summaryrefslogtreecommitdiffstats
path: root/src/main/webapp/javascripts_min/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/javascripts_min/main.js')
-rw-r--r--src/main/webapp/javascripts_min/main.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/webapp/javascripts_min/main.js b/src/main/webapp/javascripts_min/main.js
index ac234d2..2c49854 100644
--- a/src/main/webapp/javascripts_min/main.js
+++ b/src/main/webapp/javascripts_min/main.js
@@ -201,4 +201,4 @@
* http://github.com/jakefeasel/DDLBuilder
*/
-function ControlVersion(){var e,t,n;try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),e="WIN 6,0,21,0",t.AllowScriptAccess="always",e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),e="WIN 3,0,18,0"}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),e="WIN 2,0,0,11"}catch(n){e=-1}return e}function GetSwfVer(){var e=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var t=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"",n=navigator.plugins["Shockwave Flash"+t].description,r=n.split(" "),i=r[2].split("."),s=i[0],o=i[1];r[3]!=""?tempArrayMinor=r[3].split("r"):tempArrayMinor=r[4].split("r");var u=tempArrayMinor[1]>0?tempArrayMinor[1]:0,e=s+"."+o+"."+u}}else navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1?e=4:navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1?e=3:navigator.userAgent.toLowerCase().indexOf("webtv")!=-1?e=2:isIE&&isWin&&!isOpera&&(e=ControlVersion());return e}function DetectFlashVer(e,t,n){versionStr=GetSwfVer();if(versionStr==-1)return!1;if(versionStr!=0){isIE&&isWin&&!isOpera?(tempArray=versionStr.split(" "),tempString=tempArray[1],versionArray=tempString.split(",")):versionArray=versionStr.split(".");var r=versionArray[0],i=versionArray[1],s=versionArray[2];if(r>parseFloat(e))return!0;if(r==parseFloat(e)){if(i>parseFloat(t))return!0;if(i==parseFloat(t)&&s>=parseFloat(n))return!0}return!1}}function AC_AddExtension(e,t){return e.indexOf("?")!=-1?e.replace(/\?/,t+"?"):e+t}function AC_Generateobj(e,t,n){var r="";if(isIE&&isWin&&!isOpera){r+="<object ";for(var i in e)r+=i+'="'+e[i]+'" ';for(var i in t)r+='><param name="'+i+'" value="'+t[i]+'" /> ';r+="></object>"}else{r+="<embed ";for(var i in n)r+=i+'="'+n[i]+'" ';r+="> </embed>"}return r}function AC_FL_RunContent(){var e=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_Generateobj(e.objAttrs,e.params,e.embedAttrs)}function AC_GetArgs(e,t,n,r,i){var s=new Object;s.embedAttrs=new Object,s.params=new Object,s.objAttrs=new Object;for(var o=0;o<e.length;o+=2){var u=e[o].toLowerCase();switch(u){case"classid":break;case"pluginspage":s.embedAttrs[e[o]]=e[o+1];break;case"src":case"movie":e[o+1]=AC_AddExtension(e[o+1],t),s.embedAttrs.src=e[o+1],s.params[n]=e[o+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":s.objAttrs[e[o]]=e[o+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":s.embedAttrs[e[o]]=s.objAttrs[e[o]]=e[o+1];break;default:s.embedAttrs[e[o]]=s.params[e[o]]=e[o+1]}}return s.objAttrs.classid=r,i&&(s.embedAttrs.type=i),s}function getSearch(e){var t="";return e.location.search.length>1&&(t=new String(e.location.search),t=t.substring(1,t.length)),t}function parseVersion(e){if(typeof e!="string")return[0,0,0,0,0];var t=e.split("."),n=t[0]=="X"?999:parseInt(t[0])||0,r=t[1]=="X"?999:parseInt(t[1])||0,i=t[2]=="X"?999:parseInt(t[2])||0,s=t[3]=="X"?999:parseInt(t[3])||0,o=t[4]=="X"?999:parseInt(t[4])||0;return new Array(n,r,i,s,o)}function compareVersions(e,t){var n=parseVersion(e),r=parseVersion(t);for(var i=0;i<5;i++){if(n[i]<r[i])return 1;if(n[i]>r[i])return-1}return 0}function findViewerFile(e,t){var n=viewerMap[e];if(n==null)return!1;var r=n.length;for(var i=0;i<r;i++)if(compareVersions(n[i],t)<0)break;i!=0&&i--;var s="http://download.oracle.com/otn_software/emviewers/"+e+"/"+n[i]+"/"+e;return s}function loadswf(e){var t=e.match(/db_version="([\d\.]*)"/),n=e.match(/orarep\/(\w*)\//),r=n==null?"":n[1],i=t==null?"":t[1];r==""&&e.match(/sql_monitor_report/)&&(r="sqlmonitor",i="11");var s=Math.floor(Math.random()*1e5).toString(16);this!=top&&(top.Vars=Vars,top.getSearch=getSearch,top.lc_id=s);var o="historyUrl=history.htm%3F&lconid="+s+"&model="+encodeURIComponent(e)+"";if(hasProductInstall&&!hasRequestedVersion){var u=isIE==1?"ActiveX":"PlugIn",a=window.location;document.title=document.title.slice(0,47)+" - Flash Player Installation";var f=document.title;return AC_FL_RunContent("src","http://download.oracle.com/otn_software/emviewers/scripts/playerProductInstall","FlashVars",o,"width","100%","height","100%","align","middle","id",r,"quality","high","bgcolor","#FFFFFF","name",r,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer")}if(!hasRequestedVersion){var c="Fail to display EM Standalone report. This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>";return c}var l=typeof viewer_swf=="string"?viewer_swf:findViewerFile(r,i);if(!!l)return AC_FL_RunContent("src",l,"width","100%","height","100%","align","middle","id",r,"quality","high","bgcolor","#FFFFFF","name",r,"flashvars",o,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer");r!=""?alert('Sorry, viewer name "'+r+'" is not yet supported...'):alert("Sorry, cannot not display report: unknown report type")}(function(e,t){function u(e){var t=o[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function c(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(l,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:s.isNumeric(r)?+r:f.test(r)?s.parseJSON(r):r}catch(o){}s.data(e,n,r)}else r=t}return r}function h(e){for(var t in e){if(t==="data"&&s.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function p(e,t,n){var r=t+"defer",i=t+"queue",o=t+"mark",u=s._data(e,r);u&&(n==="queue"||!s._data(e,i))&&(n==="mark"||!s._data(e,o))&&setTimeout(function(){!s._data(e,i)&&!s._data(e,o)&&(s.removeData(e,r,!0),u.fire())},0)}function H(){return!1}function B(){return!0}function W(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function X(e,t,n){t=t||0;if(s.isFunction(t))return s.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return s.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=s.grep(e,function(e){return e.nodeType===1});if(q.test(t))return s.filter(t,r,!n);t=s.filter(t,r)}return s.grep(e,function(e,r){return s.inArray(e,t)>=0===n})}function V(e){var t=$.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function at(e,t){return s.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e,t){if(t.nodeType!==1||!s.hasData(e))return;var n,r,i,o=s._data(e),u=s._data(t,o),a=o.events;if(a){delete u.handle,u.events={};for(n in a)for(r=0,i=a[n].length;r<i;r++)s.event.add(t,n,a[n][r])}u.data&&(u.data=s.extend({},u.data))}function lt(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?t.outerHTML=e.outerHTML:n!=="input"||e.type!=="checkbox"&&e.type!=="radio"?n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(s.expando),t.removeAttribute("_submit_attached"),t.removeAttribute("_change_attached")}function ct(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function ht(e){if(e.type==="checkbox"||e.type==="radio")e.defaultChecked=e.checked}function pt(e){var t=(e.nodeName||"").toLowerCase();t==="input"?ht(e):t!=="script"&&typeof e.getElementsByTagName!="undefined"&&s.grep(e.getElementsByTagName("input"),ht)}function dt(e){var t=n.createElement("div");return ut.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function kt(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=t==="width"?1:0,o=4;if(r>0){if(n!=="border")for(;i<o;i+=2)n||(r-=parseFloat(s.css(e,"padding"+xt[i]))||0),n==="margin"?r+=parseFloat(s.css(e,n+xt[i]))||0:r-=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0;return r+"px"}r=Tt(e,t);if(r<0||r==null)r=e.style[t];if(bt.test(r))return r;r=parseFloat(r)||0;if(n)for(;i<o;i+=2)r+=parseFloat(s.css(e,"padding"+xt[i]))||0,n!=="padding"&&(r+=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0),n==="margin"&&(r+=parseFloat(s.css(e,n+xt[i]))||0);return r+"px"}function Qt(e){return function(t,n){typeof t!="string"&&(n=t,t="*");if(s.isFunction(n)){var r=t.toLowerCase().split(qt),i=0,o=r.length,u,a,f;for(;i<o;i++)u=r[i],f=/^\+/.test(u),f&&(u=u.substr(1)||"*"),a=e[u]=e[u]||[],a[f?"unshift":"push"](n)}}}function Gt(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u=e[s],a=0,f=u?u.length:0,l=e===Wt,c;for(;a<f&&(l||!c);a++)c=u[a](n,r,i),typeof c=="string"&&(!l||o[c]?c=t:(n.dataTypes.unshift(c),c=Gt(e,n,r,i,c,o)));return(l||!c)&&!o["*"]&&(c=Gt(e,n,r,i,"*",o)),c}function Yt(e,n){var r,i,o=s.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&s.extend(!0,e,i)}function Zt(e,t,n,r){if(s.isArray(t))s.each(t,function(t,i){n||At.test(e)?r(e,i):Zt(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&s.type(t)==="object")for(var i in t)Zt(e+"["+i+"]",t[i],n,r);else r(e,t)}function en(e,n,r){var i=e.contents,s=e.dataTypes,o=e.responseFields,u,a,f,l;for(a in o)a in r&&(n[o[a]]=r[a]);while(s[0]==="*")s.shift(),u===t&&(u=e.mimeType||n.getResponseHeader("content-type"));if(u)for(a in i)if(i[a]&&i[a].test(u)){s.unshift(a);break}if(s[0]in r)f=s[0];else{for(a in r){if(!s[0]||e.converters[a+" "+s[0]]){f=a;break}l||(l=a)}f=f||l}if(f)return f!==s[0]&&s.unshift(f),r[f]}function tn(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},o,u,a=r.length,f,l=r[0],c,h,p,d,v;for(o=1;o<a;o++){if(o===1)for(u in e.converters)typeof u=="string"&&(i[u.toLowerCase()]=e.converters[u]);c=l,l=r[o];if(l==="*")l=c;else if(c!=="*"&&c!==l){h=c+" "+l,p=i[h]||i["* "+l];if(!p){v=t;for(d in i){f=d.split(" ");if(f[0]===c||f[0]==="*"){v=i[f[1]+" "+l];if(v){d=i[d],d===!0?p=v:v===!0&&(p=d);break}}}}!p&&!v&&s.error("No conversion from "+h.replace(" "," to ")),p!==!0&&(n=p?p(n):v(d(n)))}}return n}function an(){try{return new e.XMLHttpRequest}catch(t){}}function fn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function yn(){return setTimeout(bn,0),gn=s.now()}function bn(){gn=t}function wn(e,t){var n={};return s.each(mn.concat.apply([],mn.slice(0,t)),function(){n[this]=e}),n}function En(e){if(!ln[e]){var t=n.body,r=s("<"+e+">").appendTo(t),i=r.css("display");r.remove();if(i==="none"||i===""){cn||(cn=n.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),t.appendChild(cn);if(!hn||!cn.createElement)hn=(cn.contentWindow||cn.contentDocument).document,hn.write((s.support.boxModel?"<!doctype html>":"")+"<html><body>"),hn.close();r=hn.createElement(e),hn.body.appendChild(r),i=s.css(r,"display"),t.removeChild(cn)}ln[e]=i}return ln[e]}function Nn(e){return s.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n=e.document,r=e.navigator,i=e.location,s=function(){function H(){if(i.isReady)return;try{n.documentElement.doScroll("left")}catch(e){setTimeout(H,1);return}i.ready()}var i=function(e,t){return new i.fn.init(e,t,u)},s=e.jQuery,o=e.$,u,a=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,f=/\S/,l=/^\s+/,c=/\s+$/,h=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,d=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,v=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/(webkit)[ \/]([\w.]+)/,y=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,E=/-([a-z]|[0-9])/ig,S=/^-ms-/,x=function(e,t){return(t+"").toUpperCase()},T=r.userAgent,N,C,k,L=Object.prototype.toString,A=Object.prototype.hasOwnProperty,O=Array.prototype.push,M=Array.prototype.slice,_=String.prototype.trim,D=Array.prototype.indexOf,P={};return i.fn=i.prototype={constructor:i,init:function(e,r,s){var o,u,f,l;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!r&&n.body)return this.context=n,this[0]=n.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?o=[null,e,null]:o=a.exec(e);if(o&&(o[1]||!r)){if(o[1])return r=r instanceof i?r[0]:r,l=r?r.ownerDocument||r:n,f=h.exec(e),f?i.isPlainObject(r)?(e=[n.createElement(f[1])],i.fn.attr.call(e,r,!0)):e=[l.createElement(f[1])]:(f=i.buildFragment([o[1]],[l]),e=(f.cacheable?i.clone(f.fragment):f.fragment).childNodes),i.merge(this,e);u=n.getElementById(o[2]);if(u&&u.parentNode){if(u.id!==o[2])return s.find(e);this.length=1,this[0]=u}return this.context=n,this.selector=e,this}return!r||r.jquery?(r||s).find(e):this.constructor(r).find(e)}return i.isFunction(e)?s.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),i.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return i.isArray(e)?O.apply(r,e):i.merge(r,e),r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return i.each(this,e,t)},ready:function(e){return i.bindReady(),C.add(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:O,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var e,n,r,s,o,u,a=arguments[0]||{},f=1,l=arguments.length,c=!1;typeof a=="boolean"&&(c=a,a=arguments[1]||{},f=2),typeof a!="object"&&!i.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f<l;f++)if((e=arguments[f])!=null)for(n in e){r=a[n],s=e[n];if(a===s)continue;c&&s&&(i.isPlainObject(s)||(o=i.isArray(s)))?(o?(o=!1,u=r&&i.isArray(r)?r:[]):u=r&&i.isPlainObject(r)?r:{},a[n]=i.extend(c,u,s)):s!==t&&(a[n]=s)}return a},i.extend({noConflict:function(t){return e.$===i&&(e.$=o),t&&e.jQuery===i&&(e.jQuery=s),i},isReady:!1,readyWait:1,holdReady:function(e){e?i.readyWait++:i.ready(!0)},ready:function(e){if(e===!0&&!--i.readyWait||e!==!0&&!i.isReady){if(!n.body)return setTimeout(i.ready,1);i.isReady=!0;if(e!==!0&&--i.readyWait>0)return;C.fireWith(n,[i]),i.fn.trigger&&i(n).trigger("ready").off("ready")}},bindReady:function(){if(C)return;C=i.Callbacks("once memory");if(n.readyState==="complete")return setTimeout(i.ready,1);if(n.addEventListener)n.addEventListener("DOMContentLoaded",k,!1),e.addEventListener("load",i.ready,!1);else if(n.attachEvent){n.attachEvent("onreadystatechange",k),e.attachEvent("onload",i.ready);var t=!1;try{t=e.frameElement==null}catch(r){}n.documentElement.doScroll&&t&&H()}},isFunction:function(e){return i.type(e)==="function"},isArray:Array.isArray||function(e){return i.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):P[L.call(e)]||"object"},isPlainObject:function(e){if(!e||i.type(e)!=="object"||e.nodeType||i.isWindow(e))return!1;try{if(e.constructor&&!A.call(e,"constructor")&&!A.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||A.call(e,r)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){if(typeof t!="string"||!t)return null;t=i.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(p.test(t.replace(d,"@").replace(v,"]").replace(m,"")))return(new Function("return "+t))();i.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var r,s;try{e.DOMParser?(s=new DOMParser,r=s.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&f.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(S,"ms-").replace(E,x)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var s,o=0,u=e.length,a=u===t||i.isFunction(e);if(r){if(a){for(s in e)if(n.apply(e[s],r)===!1)break}else for(;o<u;)if(n.apply(e[o++],r)===!1)break}else if(a){for(s in e)if(n.call(e[s],s,e[s])===!1)break}else for(;o<u;)if(n.call(e[o],o,e[o++])===!1)break;return e},trim:_?function(e){return e==null?"":_.call(e)}:function(e){return e==null?"":e.toString().replace(l,"").replace(c,"")},makeArray:function(e,t){var n=t||[];if(e!=null){var r=i.type(e);e.length==null||r==="string"||r==="function"||r==="regexp"||i.isWindow(e)?O.call(n,e):i.merge(n,e)}return n},inArray:function(e,t,n){var r;if(t){if(D)return D.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=e.length,i=0;if(typeof n.length=="number")for(var s=n.length;i<s;i++)e[r++]=n[i];else while(n[i]!==t)e[r++]=n[i++];return e.length=r,e},grep:function(e,t,n){var r=[],i;n=!!n;for(var s=0,o=e.length;s<o;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,r){var s,o,u=[],a=0,f=e.length,l=e instanceof i||f!==t&&typeof f=="number"&&(f>0&&e[0]&&e[f-1]||f===0||i.isArray(e));if(l)for(;a<f;a++)s=n(e[a],a,r),s!=null&&(u[u.length]=s);else for(o in e)s=n(e[o],o,r),s!=null&&(u[u.length]=s);return u.concat.apply([],u)},guid:1,proxy:function(e,n){if(typeof n=="string"){var r=e[n];n=e,e=r}if(!i.isFunction(e))return t;var s=M.call(arguments,2),o=function(){return e.apply(n,s.concat(M.call(arguments)))};return o.guid=e.guid=e.guid||o.guid||i.guid++,o},access:function(e,n,r,s,o,u,a){var f,l=r==null,c=0,h=e.length;if(r&&typeof r=="object"){for(c in r)i.access(e,n,c,r[c],1,u,s);o=1}else if(s!==t){f=a===t&&i.isFunction(s),l&&(f?(f=n,n=function(e,t,n){return f.call(i(e),n)}):(n.call(e,s),n=null));if(n)for(;c<h;c++)n(e[c],r,f?s.call(e[c],c,n(e[c],r)):s,a);o=1}return o?e:l?n.call(e):h?n(e[0],r):u},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=g.exec(e)||y.exec(e)||b.exec(e)||e.indexOf("compatible")<0&&w.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}i.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,s){return s&&s instanceof i&&!(s instanceof e)&&(s=e(s)),i.fn.init.call(this,r,s,t)},e.fn.init.prototype=e.fn;var t=e(n);return e},browser:{}}),i.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){P["[object "+t+"]"]=t.toLowerCase()}),N=i.uaMatch(T),N.browser&&(i.browser[N.browser]=!0,i.browser.version=N.version),i.browser.webkit&&(i.browser.safari=!0),f.test(" ")&&(l=/^[\s\xA0]+/,c=/[\s\xA0]+$/),u=i(n),n.addEventListener?k=function(){n.removeEventListener("DOMContentLoaded",k,!1),i.ready()}:n.attachEvent&&(k=function(){n.readyState==="complete"&&(n.detachEvent("onreadystatechange",k),i.ready())}),i}(),o={};s.Callbacks=function(e){e=e?o[e]||u(e):{};var n=[],r=[],i,a,f,l,c,h,p=function(t){var r,i,o,u,a;for(r=0,i=t.length;r<i;r++)o=t[r],u=s.type(o),u==="array"?p(o):u==="function"&&(!e.unique||!v.has(o))&&n.push(o)},d=function(t,s){s=s||[],i=!e.memory||[t,s],a=!0,f=!0,h=l||0,l=0,c=n.length;for(;n&&h<c;h++)if(n[h].apply(t,s)===!1&&e.stopOnFalse){i=!0;break}f=!1,n&&(e.once?i===!0?v.disable():n=[]:r&&r.length&&(i=r.shift(),v.fireWith(i[0],i[1])))},v={add:function(){if(n){var e=n.length;p(arguments),f?c=n.length:i&&i!==!0&&(l=e,d(i[0],i[1]))}return this},remove:function(){if(n){var t=arguments,r=0,i=t.length;for(;r<i;r++)for(var s=0;s<n.length;s++)if(t[r]===n[s]){f&&s<=c&&(c--,s<=h&&h--),n.splice(s--,1);if(e.unique)break}}return this},has:function(e){if(n){var t=0,r=n.length;for(;t<r;t++)if(e===n[t])return!0}return!1},empty:function(){return n=[],this},disable:function(){return n=r=i=t,this},disabled:function(){return!n},lock:function(){return r=t,(!i||i===!0)&&v.disable(),this},locked:function(){return!r},fireWith:function(t,n){return r&&(f?e.once||r.push([t,n]):(!e.once||!i)&&d(t,n)),this},fire:function(){return v.fireWith(this,arguments),this},fired:function(){return!!a}};return v};var a=[].slice;s.extend({Deferred:function(e){var t=s.Callbacks("once memory"),n=s.Callbacks("once memory"),r=s.Callbacks("memory"),i="pending",o={resolve:t,reject:n,notify:r},u={done:t.add,fail:n.add,progress:r.add,state:function(){return i},isResolved:t.fired,isRejected:n.fired,then:function(e,t,n){return a.done(e).fail(t).progress(n),this},always:function(){return a.done.apply(a,arguments).fail.apply(a,arguments),this},pipe:function(e,t,n){return s.Deferred(function(r){s.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n=t[0],i=t[1],o;s.isFunction(n)?a[e](function(){o=n.apply(this,arguments),o&&s.isFunction(o.promise)?o.promise().then(r.resolve,r.reject,r.notify):r[i+"With"](this===a?r:this,[o])}):a[e](r[i])})}).promise()},promise:function(e){if(e==null)e=u;else for(var t in u)e[t]=u[t];return e}},a=u.promise({}),f;for(f in o)a[f]=o[f].fire,a[f+"With"]=o[f].fireWith;return a.done(function(){i="resolved"},n.disable,r.lock).fail(function(){i="rejected"},t.disable,r.lock),e&&e.call(a,a),a},when:function(e){function c(e){return function(n){t[e]=arguments.length>1?a.call(arguments,0):n,--o||f.resolveWith(f,t)}}function h(e){return function(t){i[e]=arguments.length>1?a.call(arguments,0):t,f.notifyWith(l,i)}}var t=a.call(arguments,0),n=0,r=t.length,i=new Array(r),o=r,u=r,f=r<=1&&e&&s.isFunction(e.promise)?e:s.Deferred(),l=f.promise();if(r>1){for(;n<r;n++)t[n]&&t[n].promise&&s.isFunction(t[n].promise)?t[n].promise().then(c(n),f.reject,h(n)):--o;o||f.resolveWith(f,t)}else f!==e&&f.resolveWith(f,r?[e]:[]);return l}}),s.support=function(){var t,r,i,o,u,a,f,l,c,h,p,d,v=n.createElement("div"),m=n.documentElement;v.setAttribute("className","t"),v.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",r=v.getElementsByTagName("*"),i=v.getElementsByTagName("a")[0];if(!r||!r.length||!i)return{};o=n.createElement("select"),u=o.appendChild(n.createElement("option")),a=v.getElementsByTagName("input")[0],t={leadingWhitespace:v.firstChild.nodeType===3,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:a.value==="on",optSelected:u.selected,getSetAttribute:v.className!=="t",enctype:!!n.createElement("form").enctype,html5Clone:n.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},s.boxModel=t.boxModel=n.compatMode==="CSS1Compat",a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!u.disabled;try{delete v.test}catch(g){t.deleteExpando=!1}!v.addEventListener&&v.attachEvent&&v.fireEvent&&(v.attachEvent("onclick",function(){t.noCloneEvent=!1}),v.cloneNode(!0).fireEvent("onclick")),a=n.createElement("input"),a.value="t",a.setAttribute("type","radio"),t.radioValue=a.value==="t",a.setAttribute("checked","checked"),a.setAttribute("name","t"),v.appendChild(a),f=n.createDocumentFragment(),f.appendChild(v.lastChild),t.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,f.removeChild(a),f.appendChild(v);if(v.attachEvent)for(p in{submit:1,change:1,focusin:1})h="on"+p,d=h in v,d||(v.setAttribute(h,"return;"),d=typeof v[h]=="function"),t[p+"Bubbles"]=d;return f.removeChild(v),f=o=u=v=a=null,s(function(){var r,i,o,u,a,f,c,h,p,m,g,y,b,w=n.getElementsByTagName("body")[0];if(!w)return;h=1,b="padding:0;margin:0;border:",g="position:absolute;top:0;left:0;width:1px;height:1px;",y=b+"0;visibility:hidden;",p="style='"+g+b+"5px solid #000;",m="<div "+p+"display:block;'><div style='"+b+"0;display:block;overflow:hidden;'></div></div>"+"<table "+p+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",r=n.createElement("div"),r.style.cssText=y+"width:0;height:0;position:static;top:0;margin-top:"+h+"px",w.insertBefore(r,w.firstChild),v=n.createElement("div"),r.appendChild(v),v.innerHTML="<table><tr><td style='"+b+"0;display:none'></td><td>t</td></tr></table>",l=v.getElementsByTagName("td"),d=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",t.reliableHiddenOffsets=d&&l[0].offsetHeight===0,e.getComputedStyle&&(v.innerHTML="",c=n.createElement("div"),c.style.width="0",c.style.marginRight="0",v.style.width="2px",v.appendChild(c),t.reliableMarginRight=(parseInt((e.getComputedStyle(c,null)||{marginRight:0}).marginRight,10)||0)===0),typeof v.style.zoom!="undefined"&&(v.innerHTML="",v.style.width=v.style.padding="1px",v.style.border=0,v.style.overflow="hidden",v.style.display="inline",v.style.zoom=1,t.inlineBlockNeedsLayout=v.offsetWidth===3,v.style.display="block",v.style.overflow="visible",v.innerHTML="<div style='width:5px;'></div>",t.shrinkWrapBlocks=v.offsetWidth!==3),v.style.cssText=g+y,v.innerHTML=m,i=v.firstChild,o=i.firstChild,a=i.nextSibling.firstChild.firstChild,f={doesNotAddBorder:o.offsetTop!==5,doesAddBorderForTableAndCells:a.offsetTop===5},o.style.position="fixed",o.style.top="20px",f.fixedPosition=o.offsetTop===20||o.offsetTop===15,o.style.position=o.style.top="",i.style.overflow="hidden",i.style.position="relative",f.subtractsBorderForOverflowNotVisible=o.offsetTop===-5,f.doesNotIncludeMarginInBodyOffset=w.offsetTop!==h,e.getComputedStyle&&(v.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(v,null)||{marginTop:0}).marginTop!=="1%"),typeof r.style.zoom!="undefined"&&(r.style.zoom=1),w.removeChild(r),c=v=r=null,s.extend(t,f)}),t}();var f=/^(?:\{.*\}|\[.*\])$/,l=/([A-Z])/g;s.extend({cache:{},uuid:0,expando:"jQuery"+(s.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?s.cache[e[s.expando]]:e[s.expando],!!e&&!h(e)},data:function(e,n,r,i){if(!s.acceptData(e))return;var o,u,a,f=s.expando,l=typeof n=="string",c=e.nodeType,h=c?s.cache:e,p=c?e[f]:e[f]&&f,d=n==="events";if((!p||!h[p]||!d&&!i&&!h[p].data)&&l&&r===t)return;p||(c?e[f]=p=++s.uuid:p=f),h[p]||(h[p]={},c||(h[p].toJSON=s.noop));if(typeof n=="object"||typeof n=="function")i?h[p]=s.extend(h[p],n):h[p].data=s.extend(h[p].data,n);return o=u=h[p],i||(u.data||(u.data={}),u=u.data),r!==t&&(u[s.camelCase(n)]=r),d&&!u[n]?o.events:(l?(a=u[n],a==null&&(a=u[s.camelCase(n)])):a=u,a)},removeData:function(e,t,n){if(!s.acceptData(e))return;var r,i,o,u=s.expando,a=e.nodeType,f=a?s.cache:e,l=a?e[u]:u;if(!f[l])return;if(t){r=n?f[l]:f[l].data;if(r){s.isArray(t)||(t in r?t=[t]:(t=s.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,o=t.length;i<o;i++)delete r[t[i]];if(!(n?h:s.isEmptyObject)(r))return}}if(!n){delete f[l].data;if(!h(f[l]))return}s.support.deleteExpando||!f.setInterval?delete f[l]:f[l]=null,a&&(s.support.deleteExpando?delete e[u]:e.removeAttribute?e.removeAttribute(u):e[u]=null)},_data:function(e,t,n){return s.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=s.noData[e.nodeName.toLowerCase()];if(t)return t!==!0&&e.getAttribute("classid")===t}return!0}}),s.fn.extend({data:function(e,n){var r,i,o,u,a,f=this[0],l=0,h=null;if(e===t){if(this.length){h=s.data(f);if(f.nodeType===1&&!s._data(f,"parsedAttrs")){o=f.attributes;for(a=o.length;l<a;l++)u=o[l].name,u.indexOf("data-")===0&&(u=s.camelCase(u.substring(5)),c(f,u,h[u]));s._data(f,"parsedAttrs",!0)}}return h}return typeof e=="object"?this.each(function(){s.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",s.access(this,function(n){if(n===t)return h=this.triggerHandler("getData"+i,[r[0]]),h===t&&f&&(h=s.data(f,e),h=c(f,e,h)),h===t&&r[1]?this.data(r[0]):h;r[1]=n,this.each(function(){var t=s(this);t.triggerHandler("setData"+i,r),s.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){s.removeData(this,e)})}}),s.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",s._data(e,t,(s._data(e,t)||0)+1))},_unmark:function(e,t,n){e!==!0&&(n=t,t=e,e=!1);if(t){n=n||"fx";var r=n+"mark",i=e?0:(s._data(t,r)||1)-1;i?s._data(t,r,i):(s.removeData(t,r,!0),p(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=s._data(e,t),n&&(!r||s.isArray(n)?r=s._data(e,t,s.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=s.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),s._data(e,t+".run",i),r.call(e,function(){s.dequeue(e,t)},i)),n.length||(s.removeData(e,t+"queue "+t+".run",!0),p(e,t,"queue"))}}),s.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?s.queue(this[0],e):n===t?this:this.each(function(){var t=s.queue(this,e,n);e==="fx"&&t[0]!=="inprogress"&&s.dequeue(this,e)})},dequeue:function(e){return this.each(function(){s.dequeue(this,e)})},delay:function(e,t){return e=s.fx?s.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function h(){--u||r.resolveWith(i,[i])}typeof e!="string"&&(n=e,e=t),e=e||"fx";var r=s.Deferred(),i=this,o=i.length,u=1,a=e+"defer",f=e+"queue",l=e+"mark",c;while(o--)if(c=s.data(i[o],a,t,!0)||(s.data(i[o],f,t,!0)||s.data(i[o],l,t,!0))&&s.data(i[o],a,s.Callbacks("once memory"),!0))u++,c.add(h);return h(),r.promise(n)}});var d=/[\n\t\r]/g,v=/\s+/,m=/\r/g,g=/^(?:button|input)$/i,y=/^(?:button|input|object|select|textarea)$/i,b=/^a(?:rea)?$/i,w=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,E=s.support.getSetAttribute,S,x,T;s.fn.extend({attr:function(e,t){return s.access(this,s.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){s.removeAttr(this,e)})},prop:function(e,t){return s.access(this,s.prop,e,t,arguments.length>1)},removeProp:function(e){return e=s.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,u,a;if(s.isFunction(e))return this.each(function(t){s(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(v);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{o=" "+i.className+" ";for(u=0,a=t.length;u<a;u++)~o.indexOf(" "+t[u]+" ")||(o+=t[u]+" ");i.className=s.trim(o)}}}return this},removeClass:function(e){var n,r,i,o,u,a,f;if(s.isFunction(e))return this.each(function(t){s(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(v);for(r=0,i=this.length;r<i;r++){o=this[r];if(o.nodeType===1&&o.className)if(e){u=(" "+o.className+" ").replace(d," ");for(a=0,f=n.length;a<f;a++)u=u.replace(" "+n[a]+" "," ");o.className=s.trim(u)}else o.className=""}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return s.isFunction(e)?this.each(function(n){s(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,o=0,u=s(this),a=t,f=e.split(v);while(i=f[o++])a=r?a:!u.hasClass(i),u[a?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&s._data(this,"__className__",this.className),this.className=this.className||e===!1?"":s._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(d," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];if(!arguments.length){if(o)return n=s.valHooks[o.type]||s.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,typeof r=="string"?r.replace(m,""):r==null?"":r);return}return i=s.isFunction(e),this.each(function(r){var o=s(this),u;if(this.nodeType!==1)return;i?u=e.call(this,r,o.val()):u=e,u==null?u="":typeof u=="number"?u+="":s.isArray(u)&&(u=s.map(u,function(e){return e==null?"":e+""})),n=s.valHooks[this.type]||s.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,u,"value")===t)this.value=u})}}),s.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,u=[],a=e.options,f=e.type==="select-one";if(o<0)return null;n=f?o:0,r=f?o+1:a.length;for(;n<r;n++){i=a[n];if(i.selected&&(s.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!s.nodeName(i.parentNode,"optgroup"))){t=s(i).val();if(f)return t;u.push(t)}}return f&&!u.length&&a.length?s(a[o]).val():u},set:function(e,t){var n=s.makeArray(t);return s(e).find("option").each(function(){this.selected=s.inArray(s(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var o,u,a,f=e.nodeType;if(!e||f===3||f===8||f===2)return;if(i&&n in s.attrFn)return s(e)[n](r);if(typeof e.getAttribute=="undefined")return s.prop(e,n,r);a=f!==1||!s.isXMLDoc(e),a&&(n=n.toLowerCase(),u=s.attrHooks[n]||(w.test(n)?x:S));if(r!==t){if(r===null){s.removeAttr(e,n);return}return u&&"set"in u&&a&&(o=u.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r)}return u&&"get"in u&&a&&(o=u.get(e,n))!==null?o:(o=e.getAttribute(n),o===null?t:o)},removeAttr:function(e,t){var n,r,i,o,u,a=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(v),o=r.length;for(;a<o;a++)i=r[a],i&&(n=s.propFix[i]||i,u=w.test(i),u||s.attr(e,i,""),e.removeAttribute(E?i:n),u&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(g.test(e.nodeName)&&e.parentNode)s.error("type property can't be changed");else if(!s.support.radioValue&&t==="radio"&&s.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return S&&s.nodeName(e,"button")?S.get(e,t):t in e?e.value:null},set:function(e,t,n){if(S&&s.nodeName(e,"button"))return S.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;return u=a!==1||!s.isXMLDoc(e),u&&(n=s.propFix[n]||n,o=s.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&(i=o.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):y.test(e.nodeName)||b.test(e.nodeName)&&e.href?0:t}}}}),s.attrHooks.tabindex=s.propHooks.tabIndex,x={get:function(e,n){var r,i=s.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?s.removeAttr(e,n):(r=s.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},E||(T={name:!0,id:!0,coords:!0},S=s.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(T[n]?r.nodeValue!=="":r.specified)?r.nodeValue:t},set:function(e,t,r){var i=e.getAttributeNode(r);return i||(i=n.createAttribute(r),e.setAttributeNode(i)),i.nodeValue=t+""}},s.attrHooks.tabindex.set=S.set,s.each(["width","height"],function(e,t){s.attrHooks[t]=s.extend(s.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),s.attrHooks.contenteditable={get:S.get,set:function(e,t,n){t===""&&(t="false"),S.set(e,t,n)}}),s.support.hrefNormalized||s.each(["href","src","width","height"],function(e,n){s.attrHooks[n]=s.extend(s.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),s.support.style||(s.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),s.support.optSelected||(s.propHooks.selected=s.extend(s.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),s.support.enctype||(s.propFix.enctype="encoding"),s.support.checkOn||s.each(["radio","checkbox"],function(){s.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),s.each(["radio","checkbox"],function(){s.valHooks[this]=s.extend(s.valHooks[this],{set:function(e,t){if(s.isArray(t))return e.checked=s.inArray(s(e).val(),t)>=0}})});var N=/^(?:textarea|input|select)$/i,C=/^([^\.]*)?(?:\.(.+))?$/,k=/(?:^|\s)hover(\.\S+)?\b/,L=/^key/,A=/^(?:mouse|contextmenu)|click/,O=/^(?:focusinfocus|focusoutblur)$/,M=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,_=function(e){var t=M.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},D=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n["class"]||{}).value))},P=function(e){return s.event.special.hover?e:e.replace(k,"mouseenter$1 mouseleave$1")};s.event={add:function(e,n,r,i,o){var u,a,f,l,c,h,p,d,v,m,g,y;if(e.nodeType===3||e.nodeType===8||!n||!r||!(u=s._data(e)))return;r.handler&&(v=r,r=v.handler,o=v.selector),r.guid||(r.guid=s.guid++),f=u.events,f||(u.events=f={}),a=u.handle,a||(u.handle=a=function(e){return typeof s=="undefined"||!!e&&s.event.triggered===e.type?t:s.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=s.trim(P(n)).split(" ");for(l=0;l<n.length;l++){c=C.exec(n[l])||[],h=c[1],p=(c[2]||"").split(".").sort(),y=s.event.special[h]||{},h=(o?y.delegateType:y.bindType)||h,y=s.event.special[h]||{},d=s.extend({type:h,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,quick:o&&_(o),namespace:p.join(".")},v),g=f[h];if(!g){g=f[h]=[],g.delegateCount=0;if(!y.setup||y.setup.call(e,i,p,a)===!1)e.addEventListener?e.addEventListener(h,a,!1):e.attachEvent&&e.attachEvent("on"+h,a)}y.add&&(y.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),s.event.global[h]=!0}e=null},global:{},remove:function(e,t,n,r,i){var o=s.hasData(e)&&s._data(e),u,a,f,l,c,h,p,d,v,m,g,y;if(!o||!(d=o.events))return;t=s.trim(P(t||"")).split(" ");for(u=0;u<t.length;u++){a=C.exec(t[u])||[],f=l=a[1],c=a[2];if(!f){for(f in d)s.event.remove(e,f+t[u],n,r,!0);continue}v=s.event.special[f]||{},f=(r?v.delegateType:v.bindType)||f,g=d[f]||[],h=g.length,c=c?new RegExp("(^|\\.)"+c.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(p=0;p<g.length;p++)y=g[p],(i||l===y.origType)&&(!n||n.guid===y.guid)&&(!c||c.test(y.namespace))&&(!r||r===y.selector||r==="**"&&y.selector)&&(g.splice(p--,1),y.selector&&g.delegateCount--,v.remove&&v.remove.call(e,y));g.length===0&&h!==g.length&&((!v.teardown||v.teardown.call(e,c)===!1)&&s.removeEvent(e,f,o.handle),delete d[f])}s.isEmptyObject(d)&&(m=o.handle,m&&(m.elem=null),s.removeData(e,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||i.nodeType!==3&&i.nodeType!==8){var u=n.type||n,a=[],f,l,c,h,p,d,v,m,g,y;if(O.test(u+s.event.triggered))return;u.indexOf("!")>=0&&(u=u.slice(0,-1),l=!0),u.indexOf(".")>=0&&(a=u.split("."),u=a.shift(),a.sort());if((!i||s.event.customEvent[u])&&!s.event.global[u])return;n=typeof n=="object"?n[s.expando]?n:new s.Event(u,n):new s.Event(u),n.type=u,n.isTrigger=!0,n.exclusive=l,n.namespace=a.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+a.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,d=u.indexOf(":")<0?"on"+u:"";if(!i){f=s.cache;for(c in f)f[c].events&&f[c].events[u]&&s.event.trigger(n,r,f[c].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?s.makeArray(r):[],r.unshift(n),v=s.event.special[u]||{};if(v.trigger&&v.trigger.apply(i,r)===!1)return;g=[[i,v.bindType||u]];if(!o&&!v.noBubble&&!s.isWindow(i)){y=v.delegateType||u,h=O.test(y+u)?i:i.parentNode,p=null;for(;h;h=h.parentNode)g.push([h,y]),p=h;p&&p===i.ownerDocument&&g.push([p.defaultView||p.parentWindow||e,y])}for(c=0;c<g.length&&!n.isPropagationStopped();c++)h=g[c][0],n.type=g[c][1],m=(s._data(h,"events")||{})[n.type]&&s._data(h,"handle"),m&&m.apply(h,r),m=d&&h[d],m&&s.acceptData(h)&&m.apply(h,r)===!1&&n.preventDefault();return n.type=u,!o&&!n.isDefaultPrevented()&&(!v._default||v._default.apply(i.ownerDocument,r)===!1)&&(u!=="click"||!s.nodeName(i,"a"))&&s.acceptData(i)&&d&&i[u]&&(u!=="focus"&&u!=="blur"||n.target.offsetWidth!==0)&&!s.isWindow(i)&&(p=i[d],p&&(i[d]=null),s.event.triggered=u,i[u](),s.event.triggered=t,p&&(i[d]=p)),n.result}return},dispatch:function(n){n=s.event.fix(n||e.event);var r=(s._data(this,"events")||{})[n.type]||[],i=r.delegateCount,o=[].slice.call(arguments,0),u=!n.exclusive&&!n.namespace,a=s.event.special[n.type]||{},f=[],l,c,h,p,d,v,m,g,y,b,w;o[0]=n,n.delegateTarget=this;if(a.preDispatch&&a.preDispatch.call(this,n)===!1)return;if(i&&(!n.button||n.type!=="click")){p=s(this),p.context=this.ownerDocument||this;for(h=n.target;h!=this;h=h.parentNode||this)if(h.disabled!==!0){v={},g=[],p[0]=h;for(l=0;l<i;l++)y=r[l],b=y.selector,v[b]===t&&(v[b]=y.quick?D(h,y.quick):p.is(b)),v[b]&&g.push(y);g.length&&f.push({elem:h,matches:g})}}r.length>i&&f.push({elem:this,matches:r.slice(i)});for(l=0;l<f.length&&!n.isPropagationStopped();l++){m=f[l],n.currentTarget=m.elem;for(c=0;c<m.matches.length&&!n.isImmediatePropagationStopped();c++){y=m.matches[c];if(u||!n.namespace&&!y.namespace||n.namespace_re&&n.namespace_re.test(y.namespace))n.data=y.data,n.handleObj=y,d=((s.event.special[y.origType]||{}).handle||y.handler).apply(m.elem,o),d!==t&&(n.result=d,d===!1&&(n.preventDefault(),n.stopPropagation()))}}return a.postDispatch&&a.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,r){var i,s,o,u=r.button,a=r.fromElement;return e.pageX==null&&r.clientX!=null&&(i=e.target.ownerDocument||n,s=i.documentElement,o=i.body,e.pageX=r.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=r.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?r.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[s.expando])return e;var r,i,o=e,u=s.event.fixHooks[e.type]||{},a=u.props?this.props.concat(u.props):this.props;e=s.Event(o);for(r=a.length;r;)i=a[--r],e[i]=o[i];return e.target||(e.target=o.srcElement||n),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),u.filter?u.filter(e,o):e},special:{ready:{setup:s.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){s.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=s.extend(new s.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?s.event.trigger(i,null,t):s.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},s.event.handle=s.event.dispatch,s.removeEvent=n.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},s.Event=function(e,t){if(!(this instanceof s.Event))return new s.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?B:H):this.type=e,t&&s.extend(this,t),this.timeStamp=e&&e.timeStamp||s.now(),this[s.expando]=!0},s.Event.prototype={preventDefault:function(){this.isDefaultPrevented=B;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=B;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=B,this.stopPropagation()},isDefaultPrevented:H,isPropagationStopped:H,isImmediatePropagationStopped:H},s.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){s.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n=this,r=e.relatedTarget,i=e.handleObj,o=i.selector,u;if(!r||r!==n&&!s.contains(n,r))e.type=i.origType,u=i.handler.apply(this,arguments),e.type=t;return u}}}),s.support.submitBubbles||(s.event.special.submit={setup:function(){if(s.nodeName(this,"form"))return!1;s.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=s.nodeName(n,"input")||s.nodeName(n,"button")?n.form:t;r&&!r._submit_attached&&(s.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),r._submit_attached=!0)})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&s.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(s.nodeName(this,"form"))return!1;s.event.remove(this,"._submit")}}),s.support.changeBubbles||(s.event.special.change={setup:function(){if(N.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")s.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),s.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,s.event.simulate("change",this,e,!0))});return!1}s.event.add(this,"beforeactivate._change",function(e){var t=e.target;N.test(t.nodeName)&&!t._change_attached&&(s.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&s.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return s.event.remove(this,"._change"),N.test(this.nodeName)}}),s.support.focusinBubbles||s.each({focus:"focusin",blur:"focusout"},function(e,t){var r=0,i=function(e){s.event.simulate(t,e.target,s.event.fix(e),!0)};s.event.special[t]={setup:function(){r++===0&&n.addEventListener(e,i,!0)},teardown:function(){--r===0&&n.removeEventListener(e,i,!0)}}}),s.fn.extend({on:function(e,n,r,i,o){var u,a;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=H;else if(!i)return this;return o===1&&(u=i,i=function(e){return s().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=s.guid++)),this.each(function(){s.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){if(e&&e.preventDefault&&e.handleObj){var i=e.handleObj;return s(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if(typeof e=="object"){for(var o in e)this.off(o,n,e[o]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=H),this.each(function(){s.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return s(this.context).on(e,this.selector,t,n),this},die:function(e,t){return s(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length==1?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){s.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return s.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||s.guid++,r=0,i=function(n){var i=(s._data(this,"lastToggle"+e.guid)||0)%r;return s._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),s.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){s.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},s.attrFn&&(s.attrFn[t]=!0),L.test(t)&&(s.event.fixHooks[t]=s.event.keyHooks),A.test(t)&&(s.event.fixHooks[t]=s.event.mouseHooks)}),function(){function S(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}f.nodeType===1&&!o&&(f[r]=n,f.sizset=u);if(f.nodeName.toLowerCase()===t){l=f;break}f=f[e]}i[u]=l}}}function x(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}if(f.nodeType===1){o||(f[r]=n,f.sizset=u);if(typeof t!="string"){if(f===t){l=!0;break}}else if(h.filter(t,[f]).length>0){l=f;break}}f=f[e]}i[u]=l}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache"+(Math.random()+"").replace(".",""),i=0,o=Object.prototype.toString,u=!1,a=!0,f=/\\/g,l=/\r\n/g,c=/\W/;[0,0].sort(function(){return a=!1,0});var h=function(t,r,i,s){i=i||[],r=r||n;var u=r;if(r.nodeType!==1&&r.nodeType!==9)return[];if(!t||typeof t!="string")return i;var a,f,l,c,p,m,g,b,w=!0,E=h.isXML(r),S=[],x=t;do{e.exec(""),a=e.exec(x);if(a){x=a[3],S.push(a[1]);if(a[2]){c=a[3];break}}}while(a);if(S.length>1&&v.exec(t))if(S.length===2&&d.relative[S[0]])f=T(S[0]+S[1],r,s);else{f=d.relative[S[0]]?[r]:h(S.shift(),r);while(S.length)t=S.shift(),d.relative[t]&&(t+=S.shift()),f=T(t,f,s)}else{!s&&S.length>1&&r.nodeType===9&&!E&&d.match.ID.test(S[0])&&!d.match.ID.test(S[S.length-1])&&(p=h.find(S.shift(),r,E),r=p.expr?h.filter(p.expr,p.set)[0]:p.set[0]);if(r){p=s?{expr:S.pop(),set:y(s)}:h.find(S.pop(),S.length!==1||S[0]!=="~"&&S[0]!=="+"||!r.parentNode?r:r.parentNode,E),f=p.expr?h.filter(p.expr,p.set):p.set,S.length>0?l=y(f):w=!1;while(S.length)m=S.pop(),g=m,d.relative[m]?g=S.pop():m="",g==null&&(g=r),d.relative[m](l,g,E)}else l=S=[]}l||(l=f),l||h.error(m||t);if(o.call(l)==="[object Array]")if(!w)i.push.apply(i,l);else if(r&&r.nodeType===1)for(b=0;l[b]!=null;b++)l[b]&&(l[b]===!0||l[b].nodeType===1&&h.contains(r,l[b]))&&i.push(f[b]);else for(b=0;l[b]!=null;b++)l[b]&&l[b].nodeType===1&&i.push(f[b]);else y(l,i);return c&&(h(c,u,i,s),h.uniqueSort(i)),i};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1)}return e},h.matches=function(e,t){return h(e,null,null,t)},h.matchesSelector=function(e,t){return h(t,null,null,[e]).length>0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i<s;i++){u=d.order[i];if(o=d.leftMatch[u].exec(e)){a=o[1],o.splice(1,1);if(a.substr(a.length-1)!=="\\"){o[1]=(o[1]||"").replace(f,""),r=d.find[u](o,t,n);if(r!=null){e=e.replace(d.match[u],"");break}}}}return r||(r=typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName("*"):[]),{set:r,expr:e}},h.filter=function(e,n,r,i){var s,o,u,a,f,l,c,p,v,m=e,g=[],y=n,b=n&&n[0]&&h.isXML(n[0]);while(e&&n.length){for(u in d.filter)if((s=d.leftMatch[u].exec(e))!=null&&s[2]){l=d.filter[u],c=s[1],o=!1,s.splice(1,1);if(c.substr(c.length-1)==="\\")continue;y===g&&(g=[]);if(d.preFilter[u]){s=d.preFilter[u](s,y,r,g,i,b);if(!s)o=a=!0;else if(s===!0)continue}if(s)for(p=0;(f=y[p])!=null;p++)f&&(a=l(f,s,p,y),v=i^a,r&&a!=null?v?o=!0:y[p]=!1:v&&(g.push(f),o=!0));if(a!==t){r||(y=g),e=e.replace(d.match[u],"");if(!o)return[];break}}if(e===m){if(o!=null)break;h.error(e)}m=e}return y},h.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var p=h.getText=function(e){var t,n,r=e.nodeType,i="";if(r){if(r===1||r===9||r===11){if(typeof e.textContent=="string")return e.textContent;if(typeof e.innerText=="string")return e.innerText.replace(l,"");for(e=e.firstChild;e;e=e.nextSibling)i+=p(e)}else if(r===3||r===4)return e.nodeValue}else for(t=0;n=e[t];t++)n.nodeType!==8&&(i+=p(n));return i},d=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n=typeof t=="string",r=n&&!c.test(t),i=n&&!r;r&&(t=t.toLowerCase());for(var s=0,o=e.length,u;s<o;s++)if(u=e[s]){while((u=u.previousSibling)&&u.nodeType!==1);e[s]=i||u&&u.nodeName.toLowerCase()===t?u||!1:u===t}i&&h.filter(t,e,!0)},">":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i<s;i++){n=e[i];if(n){var o=n.parentNode;e[i]=o.nodeName.toLowerCase()===t?o:!1}}}else{for(;i<s;i++)n=e[i],n&&(e[i]=r?n.parentNode:n.parentNode===t);r&&h.filter(t,e,!0)}},"":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("parentNode",t,s,e,r,n)},"~":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("previousSibling",t,s,e,r,n)}},find:{ID:function(e,t,n){if(typeof t.getElementById!="undefined"&&!n){var r=t.getElementById(e[1]);return r&&r.parentNode?[r]:[]}},NAME:function(e,t){if(typeof t.getElementsByName!="undefined"){var n=[],r=t.getElementsByName(e[1]);for(var i=0,s=r.length;i<s;i++)r[i].getAttribute("name")===e[1]&&n.push(r[i]);return n.length===0?null:n}},TAG:function(e,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,r,i,s){e=" "+e[1].replace(f,"")+" ";if(s)return e;for(var o=0,u;(u=t[o])!=null;o++)u&&(i^(u.className&&(" "+u.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||r.push(u):n&&(t[o]=!1));return!1},ID:function(e){return e[1].replace(f,"")},TAG:function(e,t){return e[1].replace(f,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){e[2]||h.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&h.error(e[0]);return e[0]=i++,e},ATTR:function(e,t,n,r,i,s){var o=e[1]=e[1].replace(f,"");return!s&&d.attrMap[o]&&(e[1]=d.attrMap[o]),e[4]=(e[4]||e[5]||"").replace(f,""),e[2]==="~="&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(t,n,r,i,s){if(t[1]==="not"){if(!((e.exec(t[3])||"").length>1||/^\w/.test(t[3]))){var o=h.filter(t[3],n,r,!0^s);return r||i.push.apply(i,o),!1}t[3]=h(t[3],null,null,n)}else if(d.match.POS.test(t[0])||d.match.CHILD.test(t[0]))return!0;return t},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!h(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return e.nodeName.toLowerCase()==="input"&&"text"===n&&(t===n||t===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"submit"===e.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&"button"===e.type||t==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return t===0},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],s=d.filters[i];if(s)return s(e,n,t,r);if(i==="contains")return(e.textContent||e.innerText||p([e])||"").indexOf(t[3])>=0;if(i==="not"){var o=t[3];for(var u=0,a=o.length;u<a;u++)if(o[u]===e)return!1;return!0}h.error(i)},CHILD:function(e,t){var n,i,s,o,u,a,f,l=t[1],c=e;switch(l){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(l==="first")return!0;c=e;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0;case"nth":n=t[2],i=t[3];if(n===1&&i===0)return!0;s=t[0],o=e.parentNode;if(o&&(o[r]!==s||!e.nodeIndex)){a=0;for(c=o.firstChild;c;c=c.nextSibling)c.nodeType===1&&(c.nodeIndex=++a);o[r]=s}return f=e.nodeIndex-i,n===0?f===0:f%n===0&&f/n>=0}},ID:function(e,t){return e.nodeType===1&&e.getAttribute("id")===t},TAG:function(e,t){return t==="*"&&e.nodeType===1||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],r=h.attr?h.attr(e,n):d.attrHandle[n]?d.attrHandle[n](e):e[n]!=null?e[n]:e.getAttribute(n),i=r+"",s=t[2],o=t[4];return r==null?s==="!=":!s&&h.attr?r!=null:s==="="?i===o:s==="*="?i.indexOf(o)>=0:s==="~="?(" "+i+" ").indexOf(o)>=0:o?s==="!="?i!==o:s==="^="?i.indexOf(o)===0:s==="$="?i.substr(i.length-o.length)===o:s==="|="?i===o||i.substr(0,o.length+1)===o+"-":!1:i&&r!==!1},POS:function(e,t,n,r){var i=t[2],s=d.setFilters[i];if(s)return s(e,n,t,r)}}},v=d.match.POS,m=function(e,t){return"\\"+(t-0+1)};for(var g in d.match)d.match[g]=new RegExp(d.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),d.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+d.match[g].source.replace(/\\(\d+)/g,m));d.match.globalPOS=v;var y=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(n.documentElement.childNodes,0)[0].nodeType}catch(b){y=function(e,t){var n=0,r=t||[];if(o.call(e)==="[object Array]")Array.prototype.push.apply(r,e);else if(typeof e.length=="number")for(var i=e.length;n<i;n++)r.push(e[n]);else for(;e[n];n++)r.push(e[n]);return r}}var w,E;n.documentElement.compareDocumentPosition?w=function(e,t){return e===t?(u=!0,0):!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition?-1:1:e.compareDocumentPosition(t)&4?-1:1}:(w=function(e,t){if(e===t)return u=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,a=t.parentNode,f=o;if(o===a)return E(e,t);if(!o)return-1;if(!a)return 1;while(f)i.unshift(f),f=f.parentNode;f=a;while(f)s.unshift(f),f=f.parentNode;n=i.length,r=s.length;for(var l=0;l<n&&l<r;l++)if(i[l]!==s[l])return E(i[l],s[l]);return l===n?E(e,s[l],-1):E(i[l],t,1)},E=function(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}),function(){var e=n.createElement("div"),r="script"+(new Date).getTime(),i=n.documentElement;e.innerHTML="<a name='"+r+"'/>",i.insertBefore(e,i.firstChild),n.getElementById(r)&&(d.find.ID=function(e,n,r){if(typeof n.getElementById!="undefined"&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||typeof i.getAttributeNode!="undefined"&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},d.filter.ID=function(e,t){var n=typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id");return e.nodeType===1&&n&&n.nodeValue===t}),i.removeChild(e),i=e=null}(),function(){var e=n.createElement("div");e.appendChild(n.createComment("")),e.getElementsByTagName("*").length>0&&(d.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if(e[1]==="*"){var r=[];for(var i=0;n[i];i++)n[i].nodeType===1&&r.push(n[i]);n=r}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),n.querySelectorAll&&function(){var e=h,t=n.createElement("div"),r="__sizzle__";t.innerHTML="<p class='TEST'></p>";if(t.querySelectorAll&&t.querySelectorAll(".TEST").length===0)return;h=function(t,i,s,o){i=i||n;if(!o&&!h.isXML(i)){var u=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(u&&(i.nodeType===1||i.nodeType===9)){if(u[1])return y(i.getElementsByTagName(t),s);if(u[2]&&d.find.CLASS&&i.getElementsByClassName)return y(i.getElementsByClassName(u[2]),s)}if(i.nodeType===9){if(t==="body"&&i.body)return y([i.body],s);if(u&&u[3]){var a=i.getElementById(u[3]);if(!a||!a.parentNode)return y([],s);if(a.id===u[3])return y([a],s)}try{return y(i.querySelectorAll(t),s)}catch(f){}}else if(i.nodeType===1&&i.nodeName.toLowerCase()!=="object"){var l=i,c=i.getAttribute("id"),p=c||r,v=i.parentNode,m=/^\s*[+~]/.test(t);c?p=p.replace(/'/g,"\\$&"):i.setAttribute("id",p),m&&v&&(i=i.parentNode);try{if(!m||v)return y(i.querySelectorAll("[id='"+p+"'] "+t),s)}catch(g){}finally{c||l.removeAttribute("id")}}}return e(t,i,s,o)};for(var i in e)h[i]=e[i];t=null}(),function(){var e=n.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var r=!t.call(n.createElement("div"),"div"),i=!1;try{t.call(n.documentElement,"[test!='']:sizzle")}catch(s){i=!0}h.matchesSelector=function(e,n){n=n.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(i||!d.match.PSEUDO.test(n)&&!/!=/.test(n)){var s=t.call(e,n);if(s||!r||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(n,null,null,[e]).length>0}}}(),function(){var e=n.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0)return;e.lastChild.className="e";if(e.getElementsByClassName("e").length===1)return;d.order.splice(1,0,"CLASS"),d.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!="undefined"&&!n)return t.getElementsByClassName(e[1])},e=null}(),n.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:n.documentElement.compareDocumentPosition?h.contains=function(e,t){return!!(e.compareDocumentPosition(t)&16)}:h.contains=function(){return!1},h.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?t.nodeName!=="HTML":!1};var T=function(e,t,n){var r,i=[],s="",o=t.nodeType?[t]:t;while(r=d.match.PSEUDO.exec(e))s+=r[0],e=e.replace(d.match.PSEUDO,"");e=d.relative[e]?e+"*":e;for(var u=0,a=o.length;u<a;u++)h(e,o[u],i,n);return h.filter(s,i)};h.attr=s.attr,h.selectors.attrMap={},s.find=h,s.expr=h.selectors,s.expr[":"]=s.expr.filters,s.unique=h.uniqueSort,s.text=h.getText,s.isXMLDoc=h.isXML,s.contains=h.contains}();var j=/Until$/,F=/^(?:parents|prevUntil|prevAll)/,I=/,/,q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,U=s.expr.match.globalPOS,z={children:!0,contents:!0,next:!0,prev:!0};s.fn.extend({find:function(e){var t=this,n,r;if(typeof e!="string")return s(e).filter(function(){for(n=0,r=t.length;n<r;n++)if(s.contains(t[n],this))return!0});var i=this.pushStack("","find",e),o,u,a;for(n=0,r=this.length;n<r;n++){o=i.length,s.find(e,this[n],i);if(n>0)for(u=o;u<i.length;u++)for(a=0;a<o;a++)if(i[a]===i[u]){i.splice(u--,1);break}}return i},has:function(e){var t=s(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(s.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(X(this,e,!1),"not",e)},filter:function(e){return this.pushStack(X(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?U.test(e)?s(e,this.context).index(this[0])>=0:s.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,o=this[0];if(s.isArray(e)){var u=1;while(o&&o.ownerDocument&&o!==t){for(r=0;r<e.length;r++)s(o).is(e[r])&&n.push({selector:e[r],elem:o,level:u});o=o.parentNode,u++}return n}var a=U.test(e)||typeof e!="string"?s(e,t||this.context):0;for(r=0,i=this.length;r<i;r++){o=this[r];while(o){if(a?a.index(o)>-1:s.find.matchesSelector(o,e)){n.push(o);break}o=o.parentNode;if(!o||!o.ownerDocument||o===t||o.nodeType===11)break}}return n=n.length>1?s.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?s.inArray(this[0],s(e)):s.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?s(e,t):s.makeArray(e&&e.nodeType?[e]:e),r=s.merge(this.get(),n);return this.pushStack(W(n[0])||W(r[0])?r:s.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),s.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return s.dir(e,"parentNode")},parentsUntil:function(e,t,n){return s.dir(e,"parentNode",n)},next:function(e){return s.nth(e,2,"nextSibling")},prev:function(e){return s.nth(e,2,"previousSibling")},nextAll:function(e){return s.dir(e,"nextSibling")},prevAll:function(e){return s.dir(e,"previousSibling")},nextUntil:function(e,t,n){return s.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return s.dir(e,"previousSibling",n)},siblings:function(e){return s.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return s.sibling(e.firstChild)},contents:function(e){return s.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:s.makeArray(e.childNodes)}},function(e,t){s.fn[e]=function(n,r){var i=s.map(this,t,n);return j.test(e)||(r=n),r&&typeof r=="string"&&(i=s.filter(r,i)),i=this.length>1&&!z[e]?s.unique(i):i,(this.length>1||I.test(r))&&F.test(e)&&(i=i.reverse()),this.pushStack(i,e,R.call(arguments).join(","))}}),s.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?s.find.matchesSelector(t[0],e)?[t[0]]:[]:s.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&o.nodeType!==9&&(r===t||o.nodeType!==1||!s(o).is(r)))o.nodeType===1&&i.push(o),o=o[n];return i},nth:function(e,t,n,r){t=t||1;var i=0;for(;e;e=e[n])if(e.nodeType===1&&++i===t)break;return e},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var $="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",J=/ jQuery\d+="(?:\d+|null)"/g,K=/^\s+/,Q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,G=/<([\w:]+)/,Y=/<tbody/i,Z=/<|&#?\w+;/,et=/<(?:script|style)/i,tt=/<(?:script|object|embed|option|style)/i,nt=new RegExp("<(?:"+$+")[\\s/>]","i"),rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/\/(java|ecma)script/i,st=/^\s*<!(?:\[CDATA\[|\-\-)/,ot={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ut=V(n);ot.optgroup=ot.option,ot.tbody=ot.tfoot=ot.colgroup=ot.caption=ot.thead,ot.th=ot.td,s.support.htmlSerialize||(ot._default=[1,"div<div>","</div>"]),s.fn.extend({text:function(e){return s.access(this,function(e){return e===t?s.text(this):this.empty().append((this[0]&&this[0].ownerDocument||n).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(s.isFunction(e))return this.each(function(t){s(this).wrapAll(e.call(this,t))});if(this[0]){var t=s(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return s.isFunction(e)?this.each(function(t){s(this).wrapInner(e.call(this,t))}):this.each(function(){var t=s(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=s.isFunction(e);return this.each(function(n){s(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){s.nodeName(this,"body")||s(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=s.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,s.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||s.filter(e,[r]).length)!t&&r.nodeType===1&&(s.cleanData(r.getElementsByTagName("*")),s.cleanData([r])),r.parentNode&&r.parentNode.removeChild(r);return this},empty:function(){for(var e=0,t;(t=this[e])!=null;e++){t.nodeType===1&&s.cleanData(t.getElementsByTagName("*"));while(t.firstChild)t.removeChild(t.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return s.clone(this,e,t)})},html:function(e){return s.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(J,""):null;if(typeof e=="string"&&!et.test(e)&&(s.support.leadingWhitespace||!K.test(e))&&!ot[(G.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Q,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(s.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return this[0]&&this[0].parentNode?s.isFunction(e)?this.each(function(t){var n=s(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=s(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;s(this).remove(),t?s(t).before(e):s(n).append(e)})):this.length?this.pushStack(s(s.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){var i,o,u,a,f=e[0],l=[];if(!s.support.checkClone&&arguments.length===3&&typeof f=="string"&&rt.test(f))return this.each(function(){s(this).domManip(e,n,r,!0)});if(s.isFunction(f))return this.each(function(i){var o=s(this);e[0]=f.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){a=f&&f.parentNode,s.support.parentNode&&a&&a.nodeType===11&&a.childNodes.length===this.length?i={fragment:a}:i=s.buildFragment(e,this,l),u=i.fragment,u.childNodes.length===1?o=u=u.firstChild:o=u.firstChild;if(o){n=n&&s.nodeName(o,"tr");for(var c=0,h=this.length,p=h-1;c<h;c++)r.call(n?at(this[c],o):this[c],i.cacheable||h>1&&c<p?s.clone(u,!0,!0):u)}l.length&&s.each(l,function(e,t){t.src?s.ajax({type:"GET",global:!1,url:t.src,async:!1,dataType:"script"}):s.globalEval((t.text||t.textContent||t.innerHTML||"").replace(st,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),s.buildFragment=function(e,t,r){var i,o,u,a,f=e[0];return t&&t[0]&&(a=t[0].ownerDocument||t[0]),a.createDocumentFragment||(a=n),e.length===1&&typeof f=="string"&&f.length<512&&a===n&&f.charAt(0)==="<"&&!tt.test(f)&&(s.support.checkClone||!rt.test(f))&&(s.support.html5Clone||!nt.test(f))&&(o=!0,u=s.fragments[f],u&&u!==1&&(i=u)),i||(i=a.createDocumentFragment(),s.clean(e,a,i,r)),o&&(s.fragments[f]=u?i:1),{fragment:i,cacheable:o}},s.fragments={},s.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){s.fn[e]=function(n){var r=[],i=s(n),o=this.length===1&&this[0].parentNode;if(o&&o.nodeType===11&&o.childNodes.length===1&&i.length===1)return i[t](this[0]),this;for(var u=0,a=i.length;u<a;u++){var f=(u>0?this.clone(!0):this).get();s(i[u])[t](f),r=r.concat(f)}return this.pushStack(r,e,i.selector)}}),s.extend({clone:function(e,t,n){var r,i,o,u=s.support.html5Clone||s.isXMLDoc(e)||!nt.test("<"+e.nodeName+">")?e.cloneNode(!0):dt(e);if((!s.support.noCloneEvent||!s.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!s.isXMLDoc(e)){lt(e,u),r=ct(e),i=ct(u);for(o=0;r[o];++o)i[o]&&lt(r[o],i[o])}if(t){ft(e,u);if(n){r=ct(e),i=ct(u);for(o=0;r[o];++o)ft(r[o],i[o])}}return r=i=null,u},clean:function(e,t,r,i){var o,u,a,f=[];t=t||n,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||n);for(var l=0,c;(c=e[l])!=null;l++){typeof c=="number"&&(c+="");if(!c)continue;if(typeof c=="string")if(!Z.test(c))c=t.createTextNode(c);else{c=c.replace(Q,"<$1></$2>");var h=(G.exec(c)||["",""])[1].toLowerCase(),p=ot[h]||ot._default,d=p[0],v=t.createElement("div"),m=ut.childNodes,g;t===n?ut.appendChild(v):V(t).appendChild(v),v.innerHTML=p[1]+c+p[2];while(d--)v=v.lastChild;if(!s.support.tbody){var y=Y.test(c),b=h==="table"&&!y?v.firstChild&&v.firstChild.childNodes:p[1]==="<table>"&&!y?v.childNodes:[];for(a=b.length-1;a>=0;--a)s.nodeName(b[a],"tbody")&&!b[a].childNodes.length&&b[a].parentNode.removeChild(b[a])}!s.support.leadingWhitespace&&K.test(c)&&v.insertBefore(t.createTextNode(K.exec(c)[0]),v.firstChild),c=v.childNodes,v&&(v.parentNode.removeChild(v),m.length>0&&(g=m[m.length-1],g&&g.parentNode&&g.parentNode.removeChild(g)))}var w;if(!s.support.appendChecked)if(c[0]&&typeof (w=c.length)=="number")for(a=0;a<w;a++)pt(c[a]);else pt(c);c.nodeType?f.push(c):f=s.merge(f,c)}if(r){o=function(e){return!e.type||it.test(e.type)};for(l=0;f[l];l++){u=f[l];if(i&&s.nodeName(u,"script")&&(!u.type||it.test(u.type)))i.push(u.parentNode?u.parentNode.removeChild(u):u);else{if(u.nodeType===1){var E=s.grep(u.getElementsByTagName("script"),o);f.splice.apply(f,[l+1,0].concat(E))}r.appendChild(u)}}}return f},cleanData:function(e){var t,n,r=s.cache,i=s.event.special,o=s.support.deleteExpando;for(var u=0,a;(a=e[u])!=null;u++){if(a.nodeName&&s.noData[a.nodeName.toLowerCase()])continue;n=a[s.expando];if(n){t=r[n];if(t&&t.events){for(var f in t.events)i[f]?s.event.remove(a,f):s.removeEvent(a,f,t.handle);t.handle&&(t.handle.elem=null)}o?delete a[s.expando]:a.removeAttribute&&a.removeAttribute(s.expando),delete r[n]}}}});var vt=/alpha\([^)]*\)/i,mt=/opacity=([^)]*)/,gt=/([A-Z]|^ms)/g,yt=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,wt=/^([\-+])=([\-+.\de]+)/,Et=/^margin/,St={position:"absolute",visibility:"hidden",display:"block"},xt=["Top","Right","Bottom","Left"],Tt,Nt,Ct;s.fn.css=function(e,n){return s.access(this,function(e,n,r){return r!==t?s.style(e,n,r):s.css(e,n)},e,n,arguments.length>1)},s.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Tt(e,"opacity");return n===""?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":s.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var o,u,a=s.camelCase(n),f=e.style,l=s.cssHooks[a];n=s.cssProps[a]||a;if(r===t)return l&&"get"in l&&(o=l.get(e,!1,i))!==t?o:f[n];u=typeof r,u==="string"&&(o=wt.exec(r))&&(r=+(o[1]+1)*+o[2]+parseFloat(s.css(e,n)),u="number");if(r==null||u==="number"&&isNaN(r))return;u==="number"&&!s.cssNumber[a]&&(r+="px");if(!l||!("set"in l)||(r=l.set(e,r))!==t)try{f[n]=r}catch(c){}},css:function(e,n,r){var i,o;n=s.camelCase(n),o=s.cssHooks[n],n=s.cssProps[n]||n,n==="cssFloat"&&(n="float");if(o&&"get"in o&&(i=o.get(e,!0,r))!==t)return i;if(Tt)return Tt(e,n)},swap:function(e,t,n){var r={},i,s;for(s in t)r[s]=e.style[s],e.style[s]=t[s];i=n.call(e);for(s in t)e.style[s]=r[s];return i}}),s.curCSS=s.css,n.defaultView&&n.defaultView.getComputedStyle&&(Nt=function(e,t){var n,r,i,o,u=e.style;return t=t.replace(gt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!s.contains(e.ownerDocument.documentElement,e)&&(n=s.style(e,t))),!s.support.pixelMargin&&i&&Et.test(t)&&bt.test(n)&&(o=u.width,u.width=n,n=i.width,u.width=o),n}),n.documentElement.currentStyle&&(Ct=function(e,t){var n,r,i,s=e.currentStyle&&e.currentStyle[t],o=e.style;return s==null&&o&&(i=o[t])&&(s=i),bt.test(s)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=t==="fontSize"?"1em":s,s=o.pixelLeft+"px",o.left=n,r&&(e.runtimeStyle.left=r)),s===""?"auto":s}),Tt=Nt||Ct,s.each(["height","width"],function(e,t){s.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?kt(e,t,r):s.swap(e,St,function(){return kt(e,t,r)})},set:function(e,t){return yt.test(t)?t+"px":t}}}),s.support.opacity||(s.cssHooks.opacity={get:function(e,t){return mt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=s.isNumeric(t)?"alpha(opacity="+t*100+")":"",o=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&s.trim(o.replace(vt,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=vt.test(o)?o.replace(vt,i):o+" "+i}}),s(function(){s.support.reliableMarginRight||(s.cssHooks.marginRight={get:function(e,t){return s.swap(e,{display:"inline-block"},function(){return t?Tt(e,"margin-right"):e.style.marginRight})}})}),s.expr&&s.expr.filters&&(s.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!s.support.reliableHiddenOffsets&&(e.style&&e.style.display||s.css(e,"display"))==="none"},s.expr.filters.visible=function(e){return!s.expr.filters.hidden(e)}),s.each({margin:"",padding:"",border:"Width"},function(e,t){s.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+xt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Lt=/%20/g,At=/\[\]$/,Ot=/\r?\n/g,Mt=/#.*$/,_t=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Dt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Pt=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,Bt=/^\/\//,jt=/\?/,Ft=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,It=/^(?:select|textarea)/i,qt=/\s+/,Rt=/([?&])_=[^&]*/,Ut=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,zt=s.fn.load,Wt={},Xt={},Vt,$t,Jt=["*/"]+["*"];try{Vt=i.href}catch(Kt){Vt=n.createElement("a"),Vt.href="",Vt=Vt.href}$t=Ut.exec(Vt.toLowerCase())||[],s.fn.extend({load:function(e,n,r){if(typeof e!="string"&&zt)return zt.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var o=e.slice(i,e.length);e=e.slice(0,i)}var u="GET";n&&(s.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=s.param(n,s.ajaxSettings.traditional),u="POST"));var a=this;return s.ajax({url:e,type:u,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(o?s("<div>").append(n.replace(Ft,"")).find(o):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return s.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?s.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||It.test(this.nodeName)||Dt.test(this.type))}).map(function(e,t){var n=s(this).val();return n==null?null:s.isArray(n)?s.map(n,function(e,n){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}}),s.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){s.fn[t]=function(e){return this.on(t,e)}}),s.each(["get","post"],function(e,n){s[n]=function(e,r,i,o){return s.isFunction(r)&&(o=o||i,i=r,r=t),s.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),s.extend({getScript:function(e,n){return s.get(e,t,n,"script")},getJSON:function(e,t,n){return s.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Yt(e,s.ajaxSettings):(t=e,e=s.ajaxSettings),Yt(e,t),e},ajaxSettings:{url:Vt,isLocal:Pt.test($t[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Jt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":s.parseJSON,"text xml":s.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Qt(Wt),ajaxTransport:Qt(Xt),ajax:function(e,n){function S(e,n,c,h){if(y===2)return;y=2,m&&clearTimeout(m),v=t,p=h||"",E.readyState=e>0?4:0;var d,g,w,S=n,x=c?en(r,E,c):t,T,N;if(e>=200&&e<300||e===304){if(r.ifModified){if(T=E.getResponseHeader("Last-Modified"))s.lastModified[l]=T;if(N=E.getResponseHeader("Etag"))s.etag[l]=N}if(e===304)S="notmodified",d=!0;else try{g=tn(r,x),S="success",d=!0}catch(C){S="parsererror",w=C}}else{w=S;if(!S||e)S="error",e<0&&(e=0)}E.status=e,E.statusText=""+(n||S),d?u.resolveWith(i,[g,S,E]):u.rejectWith(i,[E,S,w]),E.statusCode(f),f=t,b&&o.trigger("ajax"+(d?"Success":"Error"),[E,r,d?g:w]),a.fireWith(i,[E,S]),b&&(o.trigger("ajaxComplete",[E,r]),--s.active||s.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r=s.ajaxSetup({},n),i=r.context||r,o=i!==r&&(i.nodeType||i instanceof s)?s(i):s.event,u=s.Deferred(),a=s.Callbacks("once memory"),f=r.statusCode||{},l,c={},h={},p,d,v,m,g,y=0,b,w,E={readyState:0,setRequestHeader:function(e,t){if(!y){var n=e.toLowerCase();e=h[n]=h[n]||e,c[e]=t}return this},getAllResponseHeaders:function(){return y===2?p:null},getResponseHeader:function(e){var n;if(y===2){if(!d){d={};while(n=_t.exec(p))d[n[1].toLowerCase()]=n[2]}n=d[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return y||(r.mimeType=e),this},abort:function(e){return e=e||"abort",v&&v.abort(e),S(0,e),this}};u.promise(E),E.success=E.done,E.error=E.fail,E.complete=a.add,E.statusCode=function(e){if(e){var t;if(y<2)for(t in e)f[t]=[f[t],e[t]];else t=e[E.status],E.then(t,t)}return this},r.url=((e||r.url)+"").replace(Mt,"").replace(Bt,$t[1]+"//"),r.dataTypes=s.trim(r.dataType||"*").toLowerCase().split(qt),r.crossDomain==null&&(g=Ut.exec(r.url.toLowerCase()),r.crossDomain=!(!g||g[1]==$t[1]&&g[2]==$t[2]&&(g[3]||(g[1]==="http:"?80:443))==($t[3]||($t[1]==="http:"?80:443)))),r.data&&r.processData&&typeof r.data!="string"&&(r.data=s.param(r.data,r.traditional)),Gt(Wt,r,n,E);if(y===2)return!1;b=r.global,r.type=r.type.toUpperCase(),r.hasContent=!Ht.test(r.type),b&&s.active++===0&&s.event.trigger("ajaxStart");if(!r.hasContent){r.data&&(r.url+=(jt.test(r.url)?"&":"?")+r.data,delete r.data),l=r.url;if(r.cache===!1){var x=s.now(),T=r.url.replace(Rt,"$1_="+x);r.url=T+(T===r.url?(jt.test(r.url)?"&":"?")+"_="+x:"")}}(r.data&&r.hasContent&&r.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",r.contentType),r.ifModified&&(l=l||r.url,s.lastModified[l]&&E.setRequestHeader("If-Modified-Since",s.lastModified[l]),s.etag[l]&&E.setRequestHeader("If-None-Match",s.etag[l])),E.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+(r.dataTypes[0]!=="*"?", "+Jt+"; q=0.01":""):r.accepts["*"]);for(w in r.headers)E.setRequestHeader(w,r.headers[w]);if(!r.beforeSend||r.beforeSend.call(i,E,r)!==!1&&y!==2){for(w in{success:1,error:1,complete:1})E[w](r[w]);v=Gt(Xt,r,n,E);if(!v)S(-1,"No Transport");else{E.readyState=1,b&&o.trigger("ajaxSend",[E,r]),r.async&&r.timeout>0&&(m=setTimeout(function(){E.abort("timeout")},r.timeout));try{y=1,v.send(c,S)}catch(N){if(!(y<2))throw N;S(-1,N)}}return E}return E.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=s.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=s.ajaxSettings.traditional);if(s.isArray(e)||e.jquery&&!s.isPlainObject(e))s.each(e,function(){i(this.name,this.value)});else for(var o in e)Zt(o,e[o],n,i);return r.join("&").replace(Lt,"+")}}),s.extend({active:0,lastModified:{},etag:{}});var nn=s.now(),rn=/(\=)\?(&|$)|\?\?/i;s.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return s.expando+"_"+nn++}}),s.ajaxPrefilter("json jsonp",function(t,n,r){var i=typeof t.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if(t.dataTypes[0]==="jsonp"||t.jsonp!==!1&&(rn.test(t.url)||i&&rn.test(t.data))){var o,u=t.jsonpCallback=s.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a=e[u],f=t.url,l=t.data,c="$1"+u+"$2";return t.jsonp!==!1&&(f=f.replace(rn,c),t.url===f&&(i&&(l=l.replace(rn,c)),t.data===l&&(f+=(/\?/.test(f)?"&":"?")+t.jsonp+"="+u))),t.url=f,t.data=l,e[u]=function(e){o=[e]},r.always(function(){e[u]=a,o&&s.isFunction(a)&&e[u](o[0])}),t.converters["script json"]=function(){return o||s.error(u+" was not called"),o[0]},t.dataTypes[0]="json","script"}}),s.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return s.globalEval(e),e}}}),s.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),s.ajaxTransport("script",function(e){if(e.crossDomain){var r,i=n.head||n.getElementsByTagName("head")[0]||n.documentElement;return{send:function(s,o){r=n.createElement("script"),r.async="async",e.scriptCharset&&(r.charset=e.scriptCharset),r.src=e.url,r.onload=r.onreadystatechange=function(e,n){if(n||!r.readyState||/loaded|complete/.test(r.readyState))r.onload=r.onreadystatechange=null,i&&r.parentNode&&i.removeChild(r),r=t,n||o(200,"success")},i.insertBefore(r,i.firstChild)},abort:function(){r&&r.onload(0,1)}}}});var sn=e.ActiveXObject?function(){for(var e in un)un[e](0,1)}:!1,on=0,un;s.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&an()||fn()}:an,function(e){s.extend(s.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(s.ajaxSettings.xhr()),s.support.ajax&&s.ajaxTransport(function(n){if(!n.crossDomain||s.support.cors){var r;return{send:function(i,o){var u=n.xhr(),a,f;n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async);if(n.xhrFields)for(f in n.xhrFields)u[f]=n.xhrFields[f];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(f in i)u.setRequestHeader(f,i[f])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var f,l,c,h,p;try{if(r&&(i||u.readyState===4)){r=t,a&&(u.onreadystatechange=s.noop,sn&&delete un[a]);if(i)u.readyState!==4&&u.abort();else{f=u.status,c=u.getAllResponseHeaders(),h={},p=u.responseXML,p&&p.documentElement&&(h.xml=p);try{h.text=u.responseText}catch(e){}try{l=u.statusText}catch(d){l=""}!f&&n.isLocal&&!n.crossDomain?f=h.text?200:404:f===1223&&(f=204)}}}catch(v){i||o(-1,v)}h&&o(f,l,h,c)},!n.async||u.readyState===4?r():(a=++on,sn&&(un||(un={},s(e).unload(sn)),un[a]=r),u.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var ln={},cn,hn,pn=/^(?:toggle|show|hide)$/,dn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,vn,mn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],gn;s.fn.extend({show:function(e,t,n){var r,i;if(e||e===0)return this.animate(wn("show",3),e,t,n);for(var o=0,u=this.length;o<u;o++)r=this[o],r.style&&(i=r.style.display,!s._data(r,"olddisplay")&&i==="none"&&(i=r.style.display=""),(i===""&&s.css(r,"display")==="none"||!s.contains(r.ownerDocument.documentElement,r))&&s._data(r,"olddisplay",En(r.nodeName)));for(o=0;o<u;o++){r=this[o];if(r.style){i=r.style.display;if(i===""||i==="none")r.style.display=s._data(r,"olddisplay")||""}}return this},hide:function(e,t,n){if(e||e===0)return this.animate(wn("hide",3),e,t,n);var r,i,o=0,u=this.length;for(;o<u;o++)r=this[o],r.style&&(i=s.css(r,"display"),i!=="none"&&!s._data(r,"olddisplay")&&s._data(r,"olddisplay",i));for(o=0;o<u;o++)this[o].style&&(this[o].style.display="none");return this},_toggle:s.fn.toggle,toggle:function(e,t,n){var r=typeof e=="boolean";return s.isFunction(e)&&s.isFunction(t)?this._toggle.apply(this,arguments):e==null||r?this.each(function(){var t=r?e:s(this).is(":hidden");s(this)[t?"show":"hide"]()}):this.animate(wn("toggle",3),e,t,n),this},fadeTo:function(e,t,n,r){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function o(){i.queue===!1&&s._mark(this);var t=s.extend({},i),n=this.nodeType===1,r=n&&s(this).is(":hidden"),o,u,a,f,l,c,h,p,d,v,m;t.animatedProperties={};for(a in e){o=s.camelCase(a),a!==o&&(e[o]=e[a],delete e[a]);if((l=s.cssHooks[o])&&"expand"in l){c=l.expand(e[o]),delete e[o];for(a in c)a in e||(e[a]=c[a])}}for(o in e){u=e[o],s.isArray(u)?(t.animatedProperties[o]=u[1],u=e[o]=u[0]):t.animatedProperties[o]=t.specialEasing&&t.specialEasing[o]||t.easing||"swing";if(u==="hide"&&r||u==="show"&&!r)return t.complete.call(this);n&&(o==="height"||o==="width")&&(t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],s.css(this,"display")==="inline"&&s.css(this,"float")==="none"&&(!s.support.inlineBlockNeedsLayout||En(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}t.overflow!=null&&(this.style.overflow="hidden");for(a in e)f=new s.fx(this,t,a),u=e[a],pn.test(u)?(m=s._data(this,"toggle"+a)||(u==="toggle"?r?"show":"hide":0),m?(s._data(this,"toggle"+a,m==="show"?"hide":"show"),f[m]()):f[u]()):(h=dn.exec(u),p=f.cur(),h?(d=parseFloat(h[2]),v=h[3]||(s.cssNumber[a]?"":"px"),v!=="px"&&(s.style(this,a,(d||1)+v),p=(d||1)/f.cur()*p,s.style(this,a,p+v)),h[1]&&(d=(h[1]==="-="?-1:1)*d+p),f.custom(p,d,v)):f.custom(p,u,""));return!0}var i=s.speed(t,n,r);return s.isEmptyObject(e)?this.each(i.complete,[!1]):(e=s.extend({},e),i.queue===!1?this.each(o):this.queue(i.queue,o))},stop:function(e,n,r){return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){function u(e,t,n){var i=t[n];s.removeData(e,n,!0),i.stop(r)}var t,n=!1,i=s.timers,o=s._data(this);r||s._unmark(!0,this);if(e==null)for(t in o)o[t]&&o[t].stop&&t.indexOf(".run")===t.length-4&&u(this,o,t);else o[t=e+".run"]&&o[t].stop&&u(this,o,t);for(t=i.length;t--;)i[t].elem===this&&(e==null||i[t].queue===e)&&(r?i[t](!0):i[t].saveState(),n=!0,i.splice(t,1));(!r||!n)&&s.dequeue(this,e)})}}),s.each({slideDown:wn("show",1),slideUp:wn("hide",1),slideToggle:wn("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){s.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),s.extend({speed:function(e,t,n){var r=e&&typeof e=="object"?s.extend({},e):{complete:n||!n&&t||s.isFunction(e)&&e,duration:e,easing:n&&t||t&&!s.isFunction(t)&&t};r.duration=s.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in s.fx.speeds?s.fx.speeds[r.duration]:s.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(e){s.isFunction(r.old)&&r.old.call(this),r.queue?s.dequeue(this,r.queue):e!==!1&&s._unmark(this)},r},easing:{linear:function(e){return e},swing:function(e){return-Math.cos(e*Math.PI)/2+.5}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),s.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(s.fx.step[this.prop]||s.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var e,t=s.css(this.elem,this.prop);return isNaN(e=parseFloat(t))?!t||t==="auto"?0:t:e}return this.elem[this.prop]},custom:function(e,n,r){function u(e){return i.step(e)}var i=this,o=s.fx;this.startTime=gn||yn(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=r||this.unit||(s.cssNumber[this.prop]?"":"px"),u.queue=this.options.queue,u.elem=this.elem,u.saveState=function(){s._data(i.elem,"fxshow"+i.prop)===t&&(i.options.hide?s._data(i.elem,"fxshow"+i.prop,i.start):i.options.show&&s._data(i.elem,"fxshow"+i.prop,i.end))},u()&&s.timers.push(u)&&!vn&&(vn=setInterval(o.tick,o.interval))},show:function(){var e=s._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||s.style(this.elem,this.prop),this.options.show=!0,e!==t?this.custom(this.cur(),e):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),s(this.elem).show()},hide:function(){this.options.orig[this.prop]=s._data(this.elem,"fxshow"+this.prop)||s.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(e){var t,n,r,i=gn||yn(),o=!0,u=this.elem,a=this.options;if(e||i>=a.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),a.animatedProperties[this.prop]=!0;for(t in a.animatedProperties)a.animatedProperties[t]!==!0&&(o=!1);if(o){a.overflow!=null&&!s.support.shrinkWrapBlocks&&s.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&s(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)s.style(u,t,a.orig[t]),s.removeData(u,"fxshow"+t,!0),s.removeData(u,"toggle"+t,!0);r=a.complete,r&&(a.complete=!1,r.call(u))}return!1}return a.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/a.duration,this.pos=s.easing[a.animatedProperties[this.prop]](this.state,n,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},s.extend(s.fx,{tick:function(){var e,t=s.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||s.fx.stop()},interval:13,stop:function(){clearInterval(vn),vn=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){s.style(e.elem,"opacity",e.now)},_default:function(e){e.elem.style&&e.elem.style[e.prop]!=null?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}}}),s.each(mn.concat.apply([],mn),function(e,t){t.indexOf("margin")&&(s.fx.step[t]=function(e){s.style(e.elem,t,Math.max(0,e.now)+e.unit)})}),s.expr&&s.expr.filters&&(s.expr.filters.animated=function(e){return s.grep(s.timers,function(t){return e===t.elem}).length});var Sn,xn=/^t(?:able|d|h)$/i,Tn=/^(?:body|html)$/i;"getBoundingClientRect"in n.documentElement?Sn=function(e,t,n,r){try{r=e.getBoundingClientRect()}catch(i){}if(!r||!s.contains(n,e))return r?{top:r.top,left:r.left}:{top:0,left:0};var o=t.body,u=Nn(t),a=n.clientTop||o.clientTop||0,f=n.clientLeft||o.clientLeft||0,l=u.pageYOffset||s.support.boxModel&&n.scrollTop||o.scrollTop,c=u.pageXOffset||s.support.boxModel&&n.scrollLeft||o.scrollLeft,h=r.top+l-a,p=r.left+c-f;return{top:h,left:p}}:Sn=function(e,t,n){var r,i=e.offsetParent,o=e,u=t.body,a=t.defaultView,f=a?a.getComputedStyle(e,null):e.currentStyle,l=e.offsetTop,c=e.offsetLeft;while((e=e.parentNode)&&e!==u&&e!==n){if(s.support.fixedPosition&&f.position==="fixed")break;r=a?a.getComputedStyle(e,null):e.currentStyle,l-=e.scrollTop,c-=e.scrollLeft,e===i&&(l+=e.offsetTop,c+=e.offsetLeft,s.support.doesNotAddBorder&&(!s.support.doesAddBorderForTableAndCells||!xn.test(e.nodeName))&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),o=i,i=e.offsetParent),s.support.subtractsBorderForOverflowNotVisible&&r.overflow!=="visible"&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),f=r}if(f.position==="relative"||f.position==="static")l+=u.offsetTop,c+=u.offsetLeft;return s.support.fixedPosition&&f.position==="fixed"&&(l+=Math.max(n.scrollTop,u.scrollTop),c+=Math.max(n.scrollLeft,u.scrollLeft)),{top:l,left:c}},s.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){s.offset.setOffset(this,e,t)});var n=this[0],r=n&&n.ownerDocument;return r?n===r.body?s.offset.bodyOffset(n):Sn(n,r,r.documentElement):null},s.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return s.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(s.css(e,"marginTop"))||0,n+=parseFloat(s.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=s.css(e,"position");r==="static"&&(e.style.position="relative");var i=s(e),o=i.offset(),u=s.css(e,"top"),a=s.css(e,"left"),f=(r==="absolute"||r==="fixed")&&s.inArray("auto",[u,a])>-1,l={},c={},h,p;f?(c=i.position(),h=c.top,p=c.left):(h=parseFloat(u)||0,p=parseFloat(a)||0),s.isFunction(t)&&(t=t.call(e,n,o)),t.top!=null&&(l.top=t.top-o.top+h),t.left!=null&&(l.left=t.left-o.left+p),"using"in t?t.using.call(e,l):i.css(l)}},s.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Tn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(s.css(e,"marginTop"))||0,n.left-=parseFloat(s.css(e,"marginLeft"))||0,r.top+=parseFloat(s.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(s.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||n.body;while(e&&!Tn.test(e.nodeName)&&s.css(e,"position")==="static")e=e.offsetParent;return e})}}),s.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);s.fn[e]=function(i){return s.access(this,function(e,i,o){var u=Nn(e);if(o===t)return u?n in u?u[n]:s.support.boxModel&&u.document.documentElement[i]||u.document.body[i]:e[i];u?u.scrollTo(r?s(u).scrollLeft():o,r?o:s(u).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),s.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,o="offset"+e;s.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(s.css(e,n,"padding")):this[n]():null},s.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(s.css(t,n,e?"margin":"border")):this[n]():null},s.fn[n]=function(e){return s.access(this,function(e,n,u){var a,f,l,c;if(s.isWindow(e))return a=e.document,f=a.documentElement[r],s.support.boxModel&&f||a.body&&a.body[r]||f;if(e.nodeType===9)return a=e.documentElement,a[r]>=a[i]?a[r]:Math.max(e.body[i],a[i],e.body[o],a[o]);if(u===t)return l=s.css(e,n),c=parseFloat(l),s.isNumeric(c)?c:l;s(e).css(n,u)},n,e,arguments.length,null)}}),e.jQuery=e.$=s,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return s})})(window),define("jQuery",function(e){return function(){return e.$}}(this)),function(){function L(e,t,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&x.isFunction(e.isEqual))return e.isEqual(t);if(t.isEqual&&x.isFunction(t.isEqual))return t.isEqual(e);var r=f.call(e);if(r!=f.call(t))return!1;switch(r){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var i=n.length;while(i--)if(n[i]==e)return!0;n.push(e);var s=0,o=!0;if(r=="[object Array]"){s=e.length,o=s==t.length;if(o)while(s--)if(!(o=s in e==s in t&&L(e[s],t[s],n)))break}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(var u in e)if(x.has(e,u)){s++;if(!(o=x.has(t,u)&&L(e[u],t[u],n)))break}if(o){for(u in t)if(x.has(t,u)&&!(s--))break;o=!s}}return n.pop(),o}var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.unshift,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){return new F(e)};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.3.3";var T=x.each=x.forEach=function(e,t,r){if(e==null)return;if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return e==null?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=x.toArray(e).reverse();return r&&!i&&(t=x.bind(t,r)),i?x.reduce(s,t,n,r):x.reduce(s,t)},x.find=x.detect=function(e,t,n){var r;return N(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},x.filter=x.select=function(e,t,n){var r=[];return e==null?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},x.reject=function(e,t,n){var r=[];return e==null?r:(T(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},x.every=x.all=function(e,t,r){var i=!0;return e==null?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var N=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return e==null?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};x.include=x.contains=function(e,t){var n=!1;return e==null?n:y&&e.indexOf===y?e.indexOf(t)!=-1:(n=N(e,function(e){return e===t}),n)},x.invoke=function(e,t){var n=u.call(arguments,2);return x.map(e,function(e){return(x.isFunction(t)?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-Infinity;var r={computed:-Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&x.isEmpty(e))return Infinity;var r={computed:Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=Math.floor(Math.random()*++n),r[n-1]=r[t],r[t]=e}),r},x.sortBy=function(e,t,n){var r=x.isFunction(t)?t:function(e){return e[t]};return x.pluck(x.map(e,function(e,t,i){return{value:e,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;return n===void 0?1:r===void 0?-1:n<r?-1:n>r?1:0}),"value")},x.groupBy=function(e,t){var n={},r=x.isFunction(t)?t:function(e){return e[t]};return T(e,function(e,t){var i=r(e,t);(n[i]||(n[i]=[])).push(e)}),n},x.sortedIndex=function(e,t,n){n||(n=x.identity);var r=n(t),i=0,s=e.length;while(i<s){var o=i+s>>1;n(e[o])<r?i=o+1:s=o}return i},x.toArray=function(e){return e?x.isArray(e)?u.call(e):x.isArguments(e)?u.call(e):e.toArray&&x.isFunction(e.toArray)?e.toArray():x.values(e):[]},x.size=function(e){return x.isArray(e)?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},x.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},x.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},x.rest=x.tail=function(e,t,n){return u.call(e,t==null||n?1:t)},x.compact=function(e){return x.filter(e,function(e){return!!e})};var C=function(e,t,n){return T(e,function(e){x.isArray(e)?t?o.apply(n,e):C(e,t,n):n.push(e)}),n};x.flatten=function(e,t){return C(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.uniq=x.unique=function(e,t,n){var r=n?x.map(e,n):e,i=[];return x.reduce(r,function(n,r,s){if(t?x.last(n)!==r||!n.length:!x.include(n,r))n.push(r),i.push(e[s]);return n},[]),i},x.union=function(){return x.uniq(C(arguments,!0,[]))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.indexOf(t,e)>=0})})},x.difference=function(e){var t=C(u.call(arguments,1),!0,[]);return x.filter(e,function(e){return!x.include(t,e)})},x.zip=function(){var e=u.call(arguments),t=x.max(x.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=x.pluck(e,""+r);return n},x.zipObject=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)n[e[r]]=t[r];return n},x.indexOf=function(e,t,n){if(e==null)return-1;var r,i;if(n)return r=x.sortedIndex(e,t),e[r]===t?r:-1;if(y&&e.indexOf===y)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t){if(e==null)return-1;if(b&&e.lastIndexOf===b)return e.lastIndexOf(t);var n=e.length;while(n--)if(e[n]===t)return n;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var k=function(){};x.bind=function(t,n){var r,i;if(t.bind===S&&S)return S.apply(t,u.call(arguments,1));if(!x.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){k.prototype=t.prototype;var e=new k,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=x.functions(e)),T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t){var n,r,i,s,o,u,a=x.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&e.apply(n,r),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},x.debounce=function(e,t,n){var r;return function(){var i=this,s=arguments,o=function(){r=null,n||e.apply(i,s)},u=n&&!r;clearTimeout(r),r=setTimeout(o,t),u&&e.apply(i,s)}},x.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}},x.wrap=function(e,t){return function(){var n=[e].concat(u.call(arguments,0));return t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&(t[t.length]=n);return t},x.values=function(e){return x.map(e,x.identity)},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={};return T(C(u.call(arguments,1),!0,[]),function(n){n in e&&(t[n]=e[n])}),t},x.defaults=function(e){return T(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e},x.isEqual=function(e,t){return L(e,t,[])},x.isEmpty=function(e){if(e==null)return!0;if(x.isArray(e)||x.isString(e))return e.length===0;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&e.nodeType==1},x.isArray=w||function(e){return f.call(e)=="[object Array]"},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),x.isFinite=function(e){return x.isNumber(e)&&isFinite(e)},x.isNaN=function(e){return e!==e},x.isBoolean=function(e){return e===!0||e===!1||f.call(e)=="[object Boolean]"},x.isNull=function(e){return e===null},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)};var A={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},O=/[&<>"'\/]/g;x.escape=function(e){return(""+e).replace(O,function(e){return A[e]})},x.result=function(e,t){if(e==null)return null;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions(e),function(t){q(t,x[t]=e[t])})};var M=0;x.uniqueId=function(e){var t=M++;return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var _=/.^/,D={"\\":"\\","'":"'",r:"\r",n:"\n",t:" ",u2028:"\u2028",u2029:"\u2029"};for(var P in D)D[D[P]]=P;var H=/\\|'|\r|\n|\t|\u2028|\u2029/g,B=/\\(\\|'|r|n|t|u2028|u2029)/g,j=function(e){return e.replace(B,function(e,t){return D[t]})};x.template=function(e,t,n){n=x.defaults(n||{},x.templateSettings);var r="__p+='"+e.replace(H,function(e){return"\\"+D[e]}).replace(n.escape||_,function(e,t){return"'+\n((__t=("+j(t)+"))==null?'':_.escape(__t))+\n'"}).replace(n.interpolate||_,function(e,t){return"'+\n((__t=("+j(t)+"))==null?'':__t)+\n'"}).replace(n.evaluate||_,function(e,t){return"';\n"+j(t)+"\n__p+='"})+"';\n";n.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'')};\n"+r+"return __p;\n";var i=new Function(n.variable||"obj","_",r);if(t)return i(t,x);var s=function(e){return i.call(this,e,x)};return s.source="function("+(n.variable||"obj")+"){\n"+r+"}",s},x.chain=function(e){return x(e).chain()};var F=function(e){this._wrapped=e};x.prototype=F.prototype;var I=function(e,t){return t?x(e).chain():e},q=function(e,t){F.prototype[e]=function(){var e=u.call(arguments);return a.call(e,this._wrapped),I(t.apply(x,e),this._chain)}};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];F.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],I(n,this._chain)}}),T(["concat","join","slice"],function(e){var t=r[e];F.prototype[e]=function(){return I(t.apply(this._wrapped,arguments),this._chain)}}),F.prototype.chain=function(){return this._chain=!0,this},F.prototype.value=function(){return this._wrapped}}.call(this),define("Underscore",function(e){return function(){return e._}}(this)),define("dbTypes_cached",[],function(){return[{id:2,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"2/a2581/1",simple_name:"MySQL",notes:"Separate multiple statements in MySQL by terminating each one with a semicolon.",full_name:"MySQL 5.5.27"},{id:9,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"9/a2581/1",simple_name:"MySQL",notes:"",full_name:"MySQL 5.6.6 m9"},{id:8,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"8/a2581/1",simple_name:"MySQL",notes:"",full_name:"MySQL 5.1.61"},{id:4,className:"oracle.jdbc.OracleDriver",context:"host",sample_fragment:"4/ee7da/596",simple_name:"Oracle",notes:"Oracle does not support multiple statements in batch. Separate each statement with a line consisting of a single /, and do not terminate statements with semicolons.",full_name:"Oracle 11g R2"},{id:1,className:"org.postgresql.Driver",context:"host",sample_fragment:"1/6ccc5/2",simple_name:"PostgreSQL",notes:"Separate multiple statements in PostgreSQL by terminating each one with a semicolon.",full_name:"PostgreSQL 9.1.6"},{id:12,className:"org.postgresql.Driver",context:"host",sample_fragment:"12/6d80e/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 9.2.1"},{id:11,className:"org.postgresql.Driver",context:"host",sample_fragment:"11/6d80e/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 8.4.12"},{id:10,className:"org.postgresql.Driver",context:"host",sample_fragment:"10/f9585/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 8.3.20"},{id:7,className:"websql",context:"browser",sample_fragment:"7/04eca/1",simple_name:"SQLite",notes:"",full_name:"SQLite (WebSQL)"},{id:5,className:"sqljs",context:"browser",sample_fragment:"5/781d4/2",simple_name:"SQLite",notes:"",full_name:"SQLite (SQL.js)"},{id:6,className:"net.sourceforge.jtds.jdbc.Driver",context:"host",sample_fragment:"6/189a3/1",simple_name:"SQL Server",notes:"",full_name:"MS SQL Server 2012"},{id:3,className:"net.sourceforge.jtds.jdbc.Driver",context:"host",sample_fragment:"3/1fa93/1",simple_name:"SQL Server",notes:"SQL Server supports multiple statements in a batch separated by semicolons. Separate statement batches with a line consisting of a single GO command, as needed.",full_name:"MS SQL Server 2008"}]}),define("BrowserEngines/sqlite_driver",[],function(){var e=function(){return this};return e.prototype.getSchemaStructure=function(e){var t="select * from sqlite_master where type IN ('table', 'view') and name != '__WebKitDatabaseInfoTable__' order by type,name",n=function(t){var n={},r=[];for(var i in t[0].RESULTS.COLUMNS)n[t[0].RESULTS.COLUMNS[i]]=i;for(var s in t[0].RESULTS.DATA){var o=t[0].RESULTS.DATA[s][n.sql],u=t[0].RESULTS.DATA[s][n.name],a=t[0].RESULTS.DATA[s][n.type],f={table_name:u,table_type:a,columns:[]};if(a=="table"){var l=/^[\s\S]*?\(([\s\S]*)\)$/.exec(o)[1].split(/,\s*/);for(var c in l){var h=l[c].replace(/(^\s*)|(\s*$)/,"").split(/\s+/);f.columns.push({name:h.shift(),type:h.join(" ")})}}r.push(f)}e.callback(r)};this.executeQuery({sql:t,success:n})},e.prototype.splitStatement=function(e,t){t||(t=";");var n=t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),r=e?e.split(new RegExp(n+"s*\r?(\n|$)")):[];return r},e}),define("BrowserEngines/sqljs_driver",["jQuery","BrowserEngines/sqlite_driver"],function(e,t){var n=function(){return this.db=null,this};return e.extend(n.prototype,t.prototype),n.prototype.buildSchema=function(n){var r=this;try{var i=function(){r.db=SQL.open(),e.each(t.prototype.splitStatement.call(this,n.ddl,n.statement_separator),function(e,t){r.db.exec(t)}),n.success()};window.SQL===undefined?e.getScript("javascripts_static/sql.js",function(e,t,n){i()}).fail(function(e,t,r){n.error("Your browser does not work with SQL.js. Try using a different browser (Chrome, Safari, Firefox, IE 10, etc...), or a newer version of your current one.")}):(r.db&&r.db.close(),i())}catch(s){n.error(s)}},n.prototype.executeQuery=function(n){var r=this;try{if(!r.db)throw"Database Schema not available!";var i=[];r.db.exec("BEGIN TRANSACTION"),e.each(t.prototype.splitStatement.call(this,n.sql,n.statement_separator),function(t,n){if(e.trim(n).length){var s=new Date,o=[];try{o=r.db.exec(n);var u={SUCCEEDED:!0,EXECUTIONTIME:new Date-s,RESULTS:{COLUMNS:[],DATA:[]},EXECUTIONPLAN:{COLUMNS:[],DATA:[]}};o.length&&e.each(o,function(t,n){var r=[];e.each(n,function(e,n){t==0&&u.RESULTS.COLUMNS.push(n.column),r.push(n.value)}),u.RESULTS.DATA.push(r)});try{exectionPlanArray=r.db.exec("EXPLAIN QUERY PLAN "+n),exectionPlanArray.length&&e.each(exectionPlanArray,function(t,n){var r=[];e.each(n,function(e,n){t==0&&u.EXECUTIONPLAN.COLUMNS.push(n.column),r.push(n.value)}),u.EXECUTIONPLAN.DATA.push(r)})}catch(a){}i.push(u)}catch(a){var u={SUCCEEDED:!1,EXECUTIONTIME:new Date-s,ERRORMESSAGE:a};return i.push(u),!1}}}),r.db.exec("ROLLBACK TRANSACTION"),n.success(i)}catch(s){n.error(s)}},n}),define("BrowserEngines/websql_driver",["jQuery","BrowserEngines/sqlite_driver"],function(e,t){var n=function(){return this.db=null,this.ddl=[],this.nativeSQLite=window.openDatabase!==undefined,this};return e.extend(n.prototype,t.prototype),n.prototype.buildSchema=function(e){var t=this;try{t.nativeSQLite?(t.db=openDatabase(e.short_code,"1.0",e.short_code,e.ddl.length*1024),t.db.transaction(function(n){var r=t.splitStatement(e.ddl,e.statement_separator);t.ddl=r;var i=0,s=r[i],o=function(t,a){if(i<r.length-1){do i++,s=r[i];while(i<r.length-1&&s.match(/^\s*$/));s.match(/^\s*$/)?(n.executeSql("intentional failure used to rollback transaction"),e.success()):n.executeSql(s,[],o,u)}else n.executeSql("intentional failure used to rollback transaction"),e.success()},u=function(t,n){return n.message!="not an error"?e.error(n.message):e.success(),!0};s?n.executeSql(s,[],o,u):e.success()})):e.error("SQLite (WebSQL) not available in your browser. Try either using a webkit-based browser (such as Safari or Chrome) or using the SQLite (SQL.js) database type.")}catch(n){e.error(n)}},n.prototype.executeQuery=function(t){var n=this;try{if(n.db==null)throw"You need to build the schema before you can run a query.";var r=[];n.db.transaction(function(i){var s=function(e,u){var a={SUCCEEDED:!0,EXECUTIONTIME:new Date-p,RESULTS:{COLUMNS:[],DATA:[]},EXECUTIONPLAN:{COLUMNS:[],DATA:[]}};for(var f=0;f<u.rows.length;f++){var d=[],v=u.rows.item(f);if(f==0)for(col in v)a.RESULTS.COLUMNS.push(col);for(var m=0;m<a.RESULTS.COLUMNS.length;m++)d.push(v[a.RESULTS.COLUMNS[m]]);a.RESULTS.DATA.push(d)}i.executeSql("EXPLAIN QUERY PLAN "+h,[],function(e,u){for(var f=0;f<u.rows.length;f++){var p=[],d=u.rows.item(f);if(f==0)for(col in d)a.EXECUTIONPLAN.COLUMNS.push(col);for(var v=0;v<a.EXECUTIONPLAN.COLUMNS.length;v++)p.push(d[a.EXECUTIONPLAN.COLUMNS[v]]);a.EXECUTIONPLAN.DATA.push(p)}c>n.ddl.length-1&&r.push(a);if(c<l.length-1){do c++,h=l[c];while(c<l.length-1&&h.match(/^\s*$/));h.match(/^\s*$/)?(i.executeSql("intentional failure used to rollback transaction"),t.success(r)):i.executeSql(h,[],s,o)}else i.executeSql("intentional failure used to rollback transaction"),t.success(r)},function(e,u){c>n.ddl.length-1&&r.push(a);if(c<l.length-1){do c++,h=l[c];while(c<l.length-1&&h.match(/^\s*$/));h.match(/^\s*$/)?(i.executeSql("intentional failure used to rollback transaction"),t.success(r)):i.executeSql(h,[],s,o)}else i.executeSql("intentional failure used to rollback transaction"),t.success(r)})},o=function(e,n){if(n.message!="not an error"){var i={SUCCEEDED:!1,EXECUTIONTIME:new Date-p,ERRORMESSAGE:n.message};r.push(i)}return t.success(r),!0},u=[],a,f=!1,l=n.ddl.slice(0);e.each(n.splitStatement(t.sql,t.statement_separator),function(e,t){l.push(t)});var c=0,h=l[c],p=new Date;i.executeSql(h,[],s,o)})}catch(i){t.error(i)}},n}),define("BrowserEngines/engines",["BrowserEngines/sqljs_driver","BrowserEngines/websql_driver"],function(e,t){return{sqljs:new e,websql:new t}});var JSON;JSON||(JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.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,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),define("libs/json2",function(){}),function(){var e=this,t=e.Backbone,n=Array.prototype.splice,r;typeof exports!="undefined"?r=exports:r=e.Backbone={},r.VERSION="0.9.2";var i=e._;!i&&typeof require!="undefined"&&(i=require("underscore")),r.$=e.jQuery||e.Zepto||e.ender,r.noConflict=function(){return e.Backbone=t,this},r.emulateHTTP=!1,r.emulateJSON=!1;var s=/\s+/,o=r.Events={on:function(e,t,n){var r,i,o;if(!t)return this;e=e.split(s),r=this._callbacks||(this._callbacks={});while(i=e.shift())o=r[i]||(r[i]=[]),o.push(t,n);return this},off:function(e,t,n){var r,o,u,a;if(!(o=this._callbacks))return this;if(!(e||t||n))return delete this._callbacks,this;e=e?e.split(s):i.keys(o);while(r=e.shift()){if(!(u=o[r])||!t&&!n){delete o[r];continue}for(a=u.length-2;a>=0;a-=2)t&&u[a]!==t||n&&u[a+1]!==n||u.splice(a,2)}return this},trigger:function(e){var t,n,r,i,o,u,a,f;if(!(n=this._callbacks))return this;f=[],e=e.split(s);for(i=1,o=arguments.length;i<o;i++)f[i-1]=arguments[i];while(t=e.shift()){if(a=n.all)a=a.slice();if(r=n[t])r=r.slice();if(r)for(i=0,o=r.length;i<o;i+=2)r[i].apply(r[i+1]||this,f);if(a){u=[t].concat(f);for(i=0,o=a.length;i<o;i+=2)a[i].apply(a[i+1]||this,u)}}return this}};o.bind=o.on,o.unbind=o.off;var u=r.Model=function(e,t){var n;e||(e={}),t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(e=this.parse(e));if(n=N(this,"defaults"))e=i.extend({},n,e);this.attributes={},this._escapedAttributes={},this.cid=i.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(e,{silent:!0}),this.changed={},this._silent={},this._pending={},this._previousAttributes=i.clone(this.attributes),this.initialize.apply(this,arguments)};i.extend(u.prototype,o,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return i.clone(this.attributes)},sync:function(){return r.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){var t;if(t=this._escapedAttributes[e])return t;var n=this.get(e);return this._escapedAttributes[e]=i.escape(n==null?"":""+n)},has:function(e){return this.get(e)!=null},set:function(e,t,n){var r,s,o;i.isObject(e)||e==null?(r=e,n=t):(r={},r[e]=t),n||(n={});if(!r)return this;r instanceof u&&(r=r.attributes);if(n.unset)for(s in r)r[s]=void 0;if(!this._validate(r,n))return!1;this.idAttribute in r&&(this.id=r[this.idAttribute]);var a=n.changes={},f=this.attributes,l=this._escapedAttributes,c=this._previousAttributes||{};for(s in r){o=r[s];if(!i.isEqual(f[s],o)||n.unset&&i.has(f,s))delete l[s],(n.silent?this._silent:a)[s]=!0;n.unset?delete f[s]:f[s]=o,!i.isEqual(c[s],o)||i.has(f,s)!=i.has(c,s)?(this.changed[s]=o,n.silent||(this._pending[s]=!0)):(delete this.changed[s],delete this._pending[s])}return n.silent||this.change(n),this},unset:function(e,t){return t=i.extend({},t,{unset:!0}),this.set(e,null,t)},clear:function(e){return e=i.extend({},e,{unset:!0}),this.set(i.clone(this.attributes),e)},fetch:function(e){e=e?i.clone(e):{};var t=this,n=e.success;return e.success=function(r,i,s){if(!t.set(t.parse(r,s),e))return!1;n&&n(t,r,e),t.trigger("sync",t,r,e)},e.error=r.wrapError(e.error,t,e),this.sync("read",this,e)},save:function(e,t,n){var s,o,u;i.isObject(e)||e==null?(s=e,n=t):(s={},s[e]=t),n=n?i.clone(n):{};if(n.wait){if(!this._validate(s,n))return!1;o=i.clone(this.attributes)}var a=i.extend({},n,{silent:!0});if(s&&!this.set(s,n.wait?a:n))return!1;if(!s&&!this.isValid())return!1;var f=this,l=n.success;n.success=function(e,t,r){u=!0;var o=f.parse(e,r);n.wait&&(o=i.extend(s||{},o));if(!f.set(o,n))return!1;l&&l(f,e,n),f.trigger("sync",f,e,n)},n.error=r.wrapError(n.error,f,n);var c=this.sync(this.isNew()?"create":"update",this,n);return!u&&n.wait&&(this.clear(a),this.set(o,a)),c},destroy:function(e){e=e?i.clone(e):{};var t=this,n=e.success,s=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(r){(e.wait||t.isNew())&&s(),n&&n(t,r,e),t.isNew()||t.trigger("sync",t,r,e)};if(this.isNew())return e.success(),!1;e.error=r.wrapError(e.error,t,e);var o=this.sync("delete",this,e);return e.wait||s(),o},url:function(){var e=N(this,"urlRoot")||N(this.collection,"url")||C();return this.isNew()?e:e+(e.charAt(e.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},change:function(e){e||(e={});var t=this._changing;this._changing=!0;for(var n in this._silent)this._pending[n]=!0;var r=i.extend({},e.changes,this._silent);this._silent={};for(var n in r)this.trigger("change:"+n,this,this.get(n),e);if(t)return this;while(!i.isEmpty(this._pending)){this._pending={},this.trigger("change",this,e);for(var n in this.changed){if(this._pending[n]||this._silent[n])continue;delete this.changed[n]}this._previousAttributes=i.clone(this.attributes)}return this._changing=!1,this},hasChanged:function(e){return e==null?!i.isEmpty(this.changed):i.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?i.clone(this.changed):!1;var t,n=!1,r=this._previousAttributes;for(var s in e){if(i.isEqual(r[s],t=e[s]))continue;(n||(n={}))[s]=t}return n},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return i.clone(this._previousAttributes)},isValid:function(){return!this.validate||!this.validate(this.attributes)},_validate:function(e,t){if(t.silent||!this.validate)return!0;e=i.extend({},this.attributes,e);var n=this.validate(e,t);return n?(t&&t.error?t.error(this,n,t):this.trigger("error",this,n,t),!1):!0}});var a=r.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==undefined&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,{silent:!0,parse:t.parse})};i.extend(a.prototype,o,{model:u,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return r.sync.apply(this,arguments)},add:function(e,t){var r,s,o,u,a,f,l={},c={},h=[];t||(t={}),e=i.isArray(e)?e.slice():[e];for(r=0,o=e.length;r<o;r++){if(!(u=e[r]=this._prepareModel(e[r],t)))throw new Error("Can't add an invalid model to a collection");a=u.cid,f=u.id;if(l[a]||this._byCid[a]||f!=null&&(c[f]||this._byId[f])){h.push(r);continue}l[a]=c[f]=u}r=h.length;while(r--)h[r]=e.splice(h[r],1)[0];for(r=0,o=e.length;r<o;r++)(u=e[r]).on("all",this._onModelEvent,this),this._byCid[u.cid]=u,u.id!=null&&(this._byId[u.id]=u);this.length+=o,s=t.at!=null?t.at:this.models.length,n.apply(this.models,[s,0].concat(e));if(t.merge)for(r=0,o=h.length;r<o;r++)(u=this._byId[h[r].id])&&u.set(h[r],t);this.comparator&&t.at==null&&this.sort({silent:!0});if(t.silent)return this;for(r=0,o=this.models.length;r<o;r++){if(!l[(u=this.models[r]).cid])continue;t.index=r,u.trigger("add",u,this,t)}return this},remove:function(e,t){var n,r,s,o;t||(t={}),e=i.isArray(e)?e.slice():[e];for(n=0,r=e.length;n<r;n++){o=this.getByCid(e[n])||this.get(e[n]);if(!o)continue;delete this._byId[o.id],delete this._byCid[o.cid],s=this.indexOf(o),this.models.splice(s,1),this.length--,t.silent||(t.index=s,o.trigger("remove",o,this,t)),this._removeReference(o)}return this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,t),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,i.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){return e==null?void 0:this._byId[e.id!=null?e.id:e]},getByCid:function(e){return e&&this._byCid[e.cid||e]},at:function(e){return this.models[e]},where:function(e){return i.isEmpty(e)?[]:this.filter(function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},sort:function(e){e||(e={});if(!this.comparator)throw new Error("Cannot sort a set without a comparator");var t=i.bind(this.comparator,this);return this.comparator.length==1?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("reset",this,e),this},pluck:function(e){return i.map(this.models,function(t){return t.get(e)})},reset:function(e,t){e||(e=[]),t||(t={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n]);return this._reset(),this.add(e,i.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},fetch:function(e){e=e?i.clone(e):{},e.parse===undefined&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r,i,s){t[e.add?"add":"reset"](t.parse(r,s),e),n&&n(t,r,e),t.trigger("sync",t,r,e)},e.error=r.wrapError(e.error,t,e),this.sync("read",this,e)},create:function(e,t){var n=this;t=t?i.clone(t):{},e=this._prepareModel(e,t);if(!e)return!1;t.wait||n.add(e,t);var r=t.success;return t.success=function(e,t,i){i.wait&&n.add(e,i),r&&r(e,t,i)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},chain:function(){return i(this.models).chain()},_reset:function(e){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(e,t){if(e instanceof u)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(n.attributes,t)?n:!1},_removeReference:function(e){this==e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e=="add"||e=="remove")&&n!=this)return;e=="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var f=["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","initial","rest","last","without","indexOf","shuffle","lastIndexOf","isEmpty","groupBy"];i.each(f,function(e){a.prototype[e]=function(){return i[e].apply(i,[this.models].concat(i.toArray(arguments)))}});var l=r.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},c=/:\w+/g,h=/\*\w+/g,p=/[-[\]{}()+?.,\\^$|#\s]/g;i.extend(l.prototype,o,{initialize:function(){},route:function(e,t,n){return r.history||(r.history=new d),i.isRegExp(e)||(e=this._routeToRegExp(e)),n||(n=this[t]),r.history.route(e,i.bind(function(i){var s=this._extractParameters(e,i);n&&n.apply(this,s),this.trigger.apply(this,["route:"+t].concat(s)),r.history.trigger("route",this,t,s)},this)),this},navigate:function(e,t){r.history.navigate(e,t)},_bindRoutes:function(){if(!this.routes)return;var e=[];for(var t in this.routes)e.unshift([t,this.routes[t]]);for(var n=0,r=e.length;n<r;n++)this.route(e[n][0],e[n][1],this[e[n][1]])},_routeToRegExp:function(e){return e=e.replace(p,"\\$&").replace(c,"([^/]+)").replace(h,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){return e.exec(t).slice(1)}});var d=r.History=function(t){this.handlers=[],i.bindAll(this,"checkUrl"),this.location=t&&t.location||e.location,this.history=t&&t.history||e.history},v=/^[#\/]/,m=/msie [\w.]+/,g=/\/$/;d.started=!1,i.extend(d.prototype,o,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.options.root.replace(g,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return decodeURIComponent(e.replace(v,""))},start:function(e){if(d.started)throw new Error("Backbone.history has already been started");d.started=!0,this.options=i.extend({},{root:"/"},this.options,e),this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var t=this.getFragment(),n=document.documentMode,s=m.exec(navigator.userAgent.toLowerCase())&&(!n||n<=7);s&&this._wantsHashChange&&(this.iframe=r.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?r.$(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?r.$(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var o=this.location,u=o.pathname==this.options.root&&!o.search;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!u)return this.fragment=this.getFragment(null,!0),this.location.replace(this.options.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&u&&o.hash&&(this.fragment=this.getHash().replace(v,""),this.history.replaceState({},document.title,o.protocol+"//"+o.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},stop:function(){r.$(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),d.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t==this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t==this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=i.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0});return n},navigate:function(e,t){if(!d.started)return!1;if(!t||t===!0)t={trigger:t};var n=(e||"").replace(v,"");if(this.fragment==n)return;this.fragment=n;var r=(n.indexOf(this.options.root)!=0?this.options.root:"")+n;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);this._updateHash(this.location,n,t.replace),this.iframe&&n!=this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,n,t.replace))}t.trigger&&this.loadUrl(e)},_updateHash:function(e,t,n){n?e.replace(e.href.replace(/(javascript:|#).*$/,"")+"#"+t):e.hash=t}});var y=r.View=function(e){this.cid=i.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},b=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName"];i.extend(y.prototype,o,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this},make:function(e,t,n){var i=document.createElement(e);return t&&r.$(i).attr(t),n!=null&&r.$(i).html(n),i},setElement:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof r.$?e:r.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=N(this,"events")))return;this.undelegateEvents();for(var t in e){var n=e[t];i.isFunction(n)||(n=this[e[t]]);if(!n)throw new Error('Method "'+e[t]+'" does not exist');var r=t.match(b),s=r[1],o=r[2];n=i.bind(n,this),s+=".delegateEvents"+this.cid,o===""?this.$el.bind(s,n):this.$el.delegate(o,s,n)}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(e){this.options&&(e=i.extend({},this.options,e));for(var t=0,n=w.length;t<n;t++){var r=w[t];e[r]&&(this[r]=e[r])}this.options=e},_ensureElement:function(){if(!this.el){var e=i.extend({},N(this,"attributes"));this.id&&(e.id=this.id),this.className&&(e["class"]=this.className),this.setElement(this.make(N(this,"tagName"),e),!1)}else this.setElement(this.el,!1)}});var E=function(e,t){var n=T(this,e,t);return n.extend=this.extend,n};u.extend=a.extend=l.extend=y.extend=E;var S={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};r.sync=function(e,t,n){var s=S[e];n||(n={});var o={type:s,dataType:"json"};return n.url||(o.url=N(t,"url")||C()),!n.data&&t&&(e=="create"||e=="update")&&(o.contentType="application/json",o.data=JSON.stringify(t)),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&(s==="PUT"||s==="DELETE")&&(r.emulateJSON&&(o.data._method=s),o.type="POST",o.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s)}),o.type!=="GET"&&!r.emulateJSON&&(o.processData=!1),r.ajax(i.extend(o,n))},r.ajax=function(){return r.$.ajax.apply(r.$,arguments)},r.wrapError=function(e,t,n){return function(r,i){i=r===t?i:r,e?e(t,i,n):t.trigger("error",t,i,n)}};var x=function(){},T=function(e,t,n){var r;return t&&t.hasOwnProperty("constructor")?r=t.constructor:r=function(){e.apply(this,arguments)},i.extend(r,e),x.prototype=e.prototype,r.prototype=new x,t&&i.extend(r.prototype,t),n&&i.extend(r,n),r.prototype.constructor=r,r.__super__=e.prototype,r},N=function(e,t){return!e||!e[t]?null:i.isFunction(e[t])?e[t]():e[t]},C=function(){throw new Error('A "url" property or function must be specified')}}.call(this),define("Backbone",["Underscore","jQuery","libs/json2"],function(e){return function(){return e.Backbone}}(this)),define("fiddle_backbone/models/UsedFiddle",["Backbone"],function(e){var t=e.Model.extend({defaults:{fragment:"",full_name:"",ddl:"",sql:""},initialize:function(){this.set("last_used",new Date)}});return t}),define("fiddle_backbone/models/MyFiddleHistory",["Backbone","fiddle_backbone/models/UsedFiddle"],function(e,t){var n=e.Collection.extend({model:t,comparator:function(e,t){return e.get("last_used")==t.get("last_used")?0:e.get("last_used")>t.get("last_used")?-1:1},insert:function(e){if(!$("#user_choices",this).length){var t=this.find(function(t){return t.get("fragment")==e.get("fragment")});t?(t.set("last_used",e.get("last_used")),this.sort()):this.add(e),this.trigger("change")}},initialize:function(){try{if(localStorage){var e=localStorage.getItem("fiddleHistory");e&&e.length&&this.add($.parseJSON(e))}}catch(t){}}});return n}),define("fiddle_backbone/models/DBType",["Backbone"],function(e){var t=e.Model.extend({defaults:{sample_fragment:"",notes:"",simple_name:"",full_name:"",selected:!1,context:"host",className:""}});return t}),define("fiddle_backbone/models/DBTypesList",["Backbone","fiddle_backbone/models/DBType"],function(e,t){var n=e.Collection.extend({model:t,getSelectedType:function(){var e=this.filter(function(e){return e.get("selected")});return e.length?e[0]:!1},setSelectedType:function(e,t){this.each(function(t){t.set({selected:t.id==e},{silent:!0})}),t||this.trigger("change")}});return n}),define("fiddle_backbone/models/SchemaDef",["Backbone"],function(e){var t=e.Model.extend({defaults:{ddl:"",short_code:"",simple_name:"",full_name:"",valid:!0,errorMessage:"",loading:!1,ready:!1,schema_structure:[],statement_separator:";",browserEngines:{}},reset:function(){this.set(this.defaults),this.trigger("reloaded")},build:function(e){var t=e.getSelectedType(),n=this;if(!t)return!1;(!this.has("dbType")||this.get("dbType").id!=t.id)&&this.set("dbType",t),$.ajax({type:"POST",url:"index.cfm/fiddles/createSchema",data:{statement_separator:this.get("statement_separator"),db_type_id:this.get("dbType").id,schema_ddl:this.get("ddl")},dataType:"json",success:function(e,r,i){e.short_code?t.get("context")=="browser"?n.get("browserEngines")[t.get("className")].buildSchema({short_code:$.trim(e.short_code),statement_separator:n.get("statement_separator"),ddl:n.get("ddl"),success:function(){n.set({short_code:$.trim(e.short_code),ready:!0,valid:!0,errorMessage:""}),n.get("browserEngines")[t.get("className")].getSchemaStructure({callback:function(e){n.set({schema_structure:e}),n.trigger("built")}})},error:function(t){n.set({short_code:$.trim(e.short_code),ready:!1,valid:!1,errorMessage:t,schema_structure:[]}),n.trigger("failed")}}):(n.set({short_code:$.trim(e.short_code),ready:!0,valid:!0,errorMessage:"",schema_structure:e.schema_structure}),n.trigger("built")):(n.set({short_code:"",ready:!1,valid:!1,errorMessage:e.error,schema_structure:[]}),n.trigger("failed"))},error:function(e,t,r){n.set({short_code:"",ready:!1,valid:!1,errorMessage:r,schema_structure:[]}),n.trigger("failed")}})}});return t}),define("fiddle_backbone/models/Query",["jQuery","Backbone"],function(e,t){var n=t.Model.extend({defaults:{id:0,sql:"",sets:[],pendingChanges:!1,statement_separator:";"},reset:function(){this.set(this.defaults),this.trigger("reloaded")},execute:function(){var t=this;if(!this.has("schemaDef")||!this.get("schemaDef").has("dbType")||!this.get("schemaDef").get("ready"))return!1;e.ajax({type:"POST",url:"index.cfm/fiddles/runQuery",data:{db_type_id:this.get("schemaDef").get("dbType").id,schema_short_code:this.get("schemaDef").get("short_code"),statement_separator:this.get("statement_separator"),sql:this.get("sql")},dataType:"json",success:function(e,n,r){t.get("schemaDef").get("dbType").get("context")=="browser"?t.get("schemaDef").get("browserEngines")[t.get("schemaDef").get("dbType").get("className")].executeQuery({sql:t.get("sql"),statement_separator:t.get("statement_separator"),success:function(n){t.set({id:e.ID,sets:n}),t.trigger("executed")},error:function(e){t.set({sets:[{SUCCEEDED:!1,ERRORMESSAGE:e}]}),t.trigger("executed")}}):t.set({id:e.ID,sets:e.sets})},error:function(e,n,r){t.set({sets:[]})},complete:function(e,n){t.trigger("executed")}})}});return n});var Handlebars={};Handlebars.VERSION="1.0.beta.6",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var toString=Object.prototype.toString,functionType="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=toString.call(e);s===functionType&&(e=e.call(this));if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o<u;o++)i+=r(e[o]);else i=n(this);return i}return r(e)}),Handlebars.registerHelper("each",function(e,t){var n=t.fn,r=t.inverse,i="";if(e&&e.length>0)for(var s=0,o=e.length;s<o;s++)i+=n(e[s]);else i=r(this);return i}),Handlebars.registerHelper("if",function(e,t){var n=toString.call(e);return n===functionType&&(e=e.call(this)),!e||Handlebars.Utils.isEmpty(e)?t.inverse(this):t.fn(this)}),Handlebars.registerHelper("unless",function(e,t){var n=t.fn,r=t.inverse;return t.fn=r,t.inverse=n,Handlebars.helpers["if"].call(this,e,t)}),Handlebars.registerHelper("with",function(e,t){return t.fn(e)}),Handlebars.registerHelper("log",function(e){Handlebars.log(e)});var handlebars=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new i.ProgramNode(o[a]);break;case 4:this.$=new i.ProgramNode([]);break;case 5:this.$=[o[a]];break;case 6:o[a-1].push(o[a]),this.$=o[a-1];break;case 7:this.$=new i.InverseNode(o[a-2],o[a-1],o[a]);break;case 8:this.$=new i.BlockNode(o[a-2],o[a-1],o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new i.ContentNode(o[a]);break;case 12:this.$=new i.CommentNode(o[a]);break;case 13:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new i.PartialNode(o[a-1]);break;case 19:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 20:break;case 21:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 22:this.$=[[o[a-1]].concat(o[a]),null];break;case 23:this.$=[[o[a-1]],o[a]];break;case 24:this.$=[[o[a]],null];break;case 25:o[a-1].push(o[a]),this.$=o[a-1];break;case 26:this.$=[o[a]];break;case 27:this.$=o[a];break;case 28:this.$=new i.StringNode(o[a]);break;case 29:this.$=new i.IntegerNode(o[a]);break;case 30:this.$=new i.BooleanNode(o[a]);break;case 31:this.$=new i.HashNode(o[a]);break;case 32:o[a-1].push(o[a]),this.$=o[a-1];break;case 33:this.$=[o[a]];break;case 34:this.$=[o[a-2],o[a]];break;case 35:this.$=[o[a-2],new i.StringNode(o[a])];break;case 36:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 37:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 38:this.$=new i.IdNode(o[a]);break;case 39:o[a-2].push(o[a]),this.$=o[a-2];break;case 40:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(t,n){throw new Error(t)},parse:function(t){function d(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function v(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(m==null&&(m=v()),b=o[y]&&o[y][m]);if(typeof b=="undefined"||!b.length||!b[0])if(!l){C=[];for(x in o[y])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");var k="";this.lexer.showPosition?k="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[m]+"'":k="Parse error on line "+(a+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:p,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(b[1]),m=null,g?(m=g,g=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:T=this.productions_[b[1]][1],S.$=i[i.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E=this.performAction.call(S,u,f,a,this.yy,b[1],i,s);if(typeof E!="undefined")return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),i.push(S.$),s.push(S._$),N=o[r[r.length-2]][r[r.length-1]],r.push(N);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){t=this._input.match(this.rules[i[s]]);if(t){r=t[0].match(/\n.*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[s],this.conditionStack[this.conditionStack.length-1]);if(e)return e;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return 24;case 4:return 16;case 5:return 20;case 6:return 19;case 7:return 19;case 8:return 23;case 9:return 23;case 10:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 11:return 22;case 12:return 34;case 13:return 33;case 14:return 33;case 15:return 36;case 16:break;case 17:return this.popState(),18;case 18:return this.popState(),18;case 19:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),28;case 20:return 30;case 21:return 30;case 22:return 29;case 23:return 33;case 24:return n.yytext=n.yytext.substr(1,n.yyleng-2),33;case 25:return"INVALID";case 26:return 5}},e.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/],e.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:!1},emu:{rules:[2],inclusive:!1},INITIAL:{rules:[0,1,26],inclusive:!0}},e}();return e.lexer=t,e}();typeof require!="undefined"&&typeof exports!="undefined"&&(exports.parser=handlebars,exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)},exports.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");if(typeof process!="undefined")var n=require("fs").readFileSync(require("path").join(process.cwd(),t[1]),"utf8");else var r=require("file").path(require("file").cwd()),n=r.join(t[1]).read({charset:"utf-8"});return exports.parser.parse(n)},typeof module!="undefined"&&require.main===module&&exports.main(typeof process!="undefined"?process.argv.slice(1):require("system").args)),Handlebars.Parser=handlebars,Handlebars.parse=function(e){return Handlebars.Parser.yy=Handlebars.AST,Handlebars.Parser.parse(e)},Handlebars.print=function(e){return(new Handlebars.PrintVisitor).accept(e)},Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){}},Handlebars.log=function(e,t){Handlebars.logger.log(e,t)},function(){Handlebars.AST={},Handlebars.AST.ProgramNode=function(e,t){this.type="program",this.statements=e,t&&(this.inverse=new Handlebars.AST.ProgramNode(t))},Handlebars.AST.MustacheNode=function(e,t,n){this.type="mustache",this.id=e[0],this.params=e.slice(1),this.hash=t,this.escaped=!n},Handlebars.AST.PartialNode=function(e,t){this.type="partial",this.id=e,this.context=t};var e=function(e,t){if(e.original!==t.original)throw new Handlebars.Exception(e.original+" doesn't match "+t.original)};Handlebars.AST.BlockNode=function(t,n,r){e(t.id,r),this.type="block",this.mustache=t,this.program=n},Handlebars.AST.InverseNode=function(t,n,r){e(t.id,r),this.type="inverse",this.mustache=t,this.program=n},Handlebars.AST.ContentNode=function(e){this.type="content",this.string=e},Handlebars.AST.HashNode=function(e){this.type="hash",this.pairs=e},Handlebars.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];s===".."?n++:s==="."||s==="this"?this.isScoped=!0:t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=t.length===1&&n===0},Handlebars.AST.StringNode=function(e){this.type="STRING",this.string=e},Handlebars.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e},Handlebars.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e},Handlebars.AST.CommentNode=function(e){this.type="comment",this.comment=e}}(),Handlebars.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(e){this.string=e},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.Compiler=function(){},Handlebars.JavaScriptCompiler=function(){},function(e,t){e.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16},e.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1},e.DISASSEMBLE_MAP={};for(var n in e.OPCODE_MAP){var r=e.OPCODE_MAP[n];e.DISASSEMBLE_MAP[r]=n}e.multiParamSize=function(t){return e.MULTI_PARAM_OPCODES[e.DISASSEMBLE_MAP[t]]},e.prototype={compiler:e,disassemble:function(){var t=this.opcodes,n,r,i=[],s,o,u;for(var a=0,f=t.length;a<f;a++){n=t[a];if(n==="DECLARE")o=t[++a],u=t[++a],i.push("DECLARE "+o+" = "+u);else{s=e.DISASSEMBLE_MAP[n];var l=e.multiParamSize(n),c=[];for(var h=0;h<l;h++)r=t[++a],typeof r=="string"&&(r='"'+r.replace("\n","\\n")+'"'),c.push(r);s=s+" "+c.join(" "),i.push(s)}}return i.join("\n")},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var r=0,i=t.depths.list.length;r<i;r++){depth=t.depths.list[r];if(depth<2)continue;this.addDepth(depth-1)}return n},block:function(e){var t=e.mustache,n,r,i,s,o=this.setupStackForMustache(t),u=this.compileProgram(e.program);e.program.inverse&&(s=this.compileProgram(e.program.inverse),this.declare("inverse",s)),this.opcode("invokeProgram",u,o.length,!!t.hash),this.declare("inverse",null),this.opcode("append")},inverse:function(e){var t=this.setupStackForMustache(e.mustache),n=this.compileProgram(e.program);this.declare("inverse",n),this.opcode("invokeProgram",null,t.length,!!e.mustache.hash),this.declare("inverse",null),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("push","{}");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.accept(r),this.opcode("assignToHash",n[0])},partial:function(e){var t=e.id;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.original),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.setupStackForMustache(e);this.opcode("invokeMustache",t.length,e.id.original,!!e.hash),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("lookupWithHelpers",e.parts[0]||null,e.isScoped||!1);for(var t=1,n=e.parts.length;t<n;t++)this.opcode("lookup",e.parts[t])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("push",e.integer)},BOOLEAN:function(e){this.opcode("push",e.bool)},comment:function(){},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.string)):this[n.type](n)},opcode:function(t,n,r,i){this.opcodes.push(e.OPCODE_MAP[t]),n!==undefined&&this.opcodes.push(n),r!==undefined&&this.opcodes.push(r),i!==undefined&&this.opcodes.push(i)},declare:function(e,t){this.opcodes.push("DECLARE"),this.opcodes.push(e),this.opcodes.push(t)},addDepth:function(e){if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},setupStackForMustache:function(e){var t=e.params;return this.pushParams(t),e.hash&&this.hash(e.hash),this.ID(e.id),t}},t.prototype={nameLookup:function(e,n,r){return/^[0-9]+$/.test(n)?e+"["+n+"]":t.isValidJavaScriptVariableName(n)?e+"."+n:e+"['"+n+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":"buffer += "+e+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],aliases:{self:"this"},registers:{list:[]}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(u=i.length;this.i<u;this.i++)s=this.nextOpcode(0),s[0]==="DECLARE"?(this.i=this.i+2,this[s[1]]=s[2]):(this.i=this.i+s[1].length,this[s[0]].apply(this,s[1]));return this.createFunctionContext(r)},nextOpcode:function(t){var n=this.environment.opcodes,r=n[this.i+t],i,s,o,u;if(r==="DECLARE")return i=n[this.i+1],s=n[this.i+2],["DECLARE",i,s];i=e.DISASSEMBLE_MAP[r],o=e.multiParamSize(r),u=[];for(var a=0;a<o;a++)u.push(n[this.i+a+1+t]);return[i,u]},eat:function(e){this.i=this.i+e.length},preamble:function(){var e=[];this.useRegister("foundHelper");if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(e){var t=this.stackVars;this.isChild||(t=t.concat(this.context.registers.list)),t.length>0&&(this.source[1]=this.source[1]+", "+t.join(", "));if(!this.isChild){var n=[];for(var r in this.context.aliases)this.source[1]=this.source[1]+", "+r+"="+this.context.aliases[r]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var i=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var s=0,o=this.environment.depths.list.length;s<o;s++)i.push("depth"+this.environment.depths.list[s]);if(e)return i.push(this.source.join("\n ")),Function.apply(this,i);var u="function "+(this.name||"")+"("+i.join(",")+") {\n "+this.source.join("\n ")+"}";return Handlebars.log(Handlebars.logger.DEBUG,u+"\n\n"),u},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var e=this.nextOpcode(1),t="";this.context.aliases.escapeExpression="this.escapeExpression",e[0]==="appendContent"&&(t=" + "+this.quotedString(e[1][0]),this.eat(e)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+t))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupWithHelpers:function(e,t){if(e){var n=this.nextStack();this.usingKnownHelper=!1;var r;!t&&this.options.knownHelpers[e]?(r=n+" = "+this.nameLookup("helpers",e,"helper"),this.usingKnownHelper=!0):t||this.options.knownHelpersOnly?r=n+" = "+this.nameLookup("depth"+this.lastContext,e,"context"):(this.register("foundHelper",this.nameLookup("helpers",e,"helper")),r=n+" = foundHelper || "+this.nameLookup("depth"+this.lastContext,e,"context")),r+=";",this.source.push(r)}else this.pushStack("depth"+this.lastContext)},lookup:function(e){var t=this.topStack();this.source.push(t+" = ("+t+" === null || "+t+" === undefined || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")+");")},pushStringParam:function(e){this.pushStack("depth"+this.lastContext),this.pushString(e)},pushString:function(e){this.pushStack(this.quotedString(e))},push:function(e){this.pushStack(e)},invokeMustache:function(e,t,n){this.populateParams(e,this.quotedString(t),"{}",null,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+n+"=== undef) { "+e+" = helperMissing.call("+t+"); }"),e!==n&&this.source.push("else { "+e+" = "+n+"; }"))})},invokeProgram:function(e,t,n){var r=this.programExpression(this.inverse),i=this.programExpression(e);this.populateParams(t,null,i,r,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.blockHelperMissing="helpers.blockHelperMissing",this.source.push("else { "+e+" = blockHelperMissing.call("+t+"); }"))})},populateParams:function(e,t,n,r,i,s){var o=i||this.options.stringParams||r||this.options.data,u=this.popStack(),a,f=[],l,c,h;o?(this.register("tmp1",n),h="tmp1"):h="{ hash: {} }";if(o){var p=i?this.popStack():"{}";this.source.push("tmp1.hash = "+p+";")}this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var d=0;d<e;d++)l=this.popStack(),f.push(l),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");r&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+r+";")),this.options.data&&this.source.push("tmp1.data = data;"),f.push(h),this.populateCall(f,u,t||u,s,n!=="{}")},populateCall:function(e,t,n,r,i){var s=["depth0"].concat(e).join(", "),o=["depth0"].concat(n).concat(e).join(", "),u=this.nextStack();if(this.usingKnownHelper)this.source.push(u+" = "+t+".call("+s+");");else{this.context.aliases.functionType='"function"';var a=i?"foundHelper && ":"";this.source.push("if("+a+"typeof "+t+" === functionType) { "+u+" = "+t+".call("+s+"); }")}r.call(this,u,o,t),this.usingKnownHelper=!1},invokePartial:function(e){params=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"],this.options.data&&params.push("data"),this.pushStack("self.invokePartial("+params.join(", ")+");")},assignToHash:function(e){var t=this.popStack(),n=this.topStack();this.source.push(n+"['"+e+"'] = "+t+";")},compiler:t,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler,this.context.programs.push("");var u=this.context.programs.length;r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context)}},programExpression:function(e){if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r=[t.index,t.name,"data"];for(var i=0,s=n.length;i<s;i++)depth=n[i],depth===1?r.push("depth0"):r.push("depth"+(depth-1));return n.length===0?"self.program("+r.join(", ")+")":(r.shift(),"self.programWithDepth("+r.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.context.registers[e]||(this.context.registers[e]=!0,this.context.registers.list.push(e))},pushStack:function(e){return this.source.push(this.nextStack()+" = "+e+";"),"stack"+this.stackSlot},nextStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),s=t.RESERVED_WORDS={};for(var o=0,u=i.length;o<u;o++)s[i[o]]=!0;t.isValidJavaScriptVariableName=function(e){return!t.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(Handlebars.Compiler,Handlebars.JavaScriptCompiler),Handlebars.precompile=function(e,t){t=t||{};var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t);return(new Handlebars.JavaScriptCompiler).compile(r,t)},Handlebars.compile=function(e,t){function r(){var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t),i=(new Handlebars.JavaScriptCompiler).compile(r,t,undefined,!0);return Handlebars.template(i)}t=t||{};var n;return function(e,t){return n||(n=r()),n.call(this,e,t)}},Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i,s){options={helpers:r,partials:i,data:s};if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,options);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return i[t]=Handlebars.compile(e),i[t](n,options)}},Handlebars.template=Handlebars.VM.template,define("Handlebars",function(e){return function(){return e.Handlebars}}(this)),define("text",["module"],function(e){var t,n,r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,s=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,o=typeof location!="undefined"&&location.href,u=o&&location.protocol&&location.protocol.replace(/\:/,""),a=o&&location.hostname,f=o&&(location.port||undefined),l=[],c=e.config&&e.config()||{};t={version:"2.0.3",strip:function(e){if(e){e=e.replace(i,"");var t=e.match(s);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:c.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=r[t];try{e=new ActiveXObject(n)}catch(i){}if(e){r=[n];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,c.isBuild&&(l[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}c.isBuild=i.isBuild;var s=t.parseName(e),l=s.moduleName+"."+s.ext,h=n.toUrl(l),p=c.useXhr||t.useXhr;!o||p(h,u,a,f)?t.get(h,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([l],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(l.hasOwnProperty(n)){var s=t.jsEscape(l[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.moduleName+"."+o.ext,a=r.toUrl(o.moduleName+"."+o.ext)+".js";t.load(u,r,function(n){var r=function(e){return i(a,e)};r.asModule=function(e,t){return i.asModule(e,a,t)},t.write(e,u,r,s)},s)}};if(c.env==="node"||!c.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node)n=require.nodeRequire("fs"),t.get=function(e,t){var r=n.readFileSync(e,"utf8");r.indexOf("")===0&&(r=r.substring(1)),t(r)};else if(c.env==="xhr"||!c.env&&t.createXhr())t.get=function(e,n,r){var i=t.createXhr();i.open("GET",e,!0),c.onXhr&&c.onXhr(i,e),i.onreadystatechange=function(t){var s,o;i.readyState===4&&(s=i.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=i,r(o)):n(i.responseText))},i.send(null)};else if(c.env==="rhino"||!c.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};return t}),define("text!fiddle_backbone/templates/dbTypes.html",[],function(){return' <a class="dropdown-toggle" data-toggle="dropdown" href="#">\n {{selectedFullName}} <b class="caret"></b>\n </a>\n <ul class="dropdown-menu">\n {{#each dbTypes}}\n <li db_type_id="{{this.id}}" class="{{this.className}}"><a href="#"><i class="icon-tag"></i>{{this.full_name}}</a></li>\n {{/each}}\n </ul>'}),define("fiddle_backbone/views/DBTypesList",["jQuery","Backbone","Handlebars","text!fiddle_backbone/templates/dbTypes.html"],function(e,t,n,r){var i=t.View.extend({initialize:function(){this.compiledTemplate=n.compile(r)},events:{"click ul.dropdown-menu li":"clickDBType"},clickDBType:function(t){t.preventDefault(),this.collection.setSelectedType(e(t.currentTarget).attr("db_type_id"))},render:function(){var t=this.collection.getSelectedType();return e(this.el).html(this.compiledTemplate({dbTypes:this.collection.map(function(e){var t=e.toJSON();return t.className=t.selected?"active":"",t}),selectedFullName:t.get("full_name")})),e("#db_type_label_collapsed .navbar-text").text(t.get("full_name")),this}});return i});var CodeMirror=function(){function e(r,i){function Kt(e){return e>=0&&e<bt.size}function Gt(e){return E(bt,e)}function Yt(e,t){Bt=!0;var n=t-e.height;for(var r=e;r;r=r.parent)r.height+=n}function Zt(e){var t={line:0,ch:0};mn(t,{line:bt.size-1,ch:Gt(bt.size-1).text.length},ut(e),t,t),Ot=!0}function en(){var e=[];return bt.iter(0,bt.size,function(t){e.push(t.text)}),e.join("\n")}function tn(e){function c(e){var t=Hr(e,!0);if(t&&!Z(t,o)){Et||dn(),o=t,zn(r,t),Ot=!1;var n=Bn();if(t.line>=n.to||t.line<n.from)u=setTimeout(Jr(function(){c(e)}),150)}}function h(e){clearTimeout(u);var t=Hr(e);t&&zn(r,t),L(e),_n(),Ot=!0,p(),f()}Un(D(e,"shiftKey"));for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==V&&t!=J)return;for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==nt)return s.onGutterClick&&s.onGutterClick(Qt,st(nt.childNodes,t)+It,e),L(e);var r=Hr(e);switch(_(e)){case 3:j&&!n&&Br(e);return;case 2:r&&Vn(r.line,r.ch,!0);return}if(!r){M(e)==z&&L(e);return}Et||dn();var i=+(new Date);if(Nt&&Nt.time>i-400&&Z(Nt.pos,r))return L(e),setTimeout(_n,20),tr(r.line);if(Tt&&Tt.time>i-400&&Z(Tt.pos,r))return Nt={time:i,pos:r},L(e),er(r);Tt={time:i,pos:r};var o=r,u;if(s.dragDrop&&X&&!s.readOnly&&!Z(St.from,St.to)&&!et(r,St.from)&&!et(St.to,r)){R&&(rt.draggable=!0);function a(t){R&&(rt.draggable=!1),kt=!1,f(),l(),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(L(t),Vn(r.line,r.ch,!0),_n())}var f=P(document,"mouseup",Jr(a),!0),l=P(z,"drop",Jr(a),!0);kt=!0,rt.dragDrop&&rt.dragDrop();return}L(e),Vn(r.line,r.ch,!0);var p=P(document,"mousemove",Jr(function(e){clearTimeout(u),L(e),!F&&!_(e)?h(e):c(e)}),!0),f=P(document,"mouseup",Jr(h),!0)}function nn(e){for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==nt)return L(e);var n=Hr(e);if(!n)return;Nt={time:+(new Date),pos:n},L(e),er(n)}function rn(e){if(s.onDragEvent&&s.onDragEvent(Qt,k(e)))return;e.preventDefault();var t=Hr(e,!0),n=e.dataTransfer.files;if(!t||s.readOnly)return;if(n&&n.length&&window.FileReader&&window.File){function r(e,n){var r=new FileReader;r.onload=function(){o[n]=r.result,++u==i&&(t=Jn(t),Jr(function(){var e=En(o.join(""),t,t);zn(t,e)})())},r.readAsText(e)}var i=n.length,o=Array(i),u=0;for(var a=0;a<i;++a)r(n[a],a)}else try{var o=e.dataTransfer.getData("Text");o&&Kr(function(){var e=St.from,n=St.to;zn(t,t),kt&&En("",e,n),Sn(o),_n()})}catch(e){}}function sn(e){var t=Nn();e.dataTransfer.setData("Text",t);if(j||U){var n=document.createElement("img");n.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=",e.dataTransfer.setDragImage(n,0,0)}}function on(e,t){if(typeof e=="string"){e=u[e];if(!e)return!1}var n=xt;try{s.readOnly&&(At=!0),t&&(xt=null),e(Qt)}catch(r){if(r!=B)throw r;return!1}finally{xt=n,At=!1}return!0}function un(e){function u(){o=!0}var t=f(s.keyMap),n=t.auto;clearTimeout(ln),n&&!c(e)&&(ln=setTimeout(function(){f(s.keyMap)==t&&(s.keyMap=n.call?n.call(null,Qt):n)},50));var r=ft[D(e,"keyCode")],i=!1;if(r==null||e.altGraphKey)return!1;D(e,"altKey")&&(r="Alt-"+r),D(e,"ctrlKey")&&(r="Ctrl-"+r),D(e,"metaKey")&&(r="Cmd-"+r);var o=!1;return D(e,"shiftKey")?i=l("Shift-"+r,s.extraKeys,s.keyMap,function(e){return on(e,!0)},u)||l(r,s.extraKeys,s.keyMap,function(e){if(typeof e=="string"&&/^go[A-Z]/.test(e))return on(e)},u):i=l(r,s.extraKeys,s.keyMap,on,u),o&&(i=!1),i&&(L(e),F&&(e.oldKeyCode=e.keyCode,e.keyCode=0)),i}function an(e,t){var n=l("'"+t+"'",s.extraKeys,s.keyMap,function(e){return on(e,!0)});return n&&L(e),n}function cn(e){Et||dn(),F&&e.keyCode==27&&(e.returnValue=!1),Cn&&On()&&(Cn=!1);if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;var t=D(e,"keyCode");Un(t==16||D(e,"shiftKey"));var r=un(e);window.opera&&(fn=r?t:null,!r&&t==88&&D(e,n?"metaKey":"ctrlKey")&&Sn(""))}function hn(e){Cn&&On();if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;var t=D(e,"keyCode"),n=D(e,"charCode");if(window.opera&&t==fn){fn=null,L(e);return}if((window.opera&&!e.which||W)&&un(e))return;var r=String.fromCharCode(n==null?t:n);s.electricChars&&yt.electricChars&&s.smartIndent&&!s.readOnly&&yt.electricChars.indexOf(r)>-1&&setTimeout(Jr(function(){rr(St.to.line,"smart")}),75);if(an(e,r))return;Ln()}function pn(e){if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;D(e,"keyCode")==16&&(xt=null)}function dn(){if(s.readOnly=="nocursor")return;Et||(s.onFocus&&s.onFocus(Qt),Et=!0,y.className.search(/\bCodeMirror-focused\b/)==-1&&(y.className+=" CodeMirror-focused"),Ht||Mn(!0)),kn(),jr()}function vn(){Et&&(s.onBlur&&s.onBlur(Qt),Et=!1,Ut&&Jr(function(){Ut&&(Ut(),Ut=null)})(),y.className=y.className.replace(" CodeMirror-focused","")),clearInterval(gt),setTimeout(function(){Et||(xt=null)},150)}function mn(e,t,n,r,i){if(At)return;if(Vt){var o=[];bt.iter(e.line,t.line+1,function(e){o.push(e.text)}),Vt.addChange(e.line,n.length,o);while(Vt.done.length>s.undoDepth)Vt.done.shift()}wn(e,t,n,r,i)}function gn(e,t){if(!e.length)return;var n=e.pop(),r=[];for(var i=n.length-1;i>=0;i-=1){var s=n[i],o=[],u=s.start+s.added;bt.iter(s.start,u,function(e){o.push(e.text)}),r.push({start:s.start,added:s.old.length,old:o});var a=Jn({line:s.start+s.old.length-1,ch:it(o[o.length-1],s.old[s.old.length-1])});wn({line:s.start,ch:0},{line:u-1,ch:Gt(u-1).text.length},s.old,a,a)}Ot=!0,t.push(r)}function yn(){gn(Vt.done,Vt.undone)}function bn(){gn(Vt.undone,Vt.done)}function wn(e,t,n,r,i){function T(e){return e<=Math.min(t.line,t.line+y)?e:e+y}if(At)return;var o=!1,u=zt.length;s.lineWrapping||bt.iter(e.line,t.line+1,function(e){if(e.text.length==u)return o=!0,!0});if(e.line!=t.line||n.length>1)Bt=!0;var a=t.line-e.line,f=Gt(e.line),l=Gt(t.line);if(e.ch==0&&t.ch==0&&n[n.length-1]==""){var c=[],h=null;e.line?(h=Gt(e.line-1),h.fixMarkEnds(l)):l.fixMarkStarts();for(var p=0,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],h));a&&bt.remove(e.line,a,jt),c.length&&bt.insert(e.line,c)}else if(f==l)if(n.length==1)f.replace(e.ch,t.ch,n[0]);else{l=f.split(t.ch,n[n.length-1]),f.replace(e.ch,null,n[0]),f.fixMarkEnds(l);var c=[];for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));c.push(l),bt.insert(e.line+1,c)}else if(n.length==1)f.replace(e.ch,null,n[0]),l.replace(null,t.ch,""),f.append(l),bt.remove(e.line+1,a,jt);else{var c=[];f.replace(e.ch,null,n[0]),l.replace(null,t.ch,n[n.length-1]),f.fixMarkEnds(l);for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));a>1&&bt.remove(e.line+1,a-1,jt),bt.insert(e.line+1,c)}if(s.lineWrapping){var v=Math.max(5,z.clientWidth/_r()-3);bt.iter(e.line,e.line+n.length,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/v)||1;t!=e.height&&Yt(e,t)})}else bt.iter(e.line,e.line+n.length,function(e){var t=e.text;t.length>u&&(zt=t,u=t.length,Wt=null,o=!1)}),o&&(u=0,zt="",Wt=null,bt.iter(0,bt.size,function(e){var t=e.text;t.length>u&&(u=t.length,zt=t)}));var m=[],y=n.length-a-1;for(var p=0,b=wt.length;p<b;++p){var w=wt[p];w<e.line?m.push(w):w>t.line&&m.push(w+y)}var E=e.line+Math.min(n.length,500);Ur(e.line,E),m.push(E),wt=m,Wr(100),_t.push({from:e.line,to:t.line+1,diff:y});var S={from:e,to:t,text:n};if(Dt){for(var x=Dt;x.next;x=x.next);x.next=S}else Dt=S;Wn(r,i,T(St.from.line),T(St.to.line)),z.clientHeight&&(V.style.height=bt.height*Ar()+2*Dr()+"px")}function En(e,t,n){function r(r){if(et(r,t))return r;if(!et(n,r))return i;var s=r.line+e.length-(n.line-t.line)-1,o=r.ch;return r.line==n.line&&(o+=e[e.length-1].length-(n.ch-(n.line==t.line?t.ch:0))),{line:s,ch:o}}t=Jn(t),n?n=Jn(n):n=t,e=ut(e);var i;return xn(e,t,n,function(e){return i=e,{from:r(St.from),to:r(St.to)}}),i}function Sn(e,t){xn(ut(e),St.from,St.to,function(e){return t=="end"?{from:e,to:e}:t=="start"?{from:St.from,to:St.from}:{from:St.from,to:e}})}function xn(e,t,n,r){var i=e.length==1?e[0].length+t.ch:e[e.length-1].length,s=r({line:t.line+e.length-1,ch:i});mn(t,n,e,s.from,s.to)}function Tn(e,t){var n=e.line,r=t.line;if(n==r)return Gt(n).text.slice(e.ch,t.ch);var i=[Gt(n).text.slice(e.ch)];return bt.iter(n+1,r,function(e){i.push(e.text)}),i.push(Gt(r).text.slice(0,t.ch)),i.join("\n")}function Nn(){return Tn(St.from,St.to)}function kn(){if(Cn)return;vt.set(s.pollInterval,function(){Xr(),On(),Et&&kn(),Vr()})}function Ln(){function t(){Xr();var n=On();!n&&!e?(e=!0,vt.set(60,t)):(Cn=!1,kn()),Vr()}var e=!1;Cn=!0,vt.set(20,t)}function On(){if(Ht||!Et||at(A)||s.readOnly)return!1;var e=A.value;if(e==An)return!1;xt=null;var t=0,n=Math.min(An.length,e.length);while(t<n&&An[t]==e[t])++t;return t<An.length?St.from={line:St.from.line,ch:St.from.ch-(An.length-t)}:Lt&&Z(St.from,St.to)&&(St.to={line:St.to.line,ch:Math.min(Gt(St.to.line).text.length,St.to.ch+(e.length-t))}),Sn(e.slice(t),"end"),An=e,!0}function Mn(e){Z(St.from,St.to)?e&&(An=A.value=""):(An="",A.value=Nn(),Y(A))}function _n(){s.readOnly!="nocursor"&&A.focus()}function Dn(){if(!ct.getBoundingClientRect)return;var e=ct.getBoundingClientRect();if(F&&e.top==e.bottom)return;var t=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(e.top<0||e.bottom>t)&&ct.scrollIntoView()}function Pn(){var e=xr(St.inverted?St.from:St.to),t=s.lineWrapping?Math.min(e.x,rt.offsetWidth):e.x;return Hn(t,e.y,t,e.yBot)}function Hn(e,t,n,r){var i=Pr(),o=Dr();t+=o,r+=o,e+=i,n+=i;var u=z.clientHeight,a=z.scrollTop,f=!1,l=!0;t<a?(z.scrollTop=Math.max(0,t),f=!0):r>a+u&&(z.scrollTop=r-u,f=!0);var c=z.clientWidth,h=z.scrollLeft,p=s.fixedGutter?K.clientWidth:0,d=e<p+i+10;return e<h+p||d?(d&&(e=0),z.scrollLeft=Math.max(0,e-10-p),f=!0):n>c+h-3&&(z.scrollLeft=n+10-c,f=!0,n>V.clientWidth&&(l=!1)),f&&s.onScroll&&s.onScroll(Qt),l}function Bn(){var e=Ar(),t=z.scrollTop-Dr(),n=Math.max(0,Math.floor(t/e)),r=Math.ceil((t+z.clientHeight)/e);return{from:x(bt,n),to:x(bt,r)}}function jn(e,t){function p(){Wt=z.clientWidth;var e=pt.firstChild,t=!1;return bt.iter(It,qt,function(n){if(!n.hidden){var r=Math.round(e.offsetHeight/l)||1;n.height!=r&&(Yt(n,r),Bt=t=!0)}e=e.nextSibling}),t&&(V.style.height=bt.height*l+2*Dr()+"px"),t}if(!z.clientWidth){It=qt=Ft=0;return}var n=Bn();if(e!==!0&&e.length==0&&n.from>It&&n.to<qt)return;var r=Math.max(n.from-100,0),i=Math.min(bt.size,n.to+100);It<r&&r-It<20&&(r=It),qt>i&&qt-i<20&&(i=Math.min(bt.size,qt));var o=e===!0?[]:Fn([{from:It,to:qt,domStart:0}],e),u=0;for(var a=0;a<o.length;++a){var f=o[a];f.from<r&&(f.domStart+=r-f.from,f.from=r),f.to>i&&(f.to=i),f.from>=f.to?o.splice(a--,1):u+=f.to-f.from}if(u==i-r&&r==It&&i==qt)return;o.sort(function(e,t){return e.domStart-t.domStart});var l=Ar(),c=K.style.display;pt.style.display="none",In(r,i,o),pt.style.display=K.style.display="";var h=r!=It||i!=qt||Rt!=z.clientHeight+l;h&&(Rt=z.clientHeight+l),It=r,qt=i,Ft=T(bt,r),J.style.top=Ft*l+"px",z.clientHeight&&(V.style.height=bt.height*l+2*Dr()+"px");if(pt.childNodes.length!=qt-It)throw new Error("BAD PATCH! "+JSON.stringify(o)+" size="+(qt-It)+" nodes="+pt.childNodes.length);return s.lineWrapping?p():(Wt==null&&(Wt=br(zt)),Wt>z.clientWidth?(rt.style.width=Wt+"px",V.style.width="",V.style.width=z.scrollWidth+"px"):rt.style.width=V.style.width=""),K.style.display=c,(h||Bt)&&qn()&&s.lineWrapping&&p()&&qn(),Rn(),!t&&s.onUpdate&&s.onUpdate(Qt),!0}function Fn(e,t){for(var n=0,r=t.length||0;n<r;++n){var i=t[n],s=[],o=i.diff||0;for(var u=0,a=e.length;u<a;++u){var f=e[u];i.to<=f.from&&i.diff?s.push({from:f.from+o,to:f.to+o,domStart:f.domStart}):i.to<=f.from||i.from>=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from,domStart:f.domStart}),i.to<f.to&&s.push({from:i.to+o,to:f.to+o,domStart:f.domStart+(i.to-f.from)}))}e=s}return e}function In(e,t,n){if(!n.length)pt.innerHTML="";else{function r(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var i=0,s=pt.firstChild,o;for(var u=0;u<n.length;++u){var a=n[u];while(a.domStart>i)s=r(s),i++;for(var f=0,l=a.to-a.from;f<l;++f)s=s.nextSibling,i++}while(s)s=r(s)}var c=n.shift(),s=pt.firstChild,f=e,h=document.createElement("div");bt.iter(e,t,function(e){c&&c.to==f&&(c=n.shift());if(!c||c.from>f){if(e.hidden)var t=h.innerHTML="<pre></pre>";else{var t="<pre"+(e.className?' class="'+e.className+'"':"")+">"+e.getHTML(ur)+"</pre>";e.bgClassName&&(t='<div style="position: relative"><pre class="'+e.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2">&#160;</pre>'+t+"</div>")}h.innerHTML=t,pt.insertBefore(h.firstChild,s)}else s=s.nextSibling;++f})}function qn(){if(!s.gutter&&!s.lineNumbers)return;var e=J.offsetHeight,t=z.clientHeight;K.style.height=(e-t<2?t:e)+"px";var n=[],r=It,i;bt.iter(It,Math.max(qt,It+1),function(e){if(e.hidden)n.push("<pre></pre>");else{var t=e.gutterMarker,o=s.lineNumbers?r+s.firstLineNumber:null;t&&t.text?o=t.text.replace("%N%",o!=null?o:""):o==null&&(o=" "),n.push(t&&t.style?'<pre class="'+t.style+'">':"<pre>",o);for(var u=1;u<e.height;++u)n.push("<br/>&#160;");n.push("</pre>"),t||(i=r)}++r}),K.style.display="none",nt.innerHTML=n.join("");if(i!=null){var o=nt.childNodes[i-It],u=String(bt.size).length,a=G(o),f="";while(a.length+f.length<u)f+=" ";f&&o.insertBefore(document.createTextNode(f),o.firstChild)}K.style.display="";var l=Math.abs((parseInt(rt.style.marginLeft)||0)-K.offsetWidth)>2;return rt.style.marginLeft=K.offsetWidth+"px",Bt=!1,l}function Rn(){var e=Z(St.from,St.to),t=xr(St.from,!0),n=e?t:xr(St.to,!0),r=St.inverted?t:n,i=Ar(),o=Q(y),u=Q(pt);C.style.top=Math.max(0,Math.min(z.offsetHeight,r.y+u.top-o.top))+"px",C.style.left=Math.max(0,Math.min(z.offsetWidth,r.x+u.left-o.left))+"px";if(e)ct.style.top=r.y+"px",ct.style.left=(s.lineWrapping?Math.min(r.x,rt.offsetWidth):r.x)+"px",ct.style.display="",ht.style.display="none";else{var a=t.y==n.y,f="",l=rt.clientWidth||rt.offsetWidth,c=rt.clientHeight||rt.offsetHeight;function h(e,t,n,r){var i=q?"width: "+(n?l-n-e:l)+"px":"right: "+n+"px";f+='<div class="CodeMirror-selected" style="position: absolute; left: '+e+"px; top: "+t+"px; "+i+"; height: "+r+'px"></div>'}if(St.from.ch&&t.y>=0){var p=a?l-n.x:0;h(t.x,t.y,p,i)}var d=Math.max(0,t.y+(St.from.ch?i:0)),v=Math.min(n.y,c)-d;v>.2*i&&h(0,d,0,v),(!a||!St.from.ch)&&n.y<c-.5*i&&h(0,n.y,l-n.x,i),ht.innerHTML=f,ct.style.display="none",ht.style.display=""}}function Un(e){e?xt=xt||(St.inverted?St.to:St.from):xt=null}function zn(e,t){var n=xt&&Jn(xt);n&&(et(n,e)?e=n:et(t,n)&&(t=n)),Wn(e,t),Mt=!0}function Wn(e,t,n,r){Yn=null,n==null&&(n=St.from.line,r=St.to.line);if(Z(St.from,e)&&Z(St.to,t))return;if(et(t,e)){var i=t;t=e,e=i}if(e.line!=n){var o=Xn(e,n,St.from.ch);o?e=o:gr(e.line,!1)}t.line!=r&&(t=Xn(t,r,St.to.ch)),Z(e,t)?St.inverted=!1:Z(e,St.to)?St.inverted=!1:Z(t,St.from)&&(St.inverted=!0);if(s.autoClearEmptyLines&&Z(St.from,St.to)){var u=St.inverted?e:t;if(u.line!=St.from.line&&St.from.line<bt.size){var a=Gt(St.from.line);/^\s+$/.test(a.text)&&setTimeout(Jr(function(){if(a.parent&&/^\s+$/.test(a.text)){var e=S(a);En("",{line:e,ch:0},{line:e,ch:a.text.length})}},10))}}St.from=e,St.to=t,Pt=!0}function Xn(e,t,n){function r(t){var r=e.line+t,i=t==1?bt.size:-1;while(r!=i){var o=Gt(r);if(!o.hidden){var u=e.ch;if(s||u>n||u>o.text.length)u=o.text.length;return{line:r,ch:u}}r+=t}}var i=Gt(e.line),s=e.ch==i.text.length&&e.ch!=n;return i.hidden?e.line>=t?r(1)||r(-1):r(-1)||r(1):e}function Vn(e,t,n){var r=Jn({line:e,ch:t||0});(n?zn:Wn)(r,r)}function $n(e){return Math.max(0,Math.min(e,bt.size-1))}function Jn(e){if(e.line<0)return{line:0,ch:0};if(e.line>=bt.size)return{line:bt.size-1,ch:Gt(bt.size-1).text.length};var t=e.ch,n=Gt(e.line).text.length;return t==null||t>n?{line:e.line,ch:n}:t<0?{line:e.line,ch:0}:e}function Kn(e,t){function o(){for(var t=r+e,n=e<0?-1:bt.size;t!=n;t+=e){var i=Gt(t);if(!i.hidden)return r=t,s=i,!0}}function u(t){if(i==(e<0?0:s.text.length)){if(!!t||!o())return!1;i=e<0?s.text.length:0}else i+=e;return!0}var n=St.inverted?St.from:St.to,r=n.line,i=n.ch,s=Gt(r);if(t=="char")u();else if(t=="column")u(!0);else if(t=="word"){var a=!1;for(;;){if(e<0&&!u())break;if(ot(s.text.charAt(i)))a=!0;else if(a){e<0&&(e=1,u());break}if(e>0&&!u())break}}return{line:r,ch:i}}function Qn(e,t){var n=e<0?St.from:St.to;if(xt||Z(St.from,St.to))n=Kn(e,t);Vn(n.line,n.ch,!0)}function Gn(e,t){Z(St.from,St.to)?e<0?En("",Kn(e,t),St.to):En("",St.from,Kn(e,t)):En("",St.from,St.to),Mt=!0}function Zn(e,t){var n=0,r=xr(St.inverted?St.from:St.to,!0);Yn!=null&&(r.x=Yn),t=="page"?n=Math.min(z.clientHeight,window.innerHeight||document.documentElement.clientHeight):t=="line"&&(n=Ar());var i=Tr(r.x,r.y+n*e+2);t=="page"&&(z.scrollTop+=xr(i,!0).y-r.y),Vn(i.line,i.ch,!0),Yn=r.x}function er(e){var t=Gt(e.line).text,n=e.ch,r=e.ch;while(n>0&&ot(t.charAt(n-1)))--n;while(r<t.length&&ot(t.charAt(r)))++r;zn({line:e.line,ch:n},{line:e.line,ch:r})}function tr(e){zn({line:e,ch:0},Jn({line:e+1,ch:0}))}function nr(e){if(Z(St.from,St.to))return rr(St.from.line,e);var t=St.to.line-(St.to.ch?0:1);for(var n=St.from.line;n<=t;++n)rr(n,e)}function rr(e,t){t||(t="add");if(t=="smart")if(!yt.indent)t="prev";else var n=Rr(e);var r=Gt(e),i=r.indentation(s.tabSize),o=r.text.match(/^\s*/)[0],u;t=="prev"?e?u=Gt(e-1).indentation(s.tabSize):u=0:t=="smart"?u=yt.indent(n,r.text.slice(o.length),r.text):t=="add"?u=i+s.indentUnit:t=="subtract"&&(u=i-s.indentUnit),u=Math.max(0,u);var a=u-i;if(!a){if(St.from.line!=e&&St.to.line!=e)return;var f=o}else{var f="",l=0;if(s.indentWithTabs)for(var c=Math.floor(u/s.tabSize);c;--c)l+=s.tabSize,f+=" ";while(l<u)++l,f+=" "}En(f,{line:e,ch:0},{line:e,ch:o.length})}function ir(){yt=e.getMode(s,s.mode),bt.iter(0,bt.size,function(e){e.stateAfter=null}),wt=[0],Wr()}function sr(){var e=s.gutter||s.lineNumbers;K.style.display=e?"":"none",e?Bt=!0:pt.parentNode.style.marginLeft=0}function or(e,t){if(s.lineWrapping){y.className+=" CodeMirror-wrap";var n=z.clientWidth/_r()-3;bt.iter(0,bt.size,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/n)||1;t!=1&&Yt(e,t)}),rt.style.width=V.style.width=""}else y.className=y.className.replace(" CodeMirror-wrap",""),Wt=null,zt="",bt.iter(0,bt.size,function(e){e.height!=1&&!e.hidden&&Yt(e,1),e.text.length>zt.length&&(zt=e.text)});_t.push({from:0,to:bt.size})}function ur(e){var t=s.tabSize-e%s.tabSize,n=Xt[t];if(n)return n;for(var r='<span class="cm-tab">',i=0;i<t;++i)r+=" ";return Xt[t]={html:r+"</span>",width:t}}function ar(){z.className=z.className.replace(/\s*cm-s-\S+/g,"")+s.theme.replace(/(^|\s)\s*/g," cm-s-")}function fr(){this.set=[]}function lr(e,t,n){function i(e,t,n,i){Gt(e).addMark(new v(t,n,i,r))}e=Jn(e),t=Jn(t);var r=new fr;if(!et(e,t))return r;if(e.line==t.line)i(e.line,e.ch,t.ch,n);else{i(e.line,e.ch,null,n);for(var s=e.line+1,o=t.line;s<o;++s)i(s,null,null,n);i(t.line,null,t.ch,n)}return _t.push({from:e.line,to:t.line+1}),r}function cr(e){e=Jn(e);var t=new m(e.ch);return Gt(e.line).addMark(t),t}function hr(e){e=Jn(e);var t=[],n=Gt(e.line).marked;if(!n)return t;for(var r=0,i=n.length;r<i;++r){var s=n[r];(s.from==null||s.from<=e.ch)&&(s.to==null||s.to>=e.ch)&&t.push(s.marker||s)}return t}function pr(e,t,n){return typeof e=="number"&&(e=Gt($n(e))),e.gutterMarker={text:t,style:n},Bt=!0,e}function dr(e){typeof e=="number"&&(e=Gt($n(e))),e.gutterMarker=null,Bt=!0}function vr(e,t){var n=e,r=e;return typeof e=="number"?r=Gt($n(e)):n=S(e),n==null?null:t(r,n)?(_t.push({from:n,to:n+1}),r):null}function mr(e,t,n){return vr(e,function(e){if(e.className!=t||e.bgClassName!=n)return e.className=t,e.bgClassName=n,!0})}function gr(e,t){return vr(e,function(e,n){if(e.hidden!=t){e.hidden=t,Yt(e,t?0:1);var r=St.from.line,i=St.to.line;if(t&&(r==n||i==n)){var s=r==n?Xn({line:r,ch:0},r,0):St.from,o=i==n?Xn({line:i,ch:0},i,0):St.to;if(!o)return;Wn(s,o)}return Bt=!0}})}function yr(e){if(typeof e=="number"){if(!Kt(e))return null;var t=e;e=Gt(e);if(!e)return null}else{var t=S(e);if(t==null)return null}var n=e.gutterMarker;return{line:t,handle:e,text:e.text,markerText:n&&n.text,markerClass:n&&n.style,lineClass:e.className,bgClass:e.bgClassName}}function br(e){return lt.innerHTML="<pre><span>x</span></pre>",lt.firstChild.firstChild.firstChild.nodeValue=e,lt.firstChild.firstChild.offsetWidth||10}function wr(e,t){function i(e){return Sr(n,e).left}if(t<=0)return 0;var n=Gt(e),r=n.text,s=0,o=0,u=r.length,a,f=Math.min(u,Math.ceil(t/_r()));for(;;){var l=i(f);if(!(l<=t&&f<u)){a=l,u=f;break}f=Math.min(u,Math.ceil(f*1.2))}if(t>a)return u;f=Math.floor(u*.8),l=i(f),l<t&&(s=f,o=l);for(;;){if(u-s<=1)return a-t>t-o?s:u;var c=Math.ceil((s+u)/2),h=i(c);h>t?(u=c,a=h):(s=c,o=h)}}function Sr(e,t){if(t==0)return{top:0,left:0};var n=s.lineWrapping&&t<e.text.length&&$.test(e.text.slice(t-1,t+1));lt.innerHTML="<pre>"+e.getHTML(ur,t,Er,n)+"</pre>";var r=document.getElementById(Er),i=r.offsetTop,o=r.offsetLeft;if(F&&i==0&&o==0){var u=document.createElement("span");u.innerHTML="x",r.parentNode.insertBefore(u,r.nextSibling),i=u.offsetTop}return{top:i,left:o}}function xr(e,t){var n,r=Ar(),i=r*(T(bt,e.line)-(t?Ft:0));if(e.ch==0)n=0;else{var o=Sr(Gt(e.line),e.ch);n=o.left,s.lineWrapping&&(i+=Math.max(0,o.top))}return{x:n,y:i,yBot:i+r}}function Tr(e,t){function c(e){var t=Sr(u,e);if(f){var r=Math.round(t.top/n);return Math.max(0,t.left+(r-l)*z.clientWidth)}return t.left}t<0&&(t=0);var n=Ar(),r=_r(),i=Ft+Math.floor(t/n),o=x(bt,i);if(o>=bt.size)return{line:bt.size-1,ch:Gt(bt.size-1).text.length};var u=Gt(o),a=u.text,f=s.lineWrapping,l=f?i-T(bt,o):0;if(e<=0&&l==0)return{line:o,ch:0};var h=0,p=0,d=a.length,v,m=Math.min(d,Math.ceil((e+l*z.clientWidth*.9)/r));for(;;){var g=c(m);if(!(g<=e&&m<d)){v=g,d=m;break}m=Math.min(d,Math.ceil(m*1.2))}if(e>v)return{line:o,ch:d};m=Math.floor(d*.8),g=c(m),g<e&&(h=m,p=g);for(;;){if(d-h<=1)return{line:o,ch:v-e>e-p?h:d};var y=Math.ceil((h+d)/2),b=c(y);b>e?(d=y,v=b):(h=y,p=b)}}function Nr(e){var t=xr(e,!0),n=Q(rt);return{x:n.left+t.x,y:n.top+t.y,yBot:n.top+t.yBot}}function Ar(){if(Lr==null){Lr="<pre>";for(var e=0;e<49;++e)Lr+="x<br/>";Lr+="x</pre>"}var t=pt.clientHeight;return t==kr?Cr:(kr=t,lt.innerHTML=Lr,Cr=lt.firstChild.offsetHeight/50||1,lt.innerHTML="",Cr)}function _r(){return z.clientWidth==Mr?Or:(Mr=z.clientWidth,Or=br("x"))}function Dr(){return rt.offsetTop}function Pr(){return rt.offsetLeft}function Hr(e,t){var n=Q(z,!0),r,i;try{r=e.clientX,i=e.clientY}catch(e){return null}if(!t&&(r-n.left>z.clientWidth||i-n.top>z.clientHeight))return null;var s=Q(rt,!0);return Tr(r-s.left,i-s.top)}function Br(e){function s(){var e=ut(A.value).join("\n");e!=i&&Jr(Sn)(e,"end"),C.style.position="relative",A.style.cssText=r,I&&(z.scrollTop=n),Ht=!1,Mn(!0),kn()}var t=Hr(e),n=z.scrollTop;if(!t||window.opera)return;(Z(St.from,St.to)||et(t,St.from)||!et(t,St.to))&&Jr(Vn)(t.line,t.ch);var r=A.style.cssText;C.style.position="absolute",A.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: white; "+"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ht=!0;var i=A.value=Nn();_n(),Y(A);if(j){O(e);var o=P(window,"mouseup",function(){o(),setTimeout(s,20)},!0)}else setTimeout(s,50)}function jr(){clearInterval(gt);var e=!0;ct.style.visibility="",gt=setInterval(function(){ct.style.visibility=(e=!e)?"":"hidden"},650)}function Ir(e){function v(e,t,n){if(!e.text)return;var r=e.styles,i=o?0:e.text.length-1,s;for(var a=o?0:r.length-2,f=o?r.length:-2;a!=f;a+=2*u){var l=r[a];if(r[a+1]!=null&&r[a+1]!=h){i+=u*l.length;continue}for(var c=o?0:l.length-1,v=o?l.length:-1;c!=v;c+=u,i+=u)if(i>=t&&i<n&&d.test(s=l.charAt(c))){var m=Fr[s];if(m.charAt(1)==">"==o)p.push(s);else{if(p.pop()!=m.charAt(0))return{pos:i,match:!1};if(!p.length)return{pos:i,match:!0}}}}}var t=St.inverted?St.from:St.to,n=Gt(t.line),r=t.ch-1,i=r>=0&&Fr[n.text.charAt(r)]||Fr[n.text.charAt(++r)];if(!i)return;var s=i.charAt(0),o=i.charAt(1)==">",u=o?1:-1,a=n.styles;for(var f=r+1,l=0,c=a.length;l<c;l+=2)if((f-=a[l].length)<=0){var h=a[l+1];break}var p=[n.text.charAt(r)],d=/[(){}[\]]/;for(var l=t.line,c=o?Math.min(l+100,bt.size):Math.max(-1,l-100);l!=c;l+=u){var n=Gt(l),m=l==t.line,g=v(n,m&&o?r+1:0,m&&!o?r:n.text.length);if(g)break}g||(g={pos:null,match:!1});var h=g.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",y=lr({line:t.line,ch:r},{line:t.line,ch:r+1},h),b=g.pos!=null&&lr({line:l,ch:g.pos},{line:l,ch:g.pos+1},h),w=Jr(function(){y.clear(),b&&b.clear()});e?setTimeout(w,800):Ut=w}function qr(e){var t,n;for(var r=e,i=e-40;r>i;--r){if(r==0)return 0;var o=Gt(r-1);if(o.stateAfter)return r;var u=o.indentation(s.tabSize);if(n==null||t>u)n=r-1,t=u}return n}function Rr(e){var t=qr(e),n=t&&Gt(t-1).stateAfter;return n?n=h(yt,n):n=p(yt),bt.iter(t,e,function(e){e.highlight(yt,n,s.tabSize),e.stateAfter=h(yt,n)}),t<e&&_t.push({from:t,to:e}),e<bt.size&&!Gt(e).stateAfter&&wt.push(e),n}function Ur(e,t){var n=Rr(e);bt.iter(e,t,function(e){e.highlight(yt,n,s.tabSize),e.stateAfter=h(yt,n)})}function zr(){var e=+(new Date)+s.workTime,t=wt.length;while(wt.length){if(!Gt(It).stateAfter)var n=It;else var n=wt.pop();if(n>=bt.size)continue;var r=qr(n),i=r&&Gt(r-1).stateAfter;i?i=h(yt,i):i=p(yt);var o=0,u=yt.compareStates,a=!1,f=r,l=!1;bt.iter(f,bt.size,function(t){var r=t.stateAfter;if(+(new Date)>e)return wt.push(f),Wr(s.workDelay),a&&_t.push({from:n,to:f+1}),l=!0;var c=t.highlight(yt,i,s.tabSize);c&&(a=!0),t.stateAfter=h(yt,i);var p=null;if(u){var d=r&&u(r,i);d!=B&&(p=!!d)}p==null&&(c!==!1||!r?o=0:++o>3&&(!yt.indent||yt.indent(r,"")==yt.indent(i,""))&&(p=!0));if(p)return!0;++f});if(l)return;a&&_t.push({from:n,to:f+1})}t&&s.onHighlightComplete&&s.onHighlightComplete(Qt)}function Wr(e){if(!wt.length)return;mt.set(e,Jr(zr))}function Xr(){Ot=Mt=Dt=null,_t=[],Pt=!1,jt=[]}function Vr(){var e=!1,t;Pt&&(e=!Pn()),_t.length?t=jn(_t,!0):(Pt&&Rn(),Bt&&qn()),e&&Pn(),Pt&&(Dn(),jr()),Et&&!Ht&&(Ot===!0||Ot!==!1&&Pt)&&Mn(Mt),Pt&&s.matchBrackets&&setTimeout(Jr(function(){Ut&&(Ut(),Ut=null),Z(St.from,St.to)&&Ir(!1)}),20);var n=Dt,r=jt;Pt&&s.onCursorActivity&&s.onCursorActivity(Qt),n&&s.onChange&&Qt&&s.onChange(Qt,n);for(var i=0;i<r.length;++i)r[i](Qt);t&&s.onUpdate&&s.onUpdate(Qt)}function Jr(e){return function(){$r++||Xr();try{var t=e.apply(this,arguments)}finally{--$r||Vr()}return t}}function Kr(e){Vt.startCompound();try{return e()}finally{Vt.endCompound()}}var s={},a=e.defaults;for(var d in a)a.hasOwnProperty(d)&&(s[d]=(i&&i.hasOwnProperty(d)?i:a)[d]);var y=document.createElement("div");y.className="CodeMirror"+(s.lineWrapping?" CodeMirror-wrap":""),y.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor">&#160;</pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>',r.appendChild?r.appendChild(y):r(y);var C=y.firstChild,A=C.firstChild,z=y.lastChild,V=z.firstChild,J=V.firstChild,K=J.firstChild,nt=K.firstChild,rt=K.nextSibling.firstChild,lt=rt.firstChild,ct=lt.nextSibling,ht=ct.nextSibling,pt=ht.nextSibling;ar(),t&&(A.style.width="0px"),R||(rt.draggable=!0),rt.style.outline="none",s.tabindex!=null&&(A.tabIndex=s.tabindex),s.autofocus&&_n(),!s.gutter&&!s.lineNumbers&&(K.style.display="none"),W&&(C.style.height="1px",C.style.position="absolute");try{br("x")}catch(dt){throw dt.message.match(/runtime/i)&&(dt=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")),dt}var vt=new H,mt=new H,gt,yt,bt=new w([new b([new g("")])]),wt,Et;ir();var St={from:{line:0,ch:0},to:{line:0,ch:0},inverted:!1},xt,Tt,Nt,Ct=0,kt,Lt=!1,At=!1,Ot,Mt,_t,Dt,Pt,Ht,Bt,jt,Ft=0,It=0,qt=0,Rt=0,Ut,zt="",Wt,Xt={};Jr(function(){Zt(s.value||""),Ot=!1})();var Vt=new N;P(z,"mousedown",Jr(tn)),P(z,"dblclick",Jr(nn)),P(rt,"selectstart",L),j||P(z,"contextmenu",Br),P(z,"scroll",function(){Ct=z.scrollTop,jn([]),s.fixedGutter&&(K.style.left=z.scrollLeft+"px"),s.onScroll&&s.onScroll(Qt)}),P(window,"resize",function(){jn(!0)}),P(A,"keyup",Jr(pn)),P(A,"input",Ln),P(A,"keydown",Jr(cn)),P(A,"keypress",Jr(hn)),P(A,"focus",dn),P(A,"blur",vn);if(s.dragDrop){P(rt,"dragstart",sn);function $t(e){if(s.onDragEvent&&s.onDragEvent(Qt,k(e)))return;O(e)}P(z,"dragenter",$t),P(z,"dragover",$t),P(z,"drop",Jr(rn))}P(z,"paste",function(){_n(),Ln()}),P(A,"paste",Ln),P(A,"cut",Jr(function(){s.readOnly||Sn("")})),W&&P(V,"mouseup",function(){document.activeElement==A&&A.blur(),_n()});var Jt;try{Jt=document.activeElement==A}catch(dt){}Jt||s.autofocus?setTimeout(dn,20):vn();var Qt=y.CodeMirror={getValue:en,setValue:Jr(Zt),getSelection:Nn,replaceSelection:Jr(Sn),focus:function(){window.focus(),_n(),dn(),Ln()},setOption:function(e,t){var n=s[e];s[e]=t,e=="mode"||e=="indentUnit"?ir():e=="readOnly"&&t=="nocursor"?(vn(),A.blur()):e=="readOnly"&&!t?Mn(!0):e=="theme"?ar():e=="lineWrapping"&&n!=t?Jr(or)():e=="tabSize"&&jn(!0);if(e=="lineNumbers"||e=="gutter"||e=="firstLineNumber"||e=="theme")sr(),jn(!0)},getOption:function(e){return s[e]},undo:Jr(yn),redo:Jr(bn),indentLine:Jr(function(e,t){typeof t!="string"&&(t==null?t=s.smartIndent?"smart":"prev":t=t?"add":"subtract"),Kt(e)&&rr(e,t)}),indentSelection:Jr(nr),historySize:function(){return{undo:Vt.done.length,redo:Vt.undone.length}},clearHistory:function(){Vt=new N},matchBrackets:Jr(function(){Ir(!0)}),getTokenAt:Jr(function(e){return e=Jn(e),Gt(e.line).getTokenAt(yt,Rr(e.line),e.ch)}),getStateAfter:function(e){return e=$n(e==null?bt.size-1:e),Rr(e+1)},cursorCoords:function(e,t){return e==null&&(e=St.inverted),this.charCoords(e?St.from:St.to,t)},charCoords:function(e,t){return e=Jn(e),t=="local"?xr(e,!1):t=="div"?xr(e,!0):Nr(e)},coordsChar:function(e){var t=Q(rt);return Tr(e.x-t.left,e.y-t.top)},markText:Jr(lr),setBookmark:cr,findMarksAt:hr,setMarker:Jr(pr),clearMarker:Jr(dr),setLineClass:Jr(mr),hideLine:Jr(function(e){return gr(e,!0)}),showLine:Jr(function(e){return gr(e,!1)}),onDeleteLine:function(e,t){if(typeof e=="number"){if(!Kt(e))return null;e=Gt(e)}return(e.handlers||(e.handlers=[])).push(t),e},lineInfo:yr,addWidget:function(e,t,n,r,i){e=xr(Jn(e));var s=e.yBot,o=e.x;t.style.position="absolute",V.appendChild(t);if(r=="over")s=e.y;else if(r=="near"){var u=Math.max(z.offsetHeight,bt.height*Ar()),a=Math.max(V.clientWidth,rt.clientWidth)-Pr();e.yBot+t.offsetHeight>u&&e.y>t.offsetHeight&&(s=e.y-t.offsetHeight),o+t.offsetWidth>a&&(o=a-t.offsetWidth)}t.style.top=s+Dr()+"px",t.style.left=t.style.right="",i=="right"?(o=V.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?o=0:i=="middle"&&(o=(V.clientWidth-t.offsetWidth)/2),t.style.left=o+Pr()+"px"),n&&Hn(o,s,o+t.offsetWidth,s+t.offsetHeight)},lineCount:function(){return bt.size},clipPos:Jn,getCursor:function(e){return e==null&&(e=St.inverted),tt(e?St.from:St.to)},somethingSelected:function(){return!Z(St.from,St.to)},setCursor:Jr(function(e,t,n){t==null&&typeof e.line=="number"?Vn(e.line,e.ch,n):Vn(e,t,n)}),setSelection:Jr(function(e,t,n){(n?zn:Wn)(Jn(e),Jn(t||e))}),getLine:function(e){if(Kt(e))return Gt(e).text},getLineHandle:function(e){if(Kt(e))return Gt(e)},setLine:Jr(function(e,t){Kt(e)&&En(t,{line:e,ch:0},{line:e,ch:Gt(e).text.length})}),removeLine:Jr(function(e){Kt(e)&&En("",{line:e,ch:0},Jn({line:e+1,ch:0}))}),replaceRange:Jr(En),getRange:function(e,t){return Tn(Jn(e),Jn(t))},triggerOnKeyDown:Jr(cn),execCommand:function(e){return u[e](Qt)},moveH:Jr(Qn),deleteH:Jr(Gn),moveV:Jr(Zn),toggleOverwrite:function(){Lt?(Lt=!1,ct.className=ct.className.replace(" CodeMirror-overwrite","")):(Lt=!0,ct.className+=" CodeMirror-overwrite")},posFromIndex:function(e){var t=0,n;return bt.iter(0,bt.size,function(r){var i=r.text.length+1;if(i>e)return n=e,!0;e-=i,++t}),Jn({line:t,ch:n})},indexFromPos:function(e){if(e.line<0||e.ch<0)return 0;var t=e.ch;return bt.iter(0,e.line,function(e){t+=e.text.length+1}),t},scrollTo:function(e,t){e!=null&&(z.scrollLeft=e),t!=null&&(z.scrollTop=t),jn([])},operation:function(e){return Jr(e)()},compoundChange:function(e){return Kr(e)},refresh:function(){jn(!0),z.scrollHeight>Ct&&(z.scrollTop=Ct)},getInputField:function(){return A},getWrapperElement:function(){return y},getScrollerElement:function(){return z},getGutterElement:function(){return K}},fn=null,ln,Cn=!1,An="",Yn=null;fr.prototype.clear=Jr(function(){var e=Infinity,t=-Infinity;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;if(!s||!i.parent)continue;var o=S(i);e=Math.min(e,o),t=Math.max(t,o);for(var u=0;u<s.length;++u)s[u].marker==this&&s.splice(u--,1)}e!=Infinity&&_t.push({from:e,to:t+1})}),fr.prototype.find=function(){var e,t;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;for(var o=0;o<s.length;++o){var u=s[o];if(u.marker==this)if(u.from!=null||u.to!=null){var a=S(i);a!=null&&(u.from!=null&&(e={line:a,ch:u.from}),u.to!=null&&(t={line:a,ch:u.to}))}}}return{from:e,to:t}};var Er="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16),Cr,kr,Lr,Or,Mr=0,Fr={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},$r=0;for(var Qr in o)o.propertyIsEnumerable(Qr)&&!Qt.propertyIsEnumerable(Qr)&&(Qt[Qr]=o[Qr]);return Qt}function f(e){return typeof e=="string"?a[e]:e}function l(e,t,n,r,i){function s(t){t=f(t);var n=t[e];if(n!=null&&r(n))return!0;if(t.nofallthrough)return i&&i(),!0;var o=t.fallthrough;if(o==null)return!1;if(Object.prototype.toString.call(o)!="[object Array]")return s(o);for(var u=0,a=o.length;u<a;++u)if(s(o[u]))return!0;return!1}return t&&s(t)?!0:s(n)}function c(e){var t=ft[D(e,"keyCode")];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function h(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function p(e,t,n){return e.startState?e.startState(t,n):!0}function d(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8}function v(e,t,n,r){this.from=e,this.to=t,this.style=n,this.marker=r}function m(e){this.from=e,this.to=e,this.line=null}function g(e,t){this.styles=t||[e,null],this.text=e,this.height=1,this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null,this.stateAfter=this.parent=this.hidden=null}function y(e,t,n,r){for(var i=0,s=0,o=0;s<t;i+=2){var u=n[i],a=s+u.length;o==0?(a>e&&r.push(u.slice(e-s,Math.min(u.length,t-s)),n[i+1]),a>=e&&(o=1)):o==1&&(a>t?r.push(u.slice(0,t-s),n[i+1]):r.push(u,n[i+1])),s=a}}function b(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;t<n;++t)e[t].parent=this,r+=e[t].height;this.height=r}function w(e){this.children=e;var t=0,n=0;for(var r=0,i=e.length;r<i;++r){var s=e[r];t+=s.chunkSize(),n+=s.height,s.parent=this}this.size=t,this.height=n,this.parent=null}function E(e,t){while(!e.lines)for(var n=0;;++n){var r=e.children[n],i=r.chunkSize();if(t<i){e=r;break}t-=i}return e.lines[t]}function S(e){if(e.parent==null)return null;var t=e.parent,n=st(t.lines,e);for(var r=t.parent;r;t=r,r=r.parent)for(var i=0,s=r.children.length;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n}function x(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.height;if(t<o){e=s;continue e}t-=o,n+=s.chunkSize()}return n}while(!e.lines);for(var r=0,i=e.lines.length;r<i;++r){var u=e.lines[r],a=u.height;if(t<a)break;t-=a}return n+r}function T(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.chunkSize();if(t<o){e=s;continue e}t-=o,n+=s.height}return n}while(!e.lines);for(var r=0;r<t;++r)n+=e.lines[r].height;return n}function N(){this.time=0,this.done=[],this.undone=[],this.compound=0,this.closed=!1}function C(){O(this)}function k(e){return e.stop||(e.stop=C),e}function L(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function A(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function O(e){L(e),A(e)}function M(e){return e.target||e.srcElement}function _(e){if(e.which)return e.which;if(e.button&1)return 1;if(e.button&2)return 3;if(e.button&4)return 2}function D(e,t){var n=e.override&&e.override.hasOwnProperty(t);return n?e.override[t]:e[t]}function P(e,t,n,r){if(typeof e.addEventListener=="function"){e.addEventListener(t,n,!1);if(r)return function(){e.removeEventListener(t,n,!1)}}else{var i=function(e){n(e||window.event)};e.attachEvent("on"+t,i);if(r)return function(){e.detachEvent("on"+t,i)}}}function H(){this.id=null}function J(e,t,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var r=0,i=0;r<t;++r)e.charAt(r)==" "?i+=n-i%n:++i;return i}function K(e){return e.currentStyle?e.currentStyle:window.getComputedStyle(e,null)}function Q(e,t){var n=e.ownerDocument.body,r=0,i=0,s=!1;for(var o=e;o;o=o.offsetParent){var u=o.offsetLeft,a=o.offsetTop;o==n?(r+=Math.abs(u),i+=Math.abs(a)):(r+=u,i+=a),t&&K(o).position=="fixed"&&(s=!0)}var f=t&&!s?null:n;for(var o=e.parentNode;o!=f;o=o.parentNode)o.scrollLeft!=null&&(r-=o.scrollLeft,i-=o.scrollTop);return{left:r,top:i}}function G(e){return e.textContent||e.innerText||e.nodeValue||""}function Y(e){t?(e.selectionStart=0,e.selectionEnd=e.value.length):e.select()}function Z(e,t){return e.line==t.line&&e.ch==t.ch}function et(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function tt(e){return{line:e.line,ch:e.ch}}function rt(e){return nt.textContent=e,nt.innerHTML}function it(e,t){if(!t)return 0;if(!e)return t.length;for(var n=e.length,r=t.length;n>=0&&r>=0;--n,--r)if(e.charAt(n)!=t.charAt(r))break;return r+1}function st(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function ot(e){return/\w/.test(e)||e.toUpperCase()!=e.toLowerCase()}e.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:!1,smartIndent:!0,tabSize:4,keyMap:"default",extraKeys:null,electricChars:!0,autoClearEmptyLines:!1,onKeyEvent:null,onDragEvent:null,lineWrapping:!1,lineNumbers:!1,gutter:!1,fixedGutter:!1,firstLineNumber:1,readOnly:!1,dragDrop:!0,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:!1,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null};var t=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),n=t||/Mac/.test(navigator.platform),r=/Win/.test(navigator.platform),i=e.modes={},s=e.mimeModes={};e.defineMode=function(t,n){!e.defaults.mode&&t!="null"&&(e.defaults.mode=t);if(arguments.length>2){n.dependencies=[];for(var r=2;r<arguments.length;++r)n.dependencies.push(arguments[r])}i[t]=n},e.defineMIME=function(e,t){s[e]=t},e.resolveMode=function(t){if(typeof t=="string"&&s.hasOwnProperty(t))t=s[t];else if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return typeof t=="string"?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=i[n.name];return r?r(t,n):e.getMode(t,"text/plain")},e.listModes=function(){var e=[];for(var t in i)i.propertyIsEnumerable(t)&&e.push(t);return e},e.listMIMEs=function(){var e=[];for(var t in s)s.propertyIsEnumerable(t)&&e.push({mime:t,mode:s[t]});return e};var o=e.extensions={};e.defineExtension=function(e,t){o[e]=t};var u=e.commands={selectAll:function(e){e.setSelection({line:0,ch:0},{line:e.lineCount()-1})},killLine:function(e){var t=e.getCursor(!0),n=e.getCursor(!1),r=!Z(t,n);!r&&e.getLine(t.line).length==t.ch?e.replaceRange("",t,{line:t.line+1,ch:0}):e.replaceRange("",t,r?n:{line:t.line})},deleteLine:function(e){var t=e.getCursor().line;e.replaceRange("",{line:t,ch:0},{line:t})},undo:function(e){e.undo()},redo:function(e){e.redo()},goDocStart:function(e){e.setCursor(0,0,!0)},goDocEnd:function(e){e.setSelection({line:e.lineCount()-1},null,!0)},goLineStart:function(e){e.setCursor(e.getCursor().line,0,!0)},goLineStartSmart:function(e){var t=e.getCursor(),n=e.getLine(t.line),r=Math.max(0,n.search(/\S/));e.setCursor(t.line,t.ch<=r&&t.ch?0:r,!0)},goLineEnd:function(e){e.setSelection({line:e.getCursor().line},null,!0)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goWordRight:function(e){e.moveH(1,"word")},delCharLeft:function(e){e.deleteH(-1,"char")},delCharRight:function(e){e.deleteH(1,"char")},delWordLeft:function(e){e.deleteH(-1,"word")},delWordRight:function(e){e.deleteH(1,"word")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ","end")},transposeChars:function(e){var t=e.getCursor(),n=e.getLine(t.line);t.ch>0&&t.ch<n.length-1&&e.replaceRange(n.charAt(t.ch)+n.charAt(t.ch-1),{line:t.line,ch:t.ch-1},{line:t.line,ch:t.ch+1})},newlineAndIndent:function(e){e.replaceSelection("\n","end"),e.indentLine(e.getCursor().line)},toggleOverwrite:function(e){e.toggleOverwrite()}},a=e.keyMap={};a.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"insertTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},a.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},a.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]},a["default"]=n?a.macDefault:a.pcDefault,a.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},e.fromTextArea=function(t,n){function r(){t.value=u.getValue()}n||(n={}),n.value=t.value,!n.tabindex&&t.tabindex&&(n.tabindex=t.tabindex),n.autofocus==null&&t.getAttribute("autofocus")!=null&&(n.autofocus=!0);if(t.form){var i=P(t.form,"submit",r,!0);if(typeof t.form.submit=="function"){var s=t.form.submit;function o(){r(),t.form.submit=s,t.form.submit(),t.form.submit=o}t.form.submit=o}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return u.save=r,u.getTextArea=function(){return t},u.toTextArea=function(){r(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(i(),typeof t.form.submit=="function"&&(t.form.submit=s))},u},e.copyState=h,e.startState=p,d.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){var t=this.pos;while(this.eat(e));return this.pos>t},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return J(this.string,this.start,this.tabSize)},indentation:function(){return J(this.string,null,this.tabSize)},match:function(e,t,n){if(typeof e!="string"){var i=this.string.slice(this.pos).match(e);return i&&t!==!1&&(this.pos+=i[0].length),i}function r(e){return n?e.toLowerCase():e}if(r(this.string).indexOf(r(e),this.pos)==this.pos)return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},e.StringStream=d,v.prototype={attach:function(e){this.marker.set.push(e)},detach:function(e){var t=st(this.marker.set,e);t>-1&&this.marker.set.splice(t,1)},split:function(e,t){if(this.to<=e&&this.to!=null)return null;var n=this.from<e||this.from==null?null:this.from-e+t,r=this.to==null?null:this.to-e+t;return new v(n,r,this.style,this.marker)},dup:function(){return new v(null,null,this.style,this.marker)},clipTo:function(e,t,n,r,i){e&&r>this.from&&(r<this.to||this.to==null)?this.from=null:this.from!=null&&this.from>=t&&(this.from=Math.max(r,this.from)+i),n&&(t<this.to||this.to==null)&&(t>this.from||this.from==null)?this.to=null:this.to!=null&&this.to>t&&(this.to=r<this.to?this.to+i:t)},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(e){return this.marker==e.marker}},m.prototype={attach:function(e){this.line=e},detach:function(e){this.line==e&&(this.line=null)},split:function(e,t){if(e<this.from)return this.from=this.to=this.from-e+t,this},isDead:function(){return this.from>this.to},clipTo:function(e,t,n,r,i){(e||t<this.from)&&(n||r>this.to)?(this.from=0,this.to=-1):this.from>t&&(this.from=this.to=Math.max(r,this.from)+i)},sameSet:function(e){return!1},find:function(){return!this.line||!this.line.parent?null:{line:S(this.line),ch:this.from}},clear:function(){if(this.line){var e=st(this.line.marked,this);e!=-1&&this.line.marked.splice(e,1),this.line=null}}},g.inheritMarks=function(e,t){var n=new g(e),r=t&&t.marked;if(r)for(var i=0;i<r.length;++i)if(r[i].to==null&&r[i].style){var s=n.marked||(n.marked=[]),o=r[i],u=o.dup();s.push(u),u.attach(n)}return n},g.prototype={replace:function(e,t,n){var r=[],i=this.marked,s=t==null?this.text.length:t;y(0,e,this.styles,r),n&&r.push(n,null),y(s,this.text.length,this.styles,r),this.styles=r,this.text=this.text.slice(0,e)+n+this.text.slice(s),this.stateAfter=null;if(i){var o=n.length-(s-e);for(var u=0;u<i.length;++u){var a=i[u];a.clipTo(e==null,e||0,t==null,s,o),a.isDead()&&(a.detach(this),i.splice(u--,1))}}},split:function(e,t){var n=[t,null],r=this.marked;y(e,this.text.length,this.styles,n);var i=new g(t+this.text.slice(e),n);if(r)for(var s=0;s<r.length;++s){var o=r[s],u=o.split(e,t.length);u&&(i.marked||(i.marked=[]),i.marked.push(u),u.attach(i),u==o&&r.splice(s--,1))}return i},append:function(e){var t=this.text.length,n=e.marked,r=this.marked;this.text+=e.text,y(0,e.text.length,e.styles,this.styles);if(r)for(var i=0;i<r.length;++i)r[i].to==null&&(r[i].to=t);if(n&&n.length){r||(this.marked=r=[]);e:for(var i=0;i<n.length;++i){var s=n[i];if(!s.from)for(var o=0;o<r.length;++o){var u=r[o];if(u.to==t&&u.sameSet(s)){u.to=s.to==null?null:s.to+t,u.isDead()&&(u.detach(this),n.splice(i--,1));continue e}}r.push(s),s.attach(this),s.from+=t,s.to!=null&&(s.to+=t)}}},fixMarkEnds:function(e){var t=this.marked,n=e.marked;if(!t)return;for(var r=0;r<t.length;++r){var i=t[r],s=i.to==null;if(s&&n)for(var o=0;o<n.length;++o)if(n[o].sameSet(i)){s=!1;break}s&&(i.to=this.text.length)}},fixMarkStarts:function(){var e=this.marked;if(!e)return;for(var t=0;t<e.length;++t)e[t].from==null&&(e[t].from=0)},addMark:function(e){e.attach(this),this.marked==null&&(this.marked=[]),this.marked.push(e),this.marked.sort(function(e,t){return(e.from||0)-(t.from||0)})},highlight:function(e,t,n){var r=new d(this.text,n),i=this.styles,s=0,o=!1,u=i[0],a;this.text==""&&e.blankLine&&e.blankLine(t);while(!r.eol()){var f=e.token(r,t),l=this.text.slice(r.start,r.pos);r.start=r.pos,s&&i[s-1]==f?i[s-2]+=l:l&&(!o&&(i[s+1]!=f||s&&i[s-2]!=a)&&(o=!0),i[s++]=l,i[s++]=f,a=u,u=i[s]);if(r.pos>5e3){i[s++]=this.text.slice(r.pos),i[s++]=null;break}}return i.length!=s&&(i.length=s,o=!0),s&&i[s-2]!=a&&(o=!0),o||(i.length<5&&this.text.length<10?null:!1)},getTokenAt:function(e,t,n){var r=this.text,i=new d(r);while(i.pos<n&&!i.eol()){i.start=i.pos;var s=e.token(i,t)}return{start:i.start,end:i.pos,string:i.current(),className:s||null,state:t}},indentation:function(e){return J(this.text,null,e)},getHTML:function(e,t,n,r){function u(t,n){if(!t)return;s&&F&&t.charAt(0)==" "&&(t=" "+t.slice(1)),s=!1;if(t.indexOf(" ")==-1){o+=t.length;var r=rt(t)}else{var r="";for(var u=0;;){var a=t.indexOf(" ",u);if(a==-1){r+=rt(t.slice(u)),o+=t.length-u;break}o+=a-u;var f=e(o);r+=rt(t.slice(u,a))+f.html,o+=f.width,u=a+1}}n?i.push('<span class="',n,'">',r,"</span>"):i.push(r)}function v(e){return e?"cm-"+e.replace(/ +/g," cm-"):null}var i=[],s=!0,o=0,a=u;if(t!=null){var f=0,l='<span id="'+n+'">';a=function(e,n){var s=e.length;t>=f&&t<f+s?(t>f&&(u(e.slice(0,t-f),n),r&&i.push("<wbr>")),i.push(l),u(e.slice(t-f),n),i.push("</span>"),t--,f+=s):(f+=s,u(e,n),f==t&&f==d?i.push(l+"</span>"):f>t+10&&/\s/.test(e)&&(a=function(){}))}}var c=this.styles,h=this.text,p=this.marked,d=h.length;if(!h&&t==null)a(" ");else if(!p||!p.length)for(var m=0,g=0;g<d;m+=2){var y=c[m],b=c[m+1],w=y.length;g+w>d&&(y=y.slice(0,d-g)),g+=w,a(y,v(b))}else{var E=0,m=0,S="",b,x=0,T=p[0].from||0,N=[],C=0;function k(){var e;while(C<p.length&&((e=p[C]).from==E||e.from==null))e.style!=null&&N.push(e),++C;T=C<p.length?p[C].from:Infinity;for(var t=0;t<N.length;++t){var n=N[t].to||Infinity;n==E?N.splice(t--,1):T=Math.min(n,T)}}var L=0;while(E<d){T==E&&k();var A=Math.min(d,T);for(;;){if(S){var O=E+S.length,M=b;for(var _=0;_<N.length;++_)M=(M?M+" ":"")+N[_].style;a(O>A?S.slice(0,A-E):S,M);if(O>=A){S=S.slice(A-E),E=A;break}E=O}S=c[m++],b=v(c[m++])}}}return i.join("")},cleanUp:function(){this.parent=null;if(this.marked)for(var e=0,t=this.marked.length;e<t;++e)this.marked[e].detach(this)}},b.prototype={chunkSize:function(){return this.lines.length},remove:function(e,t,n){for(var r=e,i=e+t;r<i;++r){var s=this.lines[r];this.height-=s.height,s.cleanUp();if(s.handlers)for(var o=0;o<s.handlers.length;++o)n.push(s.handlers[o])}this.lines.splice(e,t)},collapse:function(e){e.splice.apply(e,[e.length,0].concat(this.lines))},insertHeight:function(e,t,n){this.height+=n,F?this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e)):this.lines.splice.apply(this.lines,[e,0].concat(t));for(var r=0,i=t.length;r<i;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},w.prototype={chunkSize:function(){return this.size},remove:function(e,t,n){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],s=i.chunkSize();if(e<s){var o=Math.min(t,s-e),u=i.height;i.remove(e,o,n),this.height-=u-i.height,s==o&&(this.children.splice(r--,1),i.parent=null);if((t-=o)==0)break;e=0}else e-=s}if(this.size-t<25){var a=[];this.collapse(a),this.children=[new b(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0,n=this.children.length;t<n;++t)this.children[t].collapse(e)},insert:function(e,t){var n=0;for(var r=0,i=t.length;r<i;++r)n+=t[r].height;this.insertHeight(e,t,n)},insertHeight:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<=o){s.insertHeight(e,t,n);if(s.lines&&s.lines.length>50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new b(u);s.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new w(t);if(!e.parent){var r=new w(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=st(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iter:function(e,t,n){this.iterN(e,t-e,n)},iterN:function(e,t,n){for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<o){var u=Math.min(t,o-e);if(s.iterN(e,u,n))return!0;if((t-=u)==0)break;e=0}else e-=o}}},N.prototype={addChange:function(e,t,n){this.undone.length=0;var r=+(new Date),i=this.done[this.done.length-1],s=i&&i[i.length-1],o=r-this.time;if(this.compound&&i&&!this.closed)i.push({start:e,added:t,old:n});else if(o>400||!s||this.closed||s.start>e+n.length||s.start+s.added<e)this.done.push([{start:e,added:t,old:n}]),this.closed=!1;else{var u=Math.max(0,s.start-e),a=Math.max(0,e+n.length-(s.start+s.added));for(var f=u;f>0;--f)s.old.unshift(n[f-1]);for(var f=a;f>0;--f)s.old.push(n[n.length-f]);u&&(s.start=e),s.added+=t-(n.length-u-a)}this.time=r},startCompound:function(){this.compound++||(this.closed=!0)},endCompound:function(){--this.compound||(this.closed=!0)}},e.e_stop=O,e.e_preventDefault=L,e.e_stopPropagation=A,e.connect=P,H.prototype={set:function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)}};var B=e.Pass={toString:function(){return"CodeMirror.Pass"}},j=/gecko\/\d{7}/i.test(navigator.userAgent),F=/MSIE \d/.test(navigator.userAgent),I=/MSIE [1-8]\b/.test(navigator.userAgent),q=F&&document.documentMode==5,R=/WebKit\//.test(navigator.userAgent),U=/Chrome\//.test(navigator.userAgent),z=/Apple Computer/.test(navigator.vendor),W=/KHTML\//.test(navigator.userAgent),X=function(){if(I)return!1;var e=document.createElement("div");return"draggable"in e||"dragDrop"in e}(),V=function(){var e=document.createElement("textarea");return e.value="foo\nbar",e.value.indexOf("\r")>-1?"\r\n":"\n"}(),$=/^$/;j?$=/$'/:z?$=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:U&&($=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/),document.documentElement.getBoundingClientRect!=null&&(Q=function(e,t){try{var n=e.getBoundingClientRect();n={top:n.top,left:n.left}}catch(r){n={top:0,left:0}}if(!t)if(window.pageYOffset==null){var i=document.documentElement||document.body.parentNode;i.scrollTop==null&&(i=document.body),n.top+=i.scrollTop,n.left+=i.scrollLeft}else n.top+=window.pageYOffset,n.left+=window.pageXOffset;return n});var nt=document.createElement("pre");rt("a")=="\na"?rt=function(e){return nt.textContent=e,nt.innerHTML.slice(1)}:rt(" ")!=" "&&(rt=function(e){return nt.innerHTML="",nt.appendChild(document.createTextNode(e)),nt.innerHTML}),e.htmlEscape=rt;var ut="\n\nb".split(/\n/).length!=3?function(e){var t=0,n,r=[];while((n=e.indexOf("\n",t))>-1)r.push(e.slice(t,e.charAt(n-1)=="\r"?n-1:n)),t=n+1;return r.push(e.slice(t)),r}:function(e){return e.split(/\r?\n/)};e.splitLines=ut;var at=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0};e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ft={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return e.keyNames=ft,function(){for(var e=0;e<10;e++)ft[e+48]=String(e);for(var e=65;e<=90;e++)ft[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ft[e+111]=ft[e+63235]="F"+e}(),e}();define("CodeMirror",function(e){return function(){return e.CodeMirror}}(this)),CodeMirror.defineMode("mysql",function(e){function r(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function u(e,t){var r=e.next();n=null;if(r=="$"||r=="?")return e.match(/^[\w\d]*/),"variable-2";if(r=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(r=='"'||r=="'")return t.tokenize=a(r),t.tokenize(e,t);if(r=="`")return t.tokenize=f(r),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(r))return n=r,null;if(r!="-"){if(o.test(r))return e.eatWhile(o),null;if(r==":")return e.eatWhile(/[\w\d\._\-]/),"atom";e.eatWhile(/[_\w\d]/);if(e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var u=e.current(),l;return i.test(u)?null:s.test(u)?"keyword":"variable"}ch2=e.next();if(ch2=="-")return e.skipToEnd(),"comment"}function a(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"string"}}function f(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"variable-2"}}function l(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function c(e){e.indent=e.context.indent,e.context=e.context.prev}var t=e.indentUnit,n,i=r(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),s=r(["ACCESSIBLE","ALTER","AS","BEFORE","BINARY","BY","CASE","CHARACTER","COLUMN","CONTINUE","CROSS","CURRENT_TIMESTAMP","DATABASE","DAY_MICROSECOND","DEC","DEFAULT","DESC","DISTINCT","DOUBLE","EACH","ENCLOSED","EXIT","FETCH","FLOAT8","FOREIGN","GRANT","HIGH_PRIORITY","HOUR_SECOND","IN","INNER","INSERT","INT2","INT8","INTO","JOIN","KILL","LEFT","LINEAR","LOCALTIME","LONG","LOOP","MATCH","MEDIUMTEXT","MINUTE_SECOND","NATURAL","NULL","OPTIMIZE","OR","OUTER","PRIMARY","RANGE","READ_WRITE","REGEXP","REPEAT","RESTRICT","RIGHT","SCHEMAS","SENSITIVE","SHOW","SPECIFIC","SQLSTATE","SQL_CALC_FOUND_ROWS","STARTING","TERMINATED","TINYINT","TRAILING","UNDO","UNLOCK","USAGE","UTC_DATE","VALUES","VARCHARACTER","WHERE","WRITE","ZEROFILL","ALL","AND","ASENSITIVE","BIGINT","BOTH","CASCADE","CHAR","COLLATE","CONSTRAINT","CREATE","CURRENT_TIME","CURSOR","DAY_HOUR","DAY_SECOND","DECLARE","DELETE","DETERMINISTIC","DIV","DUAL","ELSEIF","EXISTS","FALSE","FLOAT4","FORCE","FULLTEXT","HAVING","HOUR_MINUTE","IGNORE","INFILE","INSENSITIVE","INT1","INT4","INTERVAL","ITERATE","KEYS","LEAVE","LIMIT","LOAD","LOCK","LONGTEXT","MASTER_SSL_VERIFY_SERVER_CERT","MEDIUMINT","MINUTE_MICROSECOND","MODIFIES","NO_WRITE_TO_BINLOG","ON","OPTIONALLY","OUT","PRECISION","PURGE","READS","REFERENCES","RENAME","REQUIRE","REVOKE","SCHEMA","SELECT","SET","SPATIAL","SQLEXCEPTION","SQL_BIG_RESULT","SSL","TABLE","TINYBLOB","TO","TRUE","UNIQUE","UPDATE","USING","UTC_TIMESTAMP","VARCHAR","WHEN","WITH","YEAR_MONTH","ADD","ANALYZE","ASC","BETWEEN","BLOB","CALL","CHANGE","CHECK","CONDITION","CONVERT","CURRENT_DATE","CURRENT_USER","DATABASES","DAY_MINUTE","DECIMAL","DELAYED","DESCRIBE","DISTINCTROW","DROP","ELSE","ESCAPED","EXPLAIN","FLOAT","FOR","FROM","GROUP","HOUR_MICROSECOND","IF","INDEX","INOUT","INT","INT3","INTEGER","IS","KEY","LEADING","LIKE","LINES","LOCALTIMESTAMP","LONGBLOB","LOW_PRIORITY","MEDIUMBLOB","MIDDLEINT","MOD","NOT","NUMERIC","OPTION","ORDER","OUTFILE","PROCEDURE","READ","REAL","RELEASE","REPLACE","RETURN","RLIKE","SECOND_MICROSECOND","SEPARATOR","SMALLINT","SQL","SQLWARNING","SQL_SMALL_RESULT","STRAIGHT_JOIN","THEN","TINYTEXT","TRIGGER","UNION","UNSIGNED","USE","UTC_TIME","VARBINARY","VARYING","WHILE","XOR","FULL","COLUMNS","MIN","MAX","STDEV","COUNT"]),o=/[*+\-<>=&|]/;return{startState:function(e){return{tokenize:u,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation());if(e.eatSpace())return null;var r=t.tokenize(e,t);r!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0);if(n=="(")l(t,")",e.column());else if(n=="[")l(t,"]",e.column());else if(n=="{")l(t,"}",e.column());else if(/[\]\}\)]/.test(n)){while(t.context&&t.context.type=="pattern")c(t);t.context&&n==t.context.type&&c(t)}else n=="."&&t.context&&t.context.type=="pattern"?c(t):/atom|string|variable/.test(r)&&t.context&&(/[\}\]]/.test(t.context.type)?l(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return r},indent:function(e,n){var r=n&&n.charAt(0),i=e.context;if(/[\]\}]/.test(r))while(i&&i.type=="pattern")i=i.prev;var s=i&&r==i.type;return i?i.type=="pattern"?i.col:i.align?i.col+(s?0:1):i.indent+(s?0:t):0}}}),CodeMirror.defineMIME("text/x-mysql","mysql"),define("MySQLCodeMirror",function(){}),define("FiddleEditor",["CodeMirror","MySQLCodeMirror"],function(e,t){var n=function(t,n,r){return this.codeMirrorSupported=!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),this.codeMirrorSupported?this.codeMirror=e.fromTextArea(document.getElementById(t),{mode:"mysql",extraKeys:{Tab:"indentMore"},lineNumbers:!0,onChange:function(){n.call(r)}}):(this.textArea=document.getElementById(t),$(this.textArea).on("change",function(){n.call(r)}),$(this.textArea).on("keyup",function(){n.call(r)}),$(this.textArea).attr("fullscreen",!1)),this};return n.prototype.getValue=function(){return this.codeMirrorSupported?this.codeMirror.getValue():this.textArea.value},n.prototype.setValue=function(e){this.codeMirrorSupported?this.codeMirror.setValue(e):(this.textArea.value=e,$(this.textArea).trigger("change"))},n.prototype.refresh=function(){this.codeMirrorSupported&&this.codeMirror.refresh()},n.prototype.somethingSelected=function(){return this.codeMirrorSupported?this.codeMirror.somethingSelected():!1},n.prototype.getSelection=function(){return this.codeMirrorSupported?this.codeMirror.getSelection():this.textArea.value},n.prototype.getScrollerElement=function(){return this.codeMirrorSupported?this.codeMirror.getScrollerElement():null},n.prototype.getGutterElement=function(){return this.codeMirrorSupported?this.codeMirror.getGutterElement():null},n.prototype.isFullscreen=function(){return this.codeMirrorSupported?$(this.codeMirror.getScrollerElement()).hasClass("CodeMirror-fullscreen"):$(this.textArea).attr("fullscreen")==1},n.prototype.setFullscreen=function(e){if(e){var t=$(window).height()-40;this.codeMirrorSupported?($(this.codeMirror.getScrollerElement()).addClass("CodeMirror-fullscreen").height(t),$(this.codeMirror.getGutterElement()).height(t)):($(this.textArea).addClass("fullscreen"),$(this.textArea).height(t),$(this.textArea).attr("fullscreen",e))}else this.codeMirrorSupported?($(this.codeMirror.getScrollerElement()).removeClass("CodeMirror-fullscreen"),$(this.codeMirror.getGutterElement()).css("height","auto"),$(this.codeMirror.getScrollerElement()).css("height","200px")):($(this.textArea).removeClass("fullscreen"),$(this.textArea).height(100),$(this.textArea).attr("fullscreen",e))},n}),define("libs/renderTerminator",[],function(){var e=function(e,t){var n=e.find(".terminator a.btn");n.html(n.html().replace(/\[ .+ \]/,"[ "+t+" ]")),e.find(".terminator").data("statement_separator",t)};return e}),define("text!fiddle_backbone/templates/schemaOutput.html",[],function(){return' {{#if errorMessage}}\n <div class="alert alert-error database-error database-messages"><i class="icon-remove"></i>{{errorMessage}}</div> \n {{else}}\n <div class="alert alert-success database-messages"><i class="icon-ok"></i>Schema Ready</div> \n {{/if}}'}),define("text!fiddle_backbone/templates/schemaBrowser.html",[],function(){return' <h3>Schema Browser</h3>\n <ul class="tables">\n {{#each objects}}\n <li>\n <a href="#{{this.table_name}}"><i class="icon-plus"></i> {{this.table_name}}</a> ({{this.table_type}})\n <ul class="columns">\n {{#each this.columns}}\n <li>{{name}} {{type}}</li>\n {{/each}}\n </ul>\n </li>\n {{/each}}\n </ul>'}),define("fiddle_backbone/views/SchemaDef",["jQuery","Backbone","Handlebars","FiddleEditor","libs/renderTerminator","text!fiddle_backbone/templates/schemaOutput.html","text!fiddle_backbone/templates/schemaBrowser.html"],function(e,t,n,r,i,s,o){var u=t.View.extend({initialize:function(){this.editor=new r(this.id,this.handleSchemaChange,this),this.compiledOutputTemplate=n.compile(s),this.compiledSchemaBrowserTemplate=n.compile(o)},handleSchemaChange:function(){if(this.model.get("ddl")!=this.editor.getValue()||this.model.get("statement_separator")!=e(".panel.schema .terminator").data("statement_separator"))this.model.set({ddl:this.editor.getValue(),statement_separator:e(".panel.schema .terminator").data("statement_separator"),ready:!1}),e(".schema .helpTip").css("display",this.model.get("ddl").length?"none":"block"),e(".sql .helpTip").css("display",!this.model.get("ready")||this.model.get("loading")?"none":"block")},render:function(){this.editor.setValue(this.model.get("ddl")),this.updateDependents(),i(e(".panel.schema"),this.model.get("statement_separator"))},renderOutput:function(){this.options.output_el.html(this.compiledOutputTemplate(this.model.toJSON()))},renderSchemaBrowser:function(){this.options.browser_el.html(this.compiledSchemaBrowserTemplate({objects:this.model.get("schema_structure")}))},refresh:function(){this.editor.refresh()},updateDependents:function(){this.model.get("ready")?(e(".needsReadySchema").unblock(),e("#schemaBrowser").attr("disabled",!1),e(".schema .helpTip").css("display","none")):(e(".needsReadySchema").block({message:"Please build schema."}),e("#schemaBrowser").attr("disabled",!0),e(".schema .helpTip").css("display",this.model.get("loading")||this.model.get("ddl").length?"none":"block"))}});return u});var isIE=navigator.appVersion.indexOf("MSIE")!=-1?!0:!1,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?!0:!1,isOpera=navigator.userAgent.indexOf("Opera")!=-1?!0:!1;define("XPlans/oracle/flashver",function(){});var viewerMap={sqlmonitor:["11"],sqlpa:["11"],xplan:["11"],sql_detail:["11","11.2.0.2.0"],EmergencyADDM:["11"],ComparePeriodReport:["11"],AshViewer:["11"]},requiredMajorVersion=10,requiredMinorVersion=0,requiredRevision=0,hasProductInstall=DetectFlashVer(6,0,65),hasRequestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);Vars=function(e){this.numVars=0;if(e!=null){var t,n,r=e.split("&"),i=r.length;for(var s=0;s<i;s++){var o=r[s];if(o.indexOf("=")!=-1&&o.length>3){var t=o.split("="),n=t[0],u=t[1];this[n]==null&&n.length>0&&u.length>0&&(this[n]=u,this.numVars++)}}}},Vars.prototype.toString=function(e){var t="";e==null&&(e="");for(var n in this)this[n]!=null&&typeof this[n]!="object"&&typeof this[n]!="function"&&n!="numVars"&&(t+=e+n+"="+this[n]+"&");return t.length>0&&(t=t.substr(0,t.length-1)),t},define("XPlans/oracle/loadswf",["XPlans/oracle/flashver"],function(e){return function(){return e.loadswf}}(this));if(typeof QP=="undefined"||!QP)var QP={};(function(){function e(e){var r=t(e),i=r[0];i.getContext!==null&&i.getContext!==undefined&&window.setTimeout(function(){var t=i.getContext("2d"),s=$(".qp-tr",e);i.width=s.outerWidth(!0),i.height=s.outerHeight(!0);var o=r.offset();$(".qp-tr",e).each(function(){var e=$("> * > .qp-node",$(this));$("> * > .qp-tr > * > .qp-node",$(this)).each(function(){n(t,o,e,$(this))})}),t.stroke()},1)}function t(e){var t=$("canvas",e);return t.length==0&&(e.prepend($("<canvas></canvas>").css("position","absolute").css("top",0).css("left",0)),t=$("canvas",e)),t}function n(e,t,n,r){var i=n.offset();i.top+=n.outerHeight()/2,i.left+=n.outerWidth();var s=r.offset();s.top+=r.outerHeight()/2;var o=i.left/2+s.left/2;e.moveTo(i.left-t.left,i.top-t.top),e.lineTo(o-t.left,i.top-t.top),e.lineTo(o-t.left,s.top-t.top),e.lineTo(s.left-t.left,s.top-t.top)}QP.drawLines=function(t){t===null||t===undefined?t=$(".qp-root").parent():t=$(t),e(t)}})(),define("XPlans/mssql",function(e){return function(){return e.QP}}(this)),define("text!fiddle_backbone/templates/queryTabularOutput.html",[],function(){return' {{#if id}}\n {{#each_with_index sets}}\n <div class="set" id="set_{{index}}">\n {{#if this.RESULTS.DATA.length}}\n <table class="results table table-bordered table-striped">\n <tr>\n {{#each this.RESULTS.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.RESULTS.DATA}}\n <tr>\n {{#each this}}\n <td>{{result_display this this}}</td>\n {{/each}}\n </tr>\n {{/each}}\n </table>\n {{/if}}\n {{#if this.SUCCEEDED}}\n <div id="messages_{{index}}" class="alert alert-success database-messages">\n <i class="icon-ok"></i>\n Record Count: {{this.RESULTS.DATA.length}}; Execution Time: {{this.EXECUTIONTIME}}ms\n {{#if this.EXECUTIONPLAN.DATA.length}}\n <a href="#executionPlan" class="executionPlanLink"><i class="icon-plus"></i>View Execution Plan</a> \n {{/if}}\n <a href="#!{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}" class="setLink"><i class="icon-share-alt"></i> link</a>\n </div> \n \n {{#if this.EXECUTIONPLAN.DATA.length}}\n <table class="executionPlan table table-bordered">\n <tr>\n {{#each this.EXECUTIONPLAN.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.EXECUTIONPLAN.DATA}}\n <tr>\n {{#each this}}\n <td><div style="position:relative">{{{this}}}</div></td>\n {{/each}}\n </tr>\n {{/each}}\n\n {{#if ../../../schemaDef/dbType/isSQLServer}}\n <tr>\n <td><a href="index.cfm/Fiddles/getSQLPlan?db_type_id={{../../../../schemaDef/dbType/id}}&short_code={{../../../../schemaDef/short_code}}&query_id={{../../../../id}}&id={{index}}">Download .sqlplan</a> | <a href="http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp?ad=201208-sqlfiddle-pe" target="_new">Download SQL Sentry Plan Explorer (free)</a></td>\n </tr>\n {{/if}}\n\n </table>\n {{/if}}\n \n {{else}}\n <div id="messages_{{index}}" class="alert alert-error database-messages"><i class="icon-remove"></i>{{this.ERRORMESSAGE}}</div> \n {{/if}}\n </div>\n {{/each_with_index}}\n {{/if}}'}),define("text!fiddle_backbone/templates/queryPlaintextOutput.html",[],function(){return' {{#if id}}\n {{#each_with_index sets}}\n <div class="set" id="set_{{index}}">\n {{#if this.RESULTS.DATA.length}}\n <pre class="results">\n|{{#each_simple_value_with_index this.RESULTS.COLUMNS}} {{result_display_padded ../this/RESULTS/COLUMNWIDTHS}} |{{/each_simple_value_with_index}}\n-{{#each_simple_value_with_index this.RESULTS.COLUMNS}}-{{divider_display ../this/RESULTS/COLUMNWIDTHS}}--{{/each_simple_value_with_index}}{{#each this.RESULTS.DATA}}\n|{{#each_simple_value_with_index this}} {{result_display_padded ../../this/RESULTS/COLUMNWIDTHS}} |{{/each_simple_value_with_index}}{{/each}}\n </pre>\n {{/if}}\n {{#if this.SUCCEEDED}}\n <div id="messages_{{index}}" class="alert alert-success database-messages">\n <i class="icon-ok"></i>\n Record Count: {{this.RESULTS.DATA.length}}; Execution Time: {{this.EXECUTIONTIME}}ms\n {{#if this.EXECUTIONPLAN.DATA.length}}\n <a href="#executionPlan" class="executionPlanLink"><i class="icon-plus"></i>View Execution Plan</a>\n {{/if}}\n <a href="#!{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}" class="setLink"><i class="icon-share-alt"></i> link</a>\n </div> \n \n {{#if this.EXECUTIONPLAN.DATA.length}}\n <table class="executionPlan table table-bordered">\n <tr>\n {{#each this.EXECUTIONPLAN.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.EXECUTIONPLAN.DATA}}\n <tr>\n {{#each this}}\n <td><div style="position:relative">{{{this}}}</div></td>\n {{/each}}\n </tr>\n {{/each}}\n\n {{#if ../../../schemaDef/dbType/isSQLServer}}\n <tr>\n <td><a href="index.cfm/Fiddles/getSQLPlan?db_type_id={{../../../../schemaDef/dbType/id}}&short_code={{../../../../schemaDef/short_code}}&query_id={{../../../../id}}&id={{index}}">Download .sqlplan</a></td>\n </tr>\n {{/if}}\n \n </table>\n {{/if}}\n \n {{else}}\n <div id="messages_{{index}}" class="alert alert-error database-error database-messages"><i class="icon-remove"></i>{{this.ERRORMESSAGE}}</div> \n {{/if}}\n </div>\n {{/each_with_index}}\n {{/if}}'}),define("HandlebarsHelpers/divider_display",["Handlebars"],function(e){e.registerHelper("divider_display",function(e){var t=[];return t.length=e[this.index]+1,t.join("-")})}),define("HandlebarsHelpers/each_simple_value_with_index",["Handlebars"],function(e){e.registerHelper("each_simple_value_with_index",function(e,t){var n="";k=0;for(var r=0,i=e.length;r<i;r++){var s={value:e[r]};s.index=k,s.first=k==0,s.last=k==e.length,n+=t(s),k++}return n})}),define("HandlebarsHelpers/each_with_index",["Handlebars"],function(e){e.registerHelper("each_with_index",function(e,t){var n="",r=0;for(var i=0,s=e.length;i<s;i++)if(e[i]){var o=e[i];o.index=r,o.first=r==0,o.last=r==e.length,n+=t(o),r++}return n})}),define("HandlebarsHelpers/result_display_padded",["Handlebars"],function(e){e.registerHelper("result_display_padded",function(e){var t=[];return t.length=e[this.index]-this.value.toString().length+1,t.join(" ")+this.value.toString()})}),define("HandlebarsHelpers/result_display",["jQuery","Handlebars"],function(e,t){t.registerHelper("result_display",function(n){var r=/\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?������]))/ig;return e.isPlainObject(n)?JSON.stringify(n):n==null?"(null)":n===!1?"false":typeof n=="string"&&n.match(r)&&t.Utils.escapeExpression(n)==n?new t.SafeString(n.replace(r,"<a href='$1' target='_new'>$1</a>")):n})}),define("fiddle_backbone/views/Query",["jQuery","Backbone","Handlebars","FiddleEditor","libs/renderTerminator","XPlans/oracle/loadswf","XPlans/mssql","text!fiddle_backbone/templates/queryTabularOutput.html","text!fiddle_backbone/templates/queryPlaintextOutput.html","HandlebarsHelpers/divider_display","HandlebarsHelpers/each_simple_value_with_index","HandlebarsHelpers/each_with_index","HandlebarsHelpers/result_display_padded","HandlebarsHelpers/result_display"],function(e,t,n,r,i,s,o,u,a){var f=t.View.extend({initialize:function(){this.editor=new r(this.id,this.handleQueryChange,this),this.outputType="tabular",this.compiledOutputTemplate={},this.compiledOutputTemplate.tabular=n.compile(u),this.compiledOutputTemplate.plaintext=n.compile(a)},setOutputType:function(e){this.outputType=e},handleQueryChange:function(){var t=this.model.get("schemaDef");this.model.set({sql:this.editor.getValue()}),e(".sql .helpTip").css("display",!t.get("ready")||t.get("loading")||this.model.get("sql").length?"none":"block")},render:function(){this.editor.setValue(this.model.get("sql")),this.model.id&&this.renderOutput(),i(e(".panel.sql"),this.model.get("statement_separator"))},renderOutput:function(){var t=this.model,n=this.model.toJSON();_.each(n.sets,function(e,t){if(e.RESULTS){var r=_.map(e.RESULTS.COLUMNS,function(e){return e.length});_.each(e.RESULTS.DATA,function(e){r=_.map(e,function(e,t){return _.max([e.toString().length,r[t]])})}),n.sets[t].RESULTS.COLUMNWIDTHS=r}}),n.schemaDef=this.model.get("schemaDef").toJSON(),n.schemaDef.dbType=this.model.get("schemaDef").get("dbType").toJSON(),n.schemaDef.dbType.isSQLServer=this.model.get("schemaDef").get("dbType").get("simple_name")=="SQL Server",this.options.output_el.html(this.compiledOutputTemplate[this.outputType](n)),e("script.oracle_xplan_xml").each(function(){e(this).siblings("div.oracle_xplan").html(s(e(this).text()))}),this.options.output_el.find("a.executionPlanLink").click(function(n){n.preventDefault(),e("i",this).toggleClass("icon-minus icon-plus"),e(this).closest(".set").find(".executionPlan").toggle(),e("i",this).hasClass("icon-minus")&&t.get("schemaDef").get("dbType").get("simple_name")=="SQL Server"&&o.drawLines(e(this).closest(".set").find(".executionPlan div"))})},refresh:function(){this.editor.refresh()},checkForSelectedText:function(){this.editor.somethingSelected()?this.model.set("sql",this.editor.getSelection()):this.model.set("sql",this.editor.getValue())}});return f}),define("fiddle_backbone/router",["jQuery","Underscore","Backbone","libs/renderTerminator","fiddle_backbone/models/UsedFiddle"],function(e,t,n,r,i){var s=function(s,o,u,a,f){var l=n.Router.extend({routes:{"!:db_type_id":"DBType","!:db_type_id/:short_code":"SchemaDef","!:db_type_id/:short_code/:query_id":"Query","!:db_type_id/:short_code/:query_id/:set_id":"SetAnchor"},DBType:function(e){s.setSelectedType(e,!0),f.render()},SchemaDef:function(e,t){this.loadContent(e,"!"+e+"/"+t)},Query:function(e,t,n){this.loadContent(e,"!"+e+"/"+t+"/"+n)},SetAnchor:function(n,r,i,a){var f=function(){e("#set_"+a).length&&(window.scrollTo(0,e("#set_"+a).offset().top-50),e("#set_"+a).addClass("highlight"))};!s.getSelectedType()||s.getSelectedType().get("id")!=n||o.get("short_code")!=r||u.get("id")!=i?(u.bind("reloaded",t.once(f)),this.loadContent(n,"!"+n+"/"+r+"/"+i)):(e(".set").removeClass("highlight"),f())},loadContent:function(n,f){this.DBType(n);if(u.get("pendingChanges")&&!confirm("Warning! You have made changes to your query which will be lost. Continue?'"))return!1;o.set("loading",!0),e(".helpTip").css("display","none"),e("body").block({message:"Loading..."}),e.getJSON("index.cfm/fiddles/loadContent",{fragment:f},function(f){o.set("loading",!1);if(f.short_code){var l=s.getSelectedType();l.get("context")=="browser"?(l.get("className")=="sqljs"&&o.get("browserEngines").websql.nativeSQLite&&confirm("Fiddle originally built with SQL.js, but you have WebSQL available - would you like to use that instead (it'll be faster to load)?")&&(s.setSelectedType(e("#db_type_id a:contains('WebSQL')").closest("li").attr("db_type_id")),l=s.getSelectedType(),o.set({ddl:f.ddl,dbType:l,statement_separator:f.schema_statement_separator}),f.sql&&(u.set({schemaDef:o,sql:f.sql,statement_separator:f.query_statement_separator}),o.on("built",t.once(function(){u.execute()}))),o.build(s)),o.get("browserEngines")[l.get("className")].buildSchema({short_code:e.trim(f.short_code),statement_separator:f.schema_statement_separator,ddl:f.ddl,success:function(){o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!0,errorMessage:"",statement_separator:f.schema_statement_separator,dbType:s.getSelectedType()}),r(e(".panel.schema"),f.schema_statement_separator),f.sql?(a.insert(new i({fragment:"!"+n+"/"+f.short_code+"/"+f.id})),u.set({id:f.id,sql:f.sql,statement_separator:f.query_statement_separator})):a.insert(new i({fragment:"!"+n+"/"+f.short_code})),o.get("browserEngines")[l.get("className")].getSchemaStructure({callback:function(t){o.set({schema_structure:t}),o.trigger("reloaded"),f.sql?o.get("browserEngines")[l.get("className")].executeQuery({sql:f.sql,statement_separator:f.query_statement_separator,success:function(t){u.set({sets:t}),u.trigger("reloaded"),e("body").unblock()},error:function(t){u.set({sets:[]}),u.trigger("reloaded"),e("body").unblock()}}):e("body").unblock()}})},error:function(t){o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!1,errorMessage:t,dbType:s.getSelectedType(),statement_separator:f.schema_statement_separator,schema_structure:[]}),r(e(".panel.schema"),f.schema_statement_separator),f.sql&&(u.set({id:f.id,sql:f.sql,statement_separator:f.query_statement_separator,schemaDef:o}),u.trigger("reloaded")),o.trigger("failed"),o.trigger("reloaded"),e("body").unblock()}})):(o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!0,errorMessage:"",statement_separator:f.schema_statement_separator,schema_structure:f.schema_structure}),r(e(".panel.schema"),f.schema_statement_separator),o.trigger("reloaded"),f.sql?(a.insert(new i({fragment:"!"+n+"/"+f.short_code+"/"+f.id})),u.set({id:f.id,sql:f.sql,sets:f.sets,statement_separator:f.query_statement_separator}),u.trigger("reloaded")):a.insert(new i({fragment:"!"+n+"/"+f.short_code})),e("body").unblock())}else e("body").unblock()})}}),c=new l;return n.history.start({pushState:!1}),c};return{initialize:s}}),function(e){function u(n,u){var f=n==window,c=u&&u.message!==undefined?u.message:undefined;u=e.extend({},e.blockUI.defaults,u||{}),u.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,u.overlayCSS||{});var v=e.extend({},e.blockUI.defaults.css,u.css||{}),m=e.extend({},e.blockUI.defaults.themedCSS,u.themedCSS||{});c=c===undefined?u.message:c,f&&s&&a(window,{fadeOut:0});if(c&&typeof c!="string"&&(c.parentNode||c.jquery)){var g=c.jquery?c[0]:c,y={};e(n).data("blockUI.history",y),y.el=g,y.parent=g.parentNode,y.display=g.style.display,y.position=g.style.position,y.parent&&y.parent.removeChild(g)}e(n).data("blockUI.onUnblock",u.onUnblock);var b=u.baseZ,w=e.browser.msie||u.forceIframe?e('<iframe class="blockUI" style="z-index:'+b++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+u.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),E=u.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+b++ +';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+b++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),S,x;u.theme&&f?x='<div class="blockUI '+u.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(u.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":u.theme?x='<div class="blockUI '+u.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(u.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":f?x='<div class="blockUI '+u.blockMsgClass+' blockPage" style="z-index:'+(b+10)+';display:none;position:fixed"></div>':x='<div class="blockUI '+u.blockMsgClass+' blockElement" style="z-index:'+(b+10)+';display:none;position:absolute"></div>',S=e(x),c&&(u.theme?(S.css(m),S.addClass("ui-widget-content")):S.css(v)),!u.theme&&(!u.applyPlatformOpacityRules||!e.browser.mozilla||!/Linux/.test(navigator.platform))&&E.css(u.overlayCSS),E.css("position",f?"fixed":"absolute"),(e.browser.msie||u.forceIframe)&&w.css("opacity",0);var T=[w,E,S],N=f?e("body"):e(n);e.each(T,function(){this.appendTo(N)}),u.theme&&u.draggable&&e.fn.draggable&&S.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var C=r&&(!e.boxModel||e("object,embed",f?null:n).length>0);if(i||C){f&&u.allowBodyStretch&&e.boxModel&&e("html,body").css("height","100%");if((i||!e.boxModel)&&!f)var k=d(n,"borderTopWidth"),L=d(n,"borderLeftWidth"),A=k?"(0 - "+k+")":0,O=L?"(0 - "+L+")":0;e.each([w,E,S],function(e,t){var n=t[0].style;n.position="absolute";if(e<2)f?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+u.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),f?n.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),O&&n.setExpression("left",O),A&&n.setExpression("top",A);else if(u.centerY)f&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!u.centerY&&f){var r=u.css&&u.css.top?parseInt(u.css.top):0,i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}c&&(u.theme?S.find(".ui-widget-content").append(c):S.append(c),(c.jquery||c.nodeType)&&e(c).show()),(e.browser.msie||u.forceIframe)&&u.showOverlay&&w.show();if(u.fadeIn){var M=u.onBlock?u.onBlock:t,_=u.showOverlay&&!c?M:t,D=c?M:t;u.showOverlay&&E._fadeIn(u.fadeIn,_),c&&S._fadeIn(u.fadeIn,D)}else u.showOverlay&&E.show(),c&&S.show(),u.onBlock&&u.onBlock();l(1,n,u),f?(s=S[0],o=e(":input:enabled:visible",s),u.focusInput&&setTimeout(h,20)):p(S[0],u.centerX,u.centerY);if(u.timeout){var P=setTimeout(function(){f?e.unblockUI(u):e(n).unblock(u)},u.timeout);e(n).data("blockUI.timeout",P)}}function a(t,n){var r=t==window,i=e(t),u=i.data("blockUI.history"),a=i.data("blockUI.timeout");a&&(clearTimeout(a),i.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),n.onUnblock===null&&(n.onUnblock=i.data("blockUI.onUnblock"),i.removeData("blockUI.onUnblock"));var c;r?c=e("body").children().filter(".blockUI").add("body > .blockUI"):c=e(".blockUI",t),r&&(s=o=null),n.fadeOut?(c.fadeOut(n.fadeOut),setTimeout(function(){f(c,u,n,t)},n.fadeOut)):f(c,u,n,t)}function f(t,n,r,i){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.parent&&n.parent.appendChild(n.el),e(i).removeData("blockUI.history")),typeof r.onUnblock=="function"&&r.onUnblock(i,r)}function l(t,n,r){var i=n==window,o=e(n);if(!t&&(i&&!s||!i&&!o.data("blockUI.isBlocked")))return;i||o.data("blockUI.isBlocked",t);if(!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress";t?e(document).bind(u,r,c):e(document).unbind(u,c)}function c(t){if(t.keyCode&&t.keyCode==9&&s&&t.data.constrainTabKey){var n=o,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout(function(){h(i)},10),!1}var u=t.data;return e(t.target).parents("div."+u.blockMsgClass).length>0?!0:e(t.target).parents().children().filter("div.blockUI").length==0}function h(e){if(!o)return;var t=o[e===!0?o.length-1:0];t&&t.focus()}function p(e,t,n){var r=e.parentNode,i=e.style,s=(r.offsetWidth-e.offsetWidth)/2-d(r,"borderLeftWidth"),o=(r.offsetHeight-e.offsetHeight)/2-d(r,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),n&&(i.top=o>0?o+"px":"0")}function d(t,n){return parseInt(e.css(t,n))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(e.fn.jquery)||/^1.1/.test(e.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+e.fn.jquery);return}e.fn._fadeIn=e.fn.fadeIn;var t=function(){},n=document.documentMode||0,r=e.browser.msie&&(e.browser.version<8&&!n||n<8),i=e.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!n;e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){a(window,e)},e.growlUI=function(t,n,r,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),n&&s.append("<h2>"+n+"</h2>"),r==undefined&&(r=3e3),e.blockUI({message:s,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:r,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})},e.fn.block=function(t){return this.unblock({fadeOut:0}).each(function(){e.css(this,"position")=="static"&&(this.style.position="relative"),e.browser.msie&&(this.style.zoom=1),u(this,t)})},e.fn.unblock=function(e){return this.each(function(){a(this,e)})},e.blockUI.version=2.39,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var s=null,o=[]}(jQuery),define("libs/jquery/jquery.blockUI",function(){}),function(e){e.cookie=function(t,n,r){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(n))||n===null||n===undefined)){r=e.extend({},r);if(n===null||n===undefined)r.expires=-1;if(typeof r.expires=="number"){var i=r.expires,s=r.expires=new Date;s.setDate(s.getDate()+i)}return n=String(n),document.cookie=[encodeURIComponent(t),"=",r.raw?n:encodeURIComponent(n),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}r=n||{};var o=r.raw?function(e){return e}:decodeURIComponent,u=document.cookie.split("; ");for(var a=0,f;f=u[a]&&u[a].split("=");a++)if(o(f[0])===t)return o(f[1]||"");return null}}(jQuery),define("libs/jquery/jquery.cookie",function(){}),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();e(i).collapse(s)})})}(window.jQuery),define("Bootstrap/bootstrap-collapse",function(){}),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),define("Bootstrap/bootstrap-tab",function(){}),!function(e){function r(){e(t).parent().removeClass("open")}var t='[data-toggle="dropdown"]',n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),i,s,o;if(n.is(".disabled, :disabled"))return;return s=n.attr("data-target"),s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),i=e(s),i.length||(i=n.parent()),o=i.hasClass("open"),r(),o||i.toggleClass("open"),!1}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api",r),e("body").on("click.dropdown",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle)})}(window.jQuery),define("Bootstrap/bootstrap-dropdown",function(){}),!function(e){function n(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),r.call(t)},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),r.call(t)})}function r(e){this.$element.hide().trigger("hidden"),i.call(this)}function i(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(s,this)):s.call(this)):t&&t()}function s(){this.$backdrop.remove(),this.$backdrop=null}function o(){var t=this;this.isShown&&this.options.keyboard?e(document).on("keyup.dismiss.modal",function(e){e.which==27&&t.hide()}):this.isShown||e(document).off("keyup.dismiss.modal")}var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this))};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,o.call(this),i.call(this,function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in"),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var i=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),o.call(this),this.$element.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?n.call(this):r.call(this)}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({},i.data(),n.data());t.preventDefault(),i.modal(s)})})}(window.jQuery),define("Bootstrap/bootstrap-modal",function(){}),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},isHTML:function(e){return typeof e!="string"||e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3||/^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(e)},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.isHTML(t)?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0}}(window.jQuery),define("Bootstrap/bootstrap-tooltip",function(){}),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.isHTML(t)?"html":"text"](t),e.find(".popover-content > *")[this.isHTML(n)?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),define("Bootstrap/bootstrap-popover",function(){}),define("fiddle_backbone/app",["BrowserEngines/engines","fiddle_backbone/models/UsedFiddle","fiddle_backbone/models/MyFiddleHistory","fiddle_backbone/models/DBTypesList","fiddle_backbone/models/SchemaDef","fiddle_backbone/models/Query","fiddle_backbone/views/DBTypesList","fiddle_backbone/views/SchemaDef","fiddle_backbone/views/Query","fiddle_backbone/router","libs/renderTerminator","libs/jquery/jquery.blockUI","libs/jquery/jquery.cookie","Bootstrap/bootstrap-collapse","Bootstrap/bootstrap-tab","Bootstrap/bootstrap-dropdown","Bootstrap/bootstrap-modal","Bootstrap/bootstrap-tooltip","Bootstrap/bootstrap-popover"],function(e,t,n,r,i,s,o,u,a,f,l){var c=function(c){var h={},p=new n,d=new r,v=new i({browserEngines:e}),m=new s({schemaDef:v}),g=new o({el:$("#db_type_id")[0],collection:d}),y=new u({id:"schema_ddl",model:v,output_el:$("#output"),browser_el:$("#browser")}),b=new a({id:"sql",model:m,output_el:$("#output")});d.on("change",function(){g.render(),v.has("dbType")&&v.set("ready",v.get("dbType").id==this.getSelectedType().id)}),v.on("change",function(){this.hasChanged("ready")&&y.updateDependents(),this.hasChanged("errorMessage")&&y.renderOutput(),this.hasChanged("schema_structure")&&y.renderSchemaBrowser()}),v.on("reloaded",function(){this.set("dbType",d.getSelectedType()),y.render()}),m.on("reloaded",function(){this.set({pendingChanges:!1},{silent:!0}),b.render()}),v.on("built failed",function(){$("#buildSchema label").prop("disabled",!1),$("#buildSchema label").html($("#buildSchema label").data("originalValue")),y.renderOutput(),y.renderSchemaBrowser()}),m.on("change",function(){(this.hasChanged("sql")||this.hasChanged("statement_separator"))&&!this.hasChanged("id")&&!this.get("pendingChanges")&&this.set({pendingChanges:!0},{silent:!0})}),m.on("executed",function(){var e=$(".runQuery");e.prop("disabled",!1),e.html(e.data("originalValue")),this.set({pendingChanges:!1},{silent:!0}),b.renderOutput()}),$("#buildSchema").click(function(e){var t=$("label",this);e.preventDefault();if(t.prop("disabled"))return!1;t.data("originalValue",t.html()),t.prop("disabled",!0).text("Building Schema..."),v.build(d)});var w=function(e){var t=$(".runQuery");e.preventDefault();if(t.prop("disabled"))return!1;t.data("originalValue",t.html()),t.prop("disabled",!0).text("Executing SQL..."),b.checkForSelectedText(),m.execute()};return $(".runQuery").click(w),$(document).keyup(function(e){e.keyCode==116&&(e.preventDefault(),w(e))}),$("#runQueryOptions li a").click(function(e){e.preventDefault(),b.setOutputType(this.id),b.renderOutput()}),$("#queryPrettify").click(function(e){var t=$(this);t.attr("disabled",!0),e.preventDefault(),$.post("index.cfm/proxy/formatSQL",{sql:m.get("sql")},function(e){m.set({sql:e}),m.trigger("reloaded"),m.set({pendingChanges:!0}),t.attr("disabled",!1)})}),$(".terminator .dropdown-menu a").on("click",function(e){e.preventDefault(),l($(this).closest(".panel"),$(this).attr("href")),$(this).closest(".panel").hasClass("schema")?y.handleSchemaChange():m.set({pendingChanges:!0,statement_separator:$(this).attr("href")},{silent:!0})}),$(window).bind("beforeunload",function(){if(m.get("pendingChanges"))return"Warning! You have made changes to your query which will be lost. Continue?'"}),d.on("reset",function(){h=f.initialize(d,v,m,p,g),this.length&&!this.getSelectedType()&&this.setSelectedType(this.first().id,!0),g.render(),y.render(),b.render()}),p.on("change reset remove",function(){localStorage&&localStorage.setItem("fiddleHistory",JSON.stringify(this.toJSON()))}),$("#clear").click(function(e){e.preventDefault(),v.reset(),m.reset(),h.navigate("!"+d.getSelectedType().id,{trigger:!0})}),$("#sample").click(function(e){e.preventDefault(),h.navigate("!"+d.getSelectedType().get("sample_fragment"),{trigger:!0})}),d.on("change",function(){g.render(),m.id&&v.get("short_code").length&&v.get("dbType").id==this.getSelectedType().id?h.navigate("!"+this.getSelectedType().id+"/"+v.get("short_code")+"/"+m.id):v.get("short_code").length&&v.get("dbType").id==this.getSelectedType().id?h.navigate("!"+this.getSelectedType().id+"/"+v.get("short_code")):h.navigate("!"+this.getSelectedType().id)}),v.on("built",function(){p.insert(new t({fragment:"!"+this.get("dbType").id+"/"+this.get("short_code")})),h.navigate("!"+this.get("dbType").id+"/"+this.get("short_code"))}),m.on("executed",function(){var e=this.get("schemaDef");p.insert(new t({fragment:"!"+e.get("dbType").id+"/"+e.get("short_code")+"/"+this.id})),h.navigate("!"+e.get("dbType").id+"/"+e.get("short_code")+"/"+this.id)}),d.reset(c),{dbTypes:d,schemaDef:v,schemaDefView:y,queryView:b}};return{initialize:c}});var dateFormat=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,r=function(e,t){e=String(e),t=t||2;while(e.length<t)e="0"+e;return e};return function(i,s,o){var u=dateFormat;arguments.length==1&&Object.prototype.toString.call(i)=="[object String]"&&!/\d/.test(i)&&(s=i,i=undefined),i=i?new Date(i):new Date;if(isNaN(i))throw SyntaxError("invalid date");s=String(u.masks[s]||s||u.masks["default"]),s.slice(0,4)=="UTC:"&&(s=s.slice(4),o=!0);var a=o?"getUTC":"get",f=i[a+"Date"](),l=i[a+"Day"](),c=i[a+"Month"](),h=i[a+"FullYear"](),p=i[a+"Hours"](),d=i[a+"Minutes"](),v=i[a+"Seconds"](),m=i[a+"Milliseconds"](),g=o?0:i.getTimezoneOffset(),y={d:f,dd:r(f),ddd:u.i18n.dayNames[l],dddd:u.i18n.dayNames[l+7],m:c+1,mm:r(c+1),mmm:u.i18n.monthNames[c],mmmm:u.i18n.monthNames[c+12],yy:String(h).slice(2),yyyy:h,h:p%12||12,hh:r(p%12||12),H:p,HH:r(p),M:d,MM:r(d),s:v,ss:r(v),l:r(m,3),L:r(m>99?Math.round(m/10):m),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:o?"UTC":(String(i).match(t)||[""]).pop().replace(n,""),o:(g>0?"-":"+")+r(Math.floor(Math.abs(g)/60)*100+Math.abs(g)%60,4),S:["th","st","nd","rd"][f%10>3?0:(f%100-f%10!=10)*f%10]};return s.replace(e,function(e){return e in y?y[e]:e.slice(1,e.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(e,t){return dateFormat(this,e,t)},define("DateFormat",function(e){return function(){return e.dateFormat}}(this)),define("text!DDLBuilder/templates/generic.sql",[],function(){return"CREATE TABLE {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n \nINSERT INTO {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}}{{/each_with_index}})\nVALUES\n {{#each_with_index data}}{{#if index}},\n {{/if}}({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}}){{/each_with_index}}\n{{separator}}"}),define("text!DDLBuilder/templates/oracle.sql",[],function(){return"CREATE TABLE {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n\nINSERT ALL {{#each_with_index data}}\n INTO {{{../tablePrefix}}}{{../tableName}}{{{../tableSuffix}}} ({{#each_with_index r}}{{#if index}}, {{/if}}{{{../../fieldPrefix}}}{{column_name_for_index ../..}}{{{../../fieldSuffix}}}{{/each_with_index}})\n VALUES ({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}}){{/each_with_index}}\nSELECT * FROM dual\n{{separator}}"}),define("text!DDLBuilder/templates/sqlite.sql",[],function(){return"CREATE TABLE {{tablePrefix}}{{tableName}}{{tableSuffix}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n\n{{#each_with_index data}}\nINSERT INTO {{tablePrefix}}{{../tableName}}{{tableSuffix}}\n ({{#each_with_index ../columns}}{{#if index}}, {{/if}}{{{../../fieldPrefix}}}{{name}}{{{../../fieldSuffix}}}{{/each_with_index}})\nVALUES\n ({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}})\n{{../separator}}\n\n{{/each_with_index}}"}),define("DDLBuilder/ddl_builder",["jQuery","Handlebars","DateFormat","text!./templates/generic.sql","text!./templates/oracle.sql","text!./templates/sqlite.sql","HandlebarsHelpers/each_with_index"],function(e,t,n,r,i,s){return ddl_builder=function(e){return e||(e={}),this.fieldPrefix="",this.fieldSuffix="",this.tablePrefix="",this.tableSuffix="",this.dateFormatMask="yyyy-mm-dd HH:MM:ss",this.charType="varchar",this.intType="int",this.floatType="numeric",this.dateType="datetime",this.valueSeparator="",this.column_count=0,this.definition={tableName:"Table1",columns:[],data:[]},this.ddlTemplate=r,this.compiledTemplate=t.compile(this.ddlTemplate),this.setup(e),this},ddl_builder.prototype.setup=function(e){for(var n in e)this[n]=e[n];return e.ddlTemplate&&(this.compiledTemplate=t.compile(this.ddlTemplate)),e.tableName&&(this.definition.tableName=e.tableName),this},ddl_builder.prototype.setupForDBType=function(e,t){switch(e){case"SQL Server":this.setup({statement_separator:t,fieldPrefix:"[",fieldSuffix:"]",tablePrefix:"[",tableSuffix:"]"});break;case"MySQL":this.setup({statement_separator:t,fieldPrefix:"`",fieldSuffix:"`",tablePrefix:"`",tableSuffix:"`"});break;case"PostgreSQL":this.setup({statement_separator:t,dateType:"timestamp",fieldPrefix:'"',fieldSuffix:'"'});break;case"Oracle":var n=i;this.setup({dateFormatMask:"dd-mmm-yyyy hh:MM:ss TT",statement_separator:t,ddlTemplate:n,dateType:"timestamp",charType:"varchar2",fieldPrefix:'"',fieldSuffix:'"'});break;case"SQLite":var n=s;this.setup({fieldPrefix:'"',fieldSuffix:'"',tablePrefix:'"',tableSuffix:'"',statement_separator:t,ddlTemplate:n,dateType:"DATE",charType:"TEXT",intType:"INTEGER",floatType:"REAL"})}return this},ddl_builder.prototype.populateDBTypes=function(){for(var e=0;e<this.definition.columns.length;e++)this.definition.columns[e].type=="charType"?this.definition.columns[e].db_type=this[this.definition.columns[e].type]+"("+this.definition.columns[e].length+")":this.definition.columns[e].db_type=this[this.definition.columns[e].type];this.definition.dateFormatMask=this.dateFormatMask},ddl_builder.prototype.populateWrappers=function(){this.definition.fieldPrefix=this.fieldPrefix,this.definition.fieldSuffix=this.fieldSuffix},ddl_builder.prototype.guessValueSeparator=function(t){var n=t.split("\n"),r=!1,i=0,s="";for(var o=0;o<n.length;o++)if(n[o].search(/[A-Z0-9_]/i)!=-1&&!r){var u=e.trim(n[o]).match(/([A-Z0-9_]+ ?)+([^A-Z0-9_]*)/gi);u.length==1&&(u=e.trim(n[o]).match(/([A-Z0-9_]+ ?)+?([^A-Z0-9_]*)/gi)),r=!0;for(var a=0;a<u.length;a++){var f=u[a].match(/[A-Z0-9_]+([^A-Z0-9_]*)$/i).pop();f.search(/^\s\s+$/)!=-1?f=new RegExp("\\s\\s+"):f.search(/^\t+$/)!=-1?f=new RegExp("\\t+"):f.search(/^\s+$/)!=-1?f=new RegExp("\\s+"):f=e.trim(f);if(f instanceof RegExp||f.length)if(s instanceof RegExp||!!s.length){if(s.toString()!=f.toString())return{status:!1,message:"Unable to find consistent column separator in header row"}}else s=f;else!(f instanceof RegExp)&&!(s instanceof RegExp)&&!s.length&&(s="\n")}s instanceof RegExp||s.length?i=e.trim(n[o]).split(s).length:i=1}else if(n[o].search(/[A-Z0-9_]/i)!=-1&&e.trim(n[o]).split(s).length!=i&&(s.toString()!=/\s\s+/.toString()||e.trim(n[o]).split(/\s+/).length!=i))return{status:!1,message:"Line "+o+' does not have the same number of columns as the header, based on separator "'+s+'".'};return{status:!0,separator:s,column_count:i}},ddl_builder.prototype.parse=function(t){if(!this.valueSeparator.length){var n=this.guessValueSeparator(t);if(!n.status)return"ERROR! "+n.message;this.column_count=n.column_count,this.valueSeparator=n.separator}var r=t.split("\n");for(var i=0;i<r.length;i++){var s=e.trim(r[i]).split(this.valueSeparator);if(e.trim(r[i]).length&&(s.length==this.column_count||this.valueSeparator.toString()==/\s\s+/.toString()&&(s=e.trim(r[i]).split(/\s+/)).length==this.column_count))if(!this.definition.columns.length)for(var o=0;o<s.length;o++){var u=e.trim(s[o]);u.length?this.definition.columns.push({name:u}):this.definition.columns.push(!1)}else{var a=[];for(var o=0;o<s.length;o++)if(this.definition.columns[o]!==!1){var u=e.trim(s[o]).replace(/'/g,"''");isNaN(u)||this.definition.columns[o].type=="dateType"||this.definition.columns[o].type=="charType"?this.definition.columns[o].type!="charType"&&!isNaN(Date.parse(u))?this.definition.columns[o].type="dateType":this.definition.columns[o].type="charType":this.definition.columns[o].type!="floatType"&&u%1!=0?this.definition.columns[o].type="floatType":this.definition.columns[o].type="intType";if(!this.definition.columns[o].length||u.length>this.definition.columns[o].length)this.definition.columns[o].length=u.length;a.push({v:u})}this.definition.data.push({r:a})}}return this.populateDBTypes(),this.populateWrappers(),this.render()},t.registerHelper("formatted_field",function(e){var r="",i=-1;for(var s=0;s<e.columns.length;s++){e.columns[s]&&i++;if(i==this.index){r=e.columns[s].type;break}}return!this.v.length||this.v.toUpperCase()=="NULL"?"NULL":r=="charType"?new t.SafeString("'"+this.v.replace(/'/g,"''")+"'"):r=="dateType"?new t.SafeString("'"+n(this.v,e.dateFormatMask)+"'"):this.v}),t.registerHelper("column_name_for_index",function(e){return e.columns[this.index].name}),ddl_builder.prototype.render=function(){return this.compiledTemplate(e.extend(this.definition,{separator:this.statement_separator}))},ddl_builder}),function(){function e(){function t(e){window.console&&window.console.log("ID Selector: "+e)}function n(e){var t=e+"=",n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" ")i=i.substring(1,i.length);if(i.indexOf(t)==0)return decodeURIComponent(i.substring(t.length,i.length))}return null}function k(e,t){this.grid=e,this.idx=t;var n=this.td=y.createElement("td");o=n.style,o.fontWeight="bold",o.padding="4px",o.verticalAlign="middle",o.cursor="pointer";var r=this;n.onmouseover=function(){r.onMouseOver()},n.onmouseout=function(){r.onMouseOut()},n.onclick=function(){r.onClick()};var i=u[t],s=y.createElement("img");s.src=i?"https://www.idselector.com/static/opicons/"+i.icon:"https://www.idselector.com/images/openid.ico",s.style.width="16px",s.style.height="16px",s.style.verticalAlign="middle",n.appendChild(s),n.appendChild(y.createTextNode(" ")),n.appendChild(y.createTextNode(i?i.shortname:"Other OpenID")),this.selected=!1}function L(){this.table=y.createElement("table"),this.table.style.backgroundColor="#FFF",this.table.style.width="100%",this.table.style.border="1px solid #6e91af",this.tbody=y.createElement("tbody"),this.table.appendChild(this.tbody),this.maxOffset=(Math.ceil(u.length/12)-1)*12,this.cells=[];for(var e=0;e<u.length;e++)this.cells[e]=new k(this,e);this.rows=[y.createElement("tr"),y.createElement("tr"),y.createElement("tr"),y.createElement("tr")],this.otherCell=new k(this,-1);var t=y.createElement("td");t.style.padding="4px",t.style.textAlign="right",t.style.verticalAlign="middle",t.colSpan=2,t.innerHTML='<a href="http://openid.net/" style="color:#6e91af;" target="_blank">Help</a>';var n=y.createElement("tr");n.style.borderTop="1px solid #AAA",n.appendChild(this.otherCell.td),n.appendChild(t);for(var r=0;r<4;r++)this.tbody.appendChild(this.rows[r]);this.tbody.appendChild(n),this.offset=0}function O(){var t=window.ActiveXObject?e?document.body.scrollLeft:document.documentElement.scrollLeft:window.pageXOffset,n=e?document.body.clientWidth:document.documentElement.clientWidth,r=n+t-401,i=f.offsetLeft,s=f.offsetTop;if(f.clientTop)s+=f.clientTop;else if(document.defaultView&&document.defaultView.getComputedStyle){var o=document.defaultView.getComputedStyle(f,"");s+=parseInt(o.getPropertyValue("border-top-width")),s+=parseInt(o.getPropertyValue("border-bottom-width"))}var u=f.offsetParent;while(u){i+=u.offsetLeft,s+=u.offsetTop;if(u.clientLeft)i+=u.clientLeft,s+=u.clientTop;else if(document.defaultView&&document.defaultView.getComputedStyle){var o=document.defaultView.getComputedStyle(u,"");s+=parseInt(o.getPropertyValue("border-top-width")),i+=parseInt(o.getPropertyValue("border-left-width"))}u=u.offsetParent}s+=f.offsetHeight,i=Math.max(Math.min(i,r),0);var a=v.style;a.left=i+"px",a.top=s+"px",a.display="block",a.height=b.offsetHeight+2+"px";var l=document.body.parentNode}function M(){v.style.display="none"}function _(e){if(e.isTextEdit){var t=e.createTextRange();t&&(t.move("character",e.value.length),t.select())}}function D(){f.value=="Click to Sign In"&&(f.value="http://"),_(f),O()}function B(e,t,n){if(n){var r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);var i="; expires="+r.toGMTString()}else var i="";document.cookie=e+"="+encodeURIComponent(t)+i+"; path=/"}var e=document.compatMode!="CSS1Compat",r=n("__openid_selector_openid"),i=n("__openid_selector_op_id"),s=n("__openid_selector_uname"),o,u=[{shortname:"myOpenID",url_suffix:".myopenid.com/",openid1:!0,openid2:!0,id:8,icon:"myopenid.ico",url_prefix:"http://",website:"https://www.myopenid.com/",longname:"myOpenID",usercalled:"username"},{shortname:"claimID",url_suffix:"",openid1:!0,openid2:!1,id:4,icon:"claimid.ico",url_prefix:"http://claimid.com/",website:"http://claimid.com/",longname:"claimID",usercalled:"username"},{shortname:"Clickpass",url_suffix:"",openid1:!0,openid2:!0,id:5,icon:"clickpass.ico",url_prefix:"http://clickpass.com/public/",website:"http://www.clickpass.com/",longname:"Clickpass",usercalled:"username"},{shortname:"Wordpress",url_suffix:".wordpress.com/",openid1:!0,openid2:!1,id:14,icon:"wordpress.ico",url_prefix:"http://",website:"http://www.wordpress.com/",longname:"Wordpress",usercalled:"username"},{shortname:"Blogger",url_suffix:".blogspot.com/",openid1:!0,openid2:!1,id:2,icon:"blogger.ico",url_prefix:"http://",website:"http://www.blogger.com/",longname:"Google Blogger",usercalled:"blog name"},{shortname:"Livejournal",url_suffix:".livejournal.com/",openid1:!0,openid2:!1,id:7,icon:"lj.ico",url_prefix:"http://",website:"http://www.livejournal.com/",longname:"Livejournal",usercalled:"username"},{shortname:"Technorati",url_suffix:"",openid1:!0,openid2:!1,id:10,icon:"technorati.ico",url_prefix:"http://technorati.com/people/technorati/",website:"http://www.technorati.com/",longname:"Technorati",usercalled:"username"},{shortname:"Flickr",url_suffix:"",openid1:!1,openid2:!0,id:6,icon:"flickr.ico",url_prefix:"http://www.flickr.com/photos/",website:"http://www.flickr.com/",longname:"Flickr",usercalled:"username"},{shortname:"Identity.net",url_suffix:".identity.net/",openid1:!0,openid2:!0,id:23,icon:"identity.ico",url_prefix:"http://",website:"http://identity.net/",longname:"Identity.net",usercalled:"username"},{shortname:"Google",url_suffix:"",openid1:!1,openid2:!0,id:26,icon:"google.ico",url_prefix:"",website:"https://www.google.com/accounts/o8/id",longname:"Google",usercalled:"username"},{shortname:"Yahoo!",url_suffix:"",openid1:!1,openid2:!0,id:15,icon:"yahoo.ico",url_prefix:"http://me.yahoo.com/",website:"http://yahoo.com/",longname:"Yahoo!",usercalled:"yahoo id"},{shortname:"AOL",url_suffix:"",openid1:!0,openid2:!1,id:1,icon:"aol.ico",url_prefix:"http://openid.aol.com/",website:"http://www.aol.com/",longname:"America Online/AIM",usercalled:"screenname"}],a=window.idselector_input_id?window.idselector_input_id:"openid_identifier",f=document.getElementById(a);if(f==null){t("couldn't find openid input box with id = "+a);for(H=0;!f&&H<document.forms.length;H++)f=document.forms[H].openid_identifier;for(H=0;!f&&H<document.forms.length;H++)f=document.forms[H].openid_url}if(f==null){t("couldn't find openid input box");return}var l=f.value,c=document.createElement("img");o=c.style,o.width="16px",o.height="16px",o.verticalAlign="middle",o.padding="0px",o.border="0px",o.margin="0px",o.display="inline";var h=document.createElement("div");h.innerHTML='<button type="button"></button>';var p=document.createElement("img");p.src="https://www.idselector.com/images/arrow.gif",p.style.display="inline";var d=h.firstChild;h.removeChild(d),d.id="__idselector_button",d.style.cursor="pointer",d.appendChild(c),d.appendChild(document.createTextNode(" ")),d.appendChild(p);var v=document.createElement("iframe");v.frameBorder=0,v.scrolling="no",o=v.style,o.display="none",o.position="absolute",o.width="400px",o.height="0px",o.margin="0px",o.padding="0px",o.zIndex=1e4,o.border="0px";var m=f.parentNode,g=null;window.idselector_target_id&&(g=document.getElementById(window.idselector_target_id),g||t("couldn't find element with id "+window.idselector_target_id)),g?g.insertBefore(d,g.firstChild):(m.insertBefore(d,f.nextSibling),m.insertBefore(document.createTextNode(" "),d)),document.body.appendChild(v);var y=v.contentWindow.document;y.open(),y.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>ID Selector</title><style type="text/css">html{color:#000;background:#6e91af;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:\'\';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}body {border:1px solid #6e91af;font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}</style></head><body></body></html>'),y.close();var b=y.body,w=y.createElement("img");w.style.verticalAlign="middle",w.style.cursor="pointer",w.src="https://www.idselector.com/images/arrow_white_back.png";var E=y.createElement("img");E.style.verticalAlign="middle",E.style.cursor="pointer",E.src="https://www.idselector.com/images/arrow_white_forward.png";var S=y.createElement("div");S.style[document.all?"styleFloat":"cssFloat"]="right",S.innerHTML='<a href="https://www.myopenid.com/signup?affiliate_id=21239" style="color:#fff;" target="_blank">Get an OpenID</a>';var x=y.createElement("div");o=x.style,o.fontWeight="bold",o.color="#fff",o.padding="2px 8px 2px 8px",x.appendChild(S),x.appendChild(y.createTextNode("Sign in with OpenID using"));var T=y.createElement("span");T.appendChild(y.createTextNode("xxx:"));var N=y.createElement("input");N.type="text",N.size=20,o=N.style,o.verticalAlign="middle",o.padding="2px 2px 2px 20px",o.backgroundRepeat="no-repeat",o.backgroundPosition="2px 2px";var C=y.createElement("div");o=C.style,o.color="#fff",o.padding="2px 8px 2px 8px",o.textAlign="right",o.position="relative",C.appendChild(T),C.appendChild(y.createTextNode(" ")),C.appendChild(N),_id=k.prototype={},_id.onMouseOver=function(){this.selected||(this.td.style.backgroundColor="#eee")},_id.onMouseOut=function(){this.selected||(this.td.style.backgroundColor="")},_id.onClick=function(){this.grid.select(this),provider=u[this.idx],this.idx==-1?(f.value="http://",f.focus()):provider.openid2&&!provider.openid1?(f.focus(),setTimeout(M,1)):(N.focus(),N.select())},_id.setSelected=function(e){this.td.style.backgroundColor=e?"#c6d9e8":"",this.selected=e},_id=L.prototype={},_id.forward=function(){this.offset=Math.min(this.offset+12,this.maxOffset),this.gen()},_id.back=function(){this.offset=Math.max(this.offset-12,0),this.gen()},_id.gen=function(){for(var e=0;e<4;e++){var t=this.rows[e];while(t.firstChild)t.removeChild(t.firstChild)}for(var e=0;e<12;e++){var t=this.rows[Math.floor(e/3)],n=this.cells[this.offset+e];n?t.appendChild(n.td):t.appendChild(y.createElement("td"))}E.style.visibility=this.offset==this.maxOffset?"hidden":"",w.style.visibility=this.offset==0?"hidden":"",v.style.height=b.offsetHeight+2+"px"},_id.select=function(e){this.curr&&this.curr.setSelected(!1),this.curr=e,e.setSelected(!0);if(e.idx>-1){var t=u[e.idx];if(t.openid2&&!t.openid1)T.style.visibility="hidden",N.style.visibility="hidden",f.value=t.website;else{T.style.visibility="",N.style.visibility="",T.removeChild(T.firstChild);var n=y.createTextNode(t.longname+" "+t.usercalled+":");T.appendChild(n),N.style.backgroundImage="url(https://www.idselector.com/static/opicons/"+t.icon+")",f.value=t.url_prefix+"username"+t.url_suffix,N.value="username"}c.src="https://www.idselector.com/static/opicons/"+t.icon}else T.style.visibility="hidden",N.style.visibility="hidden",c.src="https://www.idselector.com/images/openid.ico"},_id.setName=function(e){var t=u[this.curr.idx];f.value=t.url_prefix+e+t.url_suffix};var A=new L;A.gen(),b.appendChild(x),b.appendChild(A.table),b.appendChild(C),d.onclick=function(e){return v.style.display=="none"?O():M(),e&&(e.cancelBubble=!0),!1},d.onfocus=function(){d.blur()},E.onclick=function(){A.forward()},w.onclick=function(){A.back()},f.onkeypress=function(e){var t;window.event?t=window.event.keyCode:e.which&&(t=e.which),t!=13&&t!=9&&A.select(A.otherCell)},N.onkeydown=function(e){var t;v.contentWindow.event?t=v.contentWindow.event.keyCode:e.which&&(t=e.which),(t==13||t==9)&&setTimeout(function(){f.onfocus=D,f.focus(),setTimeout(M,1)},1)},N.onkeyup=function(){var e=this.value;e||(e="username",this.value=e,this.select()),A.setName(e)},oldOnResize=window.onresize,window.onresize=function(e){try{v.style.display=="block"&&O()}finally{oldOnResize&&oldOnResize(e)}},oldOnScroll=window.onscroll,window.onscroll=function(e){try{v.style.display=="block"&&O()}finally{oldOnScroll&&oldOnScroll(e)}};if(i){var P=null;for(var H=0;H<u.length;H++)u[H].id==i&&(P=A.cells[H]);P&&(A.select(P),N.value=s)}A.curr||A.select(A.otherCell),r?f.value=r:l.length==0&&(f.value="Click to Sign In"),f.onfocus=D;var j=null;m=f.parentNode;while(m&&m.nodeType==1){if(m.nodeName=="FORM"){j=m;break}m=m.parentNode}if(j){var F=j.onsubmit;j.onsubmit=function(e){try{B("__openid_selector_openid",f.value,365);if(A.curr.idx>-1){var t=u[A.curr.idx].id;B("__openid_selector_op_id",t,365),B("__openid_selector_uname",N.value,365)}else B("__openid_selector_op_id","",-1),B("__openid_selector_uname","",-1)}finally{if(F)return F(e)}}}window.ActiveXObject?document.body.parentNode.attachEvent("onclick",function(){window.event.srcElement!=f&&window.event.srcElement!=d&&M()}):document.body.parentNode.addEventListener("click",function(e){e.target!=f&&e.target!=d&&M()},!1)}var t=window.onload;window.onload=function(n){try{e()}finally{return t&&t(n)}}}(),define("libs/idselector",function(){}),requirejs.config({paths:{jQuery:"libs/jquery/jquery",Underscore:"libs/underscore",Backbone:"libs/backbone",Bootstrap:"libs/bootstrap",Handlebars:"libs/handlebars-1.0.0.beta.6",HandlebarsHelpers:"libs/handlebarsHelpers",DateFormat:"libs/date.format",BrowserEngines:"libs/browserEngines",FiddleEditor:"libs/fiddleEditor",CodeMirror:"libs/codemirror/codemirror",MySQLCodeMirror:"libs/codemirror/mode/mysql/mysql",XPlans:"libs/xplans",DDLBuilder:"libs/ddl_builder"},shim:{Backbone:{deps:["Underscore","jQuery","libs/json2"],exports:"Backbone"},jQuery:{exports:"$"},Underscore:{exports:"_"},CodeMirror:{exports:"CodeMirror"},Handlebars:{exports:"Handlebars"},DateFormat:{exports:"dateFormat"},"XPlans/oracle/loadswf":{deps:["XPlans/oracle/flashver"],exports:"loadswf"},"XPlans/mssql":{exports:"QP"},MySQLCodeMirror:["CodeMirror"],"libs/jquery/jquery.blockUI":["jQuery"],"libs/jquery/jquery.cookie":["jQuery"],"Bootstrap/bootstrap-collapse":["jQuery"],"Bootstrap/bootstrap-tab":["jQuery"],"Bootstrap/bootstrap-dropdown":["jQuery"],"Bootstrap/bootstrap-modal":["jQuery"],"Bootstrap/bootstrap-tooltip":["jQuery"],"Bootstrap/bootstrap-popover":["jQuery","Bootstrap/bootstrap-tooltip"]}}),require(["jQuery","Underscore","dbTypes_cached","fiddle_backbone/app","DDLBuilder/ddl_builder","libs/idselector"],function(e,t,n,r,i){function u(t){e("#exit_fullscreen").css("display")=="none"?(e("body").css("overflow-y","hidden"),e(".navbar-fixed-top").css("position","fixed").css("margin",0),e("#exit_fullscreen").css("display","block"),e("#exit_fullscreen span").text("Exit Fullscreen "+t),e(".nav-collapse, .btn-navbar, #db_type_label_collapsed .navbar-text").css("display","none")):(e("body").css("overflow-y","auto"),e("body").css("height","100%"),e(".navbar-fixed-top").css("position","").css("margin",""),e("#exit_fullscreen").css("display","none"),e(".nav-collapse, .btn-navbar, #db_type_label_collapsed .navbar-text").css("display",""))}function a(){var t=e(window).height()-165;if(t>400){var n=e("#schema-output").width();e("#schema-output").height((t-10)*.7),e("#output").css("min-height",(t-10)*.3+"px"),fiddleBackbone.schemaDefView.editor.isFullscreen()?(e("#fiddleFormDDL .CodeMirror-scroll, #schema_ddl").css("height",e(window).height()+"px"),e("#fiddleFormDDL .CodeMirror-scroll .CodeMirror-gutter").height("height",e(window).height()+"px")):(e("#fiddleFormDDL .CodeMirror-scroll").css("height",e("#fiddleFormDDL").height()-(5+e("#fiddleFormDDL .action_buttons").height())+"px"),e("#schema_ddl").css("height",e("#fiddleFormDDL").height()-(15+e("#fiddleFormDDL .action_buttons").height())+"px"),e("#fiddleFormDDL .CodeMirror-scroll .CodeMirror-gutter").height(e("#fiddleFormDDL .CodeMirror-scroll").height()-2)),fiddleBackbone.queryView.editor.isFullscreen()?(e("#fiddleFormSQL .CodeMirror-scroll, #sql").css("height",e(window).height()+"px"),e("#fiddleFormSQL .CodeMirror-scroll .CodeMirror-gutter").css("height",e(window).height()+"px")):(e("#fiddleFormSQL .CodeMirror-scroll").css("height",e("#fiddleFormSQL").height()-(5+e("#fiddleFormSQL .action_buttons").height())+"px"),e("#sql").css("height",e("#fiddleFormSQL").height()-(15+e("#fiddleFormSQL .action_buttons").height())+"px"),e("#fiddleFormSQL .CodeMirror-scroll .CodeMirror-gutter").height(e("#fiddleFormSQL .CodeMirror-scroll").height()-2)),e("#browser").height(e("#fiddleFormDDL .CodeMirror-scroll").height());var r=function(t){var n={height:e(".blockMsg",t).height(),width:e(".blockMsg",t).width()},r={height:e(t).height(),width:e(t).width()};e(".blockMsg",t).css("top",(r.height-n.height)/2).css("left",(r.width-n.width)/2)};r(e("div.sql.panel")),r(e("#output")),fiddleBackbone.schemaDefView.refresh(),fiddleBackbone.queryView.refresh()}}e.blockUI.defaults.overlayCSS.cursor="auto",e.blockUI.defaults.css.cursor="auto",fiddleBackbone=r.initialize(n),e("#userInfo").on("click","#myFiddles",function(t){t.preventDefault(),e("#myFiddlesModal").modal("show"),e("#myFiddlesModal .modal-body").block({message:"Loading..."});var n=function(){var t=e(this);e(".tab-pane",this).removeClass("active"),e(e("#myFiddlesTabs li.active a").attr("href")).addClass("active"),t.unblock(),e(".preview-schema").popover({placement:"left",title:"Schema Structure",content:function(){return e(this).closest("td").find(".schemaPreviewWrapper").html()}}),e(".preview-ddl").popover({placement:"left",title:"Schema DDL",content:function(){return e(this).closest("td").find(".schemaPreviewWrapper").html()}}),e(".result-sets").popover({placement:"left",title:"Query Results",content:function(){return e(this).closest("td").find(".resultSetWrapper").html()}}),e(".preview-sql").popover({placement:"left",title:"SQL Statements",content:function(){return e(this).closest("td").find(".resultSetWrapper").html()}}),e(".showAll",this).click(function(t){t.preventDefault(),e("tr.for-schema-"+e(this).closest("tr").attr("id")).show("fast"),e(this).hide()}),e(".favorite",this).click(function(t){t.preventDefault();var r=this,i=e(this).closest("tr.queryLog");e.post("index.cfm/UserFiddles/setFavorite",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id"),favorite:e(this).attr("href")=="#addFavorite"?1:0},function(){e(r).attr("href")=="#addFavorite"?e(r).attr("href","#removeFavorite").attr("title","Remove from favorites"):e(r).attr("href","#addFavorite").attr("title","Add to favorites"),e("i",r).toggleClass("icon-star-empty icon-star"),e(r).closest(".tab-pane").attr("id")=="favorites"&&e(".queryLog[schema_def_id="+e(r).attr("schema_def_id")+"][query_id="+e(r).attr("query_id")+"] a.favorite").replaceWith(r),e("#favorites").load("index.cfm/UserFiddles/getFavorites",{tz:(new Date).getTimezoneOffset()/60},n)})}),e(".forgetSchema",this).click(function(n){n.preventDefault();var r=e(this).closest("tr.schemaLog").attr("id");e.post("index.cfm/UserFiddles/forgetSchema",{schema_def_id:e(this).attr("schema_def_id")},function(){e("#"+r+",tr.for-schema-"+r,t).remove()})}),e(".forgetQuery",this).click(function(t){t.preventDefault();var n=e(this).closest("tr.queryLog");e.post("index.cfm/UserFiddles/forgetQuery",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id")},function(){n.remove()})}),e(".forgetOtherQueries",this).click(function(t){t.preventDefault();var n=e(this).closest("tbody").find('tr.queryLog[schema_def_id="'+e(this).attr("schema_def_id")+'"][query_id!="'+e(this).attr("query_id")+'"]');e.post("index.cfm/UserFiddles/forgetOtherQueries",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id")},function(){n.remove()})})};e("#myFiddlesModal .modal-body").load("index.cfm/UserFiddles",{tz:(new Date).getTimezoneOffset()/60},n)}),e("#myFiddlesTabs a").on("click",function(t){t.preventDefault(),e(this).tab("show")}),e("#myFiddlesModal .modal-body").on("click","a",function(t){e(this).hasClass("favorite")||e("#myFiddlesModal").modal("hide")}),e("#myFiddlesModal").on("hidden",function(){e(".popover-anchor",this).popover("hide")});if(e("#user_choices",this).length){var s=[];try{fullHistory=e.parseJSON(localStorage.getItem("fiddleHistory")),fullHistory.length&&(s=t.map(fullHistory,function(e,t){return[e.fragment,dateFormat(e.last_used,"mm/dd/yyyy HH:MM:ss")]}),e.post("index.cfm/UserFiddles/loadFromLocalStorage",{localHistory:JSON.stringify(s)},function(n){var r=e.parseJSON(n);fullHistory=t.reject(fullHistory,function(e){return t.find(r,function(t){return t[0]==e.fragment})}),localStorage.setItem("fiddleHistory",JSON.stringify(fullHistory))}))}catch(o){}}e("#loginModal form").submit(function(){e("#hash",this).val(window.location.hash)}),e("#loginModal").on("hidden",function(){e("iframe").css("display","none")}),e("#userInfo").on("click","#logout",function(t){t.preventDefault(),e("<form>",{action:e(this).attr("href"),method:"GET"}).append(e("<input>",{type:"hidden",name:"hash",value:window.location.hash})).submit()}),e("#textToDDLModal .btn").click(function(t){t.preventDefault();var n=(new i({tableName:e("#tableName").val()})).setupForDBType(fiddleBackbone.dbTypes.getSelectedType().get("simple_name"),fiddleBackbone.schemaDef.get("statement_separator")),r=n.parse(e("#raw").val());e("#parseResults").text(r),e(this).attr("id")=="appendDDL"&&(fiddleBackbone.schemaDef.set("ddl",fiddleBackbone.schemaDef.get("ddl")+"\n\n"+r),fiddleBackbone.schemaDef.trigger("reloaded"),e("#textToDDLModal").modal("hide"))}),e("#exit_fullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.schemaDefView.editor.setFullscreen(!1),fiddleBackbone.queryView.editor.setFullscreen(!1),u(""),a()}),e("#schemaFullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.schemaDefView.editor.setFullscreen(!0),u("Schema Editor")}),e("#queryFullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.queryView.editor.setFullscreen(!0),u("Query Editor")}),e("#schemaBrowser").on("click",function(t){t.preventDefault(),e(this).attr("disabled")||(e("#fiddleFormDDL .CodeMirror, .ddl_actions").css("display","none"),e("#browser, .browser_actions").css("display","block"))}),e("#browser").on("click",".tables a",function(t){t.preventDefault(),e("i",this).toggleClass("icon-minus icon-plus"),e(this).siblings(".columns").toggle()}),e("#ddlEdit").on("click",function(t){t.preventDefault(),e("#fiddleFormDDL .CodeMirror, .ddl_actions").css("display","block"),e("#browser, .browser_actions").css("display","none")}),e(window).bind("resize",a),setTimeout(a,1),e(".nav").on("click","a",function(t){e(".nav-collapse.in").collapse("hide")})}),define("main",function(){}) \ No newline at end of file
+function ControlVersion(){var e,t,n;try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"),e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),e="WIN 6,0,21,0",t.AllowScriptAccess="always",e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),e=t.GetVariable("$version")}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"),e="WIN 3,0,18,0"}catch(n){}if(!e)try{t=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),e="WIN 2,0,0,11"}catch(n){e=-1}return e}function GetSwfVer(){var e=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var t=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"",n=navigator.plugins["Shockwave Flash"+t].description,r=n.split(" "),i=r[2].split("."),s=i[0],o=i[1];r[3]!=""?tempArrayMinor=r[3].split("r"):tempArrayMinor=r[4].split("r");var u=tempArrayMinor[1]>0?tempArrayMinor[1]:0,e=s+"."+o+"."+u}}else navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1?e=4:navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1?e=3:navigator.userAgent.toLowerCase().indexOf("webtv")!=-1?e=2:isIE&&isWin&&!isOpera&&(e=ControlVersion());return e}function DetectFlashVer(e,t,n){versionStr=GetSwfVer();if(versionStr==-1)return!1;if(versionStr!=0){isIE&&isWin&&!isOpera?(tempArray=versionStr.split(" "),tempString=tempArray[1],versionArray=tempString.split(",")):versionArray=versionStr.split(".");var r=versionArray[0],i=versionArray[1],s=versionArray[2];if(r>parseFloat(e))return!0;if(r==parseFloat(e)){if(i>parseFloat(t))return!0;if(i==parseFloat(t)&&s>=parseFloat(n))return!0}return!1}}function AC_AddExtension(e,t){return e.indexOf("?")!=-1?e.replace(/\?/,t+"?"):e+t}function AC_Generateobj(e,t,n){var r="";if(isIE&&isWin&&!isOpera){r+="<object ";for(var i in e)r+=i+'="'+e[i]+'" ';for(var i in t)r+='><param name="'+i+'" value="'+t[i]+'" /> ';r+="></object>"}else{r+="<embed ";for(var i in n)r+=i+'="'+n[i]+'" ';r+="> </embed>"}return r}function AC_FL_RunContent(){var e=AC_GetArgs(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");return AC_Generateobj(e.objAttrs,e.params,e.embedAttrs)}function AC_GetArgs(e,t,n,r,i){var s=new Object;s.embedAttrs=new Object,s.params=new Object,s.objAttrs=new Object;for(var o=0;o<e.length;o+=2){var u=e[o].toLowerCase();switch(u){case"classid":break;case"pluginspage":s.embedAttrs[e[o]]=e[o+1];break;case"src":case"movie":e[o+1]=AC_AddExtension(e[o+1],t),s.embedAttrs.src=e[o+1],s.params[n]=e[o+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":s.objAttrs[e[o]]=e[o+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":s.embedAttrs[e[o]]=s.objAttrs[e[o]]=e[o+1];break;default:s.embedAttrs[e[o]]=s.params[e[o]]=e[o+1]}}return s.objAttrs.classid=r,i&&(s.embedAttrs.type=i),s}function getSearch(e){var t="";return e.location.search.length>1&&(t=new String(e.location.search),t=t.substring(1,t.length)),t}function parseVersion(e){if(typeof e!="string")return[0,0,0,0,0];var t=e.split("."),n=t[0]=="X"?999:parseInt(t[0])||0,r=t[1]=="X"?999:parseInt(t[1])||0,i=t[2]=="X"?999:parseInt(t[2])||0,s=t[3]=="X"?999:parseInt(t[3])||0,o=t[4]=="X"?999:parseInt(t[4])||0;return new Array(n,r,i,s,o)}function compareVersions(e,t){var n=parseVersion(e),r=parseVersion(t);for(var i=0;i<5;i++){if(n[i]<r[i])return 1;if(n[i]>r[i])return-1}return 0}function findViewerFile(e,t){var n=viewerMap[e];if(n==null)return!1;var r=n.length;for(var i=0;i<r;i++)if(compareVersions(n[i],t)<0)break;i!=0&&i--;var s="http://download.oracle.com/otn_software/emviewers/"+e+"/"+n[i]+"/"+e;return s}function loadswf(e){var t=e.match(/db_version="([\d\.]*)"/),n=e.match(/orarep\/(\w*)\//),r=n==null?"":n[1],i=t==null?"":t[1];r==""&&e.match(/sql_monitor_report/)&&(r="sqlmonitor",i="11");var s=Math.floor(Math.random()*1e5).toString(16);this!=top&&(top.Vars=Vars,top.getSearch=getSearch,top.lc_id=s);var o="historyUrl=history.htm%3F&lconid="+s+"&model="+encodeURIComponent(e)+"";if(hasProductInstall&&!hasRequestedVersion){var u=isIE==1?"ActiveX":"PlugIn",a=window.location;document.title=document.title.slice(0,47)+" - Flash Player Installation";var f=document.title;return AC_FL_RunContent("src","http://download.oracle.com/otn_software/emviewers/scripts/playerProductInstall","FlashVars",o,"width","100%","height","100%","align","middle","id",r,"quality","high","bgcolor","#FFFFFF","name",r,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer")}if(!hasRequestedVersion){var c="Fail to display EM Standalone report. This content requires the Adobe Flash Player. <a href=http://www.adobe.com/go/getflash/>Get Flash</a>";return c}var l=typeof viewer_swf=="string"?viewer_swf:findViewerFile(r,i);if(!!l)return AC_FL_RunContent("src",l,"width","100%","height","100%","align","middle","id",r,"quality","high","bgcolor","#FFFFFF","name",r,"flashvars",o,"allowScriptAccess","always","type","application/x-shockwave-flash","pluginspage","http://www.adobe.com/go/getflashplayer");r!=""?alert('Sorry, viewer name "'+r+'" is not yet supported...'):alert("Sorry, cannot not display report: unknown report type")}(function(e,t){function u(e){var t=o[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function c(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(l,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:s.isNumeric(r)?+r:f.test(r)?s.parseJSON(r):r}catch(o){}s.data(e,n,r)}else r=t}return r}function h(e){for(var t in e){if(t==="data"&&s.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function p(e,t,n){var r=t+"defer",i=t+"queue",o=t+"mark",u=s._data(e,r);u&&(n==="queue"||!s._data(e,i))&&(n==="mark"||!s._data(e,o))&&setTimeout(function(){!s._data(e,i)&&!s._data(e,o)&&(s.removeData(e,r,!0),u.fire())},0)}function H(){return!1}function B(){return!0}function W(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function X(e,t,n){t=t||0;if(s.isFunction(t))return s.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return s.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=s.grep(e,function(e){return e.nodeType===1});if(q.test(t))return s.filter(t,r,!n);t=s.filter(t,r)}return s.grep(e,function(e,r){return s.inArray(e,t)>=0===n})}function V(e){var t=$.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function at(e,t){return s.nodeName(e,"table")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ft(e,t){if(t.nodeType!==1||!s.hasData(e))return;var n,r,i,o=s._data(e),u=s._data(t,o),a=o.events;if(a){delete u.handle,u.events={};for(n in a)for(r=0,i=a[n].length;r<i;r++)s.event.add(t,n,a[n][r])}u.data&&(u.data=s.extend({},u.data))}function lt(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?t.outerHTML=e.outerHTML:n!=="input"||e.type!=="checkbox"&&e.type!=="radio"?n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text):(e.checked&&(t.defaultChecked=t.checked=e.checked),t.value!==e.value&&(t.value=e.value)),t.removeAttribute(s.expando),t.removeAttribute("_submit_attached"),t.removeAttribute("_change_attached")}function ct(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function ht(e){if(e.type==="checkbox"||e.type==="radio")e.defaultChecked=e.checked}function pt(e){var t=(e.nodeName||"").toLowerCase();t==="input"?ht(e):t!=="script"&&typeof e.getElementsByTagName!="undefined"&&s.grep(e.getElementsByTagName("input"),ht)}function dt(e){var t=n.createElement("div");return ut.appendChild(t),t.innerHTML=e.outerHTML,t.firstChild}function kt(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=t==="width"?1:0,o=4;if(r>0){if(n!=="border")for(;i<o;i+=2)n||(r-=parseFloat(s.css(e,"padding"+xt[i]))||0),n==="margin"?r+=parseFloat(s.css(e,n+xt[i]))||0:r-=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0;return r+"px"}r=Tt(e,t);if(r<0||r==null)r=e.style[t];if(bt.test(r))return r;r=parseFloat(r)||0;if(n)for(;i<o;i+=2)r+=parseFloat(s.css(e,"padding"+xt[i]))||0,n!=="padding"&&(r+=parseFloat(s.css(e,"border"+xt[i]+"Width"))||0),n==="margin"&&(r+=parseFloat(s.css(e,n+xt[i]))||0);return r+"px"}function Qt(e){return function(t,n){typeof t!="string"&&(n=t,t="*");if(s.isFunction(n)){var r=t.toLowerCase().split(qt),i=0,o=r.length,u,a,f;for(;i<o;i++)u=r[i],f=/^\+/.test(u),f&&(u=u.substr(1)||"*"),a=e[u]=e[u]||[],a[f?"unshift":"push"](n)}}}function Gt(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u=e[s],a=0,f=u?u.length:0,l=e===Wt,c;for(;a<f&&(l||!c);a++)c=u[a](n,r,i),typeof c=="string"&&(!l||o[c]?c=t:(n.dataTypes.unshift(c),c=Gt(e,n,r,i,c,o)));return(l||!c)&&!o["*"]&&(c=Gt(e,n,r,i,"*",o)),c}function Yt(e,n){var r,i,o=s.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);i&&s.extend(!0,e,i)}function Zt(e,t,n,r){if(s.isArray(t))s.each(t,function(t,i){n||At.test(e)?r(e,i):Zt(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&s.type(t)==="object")for(var i in t)Zt(e+"["+i+"]",t[i],n,r);else r(e,t)}function en(e,n,r){var i=e.contents,s=e.dataTypes,o=e.responseFields,u,a,f,l;for(a in o)a in r&&(n[o[a]]=r[a]);while(s[0]==="*")s.shift(),u===t&&(u=e.mimeType||n.getResponseHeader("content-type"));if(u)for(a in i)if(i[a]&&i[a].test(u)){s.unshift(a);break}if(s[0]in r)f=s[0];else{for(a in r){if(!s[0]||e.converters[a+" "+s[0]]){f=a;break}l||(l=a)}f=f||l}if(f)return f!==s[0]&&s.unshift(f),r[f]}function tn(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},o,u,a=r.length,f,l=r[0],c,h,p,d,v;for(o=1;o<a;o++){if(o===1)for(u in e.converters)typeof u=="string"&&(i[u.toLowerCase()]=e.converters[u]);c=l,l=r[o];if(l==="*")l=c;else if(c!=="*"&&c!==l){h=c+" "+l,p=i[h]||i["* "+l];if(!p){v=t;for(d in i){f=d.split(" ");if(f[0]===c||f[0]==="*"){v=i[f[1]+" "+l];if(v){d=i[d],d===!0?p=v:v===!0&&(p=d);break}}}}!p&&!v&&s.error("No conversion from "+h.replace(" "," to ")),p!==!0&&(n=p?p(n):v(d(n)))}}return n}function an(){try{return new e.XMLHttpRequest}catch(t){}}function fn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function yn(){return setTimeout(bn,0),gn=s.now()}function bn(){gn=t}function wn(e,t){var n={};return s.each(mn.concat.apply([],mn.slice(0,t)),function(){n[this]=e}),n}function En(e){if(!ln[e]){var t=n.body,r=s("<"+e+">").appendTo(t),i=r.css("display");r.remove();if(i==="none"||i===""){cn||(cn=n.createElement("iframe"),cn.frameBorder=cn.width=cn.height=0),t.appendChild(cn);if(!hn||!cn.createElement)hn=(cn.contentWindow||cn.contentDocument).document,hn.write((s.support.boxModel?"<!doctype html>":"")+"<html><body>"),hn.close();r=hn.createElement(e),hn.body.appendChild(r),i=s.css(r,"display"),t.removeChild(cn)}ln[e]=i}return ln[e]}function Nn(e){return s.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n=e.document,r=e.navigator,i=e.location,s=function(){function H(){if(i.isReady)return;try{n.documentElement.doScroll("left")}catch(e){setTimeout(H,1);return}i.ready()}var i=function(e,t){return new i.fn.init(e,t,u)},s=e.jQuery,o=e.$,u,a=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,f=/\S/,l=/^\s+/,c=/\s+$/,h=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,d=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,v=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,m=/(?:^|:|,)(?:\s*\[)+/g,g=/(webkit)[ \/]([\w.]+)/,y=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,E=/-([a-z]|[0-9])/ig,S=/^-ms-/,x=function(e,t){return(t+"").toUpperCase()},T=r.userAgent,N,C,k,L=Object.prototype.toString,A=Object.prototype.hasOwnProperty,O=Array.prototype.push,M=Array.prototype.slice,_=String.prototype.trim,D=Array.prototype.indexOf,P={};return i.fn=i.prototype={constructor:i,init:function(e,r,s){var o,u,f,l;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!r&&n.body)return this.context=n,this[0]=n.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?o=[null,e,null]:o=a.exec(e);if(o&&(o[1]||!r)){if(o[1])return r=r instanceof i?r[0]:r,l=r?r.ownerDocument||r:n,f=h.exec(e),f?i.isPlainObject(r)?(e=[n.createElement(f[1])],i.fn.attr.call(e,r,!0)):e=[l.createElement(f[1])]:(f=i.buildFragment([o[1]],[l]),e=(f.cacheable?i.clone(f.fragment):f.fragment).childNodes),i.merge(this,e);u=n.getElementById(o[2]);if(u&&u.parentNode){if(u.id!==o[2])return s.find(e);this.length=1,this[0]=u}return this.context=n,this.selector=e,this}return!r||r.jquery?(r||s).find(e):this.constructor(r).find(e)}return i.isFunction(e)?s.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),i.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return M.call(this,0)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return i.isArray(e)?O.apply(r,e):i.merge(r,e),r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return i.each(this,e,t)},ready:function(e){return i.bindReady(),C.add(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(M.apply(this,arguments),"slice",M.call(arguments).join(","))},map:function(e){return this.pushStack(i.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:O,sort:[].sort,splice:[].splice},i.fn.init.prototype=i.fn,i.extend=i.fn.extend=function(){var e,n,r,s,o,u,a=arguments[0]||{},f=1,l=arguments.length,c=!1;typeof a=="boolean"&&(c=a,a=arguments[1]||{},f=2),typeof a!="object"&&!i.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f<l;f++)if((e=arguments[f])!=null)for(n in e){r=a[n],s=e[n];if(a===s)continue;c&&s&&(i.isPlainObject(s)||(o=i.isArray(s)))?(o?(o=!1,u=r&&i.isArray(r)?r:[]):u=r&&i.isPlainObject(r)?r:{},a[n]=i.extend(c,u,s)):s!==t&&(a[n]=s)}return a},i.extend({noConflict:function(t){return e.$===i&&(e.$=o),t&&e.jQuery===i&&(e.jQuery=s),i},isReady:!1,readyWait:1,holdReady:function(e){e?i.readyWait++:i.ready(!0)},ready:function(e){if(e===!0&&!--i.readyWait||e!==!0&&!i.isReady){if(!n.body)return setTimeout(i.ready,1);i.isReady=!0;if(e!==!0&&--i.readyWait>0)return;C.fireWith(n,[i]),i.fn.trigger&&i(n).trigger("ready").off("ready")}},bindReady:function(){if(C)return;C=i.Callbacks("once memory");if(n.readyState==="complete")return setTimeout(i.ready,1);if(n.addEventListener)n.addEventListener("DOMContentLoaded",k,!1),e.addEventListener("load",i.ready,!1);else if(n.attachEvent){n.attachEvent("onreadystatechange",k),e.attachEvent("onload",i.ready);var t=!1;try{t=e.frameElement==null}catch(r){}n.documentElement.doScroll&&t&&H()}},isFunction:function(e){return i.type(e)==="function"},isArray:Array.isArray||function(e){return i.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):P[L.call(e)]||"object"},isPlainObject:function(e){if(!e||i.type(e)!=="object"||e.nodeType||i.isWindow(e))return!1;try{if(e.constructor&&!A.call(e,"constructor")&&!A.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||A.call(e,r)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){if(typeof t!="string"||!t)return null;t=i.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(p.test(t.replace(d,"@").replace(v,"]").replace(m,"")))return(new Function("return "+t))();i.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var r,s;try{e.DOMParser?(s=new DOMParser,r=s.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&i.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&f.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(S,"ms-").replace(E,x)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var s,o=0,u=e.length,a=u===t||i.isFunction(e);if(r){if(a){for(s in e)if(n.apply(e[s],r)===!1)break}else for(;o<u;)if(n.apply(e[o++],r)===!1)break}else if(a){for(s in e)if(n.call(e[s],s,e[s])===!1)break}else for(;o<u;)if(n.call(e[o],o,e[o++])===!1)break;return e},trim:_?function(e){return e==null?"":_.call(e)}:function(e){return e==null?"":e.toString().replace(l,"").replace(c,"")},makeArray:function(e,t){var n=t||[];if(e!=null){var r=i.type(e);e.length==null||r==="string"||r==="function"||r==="regexp"||i.isWindow(e)?O.call(n,e):i.merge(n,e)}return n},inArray:function(e,t,n){var r;if(t){if(D)return D.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=e.length,i=0;if(typeof n.length=="number")for(var s=n.length;i<s;i++)e[r++]=n[i];else while(n[i]!==t)e[r++]=n[i++];return e.length=r,e},grep:function(e,t,n){var r=[],i;n=!!n;for(var s=0,o=e.length;s<o;s++)i=!!t(e[s],s),n!==i&&r.push(e[s]);return r},map:function(e,n,r){var s,o,u=[],a=0,f=e.length,l=e instanceof i||f!==t&&typeof f=="number"&&(f>0&&e[0]&&e[f-1]||f===0||i.isArray(e));if(l)for(;a<f;a++)s=n(e[a],a,r),s!=null&&(u[u.length]=s);else for(o in e)s=n(e[o],o,r),s!=null&&(u[u.length]=s);return u.concat.apply([],u)},guid:1,proxy:function(e,n){if(typeof n=="string"){var r=e[n];n=e,e=r}if(!i.isFunction(e))return t;var s=M.call(arguments,2),o=function(){return e.apply(n,s.concat(M.call(arguments)))};return o.guid=e.guid=e.guid||o.guid||i.guid++,o},access:function(e,n,r,s,o,u,a){var f,l=r==null,c=0,h=e.length;if(r&&typeof r=="object"){for(c in r)i.access(e,n,c,r[c],1,u,s);o=1}else if(s!==t){f=a===t&&i.isFunction(s),l&&(f?(f=n,n=function(e,t,n){return f.call(i(e),n)}):(n.call(e,s),n=null));if(n)for(;c<h;c++)n(e[c],r,f?s.call(e[c],c,n(e[c],r)):s,a);o=1}return o?e:l?n.call(e):h?n(e[0],r):u},now:function(){return(new Date).getTime()},uaMatch:function(e){e=e.toLowerCase();var t=g.exec(e)||y.exec(e)||b.exec(e)||e.indexOf("compatible")<0&&w.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},sub:function(){function e(t,n){return new e.fn.init(t,n)}i.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,s){return s&&s instanceof i&&!(s instanceof e)&&(s=e(s)),i.fn.init.call(this,r,s,t)},e.fn.init.prototype=e.fn;var t=e(n);return e},browser:{}}),i.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){P["[object "+t+"]"]=t.toLowerCase()}),N=i.uaMatch(T),N.browser&&(i.browser[N.browser]=!0,i.browser.version=N.version),i.browser.webkit&&(i.browser.safari=!0),f.test(" ")&&(l=/^[\s\xA0]+/,c=/[\s\xA0]+$/),u=i(n),n.addEventListener?k=function(){n.removeEventListener("DOMContentLoaded",k,!1),i.ready()}:n.attachEvent&&(k=function(){n.readyState==="complete"&&(n.detachEvent("onreadystatechange",k),i.ready())}),i}(),o={};s.Callbacks=function(e){e=e?o[e]||u(e):{};var n=[],r=[],i,a,f,l,c,h,p=function(t){var r,i,o,u,a;for(r=0,i=t.length;r<i;r++)o=t[r],u=s.type(o),u==="array"?p(o):u==="function"&&(!e.unique||!v.has(o))&&n.push(o)},d=function(t,s){s=s||[],i=!e.memory||[t,s],a=!0,f=!0,h=l||0,l=0,c=n.length;for(;n&&h<c;h++)if(n[h].apply(t,s)===!1&&e.stopOnFalse){i=!0;break}f=!1,n&&(e.once?i===!0?v.disable():n=[]:r&&r.length&&(i=r.shift(),v.fireWith(i[0],i[1])))},v={add:function(){if(n){var e=n.length;p(arguments),f?c=n.length:i&&i!==!0&&(l=e,d(i[0],i[1]))}return this},remove:function(){if(n){var t=arguments,r=0,i=t.length;for(;r<i;r++)for(var s=0;s<n.length;s++)if(t[r]===n[s]){f&&s<=c&&(c--,s<=h&&h--),n.splice(s--,1);if(e.unique)break}}return this},has:function(e){if(n){var t=0,r=n.length;for(;t<r;t++)if(e===n[t])return!0}return!1},empty:function(){return n=[],this},disable:function(){return n=r=i=t,this},disabled:function(){return!n},lock:function(){return r=t,(!i||i===!0)&&v.disable(),this},locked:function(){return!r},fireWith:function(t,n){return r&&(f?e.once||r.push([t,n]):(!e.once||!i)&&d(t,n)),this},fire:function(){return v.fireWith(this,arguments),this},fired:function(){return!!a}};return v};var a=[].slice;s.extend({Deferred:function(e){var t=s.Callbacks("once memory"),n=s.Callbacks("once memory"),r=s.Callbacks("memory"),i="pending",o={resolve:t,reject:n,notify:r},u={done:t.add,fail:n.add,progress:r.add,state:function(){return i},isResolved:t.fired,isRejected:n.fired,then:function(e,t,n){return a.done(e).fail(t).progress(n),this},always:function(){return a.done.apply(a,arguments).fail.apply(a,arguments),this},pipe:function(e,t,n){return s.Deferred(function(r){s.each({done:[e,"resolve"],fail:[t,"reject"],progress:[n,"notify"]},function(e,t){var n=t[0],i=t[1],o;s.isFunction(n)?a[e](function(){o=n.apply(this,arguments),o&&s.isFunction(o.promise)?o.promise().then(r.resolve,r.reject,r.notify):r[i+"With"](this===a?r:this,[o])}):a[e](r[i])})}).promise()},promise:function(e){if(e==null)e=u;else for(var t in u)e[t]=u[t];return e}},a=u.promise({}),f;for(f in o)a[f]=o[f].fire,a[f+"With"]=o[f].fireWith;return a.done(function(){i="resolved"},n.disable,r.lock).fail(function(){i="rejected"},t.disable,r.lock),e&&e.call(a,a),a},when:function(e){function c(e){return function(n){t[e]=arguments.length>1?a.call(arguments,0):n,--o||f.resolveWith(f,t)}}function h(e){return function(t){i[e]=arguments.length>1?a.call(arguments,0):t,f.notifyWith(l,i)}}var t=a.call(arguments,0),n=0,r=t.length,i=new Array(r),o=r,u=r,f=r<=1&&e&&s.isFunction(e.promise)?e:s.Deferred(),l=f.promise();if(r>1){for(;n<r;n++)t[n]&&t[n].promise&&s.isFunction(t[n].promise)?t[n].promise().then(c(n),f.reject,h(n)):--o;o||f.resolveWith(f,t)}else f!==e&&f.resolveWith(f,r?[e]:[]);return l}}),s.support=function(){var t,r,i,o,u,a,f,l,c,h,p,d,v=n.createElement("div"),m=n.documentElement;v.setAttribute("className","t"),v.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",r=v.getElementsByTagName("*"),i=v.getElementsByTagName("a")[0];if(!r||!r.length||!i)return{};o=n.createElement("select"),u=o.appendChild(n.createElement("option")),a=v.getElementsByTagName("input")[0],t={leadingWhitespace:v.firstChild.nodeType===3,tbody:!v.getElementsByTagName("tbody").length,htmlSerialize:!!v.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:a.value==="on",optSelected:u.selected,getSetAttribute:v.className!=="t",enctype:!!n.createElement("form").enctype,html5Clone:n.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},s.boxModel=t.boxModel=n.compatMode==="CSS1Compat",a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!u.disabled;try{delete v.test}catch(g){t.deleteExpando=!1}!v.addEventListener&&v.attachEvent&&v.fireEvent&&(v.attachEvent("onclick",function(){t.noCloneEvent=!1}),v.cloneNode(!0).fireEvent("onclick")),a=n.createElement("input"),a.value="t",a.setAttribute("type","radio"),t.radioValue=a.value==="t",a.setAttribute("checked","checked"),a.setAttribute("name","t"),v.appendChild(a),f=n.createDocumentFragment(),f.appendChild(v.lastChild),t.checkClone=f.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,f.removeChild(a),f.appendChild(v);if(v.attachEvent)for(p in{submit:1,change:1,focusin:1})h="on"+p,d=h in v,d||(v.setAttribute(h,"return;"),d=typeof v[h]=="function"),t[p+"Bubbles"]=d;return f.removeChild(v),f=o=u=v=a=null,s(function(){var r,i,o,u,a,f,c,h,p,m,g,y,b,w=n.getElementsByTagName("body")[0];if(!w)return;h=1,b="padding:0;margin:0;border:",g="position:absolute;top:0;left:0;width:1px;height:1px;",y=b+"0;visibility:hidden;",p="style='"+g+b+"5px solid #000;",m="<div "+p+"display:block;'><div style='"+b+"0;display:block;overflow:hidden;'></div></div>"+"<table "+p+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",r=n.createElement("div"),r.style.cssText=y+"width:0;height:0;position:static;top:0;margin-top:"+h+"px",w.insertBefore(r,w.firstChild),v=n.createElement("div"),r.appendChild(v),v.innerHTML="<table><tr><td style='"+b+"0;display:none'></td><td>t</td></tr></table>",l=v.getElementsByTagName("td"),d=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",t.reliableHiddenOffsets=d&&l[0].offsetHeight===0,e.getComputedStyle&&(v.innerHTML="",c=n.createElement("div"),c.style.width="0",c.style.marginRight="0",v.style.width="2px",v.appendChild(c),t.reliableMarginRight=(parseInt((e.getComputedStyle(c,null)||{marginRight:0}).marginRight,10)||0)===0),typeof v.style.zoom!="undefined"&&(v.innerHTML="",v.style.width=v.style.padding="1px",v.style.border=0,v.style.overflow="hidden",v.style.display="inline",v.style.zoom=1,t.inlineBlockNeedsLayout=v.offsetWidth===3,v.style.display="block",v.style.overflow="visible",v.innerHTML="<div style='width:5px;'></div>",t.shrinkWrapBlocks=v.offsetWidth!==3),v.style.cssText=g+y,v.innerHTML=m,i=v.firstChild,o=i.firstChild,a=i.nextSibling.firstChild.firstChild,f={doesNotAddBorder:o.offsetTop!==5,doesAddBorderForTableAndCells:a.offsetTop===5},o.style.position="fixed",o.style.top="20px",f.fixedPosition=o.offsetTop===20||o.offsetTop===15,o.style.position=o.style.top="",i.style.overflow="hidden",i.style.position="relative",f.subtractsBorderForOverflowNotVisible=o.offsetTop===-5,f.doesNotIncludeMarginInBodyOffset=w.offsetTop!==h,e.getComputedStyle&&(v.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(v,null)||{marginTop:0}).marginTop!=="1%"),typeof r.style.zoom!="undefined"&&(r.style.zoom=1),w.removeChild(r),c=v=r=null,s.extend(t,f)}),t}();var f=/^(?:\{.*\}|\[.*\])$/,l=/([A-Z])/g;s.extend({cache:{},uuid:0,expando:"jQuery"+(s.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?s.cache[e[s.expando]]:e[s.expando],!!e&&!h(e)},data:function(e,n,r,i){if(!s.acceptData(e))return;var o,u,a,f=s.expando,l=typeof n=="string",c=e.nodeType,h=c?s.cache:e,p=c?e[f]:e[f]&&f,d=n==="events";if((!p||!h[p]||!d&&!i&&!h[p].data)&&l&&r===t)return;p||(c?e[f]=p=++s.uuid:p=f),h[p]||(h[p]={},c||(h[p].toJSON=s.noop));if(typeof n=="object"||typeof n=="function")i?h[p]=s.extend(h[p],n):h[p].data=s.extend(h[p].data,n);return o=u=h[p],i||(u.data||(u.data={}),u=u.data),r!==t&&(u[s.camelCase(n)]=r),d&&!u[n]?o.events:(l?(a=u[n],a==null&&(a=u[s.camelCase(n)])):a=u,a)},removeData:function(e,t,n){if(!s.acceptData(e))return;var r,i,o,u=s.expando,a=e.nodeType,f=a?s.cache:e,l=a?e[u]:u;if(!f[l])return;if(t){r=n?f[l]:f[l].data;if(r){s.isArray(t)||(t in r?t=[t]:(t=s.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,o=t.length;i<o;i++)delete r[t[i]];if(!(n?h:s.isEmptyObject)(r))return}}if(!n){delete f[l].data;if(!h(f[l]))return}s.support.deleteExpando||!f.setInterval?delete f[l]:f[l]=null,a&&(s.support.deleteExpando?delete e[u]:e.removeAttribute?e.removeAttribute(u):e[u]=null)},_data:function(e,t,n){return s.data(e,t,n,!0)},acceptData:function(e){if(e.nodeName){var t=s.noData[e.nodeName.toLowerCase()];if(t)return t!==!0&&e.getAttribute("classid")===t}return!0}}),s.fn.extend({data:function(e,n){var r,i,o,u,a,f=this[0],l=0,h=null;if(e===t){if(this.length){h=s.data(f);if(f.nodeType===1&&!s._data(f,"parsedAttrs")){o=f.attributes;for(a=o.length;l<a;l++)u=o[l].name,u.indexOf("data-")===0&&(u=s.camelCase(u.substring(5)),c(f,u,h[u]));s._data(f,"parsedAttrs",!0)}}return h}return typeof e=="object"?this.each(function(){s.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",s.access(this,function(n){if(n===t)return h=this.triggerHandler("getData"+i,[r[0]]),h===t&&f&&(h=s.data(f,e),h=c(f,e,h)),h===t&&r[1]?this.data(r[0]):h;r[1]=n,this.each(function(){var t=s(this);t.triggerHandler("setData"+i,r),s.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){s.removeData(this,e)})}}),s.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",s._data(e,t,(s._data(e,t)||0)+1))},_unmark:function(e,t,n){e!==!0&&(n=t,t=e,e=!1);if(t){n=n||"fx";var r=n+"mark",i=e?0:(s._data(t,r)||1)-1;i?s._data(t,r,i):(s.removeData(t,r,!0),p(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=s._data(e,t),n&&(!r||s.isArray(n)?r=s._data(e,t,s.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=s.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),s._data(e,t+".run",i),r.call(e,function(){s.dequeue(e,t)},i)),n.length||(s.removeData(e,t+"queue "+t+".run",!0),p(e,t,"queue"))}}),s.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?s.queue(this[0],e):n===t?this:this.each(function(){var t=s.queue(this,e,n);e==="fx"&&t[0]!=="inprogress"&&s.dequeue(this,e)})},dequeue:function(e){return this.each(function(){s.dequeue(this,e)})},delay:function(e,t){return e=s.fx?s.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){function h(){--u||r.resolveWith(i,[i])}typeof e!="string"&&(n=e,e=t),e=e||"fx";var r=s.Deferred(),i=this,o=i.length,u=1,a=e+"defer",f=e+"queue",l=e+"mark",c;while(o--)if(c=s.data(i[o],a,t,!0)||(s.data(i[o],f,t,!0)||s.data(i[o],l,t,!0))&&s.data(i[o],a,s.Callbacks("once memory"),!0))u++,c.add(h);return h(),r.promise(n)}});var d=/[\n\t\r]/g,v=/\s+/,m=/\r/g,g=/^(?:button|input)$/i,y=/^(?:button|input|object|select|textarea)$/i,b=/^a(?:rea)?$/i,w=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,E=s.support.getSetAttribute,S,x,T;s.fn.extend({attr:function(e,t){return s.access(this,s.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){s.removeAttr(this,e)})},prop:function(e,t){return s.access(this,s.prop,e,t,arguments.length>1)},removeProp:function(e){return e=s.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,u,a;if(s.isFunction(e))return this.each(function(t){s(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(v);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{o=" "+i.className+" ";for(u=0,a=t.length;u<a;u++)~o.indexOf(" "+t[u]+" ")||(o+=t[u]+" ");i.className=s.trim(o)}}}return this},removeClass:function(e){var n,r,i,o,u,a,f;if(s.isFunction(e))return this.each(function(t){s(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(v);for(r=0,i=this.length;r<i;r++){o=this[r];if(o.nodeType===1&&o.className)if(e){u=(" "+o.className+" ").replace(d," ");for(a=0,f=n.length;a<f;a++)u=u.replace(" "+n[a]+" "," ");o.className=s.trim(u)}else o.className=""}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return s.isFunction(e)?this.each(function(n){s(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,o=0,u=s(this),a=t,f=e.split(v);while(i=f[o++])a=r?a:!u.hasClass(i),u[a?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&s._data(this,"__className__",this.className),this.className=this.className||e===!1?"":s._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(d," ").indexOf(t)>-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];if(!arguments.length){if(o)return n=s.valHooks[o.type]||s.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,typeof r=="string"?r.replace(m,""):r==null?"":r);return}return i=s.isFunction(e),this.each(function(r){var o=s(this),u;if(this.nodeType!==1)return;i?u=e.call(this,r,o.val()):u=e,u==null?u="":typeof u=="number"?u+="":s.isArray(u)&&(u=s.map(u,function(e){return e==null?"":e+""})),n=s.valHooks[this.type]||s.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,u,"value")===t)this.value=u})}}),s.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,u=[],a=e.options,f=e.type==="select-one";if(o<0)return null;n=f?o:0,r=f?o+1:a.length;for(;n<r;n++){i=a[n];if(i.selected&&(s.support.optDisabled?!i.disabled:i.getAttribute("disabled")===null)&&(!i.parentNode.disabled||!s.nodeName(i.parentNode,"optgroup"))){t=s(i).val();if(f)return t;u.push(t)}}return f&&!u.length&&a.length?s(a[o]).val():u},set:function(e,t){var n=s.makeArray(t);return s(e).find("option").each(function(){this.selected=s.inArray(s(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var o,u,a,f=e.nodeType;if(!e||f===3||f===8||f===2)return;if(i&&n in s.attrFn)return s(e)[n](r);if(typeof e.getAttribute=="undefined")return s.prop(e,n,r);a=f!==1||!s.isXMLDoc(e),a&&(n=n.toLowerCase(),u=s.attrHooks[n]||(w.test(n)?x:S));if(r!==t){if(r===null){s.removeAttr(e,n);return}return u&&"set"in u&&a&&(o=u.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r)}return u&&"get"in u&&a&&(o=u.get(e,n))!==null?o:(o=e.getAttribute(n),o===null?t:o)},removeAttr:function(e,t){var n,r,i,o,u,a=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(v),o=r.length;for(;a<o;a++)i=r[a],i&&(n=s.propFix[i]||i,u=w.test(i),u||s.attr(e,i,""),e.removeAttribute(E?i:n),u&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(g.test(e.nodeName)&&e.parentNode)s.error("type property can't be changed");else if(!s.support.radioValue&&t==="radio"&&s.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return S&&s.nodeName(e,"button")?S.get(e,t):t in e?e.value:null},set:function(e,t,n){if(S&&s.nodeName(e,"button"))return S.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;return u=a!==1||!s.isXMLDoc(e),u&&(n=s.propFix[n]||n,o=s.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&(i=o.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):y.test(e.nodeName)||b.test(e.nodeName)&&e.href?0:t}}}}),s.attrHooks.tabindex=s.propHooks.tabIndex,x={get:function(e,n){var r,i=s.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?s.removeAttr(e,n):(r=s.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},E||(T={name:!0,id:!0,coords:!0},S=s.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(T[n]?r.nodeValue!=="":r.specified)?r.nodeValue:t},set:function(e,t,r){var i=e.getAttributeNode(r);return i||(i=n.createAttribute(r),e.setAttributeNode(i)),i.nodeValue=t+""}},s.attrHooks.tabindex.set=S.set,s.each(["width","height"],function(e,t){s.attrHooks[t]=s.extend(s.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),s.attrHooks.contenteditable={get:S.get,set:function(e,t,n){t===""&&(t="false"),S.set(e,t,n)}}),s.support.hrefNormalized||s.each(["href","src","width","height"],function(e,n){s.attrHooks[n]=s.extend(s.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),s.support.style||(s.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=""+t}}),s.support.optSelected||(s.propHooks.selected=s.extend(s.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),s.support.enctype||(s.propFix.enctype="encoding"),s.support.checkOn||s.each(["radio","checkbox"],function(){s.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),s.each(["radio","checkbox"],function(){s.valHooks[this]=s.extend(s.valHooks[this],{set:function(e,t){if(s.isArray(t))return e.checked=s.inArray(s(e).val(),t)>=0}})});var N=/^(?:textarea|input|select)$/i,C=/^([^\.]*)?(?:\.(.+))?$/,k=/(?:^|\s)hover(\.\S+)?\b/,L=/^key/,A=/^(?:mouse|contextmenu)|click/,O=/^(?:focusinfocus|focusoutblur)$/,M=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,_=function(e){var t=M.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},D=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n["class"]||{}).value))},P=function(e){return s.event.special.hover?e:e.replace(k,"mouseenter$1 mouseleave$1")};s.event={add:function(e,n,r,i,o){var u,a,f,l,c,h,p,d,v,m,g,y;if(e.nodeType===3||e.nodeType===8||!n||!r||!(u=s._data(e)))return;r.handler&&(v=r,r=v.handler,o=v.selector),r.guid||(r.guid=s.guid++),f=u.events,f||(u.events=f={}),a=u.handle,a||(u.handle=a=function(e){return typeof s=="undefined"||!!e&&s.event.triggered===e.type?t:s.event.dispatch.apply(a.elem,arguments)},a.elem=e),n=s.trim(P(n)).split(" ");for(l=0;l<n.length;l++){c=C.exec(n[l])||[],h=c[1],p=(c[2]||"").split(".").sort(),y=s.event.special[h]||{},h=(o?y.delegateType:y.bindType)||h,y=s.event.special[h]||{},d=s.extend({type:h,origType:c[1],data:i,handler:r,guid:r.guid,selector:o,quick:o&&_(o),namespace:p.join(".")},v),g=f[h];if(!g){g=f[h]=[],g.delegateCount=0;if(!y.setup||y.setup.call(e,i,p,a)===!1)e.addEventListener?e.addEventListener(h,a,!1):e.attachEvent&&e.attachEvent("on"+h,a)}y.add&&(y.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),o?g.splice(g.delegateCount++,0,d):g.push(d),s.event.global[h]=!0}e=null},global:{},remove:function(e,t,n,r,i){var o=s.hasData(e)&&s._data(e),u,a,f,l,c,h,p,d,v,m,g,y;if(!o||!(d=o.events))return;t=s.trim(P(t||"")).split(" ");for(u=0;u<t.length;u++){a=C.exec(t[u])||[],f=l=a[1],c=a[2];if(!f){for(f in d)s.event.remove(e,f+t[u],n,r,!0);continue}v=s.event.special[f]||{},f=(r?v.delegateType:v.bindType)||f,g=d[f]||[],h=g.length,c=c?new RegExp("(^|\\.)"+c.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(p=0;p<g.length;p++)y=g[p],(i||l===y.origType)&&(!n||n.guid===y.guid)&&(!c||c.test(y.namespace))&&(!r||r===y.selector||r==="**"&&y.selector)&&(g.splice(p--,1),y.selector&&g.delegateCount--,v.remove&&v.remove.call(e,y));g.length===0&&h!==g.length&&((!v.teardown||v.teardown.call(e,c)===!1)&&s.removeEvent(e,f,o.handle),delete d[f])}s.isEmptyObject(d)&&(m=o.handle,m&&(m.elem=null),s.removeData(e,["events","handle"],!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,i,o){if(!i||i.nodeType!==3&&i.nodeType!==8){var u=n.type||n,a=[],f,l,c,h,p,d,v,m,g,y;if(O.test(u+s.event.triggered))return;u.indexOf("!")>=0&&(u=u.slice(0,-1),l=!0),u.indexOf(".")>=0&&(a=u.split("."),u=a.shift(),a.sort());if((!i||s.event.customEvent[u])&&!s.event.global[u])return;n=typeof n=="object"?n[s.expando]?n:new s.Event(u,n):new s.Event(u),n.type=u,n.isTrigger=!0,n.exclusive=l,n.namespace=a.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+a.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,d=u.indexOf(":")<0?"on"+u:"";if(!i){f=s.cache;for(c in f)f[c].events&&f[c].events[u]&&s.event.trigger(n,r,f[c].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?s.makeArray(r):[],r.unshift(n),v=s.event.special[u]||{};if(v.trigger&&v.trigger.apply(i,r)===!1)return;g=[[i,v.bindType||u]];if(!o&&!v.noBubble&&!s.isWindow(i)){y=v.delegateType||u,h=O.test(y+u)?i:i.parentNode,p=null;for(;h;h=h.parentNode)g.push([h,y]),p=h;p&&p===i.ownerDocument&&g.push([p.defaultView||p.parentWindow||e,y])}for(c=0;c<g.length&&!n.isPropagationStopped();c++)h=g[c][0],n.type=g[c][1],m=(s._data(h,"events")||{})[n.type]&&s._data(h,"handle"),m&&m.apply(h,r),m=d&&h[d],m&&s.acceptData(h)&&m.apply(h,r)===!1&&n.preventDefault();return n.type=u,!o&&!n.isDefaultPrevented()&&(!v._default||v._default.apply(i.ownerDocument,r)===!1)&&(u!=="click"||!s.nodeName(i,"a"))&&s.acceptData(i)&&d&&i[u]&&(u!=="focus"&&u!=="blur"||n.target.offsetWidth!==0)&&!s.isWindow(i)&&(p=i[d],p&&(i[d]=null),s.event.triggered=u,i[u](),s.event.triggered=t,p&&(i[d]=p)),n.result}return},dispatch:function(n){n=s.event.fix(n||e.event);var r=(s._data(this,"events")||{})[n.type]||[],i=r.delegateCount,o=[].slice.call(arguments,0),u=!n.exclusive&&!n.namespace,a=s.event.special[n.type]||{},f=[],l,c,h,p,d,v,m,g,y,b,w;o[0]=n,n.delegateTarget=this;if(a.preDispatch&&a.preDispatch.call(this,n)===!1)return;if(i&&(!n.button||n.type!=="click")){p=s(this),p.context=this.ownerDocument||this;for(h=n.target;h!=this;h=h.parentNode||this)if(h.disabled!==!0){v={},g=[],p[0]=h;for(l=0;l<i;l++)y=r[l],b=y.selector,v[b]===t&&(v[b]=y.quick?D(h,y.quick):p.is(b)),v[b]&&g.push(y);g.length&&f.push({elem:h,matches:g})}}r.length>i&&f.push({elem:this,matches:r.slice(i)});for(l=0;l<f.length&&!n.isPropagationStopped();l++){m=f[l],n.currentTarget=m.elem;for(c=0;c<m.matches.length&&!n.isImmediatePropagationStopped();c++){y=m.matches[c];if(u||!n.namespace&&!y.namespace||n.namespace_re&&n.namespace_re.test(y.namespace))n.data=y.data,n.handleObj=y,d=((s.event.special[y.origType]||{}).handle||y.handler).apply(m.elem,o),d!==t&&(n.result=d,d===!1&&(n.preventDefault(),n.stopPropagation()))}}return a.postDispatch&&a.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,r){var i,s,o,u=r.button,a=r.fromElement;return e.pageX==null&&r.clientX!=null&&(i=e.target.ownerDocument||n,s=i.documentElement,o=i.body,e.pageX=r.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=r.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?r.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[s.expando])return e;var r,i,o=e,u=s.event.fixHooks[e.type]||{},a=u.props?this.props.concat(u.props):this.props;e=s.Event(o);for(r=a.length;r;)i=a[--r],e[i]=o[i];return e.target||(e.target=o.srcElement||n),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey===t&&(e.metaKey=e.ctrlKey),u.filter?u.filter(e,o):e},special:{ready:{setup:s.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){s.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=s.extend(new s.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?s.event.trigger(i,null,t):s.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},s.event.handle=s.event.dispatch,s.removeEvent=n.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent&&e.detachEvent("on"+t,n)},s.Event=function(e,t){if(!(this instanceof s.Event))return new s.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?B:H):this.type=e,t&&s.extend(this,t),this.timeStamp=e&&e.timeStamp||s.now(),this[s.expando]=!0},s.Event.prototype={preventDefault:function(){this.isDefaultPrevented=B;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=B;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=B,this.stopPropagation()},isDefaultPrevented:H,isPropagationStopped:H,isImmediatePropagationStopped:H},s.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){s.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n=this,r=e.relatedTarget,i=e.handleObj,o=i.selector,u;if(!r||r!==n&&!s.contains(n,r))e.type=i.origType,u=i.handler.apply(this,arguments),e.type=t;return u}}}),s.support.submitBubbles||(s.event.special.submit={setup:function(){if(s.nodeName(this,"form"))return!1;s.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=s.nodeName(n,"input")||s.nodeName(n,"button")?n.form:t;r&&!r._submit_attached&&(s.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),r._submit_attached=!0)})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&s.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(s.nodeName(this,"form"))return!1;s.event.remove(this,"._submit")}}),s.support.changeBubbles||(s.event.special.change={setup:function(){if(N.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")s.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),s.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1,s.event.simulate("change",this,e,!0))});return!1}s.event.add(this,"beforeactivate._change",function(e){var t=e.target;N.test(t.nodeName)&&!t._change_attached&&(s.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&s.event.simulate("change",this.parentNode,e,!0)}),t._change_attached=!0)})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return s.event.remove(this,"._change"),N.test(this.nodeName)}}),s.support.focusinBubbles||s.each({focus:"focusin",blur:"focusout"},function(e,t){var r=0,i=function(e){s.event.simulate(t,e.target,s.event.fix(e),!0)};s.event.special[t]={setup:function(){r++===0&&n.addEventListener(e,i,!0)},teardown:function(){--r===0&&n.removeEventListener(e,i,!0)}}}),s.fn.extend({on:function(e,n,r,i,o){var u,a;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=H;else if(!i)return this;return o===1&&(u=i,i=function(e){return s().off(e),u.apply(this,arguments)},i.guid=u.guid||(u.guid=s.guid++)),this.each(function(){s.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){if(e&&e.preventDefault&&e.handleObj){var i=e.handleObj;return s(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this}if(typeof e=="object"){for(var o in e)this.off(o,n,e[o]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=H),this.each(function(){s.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return s(this.context).on(e,this.selector,t,n),this},die:function(e,t){return s(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length==1?this.off(e,"**"):this.off(t,e,n)},trigger:function(e,t){return this.each(function(){s.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return s.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||s.guid++,r=0,i=function(n){var i=(s._data(this,"lastToggle"+e.guid)||0)%r;return s._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),s.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){s.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},s.attrFn&&(s.attrFn[t]=!0),L.test(t)&&(s.event.fixHooks[t]=s.event.keyHooks),A.test(t)&&(s.event.fixHooks[t]=s.event.mouseHooks)}),function(){function S(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}f.nodeType===1&&!o&&(f[r]=n,f.sizset=u);if(f.nodeName.toLowerCase()===t){l=f;break}f=f[e]}i[u]=l}}}function x(e,t,n,i,s,o){for(var u=0,a=i.length;u<a;u++){var f=i[u];if(f){var l=!1;f=f[e];while(f){if(f[r]===n){l=i[f.sizset];break}if(f.nodeType===1){o||(f[r]=n,f.sizset=u);if(typeof t!="string"){if(f===t){l=!0;break}}else if(h.filter(t,[f]).length>0){l=f;break}}f=f[e]}i[u]=l}}}var e=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,r="sizcache"+(Math.random()+"").replace(".",""),i=0,o=Object.prototype.toString,u=!1,a=!0,f=/\\/g,l=/\r\n/g,c=/\W/;[0,0].sort(function(){return a=!1,0});var h=function(t,r,i,s){i=i||[],r=r||n;var u=r;if(r.nodeType!==1&&r.nodeType!==9)return[];if(!t||typeof t!="string")return i;var a,f,l,c,p,m,g,b,w=!0,E=h.isXML(r),S=[],x=t;do{e.exec(""),a=e.exec(x);if(a){x=a[3],S.push(a[1]);if(a[2]){c=a[3];break}}}while(a);if(S.length>1&&v.exec(t))if(S.length===2&&d.relative[S[0]])f=T(S[0]+S[1],r,s);else{f=d.relative[S[0]]?[r]:h(S.shift(),r);while(S.length)t=S.shift(),d.relative[t]&&(t+=S.shift()),f=T(t,f,s)}else{!s&&S.length>1&&r.nodeType===9&&!E&&d.match.ID.test(S[0])&&!d.match.ID.test(S[S.length-1])&&(p=h.find(S.shift(),r,E),r=p.expr?h.filter(p.expr,p.set)[0]:p.set[0]);if(r){p=s?{expr:S.pop(),set:y(s)}:h.find(S.pop(),S.length!==1||S[0]!=="~"&&S[0]!=="+"||!r.parentNode?r:r.parentNode,E),f=p.expr?h.filter(p.expr,p.set):p.set,S.length>0?l=y(f):w=!1;while(S.length)m=S.pop(),g=m,d.relative[m]?g=S.pop():m="",g==null&&(g=r),d.relative[m](l,g,E)}else l=S=[]}l||(l=f),l||h.error(m||t);if(o.call(l)==="[object Array]")if(!w)i.push.apply(i,l);else if(r&&r.nodeType===1)for(b=0;l[b]!=null;b++)l[b]&&(l[b]===!0||l[b].nodeType===1&&h.contains(r,l[b]))&&i.push(f[b]);else for(b=0;l[b]!=null;b++)l[b]&&l[b].nodeType===1&&i.push(f[b]);else y(l,i);return c&&(h(c,u,i,s),h.uniqueSort(i)),i};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t<e.length;t++)e[t]===e[t-1]&&e.splice(t--,1)}return e},h.matches=function(e,t){return h(e,null,null,t)},h.matchesSelector=function(e,t){return h(t,null,null,[e]).length>0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i<s;i++){u=d.order[i];if(o=d.leftMatch[u].exec(e)){a=o[1],o.splice(1,1);if(a.substr(a.length-1)!=="\\"){o[1]=(o[1]||"").replace(f,""),r=d.find[u](o,t,n);if(r!=null){e=e.replace(d.match[u],"");break}}}}return r||(r=typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName("*"):[]),{set:r,expr:e}},h.filter=function(e,n,r,i){var s,o,u,a,f,l,c,p,v,m=e,g=[],y=n,b=n&&n[0]&&h.isXML(n[0]);while(e&&n.length){for(u in d.filter)if((s=d.leftMatch[u].exec(e))!=null&&s[2]){l=d.filter[u],c=s[1],o=!1,s.splice(1,1);if(c.substr(c.length-1)==="\\")continue;y===g&&(g=[]);if(d.preFilter[u]){s=d.preFilter[u](s,y,r,g,i,b);if(!s)o=a=!0;else if(s===!0)continue}if(s)for(p=0;(f=y[p])!=null;p++)f&&(a=l(f,s,p,y),v=i^a,r&&a!=null?v?o=!0:y[p]=!1:v&&(g.push(f),o=!0));if(a!==t){r||(y=g),e=e.replace(d.match[u],"");if(!o)return[];break}}if(e===m){if(o!=null)break;h.error(e)}m=e}return y},h.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)};var p=h.getText=function(e){var t,n,r=e.nodeType,i="";if(r){if(r===1||r===9||r===11){if(typeof e.textContent=="string")return e.textContent;if(typeof e.innerText=="string")return e.innerText.replace(l,"");for(e=e.firstChild;e;e=e.nextSibling)i+=p(e)}else if(r===3||r===4)return e.nodeValue}else for(t=0;n=e[t];t++)n.nodeType!==8&&(i+=p(n));return i},d=h.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(e){return e.getAttribute("href")},type:function(e){return e.getAttribute("type")}},relative:{"+":function(e,t){var n=typeof t=="string",r=n&&!c.test(t),i=n&&!r;r&&(t=t.toLowerCase());for(var s=0,o=e.length,u;s<o;s++)if(u=e[s]){while((u=u.previousSibling)&&u.nodeType!==1);e[s]=i||u&&u.nodeName.toLowerCase()===t?u||!1:u===t}i&&h.filter(t,e,!0)},">":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i<s;i++){n=e[i];if(n){var o=n.parentNode;e[i]=o.nodeName.toLowerCase()===t?o:!1}}}else{for(;i<s;i++)n=e[i],n&&(e[i]=r?n.parentNode:n.parentNode===t);r&&h.filter(t,e,!0)}},"":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("parentNode",t,s,e,r,n)},"~":function(e,t,n){var r,s=i++,o=x;typeof t=="string"&&!c.test(t)&&(t=t.toLowerCase(),r=t,o=S),o("previousSibling",t,s,e,r,n)}},find:{ID:function(e,t,n){if(typeof t.getElementById!="undefined"&&!n){var r=t.getElementById(e[1]);return r&&r.parentNode?[r]:[]}},NAME:function(e,t){if(typeof t.getElementsByName!="undefined"){var n=[],r=t.getElementsByName(e[1]);for(var i=0,s=r.length;i<s;i++)r[i].getAttribute("name")===e[1]&&n.push(r[i]);return n.length===0?null:n}},TAG:function(e,t){if(typeof t.getElementsByTagName!="undefined")return t.getElementsByTagName(e[1])}},preFilter:{CLASS:function(e,t,n,r,i,s){e=" "+e[1].replace(f,"")+" ";if(s)return e;for(var o=0,u;(u=t[o])!=null;o++)u&&(i^(u.className&&(" "+u.className+" ").replace(/[\t\n\r]/g," ").indexOf(e)>=0)?n||r.push(u):n&&(t[o]=!1));return!1},ID:function(e){return e[1].replace(f,"")},TAG:function(e,t){return e[1].replace(f,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){e[2]||h.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&h.error(e[0]);return e[0]=i++,e},ATTR:function(e,t,n,r,i,s){var o=e[1]=e[1].replace(f,"");return!s&&d.attrMap[o]&&(e[1]=d.attrMap[o]),e[4]=(e[4]||e[5]||"").replace(f,""),e[2]==="~="&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(t,n,r,i,s){if(t[1]==="not"){if(!((e.exec(t[3])||"").length>1||/^\w/.test(t[3]))){var o=h.filter(t[3],n,r,!0^s);return r||i.push.apply(i,o),!1}t[3]=h(t[3],null,null,n)}else if(d.match.POS.test(t[0])||d.match.CHILD.test(t[0]))return!0;return t},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return e.disabled===!1&&e.type!=="hidden"},disabled:function(e){return e.disabled===!0},checked:function(e){return e.checked===!0},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!h(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return e.nodeName.toLowerCase()==="input"&&"text"===n&&(t===n||t===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"submit"===e.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return(t==="input"||t==="button")&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&"button"===e.type||t==="button"},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return t===0},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2===0},odd:function(e,t){return t%2===1},lt:function(e,t,n){return t<n[3]-0},gt:function(e,t,n){return t>n[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],s=d.filters[i];if(s)return s(e,n,t,r);if(i==="contains")return(e.textContent||e.innerText||p([e])||"").indexOf(t[3])>=0;if(i==="not"){var o=t[3];for(var u=0,a=o.length;u<a;u++)if(o[u]===e)return!1;return!0}h.error(i)},CHILD:function(e,t){var n,i,s,o,u,a,f,l=t[1],c=e;switch(l){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(l==="first")return!0;c=e;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0;case"nth":n=t[2],i=t[3];if(n===1&&i===0)return!0;s=t[0],o=e.parentNode;if(o&&(o[r]!==s||!e.nodeIndex)){a=0;for(c=o.firstChild;c;c=c.nextSibling)c.nodeType===1&&(c.nodeIndex=++a);o[r]=s}return f=e.nodeIndex-i,n===0?f===0:f%n===0&&f/n>=0}},ID:function(e,t){return e.nodeType===1&&e.getAttribute("id")===t},TAG:function(e,t){return t==="*"&&e.nodeType===1||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],r=h.attr?h.attr(e,n):d.attrHandle[n]?d.attrHandle[n](e):e[n]!=null?e[n]:e.getAttribute(n),i=r+"",s=t[2],o=t[4];return r==null?s==="!=":!s&&h.attr?r!=null:s==="="?i===o:s==="*="?i.indexOf(o)>=0:s==="~="?(" "+i+" ").indexOf(o)>=0:o?s==="!="?i!==o:s==="^="?i.indexOf(o)===0:s==="$="?i.substr(i.length-o.length)===o:s==="|="?i===o||i.substr(0,o.length+1)===o+"-":!1:i&&r!==!1},POS:function(e,t,n,r){var i=t[2],s=d.setFilters[i];if(s)return s(e,n,t,r)}}},v=d.match.POS,m=function(e,t){return"\\"+(t-0+1)};for(var g in d.match)d.match[g]=new RegExp(d.match[g].source+/(?![^\[]*\])(?![^\(]*\))/.source),d.leftMatch[g]=new RegExp(/(^(?:.|\r|\n)*?)/.source+d.match[g].source.replace(/\\(\d+)/g,m));d.match.globalPOS=v;var y=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(n.documentElement.childNodes,0)[0].nodeType}catch(b){y=function(e,t){var n=0,r=t||[];if(o.call(e)==="[object Array]")Array.prototype.push.apply(r,e);else if(typeof e.length=="number")for(var i=e.length;n<i;n++)r.push(e[n]);else for(;e[n];n++)r.push(e[n]);return r}}var w,E;n.documentElement.compareDocumentPosition?w=function(e,t){return e===t?(u=!0,0):!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition?-1:1:e.compareDocumentPosition(t)&4?-1:1}:(w=function(e,t){if(e===t)return u=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,a=t.parentNode,f=o;if(o===a)return E(e,t);if(!o)return-1;if(!a)return 1;while(f)i.unshift(f),f=f.parentNode;f=a;while(f)s.unshift(f),f=f.parentNode;n=i.length,r=s.length;for(var l=0;l<n&&l<r;l++)if(i[l]!==s[l])return E(i[l],s[l]);return l===n?E(e,s[l],-1):E(i[l],t,1)},E=function(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}),function(){var e=n.createElement("div"),r="script"+(new Date).getTime(),i=n.documentElement;e.innerHTML="<a name='"+r+"'/>",i.insertBefore(e,i.firstChild),n.getElementById(r)&&(d.find.ID=function(e,n,r){if(typeof n.getElementById!="undefined"&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||typeof i.getAttributeNode!="undefined"&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},d.filter.ID=function(e,t){var n=typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id");return e.nodeType===1&&n&&n.nodeValue===t}),i.removeChild(e),i=e=null}(),function(){var e=n.createElement("div");e.appendChild(n.createComment("")),e.getElementsByTagName("*").length>0&&(d.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if(e[1]==="*"){var r=[];for(var i=0;n[i];i++)n[i].nodeType===1&&r.push(n[i]);n=r}return n}),e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),n.querySelectorAll&&function(){var e=h,t=n.createElement("div"),r="__sizzle__";t.innerHTML="<p class='TEST'></p>";if(t.querySelectorAll&&t.querySelectorAll(".TEST").length===0)return;h=function(t,i,s,o){i=i||n;if(!o&&!h.isXML(i)){var u=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(u&&(i.nodeType===1||i.nodeType===9)){if(u[1])return y(i.getElementsByTagName(t),s);if(u[2]&&d.find.CLASS&&i.getElementsByClassName)return y(i.getElementsByClassName(u[2]),s)}if(i.nodeType===9){if(t==="body"&&i.body)return y([i.body],s);if(u&&u[3]){var a=i.getElementById(u[3]);if(!a||!a.parentNode)return y([],s);if(a.id===u[3])return y([a],s)}try{return y(i.querySelectorAll(t),s)}catch(f){}}else if(i.nodeType===1&&i.nodeName.toLowerCase()!=="object"){var l=i,c=i.getAttribute("id"),p=c||r,v=i.parentNode,m=/^\s*[+~]/.test(t);c?p=p.replace(/'/g,"\\$&"):i.setAttribute("id",p),m&&v&&(i=i.parentNode);try{if(!m||v)return y(i.querySelectorAll("[id='"+p+"'] "+t),s)}catch(g){}finally{c||l.removeAttribute("id")}}}return e(t,i,s,o)};for(var i in e)h[i]=e[i];t=null}(),function(){var e=n.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var r=!t.call(n.createElement("div"),"div"),i=!1;try{t.call(n.documentElement,"[test!='']:sizzle")}catch(s){i=!0}h.matchesSelector=function(e,n){n=n.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(i||!d.match.PSEUDO.test(n)&&!/!=/.test(n)){var s=t.call(e,n);if(s||!r||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(n,null,null,[e]).length>0}}}(),function(){var e=n.createElement("div");e.innerHTML="<div class='test e'></div><div class='test'></div>";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0)return;e.lastChild.className="e";if(e.getElementsByClassName("e").length===1)return;d.order.splice(1,0,"CLASS"),d.find.CLASS=function(e,t,n){if(typeof t.getElementsByClassName!="undefined"&&!n)return t.getElementsByClassName(e[1])},e=null}(),n.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:n.documentElement.compareDocumentPosition?h.contains=function(e,t){return!!(e.compareDocumentPosition(t)&16)}:h.contains=function(){return!1},h.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return t?t.nodeName!=="HTML":!1};var T=function(e,t,n){var r,i=[],s="",o=t.nodeType?[t]:t;while(r=d.match.PSEUDO.exec(e))s+=r[0],e=e.replace(d.match.PSEUDO,"");e=d.relative[e]?e+"*":e;for(var u=0,a=o.length;u<a;u++)h(e,o[u],i,n);return h.filter(s,i)};h.attr=s.attr,h.selectors.attrMap={},s.find=h,s.expr=h.selectors,s.expr[":"]=s.expr.filters,s.unique=h.uniqueSort,s.text=h.getText,s.isXMLDoc=h.isXML,s.contains=h.contains}();var j=/Until$/,F=/^(?:parents|prevUntil|prevAll)/,I=/,/,q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,U=s.expr.match.globalPOS,z={children:!0,contents:!0,next:!0,prev:!0};s.fn.extend({find:function(e){var t=this,n,r;if(typeof e!="string")return s(e).filter(function(){for(n=0,r=t.length;n<r;n++)if(s.contains(t[n],this))return!0});var i=this.pushStack("","find",e),o,u,a;for(n=0,r=this.length;n<r;n++){o=i.length,s.find(e,this[n],i);if(n>0)for(u=o;u<i.length;u++)for(a=0;a<o;a++)if(i[a]===i[u]){i.splice(u--,1);break}}return i},has:function(e){var t=s(e);return this.filter(function(){for(var e=0,n=t.length;e<n;e++)if(s.contains(this,t[e]))return!0})},not:function(e){return this.pushStack(X(this,e,!1),"not",e)},filter:function(e){return this.pushStack(X(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?U.test(e)?s(e,this.context).index(this[0])>=0:s.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,o=this[0];if(s.isArray(e)){var u=1;while(o&&o.ownerDocument&&o!==t){for(r=0;r<e.length;r++)s(o).is(e[r])&&n.push({selector:e[r],elem:o,level:u});o=o.parentNode,u++}return n}var a=U.test(e)||typeof e!="string"?s(e,t||this.context):0;for(r=0,i=this.length;r<i;r++){o=this[r];while(o){if(a?a.index(o)>-1:s.find.matchesSelector(o,e)){n.push(o);break}o=o.parentNode;if(!o||!o.ownerDocument||o===t||o.nodeType===11)break}}return n=n.length>1?s.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?s.inArray(this[0],s(e)):s.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?s(e,t):s.makeArray(e&&e.nodeType?[e]:e),r=s.merge(this.get(),n);return this.pushStack(W(n[0])||W(r[0])?r:s.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),s.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return s.dir(e,"parentNode")},parentsUntil:function(e,t,n){return s.dir(e,"parentNode",n)},next:function(e){return s.nth(e,2,"nextSibling")},prev:function(e){return s.nth(e,2,"previousSibling")},nextAll:function(e){return s.dir(e,"nextSibling")},prevAll:function(e){return s.dir(e,"previousSibling")},nextUntil:function(e,t,n){return s.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return s.dir(e,"previousSibling",n)},siblings:function(e){return s.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return s.sibling(e.firstChild)},contents:function(e){return s.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:s.makeArray(e.childNodes)}},function(e,t){s.fn[e]=function(n,r){var i=s.map(this,t,n);return j.test(e)||(r=n),r&&typeof r=="string"&&(i=s.filter(r,i)),i=this.length>1&&!z[e]?s.unique(i):i,(this.length>1||I.test(r))&&F.test(e)&&(i=i.reverse()),this.pushStack(i,e,R.call(arguments).join(","))}}),s.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?s.find.matchesSelector(t[0],e)?[t[0]]:[]:s.find.matches(e,t)},dir:function(e,n,r){var i=[],o=e[n];while(o&&o.nodeType!==9&&(r===t||o.nodeType!==1||!s(o).is(r)))o.nodeType===1&&i.push(o),o=o[n];return i},nth:function(e,t,n,r){t=t||1;var i=0;for(;e;e=e[n])if(e.nodeType===1&&++i===t)break;return e},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var $="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",J=/ jQuery\d+="(?:\d+|null)"/g,K=/^\s+/,Q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,G=/<([\w:]+)/,Y=/<tbody/i,Z=/<|&#?\w+;/,et=/<(?:script|style)/i,tt=/<(?:script|object|embed|option|style)/i,nt=new RegExp("<(?:"+$+")[\\s/>]","i"),rt=/checked\s*(?:[^=]|=\s*.checked.)/i,it=/\/(java|ecma)script/i,st=/^\s*<!(?:\[CDATA\[|\-\-)/,ot={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},ut=V(n);ot.optgroup=ot.option,ot.tbody=ot.tfoot=ot.colgroup=ot.caption=ot.thead,ot.th=ot.td,s.support.htmlSerialize||(ot._default=[1,"div<div>","</div>"]),s.fn.extend({text:function(e){return s.access(this,function(e){return e===t?s.text(this):this.empty().append((this[0]&&this[0].ownerDocument||n).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(s.isFunction(e))return this.each(function(t){s(this).wrapAll(e.call(this,t))});if(this[0]){var t=s(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return s.isFunction(e)?this.each(function(t){s(this).wrapInner(e.call(this,t))}):this.each(function(){var t=s(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=s.isFunction(e);return this.each(function(n){s(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){s.nodeName(this,"body")||s(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){this.nodeType===1&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=s.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,s.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||s.filter(e,[r]).length)!t&&r.nodeType===1&&(s.cleanData(r.getElementsByTagName("*")),s.cleanData([r])),r.parentNode&&r.parentNode.removeChild(r);return this},empty:function(){for(var e=0,t;(t=this[e])!=null;e++){t.nodeType===1&&s.cleanData(t.getElementsByTagName("*"));while(t.firstChild)t.removeChild(t.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return s.clone(this,e,t)})},html:function(e){return s.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(J,""):null;if(typeof e=="string"&&!et.test(e)&&(s.support.leadingWhitespace||!K.test(e))&&!ot[(G.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(Q,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(s.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return this[0]&&this[0].parentNode?s.isFunction(e)?this.each(function(t){var n=s(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=s(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;s(this).remove(),t?s(t).before(e):s(n).append(e)})):this.length?this.pushStack(s(s.isFunction(e)?e():e),"replaceWith",e):this},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){var i,o,u,a,f=e[0],l=[];if(!s.support.checkClone&&arguments.length===3&&typeof f=="string"&&rt.test(f))return this.each(function(){s(this).domManip(e,n,r,!0)});if(s.isFunction(f))return this.each(function(i){var o=s(this);e[0]=f.call(this,i,n?o.html():t),o.domManip(e,n,r)});if(this[0]){a=f&&f.parentNode,s.support.parentNode&&a&&a.nodeType===11&&a.childNodes.length===this.length?i={fragment:a}:i=s.buildFragment(e,this,l),u=i.fragment,u.childNodes.length===1?o=u=u.firstChild:o=u.firstChild;if(o){n=n&&s.nodeName(o,"tr");for(var c=0,h=this.length,p=h-1;c<h;c++)r.call(n?at(this[c],o):this[c],i.cacheable||h>1&&c<p?s.clone(u,!0,!0):u)}l.length&&s.each(l,function(e,t){t.src?s.ajax({type:"GET",global:!1,url:t.src,async:!1,dataType:"script"}):s.globalEval((t.text||t.textContent||t.innerHTML||"").replace(st,"/*$0*/")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),s.buildFragment=function(e,t,r){var i,o,u,a,f=e[0];return t&&t[0]&&(a=t[0].ownerDocument||t[0]),a.createDocumentFragment||(a=n),e.length===1&&typeof f=="string"&&f.length<512&&a===n&&f.charAt(0)==="<"&&!tt.test(f)&&(s.support.checkClone||!rt.test(f))&&(s.support.html5Clone||!nt.test(f))&&(o=!0,u=s.fragments[f],u&&u!==1&&(i=u)),i||(i=a.createDocumentFragment(),s.clean(e,a,i,r)),o&&(s.fragments[f]=u?i:1),{fragment:i,cacheable:o}},s.fragments={},s.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){s.fn[e]=function(n){var r=[],i=s(n),o=this.length===1&&this[0].parentNode;if(o&&o.nodeType===11&&o.childNodes.length===1&&i.length===1)return i[t](this[0]),this;for(var u=0,a=i.length;u<a;u++){var f=(u>0?this.clone(!0):this).get();s(i[u])[t](f),r=r.concat(f)}return this.pushStack(r,e,i.selector)}}),s.extend({clone:function(e,t,n){var r,i,o,u=s.support.html5Clone||s.isXMLDoc(e)||!nt.test("<"+e.nodeName+">")?e.cloneNode(!0):dt(e);if((!s.support.noCloneEvent||!s.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!s.isXMLDoc(e)){lt(e,u),r=ct(e),i=ct(u);for(o=0;r[o];++o)i[o]&&lt(r[o],i[o])}if(t){ft(e,u);if(n){r=ct(e),i=ct(u);for(o=0;r[o];++o)ft(r[o],i[o])}}return r=i=null,u},clean:function(e,t,r,i){var o,u,a,f=[];t=t||n,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||n);for(var l=0,c;(c=e[l])!=null;l++){typeof c=="number"&&(c+="");if(!c)continue;if(typeof c=="string")if(!Z.test(c))c=t.createTextNode(c);else{c=c.replace(Q,"<$1></$2>");var h=(G.exec(c)||["",""])[1].toLowerCase(),p=ot[h]||ot._default,d=p[0],v=t.createElement("div"),m=ut.childNodes,g;t===n?ut.appendChild(v):V(t).appendChild(v),v.innerHTML=p[1]+c+p[2];while(d--)v=v.lastChild;if(!s.support.tbody){var y=Y.test(c),b=h==="table"&&!y?v.firstChild&&v.firstChild.childNodes:p[1]==="<table>"&&!y?v.childNodes:[];for(a=b.length-1;a>=0;--a)s.nodeName(b[a],"tbody")&&!b[a].childNodes.length&&b[a].parentNode.removeChild(b[a])}!s.support.leadingWhitespace&&K.test(c)&&v.insertBefore(t.createTextNode(K.exec(c)[0]),v.firstChild),c=v.childNodes,v&&(v.parentNode.removeChild(v),m.length>0&&(g=m[m.length-1],g&&g.parentNode&&g.parentNode.removeChild(g)))}var w;if(!s.support.appendChecked)if(c[0]&&typeof (w=c.length)=="number")for(a=0;a<w;a++)pt(c[a]);else pt(c);c.nodeType?f.push(c):f=s.merge(f,c)}if(r){o=function(e){return!e.type||it.test(e.type)};for(l=0;f[l];l++){u=f[l];if(i&&s.nodeName(u,"script")&&(!u.type||it.test(u.type)))i.push(u.parentNode?u.parentNode.removeChild(u):u);else{if(u.nodeType===1){var E=s.grep(u.getElementsByTagName("script"),o);f.splice.apply(f,[l+1,0].concat(E))}r.appendChild(u)}}}return f},cleanData:function(e){var t,n,r=s.cache,i=s.event.special,o=s.support.deleteExpando;for(var u=0,a;(a=e[u])!=null;u++){if(a.nodeName&&s.noData[a.nodeName.toLowerCase()])continue;n=a[s.expando];if(n){t=r[n];if(t&&t.events){for(var f in t.events)i[f]?s.event.remove(a,f):s.removeEvent(a,f,t.handle);t.handle&&(t.handle.elem=null)}o?delete a[s.expando]:a.removeAttribute&&a.removeAttribute(s.expando),delete r[n]}}}});var vt=/alpha\([^)]*\)/i,mt=/opacity=([^)]*)/,gt=/([A-Z]|^ms)/g,yt=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,wt=/^([\-+])=([\-+.\de]+)/,Et=/^margin/,St={position:"absolute",visibility:"hidden",display:"block"},xt=["Top","Right","Bottom","Left"],Tt,Nt,Ct;s.fn.css=function(e,n){return s.access(this,function(e,n,r){return r!==t?s.style(e,n,r):s.css(e,n)},e,n,arguments.length>1)},s.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Tt(e,"opacity");return n===""?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":s.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var o,u,a=s.camelCase(n),f=e.style,l=s.cssHooks[a];n=s.cssProps[a]||a;if(r===t)return l&&"get"in l&&(o=l.get(e,!1,i))!==t?o:f[n];u=typeof r,u==="string"&&(o=wt.exec(r))&&(r=+(o[1]+1)*+o[2]+parseFloat(s.css(e,n)),u="number");if(r==null||u==="number"&&isNaN(r))return;u==="number"&&!s.cssNumber[a]&&(r+="px");if(!l||!("set"in l)||(r=l.set(e,r))!==t)try{f[n]=r}catch(c){}},css:function(e,n,r){var i,o;n=s.camelCase(n),o=s.cssHooks[n],n=s.cssProps[n]||n,n==="cssFloat"&&(n="float");if(o&&"get"in o&&(i=o.get(e,!0,r))!==t)return i;if(Tt)return Tt(e,n)},swap:function(e,t,n){var r={},i,s;for(s in t)r[s]=e.style[s],e.style[s]=t[s];i=n.call(e);for(s in t)e.style[s]=r[s];return i}}),s.curCSS=s.css,n.defaultView&&n.defaultView.getComputedStyle&&(Nt=function(e,t){var n,r,i,o,u=e.style;return t=t.replace(gt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!s.contains(e.ownerDocument.documentElement,e)&&(n=s.style(e,t))),!s.support.pixelMargin&&i&&Et.test(t)&&bt.test(n)&&(o=u.width,u.width=n,n=i.width,u.width=o),n}),n.documentElement.currentStyle&&(Ct=function(e,t){var n,r,i,s=e.currentStyle&&e.currentStyle[t],o=e.style;return s==null&&o&&(i=o[t])&&(s=i),bt.test(s)&&(n=o.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),o.left=t==="fontSize"?"1em":s,s=o.pixelLeft+"px",o.left=n,r&&(e.runtimeStyle.left=r)),s===""?"auto":s}),Tt=Nt||Ct,s.each(["height","width"],function(e,t){s.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?kt(e,t,r):s.swap(e,St,function(){return kt(e,t,r)})},set:function(e,t){return yt.test(t)?t+"px":t}}}),s.support.opacity||(s.cssHooks.opacity={get:function(e,t){return mt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=s.isNumeric(t)?"alpha(opacity="+t*100+")":"",o=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&s.trim(o.replace(vt,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=vt.test(o)?o.replace(vt,i):o+" "+i}}),s(function(){s.support.reliableMarginRight||(s.cssHooks.marginRight={get:function(e,t){return s.swap(e,{display:"inline-block"},function(){return t?Tt(e,"margin-right"):e.style.marginRight})}})}),s.expr&&s.expr.filters&&(s.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!s.support.reliableHiddenOffsets&&(e.style&&e.style.display||s.css(e,"display"))==="none"},s.expr.filters.visible=function(e){return!s.expr.filters.hidden(e)}),s.each({margin:"",padding:"",border:"Width"},function(e,t){s.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+xt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Lt=/%20/g,At=/\[\]$/,Ot=/\r?\n/g,Mt=/#.*$/,_t=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Dt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Pt=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ht=/^(?:GET|HEAD)$/,Bt=/^\/\//,jt=/\?/,Ft=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,It=/^(?:select|textarea)/i,qt=/\s+/,Rt=/([?&])_=[^&]*/,Ut=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,zt=s.fn.load,Wt={},Xt={},Vt,$t,Jt=["*/"]+["*"];try{Vt=i.href}catch(Kt){Vt=n.createElement("a"),Vt.href="",Vt=Vt.href}$t=Ut.exec(Vt.toLowerCase())||[],s.fn.extend({load:function(e,n,r){if(typeof e!="string"&&zt)return zt.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var o=e.slice(i,e.length);e=e.slice(0,i)}var u="GET";n&&(s.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=s.param(n,s.ajaxSettings.traditional),u="POST"));var a=this;return s.ajax({url:e,type:u,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(o?s("<div>").append(n.replace(Ft,"")).find(o):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return s.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?s.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||It.test(this.nodeName)||Dt.test(this.type))}).map(function(e,t){var n=s(this).val();return n==null?null:s.isArray(n)?s.map(n,function(e,n){return{name:t.name,value:e.replace(Ot,"\r\n")}}):{name:t.name,value:n.replace(Ot,"\r\n")}}).get()}}),s.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){s.fn[t]=function(e){return this.on(t,e)}}),s.each(["get","post"],function(e,n){s[n]=function(e,r,i,o){return s.isFunction(r)&&(o=o||i,i=r,r=t),s.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),s.extend({getScript:function(e,n){return s.get(e,t,n,"script")},getJSON:function(e,t,n){return s.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Yt(e,s.ajaxSettings):(t=e,e=s.ajaxSettings),Yt(e,t),e},ajaxSettings:{url:Vt,isLocal:Pt.test($t[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Jt},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":s.parseJSON,"text xml":s.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Qt(Wt),ajaxTransport:Qt(Xt),ajax:function(e,n){function S(e,n,c,h){if(y===2)return;y=2,m&&clearTimeout(m),v=t,p=h||"",E.readyState=e>0?4:0;var d,g,w,S=n,x=c?en(r,E,c):t,T,N;if(e>=200&&e<300||e===304){if(r.ifModified){if(T=E.getResponseHeader("Last-Modified"))s.lastModified[l]=T;if(N=E.getResponseHeader("Etag"))s.etag[l]=N}if(e===304)S="notmodified",d=!0;else try{g=tn(r,x),S="success",d=!0}catch(C){S="parsererror",w=C}}else{w=S;if(!S||e)S="error",e<0&&(e=0)}E.status=e,E.statusText=""+(n||S),d?u.resolveWith(i,[g,S,E]):u.rejectWith(i,[E,S,w]),E.statusCode(f),f=t,b&&o.trigger("ajax"+(d?"Success":"Error"),[E,r,d?g:w]),a.fireWith(i,[E,S]),b&&(o.trigger("ajaxComplete",[E,r]),--s.active||s.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r=s.ajaxSetup({},n),i=r.context||r,o=i!==r&&(i.nodeType||i instanceof s)?s(i):s.event,u=s.Deferred(),a=s.Callbacks("once memory"),f=r.statusCode||{},l,c={},h={},p,d,v,m,g,y=0,b,w,E={readyState:0,setRequestHeader:function(e,t){if(!y){var n=e.toLowerCase();e=h[n]=h[n]||e,c[e]=t}return this},getAllResponseHeaders:function(){return y===2?p:null},getResponseHeader:function(e){var n;if(y===2){if(!d){d={};while(n=_t.exec(p))d[n[1].toLowerCase()]=n[2]}n=d[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return y||(r.mimeType=e),this},abort:function(e){return e=e||"abort",v&&v.abort(e),S(0,e),this}};u.promise(E),E.success=E.done,E.error=E.fail,E.complete=a.add,E.statusCode=function(e){if(e){var t;if(y<2)for(t in e)f[t]=[f[t],e[t]];else t=e[E.status],E.then(t,t)}return this},r.url=((e||r.url)+"").replace(Mt,"").replace(Bt,$t[1]+"//"),r.dataTypes=s.trim(r.dataType||"*").toLowerCase().split(qt),r.crossDomain==null&&(g=Ut.exec(r.url.toLowerCase()),r.crossDomain=!(!g||g[1]==$t[1]&&g[2]==$t[2]&&(g[3]||(g[1]==="http:"?80:443))==($t[3]||($t[1]==="http:"?80:443)))),r.data&&r.processData&&typeof r.data!="string"&&(r.data=s.param(r.data,r.traditional)),Gt(Wt,r,n,E);if(y===2)return!1;b=r.global,r.type=r.type.toUpperCase(),r.hasContent=!Ht.test(r.type),b&&s.active++===0&&s.event.trigger("ajaxStart");if(!r.hasContent){r.data&&(r.url+=(jt.test(r.url)?"&":"?")+r.data,delete r.data),l=r.url;if(r.cache===!1){var x=s.now(),T=r.url.replace(Rt,"$1_="+x);r.url=T+(T===r.url?(jt.test(r.url)?"&":"?")+"_="+x:"")}}(r.data&&r.hasContent&&r.contentType!==!1||n.contentType)&&E.setRequestHeader("Content-Type",r.contentType),r.ifModified&&(l=l||r.url,s.lastModified[l]&&E.setRequestHeader("If-Modified-Since",s.lastModified[l]),s.etag[l]&&E.setRequestHeader("If-None-Match",s.etag[l])),E.setRequestHeader("Accept",r.dataTypes[0]&&r.accepts[r.dataTypes[0]]?r.accepts[r.dataTypes[0]]+(r.dataTypes[0]!=="*"?", "+Jt+"; q=0.01":""):r.accepts["*"]);for(w in r.headers)E.setRequestHeader(w,r.headers[w]);if(!r.beforeSend||r.beforeSend.call(i,E,r)!==!1&&y!==2){for(w in{success:1,error:1,complete:1})E[w](r[w]);v=Gt(Xt,r,n,E);if(!v)S(-1,"No Transport");else{E.readyState=1,b&&o.trigger("ajaxSend",[E,r]),r.async&&r.timeout>0&&(m=setTimeout(function(){E.abort("timeout")},r.timeout));try{y=1,v.send(c,S)}catch(N){if(!(y<2))throw N;S(-1,N)}}return E}return E.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=s.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=s.ajaxSettings.traditional);if(s.isArray(e)||e.jquery&&!s.isPlainObject(e))s.each(e,function(){i(this.name,this.value)});else for(var o in e)Zt(o,e[o],n,i);return r.join("&").replace(Lt,"+")}}),s.extend({active:0,lastModified:{},etag:{}});var nn=s.now(),rn=/(\=)\?(&|$)|\?\?/i;s.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return s.expando+"_"+nn++}}),s.ajaxPrefilter("json jsonp",function(t,n,r){var i=typeof t.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if(t.dataTypes[0]==="jsonp"||t.jsonp!==!1&&(rn.test(t.url)||i&&rn.test(t.data))){var o,u=t.jsonpCallback=s.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a=e[u],f=t.url,l=t.data,c="$1"+u+"$2";return t.jsonp!==!1&&(f=f.replace(rn,c),t.url===f&&(i&&(l=l.replace(rn,c)),t.data===l&&(f+=(/\?/.test(f)?"&":"?")+t.jsonp+"="+u))),t.url=f,t.data=l,e[u]=function(e){o=[e]},r.always(function(){e[u]=a,o&&s.isFunction(a)&&e[u](o[0])}),t.converters["script json"]=function(){return o||s.error(u+" was not called"),o[0]},t.dataTypes[0]="json","script"}}),s.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return s.globalEval(e),e}}}),s.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),s.ajaxTransport("script",function(e){if(e.crossDomain){var r,i=n.head||n.getElementsByTagName("head")[0]||n.documentElement;return{send:function(s,o){r=n.createElement("script"),r.async="async",e.scriptCharset&&(r.charset=e.scriptCharset),r.src=e.url,r.onload=r.onreadystatechange=function(e,n){if(n||!r.readyState||/loaded|complete/.test(r.readyState))r.onload=r.onreadystatechange=null,i&&r.parentNode&&i.removeChild(r),r=t,n||o(200,"success")},i.insertBefore(r,i.firstChild)},abort:function(){r&&r.onload(0,1)}}}});var sn=e.ActiveXObject?function(){for(var e in un)un[e](0,1)}:!1,on=0,un;s.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&an()||fn()}:an,function(e){s.extend(s.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(s.ajaxSettings.xhr()),s.support.ajax&&s.ajaxTransport(function(n){if(!n.crossDomain||s.support.cors){var r;return{send:function(i,o){var u=n.xhr(),a,f;n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async);if(n.xhrFields)for(f in n.xhrFields)u[f]=n.xhrFields[f];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(f in i)u.setRequestHeader(f,i[f])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var f,l,c,h,p;try{if(r&&(i||u.readyState===4)){r=t,a&&(u.onreadystatechange=s.noop,sn&&delete un[a]);if(i)u.readyState!==4&&u.abort();else{f=u.status,c=u.getAllResponseHeaders(),h={},p=u.responseXML,p&&p.documentElement&&(h.xml=p);try{h.text=u.responseText}catch(e){}try{l=u.statusText}catch(d){l=""}!f&&n.isLocal&&!n.crossDomain?f=h.text?200:404:f===1223&&(f=204)}}}catch(v){i||o(-1,v)}h&&o(f,l,h,c)},!n.async||u.readyState===4?r():(a=++on,sn&&(un||(un={},s(e).unload(sn)),un[a]=r),u.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var ln={},cn,hn,pn=/^(?:toggle|show|hide)$/,dn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,vn,mn=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],gn;s.fn.extend({show:function(e,t,n){var r,i;if(e||e===0)return this.animate(wn("show",3),e,t,n);for(var o=0,u=this.length;o<u;o++)r=this[o],r.style&&(i=r.style.display,!s._data(r,"olddisplay")&&i==="none"&&(i=r.style.display=""),(i===""&&s.css(r,"display")==="none"||!s.contains(r.ownerDocument.documentElement,r))&&s._data(r,"olddisplay",En(r.nodeName)));for(o=0;o<u;o++){r=this[o];if(r.style){i=r.style.display;if(i===""||i==="none")r.style.display=s._data(r,"olddisplay")||""}}return this},hide:function(e,t,n){if(e||e===0)return this.animate(wn("hide",3),e,t,n);var r,i,o=0,u=this.length;for(;o<u;o++)r=this[o],r.style&&(i=s.css(r,"display"),i!=="none"&&!s._data(r,"olddisplay")&&s._data(r,"olddisplay",i));for(o=0;o<u;o++)this[o].style&&(this[o].style.display="none");return this},_toggle:s.fn.toggle,toggle:function(e,t,n){var r=typeof e=="boolean";return s.isFunction(e)&&s.isFunction(t)?this._toggle.apply(this,arguments):e==null||r?this.each(function(){var t=r?e:s(this).is(":hidden");s(this)[t?"show":"hide"]()}):this.animate(wn("toggle",3),e,t,n),this},fadeTo:function(e,t,n,r){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function o(){i.queue===!1&&s._mark(this);var t=s.extend({},i),n=this.nodeType===1,r=n&&s(this).is(":hidden"),o,u,a,f,l,c,h,p,d,v,m;t.animatedProperties={};for(a in e){o=s.camelCase(a),a!==o&&(e[o]=e[a],delete e[a]);if((l=s.cssHooks[o])&&"expand"in l){c=l.expand(e[o]),delete e[o];for(a in c)a in e||(e[a]=c[a])}}for(o in e){u=e[o],s.isArray(u)?(t.animatedProperties[o]=u[1],u=e[o]=u[0]):t.animatedProperties[o]=t.specialEasing&&t.specialEasing[o]||t.easing||"swing";if(u==="hide"&&r||u==="show"&&!r)return t.complete.call(this);n&&(o==="height"||o==="width")&&(t.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],s.css(this,"display")==="inline"&&s.css(this,"float")==="none"&&(!s.support.inlineBlockNeedsLayout||En(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}t.overflow!=null&&(this.style.overflow="hidden");for(a in e)f=new s.fx(this,t,a),u=e[a],pn.test(u)?(m=s._data(this,"toggle"+a)||(u==="toggle"?r?"show":"hide":0),m?(s._data(this,"toggle"+a,m==="show"?"hide":"show"),f[m]()):f[u]()):(h=dn.exec(u),p=f.cur(),h?(d=parseFloat(h[2]),v=h[3]||(s.cssNumber[a]?"":"px"),v!=="px"&&(s.style(this,a,(d||1)+v),p=(d||1)/f.cur()*p,s.style(this,a,p+v)),h[1]&&(d=(h[1]==="-="?-1:1)*d+p),f.custom(p,d,v)):f.custom(p,u,""));return!0}var i=s.speed(t,n,r);return s.isEmptyObject(e)?this.each(i.complete,[!1]):(e=s.extend({},e),i.queue===!1?this.each(o):this.queue(i.queue,o))},stop:function(e,n,r){return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){function u(e,t,n){var i=t[n];s.removeData(e,n,!0),i.stop(r)}var t,n=!1,i=s.timers,o=s._data(this);r||s._unmark(!0,this);if(e==null)for(t in o)o[t]&&o[t].stop&&t.indexOf(".run")===t.length-4&&u(this,o,t);else o[t=e+".run"]&&o[t].stop&&u(this,o,t);for(t=i.length;t--;)i[t].elem===this&&(e==null||i[t].queue===e)&&(r?i[t](!0):i[t].saveState(),n=!0,i.splice(t,1));(!r||!n)&&s.dequeue(this,e)})}}),s.each({slideDown:wn("show",1),slideUp:wn("hide",1),slideToggle:wn("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){s.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),s.extend({speed:function(e,t,n){var r=e&&typeof e=="object"?s.extend({},e):{complete:n||!n&&t||s.isFunction(e)&&e,duration:e,easing:n&&t||t&&!s.isFunction(t)&&t};r.duration=s.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in s.fx.speeds?s.fx.speeds[r.duration]:s.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(e){s.isFunction(r.old)&&r.old.call(this),r.queue?s.dequeue(this,r.queue):e!==!1&&s._unmark(this)},r},easing:{linear:function(e){return e},swing:function(e){return-Math.cos(e*Math.PI)/2+.5}},timers:[],fx:function(e,t,n){this.options=t,this.elem=e,this.prop=n,t.orig=t.orig||{}}}),s.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(s.fx.step[this.prop]||s.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]==null||!!this.elem.style&&this.elem.style[this.prop]!=null){var e,t=s.css(this.elem,this.prop);return isNaN(e=parseFloat(t))?!t||t==="auto"?0:t:e}return this.elem[this.prop]},custom:function(e,n,r){function u(e){return i.step(e)}var i=this,o=s.fx;this.startTime=gn||yn(),this.end=n,this.now=this.start=e,this.pos=this.state=0,this.unit=r||this.unit||(s.cssNumber[this.prop]?"":"px"),u.queue=this.options.queue,u.elem=this.elem,u.saveState=function(){s._data(i.elem,"fxshow"+i.prop)===t&&(i.options.hide?s._data(i.elem,"fxshow"+i.prop,i.start):i.options.show&&s._data(i.elem,"fxshow"+i.prop,i.end))},u()&&s.timers.push(u)&&!vn&&(vn=setInterval(o.tick,o.interval))},show:function(){var e=s._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=e||s.style(this.elem,this.prop),this.options.show=!0,e!==t?this.custom(this.cur(),e):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),s(this.elem).show()},hide:function(){this.options.orig[this.prop]=s._data(this.elem,"fxshow"+this.prop)||s.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(e){var t,n,r,i=gn||yn(),o=!0,u=this.elem,a=this.options;if(e||i>=a.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),a.animatedProperties[this.prop]=!0;for(t in a.animatedProperties)a.animatedProperties[t]!==!0&&(o=!1);if(o){a.overflow!=null&&!s.support.shrinkWrapBlocks&&s.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&s(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)s.style(u,t,a.orig[t]),s.removeData(u,"fxshow"+t,!0),s.removeData(u,"toggle"+t,!0);r=a.complete,r&&(a.complete=!1,r.call(u))}return!1}return a.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/a.duration,this.pos=s.easing[a.animatedProperties[this.prop]](this.state,n,0,1,a.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},s.extend(s.fx,{tick:function(){var e,t=s.timers,n=0;for(;n<t.length;n++)e=t[n],!e()&&t[n]===e&&t.splice(n--,1);t.length||s.fx.stop()},interval:13,stop:function(){clearInterval(vn),vn=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(e){s.style(e.elem,"opacity",e.now)},_default:function(e){e.elem.style&&e.elem.style[e.prop]!=null?e.elem.style[e.prop]=e.now+e.unit:e.elem[e.prop]=e.now}}}),s.each(mn.concat.apply([],mn),function(e,t){t.indexOf("margin")&&(s.fx.step[t]=function(e){s.style(e.elem,t,Math.max(0,e.now)+e.unit)})}),s.expr&&s.expr.filters&&(s.expr.filters.animated=function(e){return s.grep(s.timers,function(t){return e===t.elem}).length});var Sn,xn=/^t(?:able|d|h)$/i,Tn=/^(?:body|html)$/i;"getBoundingClientRect"in n.documentElement?Sn=function(e,t,n,r){try{r=e.getBoundingClientRect()}catch(i){}if(!r||!s.contains(n,e))return r?{top:r.top,left:r.left}:{top:0,left:0};var o=t.body,u=Nn(t),a=n.clientTop||o.clientTop||0,f=n.clientLeft||o.clientLeft||0,l=u.pageYOffset||s.support.boxModel&&n.scrollTop||o.scrollTop,c=u.pageXOffset||s.support.boxModel&&n.scrollLeft||o.scrollLeft,h=r.top+l-a,p=r.left+c-f;return{top:h,left:p}}:Sn=function(e,t,n){var r,i=e.offsetParent,o=e,u=t.body,a=t.defaultView,f=a?a.getComputedStyle(e,null):e.currentStyle,l=e.offsetTop,c=e.offsetLeft;while((e=e.parentNode)&&e!==u&&e!==n){if(s.support.fixedPosition&&f.position==="fixed")break;r=a?a.getComputedStyle(e,null):e.currentStyle,l-=e.scrollTop,c-=e.scrollLeft,e===i&&(l+=e.offsetTop,c+=e.offsetLeft,s.support.doesNotAddBorder&&(!s.support.doesAddBorderForTableAndCells||!xn.test(e.nodeName))&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),o=i,i=e.offsetParent),s.support.subtractsBorderForOverflowNotVisible&&r.overflow!=="visible"&&(l+=parseFloat(r.borderTopWidth)||0,c+=parseFloat(r.borderLeftWidth)||0),f=r}if(f.position==="relative"||f.position==="static")l+=u.offsetTop,c+=u.offsetLeft;return s.support.fixedPosition&&f.position==="fixed"&&(l+=Math.max(n.scrollTop,u.scrollTop),c+=Math.max(n.scrollLeft,u.scrollLeft)),{top:l,left:c}},s.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){s.offset.setOffset(this,e,t)});var n=this[0],r=n&&n.ownerDocument;return r?n===r.body?s.offset.bodyOffset(n):Sn(n,r,r.documentElement):null},s.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return s.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(s.css(e,"marginTop"))||0,n+=parseFloat(s.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=s.css(e,"position");r==="static"&&(e.style.position="relative");var i=s(e),o=i.offset(),u=s.css(e,"top"),a=s.css(e,"left"),f=(r==="absolute"||r==="fixed")&&s.inArray("auto",[u,a])>-1,l={},c={},h,p;f?(c=i.position(),h=c.top,p=c.left):(h=parseFloat(u)||0,p=parseFloat(a)||0),s.isFunction(t)&&(t=t.call(e,n,o)),t.top!=null&&(l.top=t.top-o.top+h),t.left!=null&&(l.left=t.left-o.left+p),"using"in t?t.using.call(e,l):i.css(l)}},s.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Tn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(s.css(e,"marginTop"))||0,n.left-=parseFloat(s.css(e,"marginLeft"))||0,r.top+=parseFloat(s.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(s.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||n.body;while(e&&!Tn.test(e.nodeName)&&s.css(e,"position")==="static")e=e.offsetParent;return e})}}),s.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);s.fn[e]=function(i){return s.access(this,function(e,i,o){var u=Nn(e);if(o===t)return u?n in u?u[n]:s.support.boxModel&&u.document.documentElement[i]||u.document.body[i]:e[i];u?u.scrollTo(r?s(u).scrollLeft():o,r?o:s(u).scrollTop()):e[i]=o},e,i,arguments.length,null)}}),s.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,o="offset"+e;s.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(s.css(e,n,"padding")):this[n]():null},s.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(s.css(t,n,e?"margin":"border")):this[n]():null},s.fn[n]=function(e){return s.access(this,function(e,n,u){var a,f,l,c;if(s.isWindow(e))return a=e.document,f=a.documentElement[r],s.support.boxModel&&f||a.body&&a.body[r]||f;if(e.nodeType===9)return a=e.documentElement,a[r]>=a[i]?a[r]:Math.max(e.body[i],a[i],e.body[o],a[o]);if(u===t)return l=s.css(e,n),c=parseFloat(l),s.isNumeric(c)?c:l;s(e).css(n,u)},n,e,arguments.length,null)}}),e.jQuery=e.$=s,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return s})})(window),define("jQuery",function(e){return function(){return e.$}}(this)),function(){function L(e,t,n){if(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e._chain&&(e=e._wrapped),t._chain&&(t=t._wrapped);if(e.isEqual&&x.isFunction(e.isEqual))return e.isEqual(t);if(t.isEqual&&x.isFunction(t.isEqual))return t.isEqual(e);var r=f.call(e);if(r!=f.call(t))return!1;switch(r){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var i=n.length;while(i--)if(n[i]==e)return!0;n.push(e);var s=0,o=!0;if(r=="[object Array]"){s=e.length,o=s==t.length;if(o)while(s--)if(!(o=s in e==s in t&&L(e[s],t[s],n)))break}else{if("constructor"in e!="constructor"in t||e.constructor!=t.constructor)return!1;for(var u in e)if(x.has(e,u)){s++;if(!(o=x.has(t,u)&&L(e[u],t[u],n)))break}if(o){for(u in t)if(x.has(t,u)&&!(s--))break;o=!s}}return n.pop(),o}var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.unshift,f=i.toString,l=i.hasOwnProperty,c=r.forEach,h=r.map,p=r.reduce,d=r.reduceRight,v=r.filter,m=r.every,g=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,E=Object.keys,S=s.bind,x=function(e){return new F(e)};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=x),exports._=x):e._=x,x.VERSION="1.3.3";var T=x.each=x.forEach=function(e,t,r){if(e==null)return;if(c&&e.forEach===c)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(x.has(e,o)&&t.call(r,e[o],o,e)===n)return};x.map=x.collect=function(e,t,n){var r=[];return e==null?r:h&&e.map===h?e.map(t,n):(T(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},x.reduce=x.foldl=x.inject=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(p&&e.reduce===p)return r&&(t=x.bind(t,r)),i?e.reduce(t,n):e.reduce(t);T(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},x.reduceRight=x.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(d&&e.reduceRight===d)return r&&(t=x.bind(t,r)),i?e.reduceRight(t,n):e.reduceRight(t);var s=x.toArray(e).reverse();return r&&!i&&(t=x.bind(t,r)),i?x.reduce(s,t,n,r):x.reduce(s,t)},x.find=x.detect=function(e,t,n){var r;return N(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},x.filter=x.select=function(e,t,n){var r=[];return e==null?r:v&&e.filter===v?e.filter(t,n):(T(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},x.reject=function(e,t,n){var r=[];return e==null?r:(T(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},x.every=x.all=function(e,t,r){var i=!0;return e==null?i:m&&e.every===m?e.every(t,r):(T(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var N=x.some=x.any=function(e,t,r){t||(t=x.identity);var i=!1;return e==null?i:g&&e.some===g?e.some(t,r):(T(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};x.include=x.contains=function(e,t){var n=!1;return e==null?n:y&&e.indexOf===y?e.indexOf(t)!=-1:(n=N(e,function(e){return e===t}),n)},x.invoke=function(e,t){var n=u.call(arguments,2);return x.map(e,function(e){return(x.isFunction(t)?t:e[t]).apply(e,n)})},x.pluck=function(e,t){return x.map(e,function(e){return e[t]})},x.max=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&x.isEmpty(e))return-Infinity;var r={computed:-Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.computed&&(r={value:e,computed:o})}),r.value},x.min=function(e,t,n){if(!t&&x.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&x.isEmpty(e))return Infinity;var r={computed:Infinity};return T(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},x.shuffle=function(e){var t,n=0,r=[];return T(e,function(e){t=Math.floor(Math.random()*++n),r[n-1]=r[t],r[t]=e}),r},x.sortBy=function(e,t,n){var r=x.isFunction(t)?t:function(e){return e[t]};return x.pluck(x.map(e,function(e,t,i){return{value:e,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;return n===void 0?1:r===void 0?-1:n<r?-1:n>r?1:0}),"value")},x.groupBy=function(e,t){var n={},r=x.isFunction(t)?t:function(e){return e[t]};return T(e,function(e,t){var i=r(e,t);(n[i]||(n[i]=[])).push(e)}),n},x.sortedIndex=function(e,t,n){n||(n=x.identity);var r=n(t),i=0,s=e.length;while(i<s){var o=i+s>>1;n(e[o])<r?i=o+1:s=o}return i},x.toArray=function(e){return e?x.isArray(e)?u.call(e):x.isArguments(e)?u.call(e):e.toArray&&x.isFunction(e.toArray)?e.toArray():x.values(e):[]},x.size=function(e){return x.isArray(e)?e.length:x.keys(e).length},x.first=x.head=x.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},x.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},x.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},x.rest=x.tail=function(e,t,n){return u.call(e,t==null||n?1:t)},x.compact=function(e){return x.filter(e,function(e){return!!e})};var C=function(e,t,n){return T(e,function(e){x.isArray(e)?t?o.apply(n,e):C(e,t,n):n.push(e)}),n};x.flatten=function(e,t){return C(e,t,[])},x.without=function(e){return x.difference(e,u.call(arguments,1))},x.uniq=x.unique=function(e,t,n){var r=n?x.map(e,n):e,i=[];return x.reduce(r,function(n,r,s){if(t?x.last(n)!==r||!n.length:!x.include(n,r))n.push(r),i.push(e[s]);return n},[]),i},x.union=function(){return x.uniq(C(arguments,!0,[]))},x.intersection=function(e){var t=u.call(arguments,1);return x.filter(x.uniq(e),function(e){return x.every(t,function(t){return x.indexOf(t,e)>=0})})},x.difference=function(e){var t=C(u.call(arguments,1),!0,[]);return x.filter(e,function(e){return!x.include(t,e)})},x.zip=function(){var e=u.call(arguments),t=x.max(x.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=x.pluck(e,""+r);return n},x.zipObject=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)n[e[r]]=t[r];return n},x.indexOf=function(e,t,n){if(e==null)return-1;var r,i;if(n)return r=x.sortedIndex(e,t),e[r]===t?r:-1;if(y&&e.indexOf===y)return e.indexOf(t);for(r=0,i=e.length;r<i;r++)if(e[r]===t)return r;return-1},x.lastIndexOf=function(e,t){if(e==null)return-1;if(b&&e.lastIndexOf===b)return e.lastIndexOf(t);var n=e.length;while(n--)if(e[n]===t)return n;return-1},x.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var k=function(){};x.bind=function(t,n){var r,i;if(t.bind===S&&S)return S.apply(t,u.call(arguments,1));if(!x.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){k.prototype=t.prototype;var e=new k,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},x.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=x.functions(e)),T(t,function(t){e[t]=x.bind(e[t],e)}),e},x.memoize=function(e,t){var n={};return t||(t=x.identity),function(){var r=t.apply(this,arguments);return x.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},x.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},x.defer=function(e){return x.delay.apply(x,[e,1].concat(u.call(arguments,1)))},x.throttle=function(e,t){var n,r,i,s,o,u,a=x.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&e.apply(n,r),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},x.debounce=function(e,t,n){var r;return function(){var i=this,s=arguments,o=function(){r=null,n||e.apply(i,s)},u=n&&!r;clearTimeout(r),r=setTimeout(o,t),u&&e.apply(i,s)}},x.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments))}},x.wrap=function(e,t){return function(){var n=[e].concat(u.call(arguments,0));return t.apply(this,n)}},x.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},x.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},x.keys=E||function(e){if(e!==Object(e))throw new TypeError("Invalid object");var t=[];for(var n in e)x.has(e,n)&&(t[t.length]=n);return t},x.values=function(e){return x.map(e,x.identity)},x.functions=x.methods=function(e){var t=[];for(var n in e)x.isFunction(e[n])&&t.push(n);return t.sort()},x.extend=function(e){return T(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},x.pick=function(e){var t={};return T(C(u.call(arguments,1),!0,[]),function(n){n in e&&(t[n]=e[n])}),t},x.defaults=function(e){return T(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},x.clone=function(e){return x.isObject(e)?x.isArray(e)?e.slice():x.extend({},e):e},x.tap=function(e,t){return t(e),e},x.isEqual=function(e,t){return L(e,t,[])},x.isEmpty=function(e){if(e==null)return!0;if(x.isArray(e)||x.isString(e))return e.length===0;for(var t in e)if(x.has(e,t))return!1;return!0},x.isElement=function(e){return!!e&&e.nodeType==1},x.isArray=w||function(e){return f.call(e)=="[object Array]"},x.isObject=function(e){return e===Object(e)},T(["Arguments","Function","String","Number","Date","RegExp"],function(e){x["is"+e]=function(t){return f.call(t)=="[object "+e+"]"}}),x.isArguments(arguments)||(x.isArguments=function(e){return!!e&&!!x.has(e,"callee")}),x.isFinite=function(e){return x.isNumber(e)&&isFinite(e)},x.isNaN=function(e){return e!==e},x.isBoolean=function(e){return e===!0||e===!1||f.call(e)=="[object Boolean]"},x.isNull=function(e){return e===null},x.isUndefined=function(e){return e===void 0},x.has=function(e,t){return l.call(e,t)},x.noConflict=function(){return e._=t,this},x.identity=function(e){return e},x.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)};var A={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},O=/[&<>"'\/]/g;x.escape=function(e){return(""+e).replace(O,function(e){return A[e]})},x.result=function(e,t){if(e==null)return null;var n=e[t];return x.isFunction(n)?n.call(e):n},x.mixin=function(e){T(x.functions(e),function(t){q(t,x[t]=e[t])})};var M=0;x.uniqueId=function(e){var t=M++;return e?e+t:t},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var _=/.^/,D={"\\":"\\","'":"'",r:"\r",n:"\n",t:" ",u2028:"\u2028",u2029:"\u2029"};for(var P in D)D[D[P]]=P;var H=/\\|'|\r|\n|\t|\u2028|\u2029/g,B=/\\(\\|'|r|n|t|u2028|u2029)/g,j=function(e){return e.replace(B,function(e,t){return D[t]})};x.template=function(e,t,n){n=x.defaults(n||{},x.templateSettings);var r="__p+='"+e.replace(H,function(e){return"\\"+D[e]}).replace(n.escape||_,function(e,t){return"'+\n((__t=("+j(t)+"))==null?'':_.escape(__t))+\n'"}).replace(n.interpolate||_,function(e,t){return"'+\n((__t=("+j(t)+"))==null?'':__t)+\n'"}).replace(n.evaluate||_,function(e,t){return"';\n"+j(t)+"\n__p+='"})+"';\n";n.variable||(r="with(obj||{}){\n"+r+"}\n"),r="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'')};\n"+r+"return __p;\n";var i=new Function(n.variable||"obj","_",r);if(t)return i(t,x);var s=function(e){return i.call(this,e,x)};return s.source="function("+(n.variable||"obj")+"){\n"+r+"}",s},x.chain=function(e){return x(e).chain()};var F=function(e){this._wrapped=e};x.prototype=F.prototype;var I=function(e,t){return t?x(e).chain():e},q=function(e,t){F.prototype[e]=function(){var e=u.call(arguments);return a.call(e,this._wrapped),I(t.apply(x,e),this._chain)}};x.mixin(x),T(["pop","push","reverse","shift","sort","splice","unshift"],function(e){var t=r[e];F.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],I(n,this._chain)}}),T(["concat","join","slice"],function(e){var t=r[e];F.prototype[e]=function(){return I(t.apply(this._wrapped,arguments),this._chain)}}),F.prototype.chain=function(){return this._chain=!0,this},F.prototype.value=function(){return this._wrapped}}.call(this),define("Underscore",function(e){return function(){return e._}}(this)),define("dbTypes_cached",[],function(){return[{id:2,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"2/a2581/1",simple_name:"MySQL",notes:"Separate multiple statements in MySQL by terminating each one with a semicolon.",full_name:"MySQL 5.5.27"},{id:9,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"9/a2581/1",simple_name:"MySQL",notes:"",full_name:"MySQL 5.6.6 m9"},{id:8,className:"org.gjt.mm.mysql.Driver",context:"host",sample_fragment:"8/a2581/1",simple_name:"MySQL",notes:"",full_name:"MySQL 5.1.61"},{id:4,className:"oracle.jdbc.OracleDriver",context:"host",sample_fragment:"4/ee7da/596",simple_name:"Oracle",notes:"Oracle does not support multiple statements in batch. Separate each statement with a line consisting of a single /, and do not terminate statements with semicolons.",full_name:"Oracle 11g R2"},{id:1,className:"org.postgresql.Driver",context:"host",sample_fragment:"1/6ccc5/2",simple_name:"PostgreSQL",notes:"Separate multiple statements in PostgreSQL by terminating each one with a semicolon.",full_name:"PostgreSQL 9.1.6"},{id:12,className:"org.postgresql.Driver",context:"host",sample_fragment:"12/6d80e/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 9.2.1"},{id:11,className:"org.postgresql.Driver",context:"host",sample_fragment:"11/6d80e/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 8.4.12"},{id:10,className:"org.postgresql.Driver",context:"host",sample_fragment:"10/f9585/1",simple_name:"PostgreSQL",notes:"",full_name:"PostgreSQL 8.3.20"},{id:7,className:"websql",context:"browser",sample_fragment:"7/04eca/1",simple_name:"SQLite",notes:"",full_name:"SQLite (WebSQL)"},{id:5,className:"sqljs",context:"browser",sample_fragment:"5/781d4/2",simple_name:"SQLite",notes:"",full_name:"SQLite (SQL.js)"},{id:6,className:"net.sourceforge.jtds.jdbc.Driver",context:"host",sample_fragment:"6/189a3/1",simple_name:"SQL Server",notes:"",full_name:"MS SQL Server 2012"},{id:3,className:"net.sourceforge.jtds.jdbc.Driver",context:"host",sample_fragment:"3/1fa93/1",simple_name:"SQL Server",notes:"SQL Server supports multiple statements in a batch separated by semicolons. Separate statement batches with a line consisting of a single GO command, as needed.",full_name:"MS SQL Server 2008"}]}),define("BrowserEngines/sqlite_driver",[],function(){var e=function(){return this};return e.prototype.getSchemaStructure=function(e){var t="select * from sqlite_master where type IN ('table', 'view') and name != '__WebKitDatabaseInfoTable__' order by type,name",n=function(t){var n={},r=[];for(var i in t[0].RESULTS.COLUMNS)n[t[0].RESULTS.COLUMNS[i]]=i;for(var s in t[0].RESULTS.DATA){var o=t[0].RESULTS.DATA[s][n.sql],u=t[0].RESULTS.DATA[s][n.name],a=t[0].RESULTS.DATA[s][n.type],f={table_name:u,table_type:a,columns:[]};if(a=="table"){var l=/^[\s\S]*?\(([\s\S]*)\)$/.exec(o)[1].split(/,\s*/);for(var c in l){var h=l[c].replace(/(^\s*)|(\s*$)/,"").split(/\s+/);f.columns.push({name:h.shift(),type:h.join(" ")})}}r.push(f)}e.callback(r)};this.executeQuery({sql:t,success:n})},e.prototype.splitStatement=function(e,t){t||(t=";");var n=t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),r=e?e.split(new RegExp(n+"s*\r?(\n|$)")):[];return r},e}),define("BrowserEngines/sqljs_driver",["jQuery","BrowserEngines/sqlite_driver"],function(e,t){var n=function(){return this.db=null,this};return e.extend(n.prototype,t.prototype),n.prototype.buildSchema=function(n){var r=this;try{var i=function(){r.db=SQL.open(),e.each(t.prototype.splitStatement.call(this,n.ddl,n.statement_separator),function(e,t){r.db.exec(t)}),n.success()};window.SQL===undefined?e.getScript("javascripts_static/sql.js",function(e,t,n){i()}).fail(function(e,t,r){n.error("Your browser does not work with SQL.js. Try using a different browser (Chrome, Safari, Firefox, IE 10, etc...), or a newer version of your current one.")}):(r.db&&r.db.close(),i())}catch(s){n.error(s)}},n.prototype.executeQuery=function(n){var r=this;try{if(!r.db)throw"Database Schema not available!";var i=[];r.db.exec("BEGIN TRANSACTION"),e.each(t.prototype.splitStatement.call(this,n.sql,n.statement_separator),function(t,n){if(e.trim(n).length){var s=new Date,o=[];try{o=r.db.exec(n);var u={SUCCEEDED:!0,EXECUTIONTIME:new Date-s,RESULTS:{COLUMNS:[],DATA:[]},EXECUTIONPLAN:{COLUMNS:[],DATA:[]}};o.length&&e.each(o,function(t,n){var r=[];e.each(n,function(e,n){t==0&&u.RESULTS.COLUMNS.push(n.column),r.push(n.value)}),u.RESULTS.DATA.push(r)});try{exectionPlanArray=r.db.exec("EXPLAIN QUERY PLAN "+n),exectionPlanArray.length&&e.each(exectionPlanArray,function(t,n){var r=[];e.each(n,function(e,n){t==0&&u.EXECUTIONPLAN.COLUMNS.push(n.column),r.push(n.value)}),u.EXECUTIONPLAN.DATA.push(r)})}catch(a){}i.push(u)}catch(a){var u={SUCCEEDED:!1,EXECUTIONTIME:new Date-s,ERRORMESSAGE:a};return i.push(u),!1}}}),r.db.exec("ROLLBACK TRANSACTION"),n.success(i)}catch(s){n.error(s)}},n}),define("BrowserEngines/websql_driver",["jQuery","BrowserEngines/sqlite_driver"],function(e,t){var n=function(){return this.db=null,this.ddl=[],this.nativeSQLite=window.openDatabase!==undefined,this};return e.extend(n.prototype,t.prototype),n.prototype.buildSchema=function(e){var t=this;try{t.nativeSQLite?(t.db=openDatabase(e.short_code,"1.0",e.short_code,e.ddl.length*1024),t.db.transaction(function(n){var r=t.splitStatement(e.ddl,e.statement_separator);t.ddl=r;var i=0,s=r[i],o=function(t,a){if(i<r.length-1){do i++,s=r[i];while(i<r.length-1&&s.match(/^\s*$/));s.match(/^\s*$/)?(n.executeSql("intentional failure used to rollback transaction"),e.success()):n.executeSql(s,[],o,u)}else n.executeSql("intentional failure used to rollback transaction"),e.success()},u=function(t,n){return n.message!="not an error"?e.error(n.message):e.success(),!0};s?n.executeSql(s,[],o,u):e.success()})):e.error("SQLite (WebSQL) not available in your browser. Try either using a webkit-based browser (such as Safari or Chrome) or using the SQLite (SQL.js) database type.")}catch(n){e.error(n)}},n.prototype.executeQuery=function(t){var n=this;try{if(n.db==null)throw"You need to build the schema before you can run a query.";var r=[];n.db.transaction(function(i){var s=function(e,u){var a={SUCCEEDED:!0,EXECUTIONTIME:new Date-p,RESULTS:{COLUMNS:[],DATA:[]},EXECUTIONPLAN:{COLUMNS:[],DATA:[]}};for(var f=0;f<u.rows.length;f++){var d=[],v=u.rows.item(f);if(f==0)for(col in v)a.RESULTS.COLUMNS.push(col);for(var m=0;m<a.RESULTS.COLUMNS.length;m++)d.push(v[a.RESULTS.COLUMNS[m]]);a.RESULTS.DATA.push(d)}i.executeSql("EXPLAIN QUERY PLAN "+h,[],function(e,u){for(var f=0;f<u.rows.length;f++){var p=[],d=u.rows.item(f);if(f==0)for(col in d)a.EXECUTIONPLAN.COLUMNS.push(col);for(var v=0;v<a.EXECUTIONPLAN.COLUMNS.length;v++)p.push(d[a.EXECUTIONPLAN.COLUMNS[v]]);a.EXECUTIONPLAN.DATA.push(p)}c>n.ddl.length-1&&r.push(a);if(c<l.length-1){do c++,h=l[c];while(c<l.length-1&&h.match(/^\s*$/));h.match(/^\s*$/)?(i.executeSql("intentional failure used to rollback transaction"),t.success(r)):i.executeSql(h,[],s,o)}else i.executeSql("intentional failure used to rollback transaction"),t.success(r)},function(e,u){c>n.ddl.length-1&&r.push(a);if(c<l.length-1){do c++,h=l[c];while(c<l.length-1&&h.match(/^\s*$/));h.match(/^\s*$/)?(i.executeSql("intentional failure used to rollback transaction"),t.success(r)):i.executeSql(h,[],s,o)}else i.executeSql("intentional failure used to rollback transaction"),t.success(r)})},o=function(e,n){if(n.message!="not an error"){var i={SUCCEEDED:!1,EXECUTIONTIME:new Date-p,ERRORMESSAGE:n.message};r.push(i)}return t.success(r),!0},u=[],a,f=!1,l=n.ddl.slice(0);e.each(n.splitStatement(t.sql,t.statement_separator),function(e,t){l.push(t)});var c=0,h=l[c],p=new Date;i.executeSql(h,[],s,o)})}catch(i){t.error(i)}},n}),define("BrowserEngines/engines",["BrowserEngines/sqljs_driver","BrowserEngines/websql_driver"],function(e,t){return{sqljs:new e,websql:new t}});var JSON;JSON||(JSON={}),function(){function f(e){return e<10?"0"+e:e}function quote(e){return escapable.lastIndex=0,escapable.test(e)?'"'+e.replace(escapable,function(e){var t=meta[e];return typeof t=="string"?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function str(e,t){var n,r,i,s,o=gap,u,a=t[e];a&&typeof a=="object"&&typeof a.toJSON=="function"&&(a=a.toJSON(e)),typeof rep=="function"&&(a=rep.call(t,e,a));switch(typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";gap+=indent,u=[];if(Object.prototype.toString.apply(a)==="[object Array]"){s=a.length;for(n=0;n<s;n+=1)u[n]=str(n,a)||"null";return i=u.length===0?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+o+"]":"["+u.join(",")+"]",gap=o,i}if(rep&&typeof rep=="object"){s=rep.length;for(n=0;n<s;n+=1)typeof rep[n]=="string"&&(r=rep[n],i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i))}else for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(i=str(r,a),i&&u.push(quote(r)+(gap?": ":":")+i));return i=u.length===0?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+o+"}":"{"+u.join(",")+"}",gap=o,i}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(e){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(e){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","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;typeof JSON.stringify!="function"&&(JSON.stringify=function(e,t,n){var r;gap="",indent="";if(typeof n=="number")for(r=0;r<n;r+=1)indent+=" ";else typeof n=="string"&&(indent=n);rep=t;if(!t||typeof t=="function"||typeof t=="object"&&typeof t.length=="number")return str("",{"":e});throw new Error("JSON.stringify")}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){function walk(e,t){var n,r,i=e[t];if(i&&typeof i=="object")for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(r=walk(i,n),r!==undefined?i[n]=r:delete i[n]);return reviver.call(e,t,i)}var j;text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(e){return"\\u"+("0000"+e.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,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),define("libs/json2",function(){}),function(){var e=this,t=e.Backbone,n=Array.prototype.splice,r;typeof exports!="undefined"?r=exports:r=e.Backbone={},r.VERSION="0.9.2";var i=e._;!i&&typeof require!="undefined"&&(i=require("underscore")),r.$=e.jQuery||e.Zepto||e.ender,r.noConflict=function(){return e.Backbone=t,this},r.emulateHTTP=!1,r.emulateJSON=!1;var s=/\s+/,o=r.Events={on:function(e,t,n){var r,i,o;if(!t)return this;e=e.split(s),r=this._callbacks||(this._callbacks={});while(i=e.shift())o=r[i]||(r[i]=[]),o.push(t,n);return this},off:function(e,t,n){var r,o,u,a;if(!(o=this._callbacks))return this;if(!(e||t||n))return delete this._callbacks,this;e=e?e.split(s):i.keys(o);while(r=e.shift()){if(!(u=o[r])||!t&&!n){delete o[r];continue}for(a=u.length-2;a>=0;a-=2)t&&u[a]!==t||n&&u[a+1]!==n||u.splice(a,2)}return this},trigger:function(e){var t,n,r,i,o,u,a,f;if(!(n=this._callbacks))return this;f=[],e=e.split(s);for(i=1,o=arguments.length;i<o;i++)f[i-1]=arguments[i];while(t=e.shift()){if(a=n.all)a=a.slice();if(r=n[t])r=r.slice();if(r)for(i=0,o=r.length;i<o;i+=2)r[i].apply(r[i+1]||this,f);if(a){u=[t].concat(f);for(i=0,o=a.length;i<o;i+=2)a[i].apply(a[i+1]||this,u)}}return this}};o.bind=o.on,o.unbind=o.off;var u=r.Model=function(e,t){var n;e||(e={}),t&&t.collection&&(this.collection=t.collection),t&&t.parse&&(e=this.parse(e));if(n=N(this,"defaults"))e=i.extend({},n,e);this.attributes={},this._escapedAttributes={},this.cid=i.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(e,{silent:!0}),this.changed={},this._silent={},this._pending={},this._previousAttributes=i.clone(this.attributes),this.initialize.apply(this,arguments)};i.extend(u.prototype,o,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(e){return i.clone(this.attributes)},sync:function(){return r.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){var t;if(t=this._escapedAttributes[e])return t;var n=this.get(e);return this._escapedAttributes[e]=i.escape(n==null?"":""+n)},has:function(e){return this.get(e)!=null},set:function(e,t,n){var r,s,o;i.isObject(e)||e==null?(r=e,n=t):(r={},r[e]=t),n||(n={});if(!r)return this;r instanceof u&&(r=r.attributes);if(n.unset)for(s in r)r[s]=void 0;if(!this._validate(r,n))return!1;this.idAttribute in r&&(this.id=r[this.idAttribute]);var a=n.changes={},f=this.attributes,l=this._escapedAttributes,c=this._previousAttributes||{};for(s in r){o=r[s];if(!i.isEqual(f[s],o)||n.unset&&i.has(f,s))delete l[s],(n.silent?this._silent:a)[s]=!0;n.unset?delete f[s]:f[s]=o,!i.isEqual(c[s],o)||i.has(f,s)!=i.has(c,s)?(this.changed[s]=o,n.silent||(this._pending[s]=!0)):(delete this.changed[s],delete this._pending[s])}return n.silent||this.change(n),this},unset:function(e,t){return t=i.extend({},t,{unset:!0}),this.set(e,null,t)},clear:function(e){return e=i.extend({},e,{unset:!0}),this.set(i.clone(this.attributes),e)},fetch:function(e){e=e?i.clone(e):{};var t=this,n=e.success;return e.success=function(r,i,s){if(!t.set(t.parse(r,s),e))return!1;n&&n(t,r,e),t.trigger("sync",t,r,e)},e.error=r.wrapError(e.error,t,e),this.sync("read",this,e)},save:function(e,t,n){var s,o,u;i.isObject(e)||e==null?(s=e,n=t):(s={},s[e]=t),n=n?i.clone(n):{};if(n.wait){if(!this._validate(s,n))return!1;o=i.clone(this.attributes)}var a=i.extend({},n,{silent:!0});if(s&&!this.set(s,n.wait?a:n))return!1;if(!s&&!this.isValid())return!1;var f=this,l=n.success;n.success=function(e,t,r){u=!0;var o=f.parse(e,r);n.wait&&(o=i.extend(s||{},o));if(!f.set(o,n))return!1;l&&l(f,e,n),f.trigger("sync",f,e,n)},n.error=r.wrapError(n.error,f,n);var c=this.sync(this.isNew()?"create":"update",this,n);return!u&&n.wait&&(this.clear(a),this.set(o,a)),c},destroy:function(e){e=e?i.clone(e):{};var t=this,n=e.success,s=function(){t.trigger("destroy",t,t.collection,e)};e.success=function(r){(e.wait||t.isNew())&&s(),n&&n(t,r,e),t.isNew()||t.trigger("sync",t,r,e)};if(this.isNew())return e.success(),!1;e.error=r.wrapError(e.error,t,e);var o=this.sync("delete",this,e);return e.wait||s(),o},url:function(){var e=N(this,"urlRoot")||N(this.collection,"url")||C();return this.isNew()?e:e+(e.charAt(e.length-1)=="/"?"":"/")+encodeURIComponent(this.id)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return this.id==null},change:function(e){e||(e={});var t=this._changing;this._changing=!0;for(var n in this._silent)this._pending[n]=!0;var r=i.extend({},e.changes,this._silent);this._silent={};for(var n in r)this.trigger("change:"+n,this,this.get(n),e);if(t)return this;while(!i.isEmpty(this._pending)){this._pending={},this.trigger("change",this,e);for(var n in this.changed){if(this._pending[n]||this._silent[n])continue;delete this.changed[n]}this._previousAttributes=i.clone(this.attributes)}return this._changing=!1,this},hasChanged:function(e){return e==null?!i.isEmpty(this.changed):i.has(this.changed,e)},changedAttributes:function(e){if(!e)return this.hasChanged()?i.clone(this.changed):!1;var t,n=!1,r=this._previousAttributes;for(var s in e){if(i.isEqual(r[s],t=e[s]))continue;(n||(n={}))[s]=t}return n},previous:function(e){return e==null||!this._previousAttributes?null:this._previousAttributes[e]},previousAttributes:function(){return i.clone(this._previousAttributes)},isValid:function(){return!this.validate||!this.validate(this.attributes)},_validate:function(e,t){if(t.silent||!this.validate)return!0;e=i.extend({},this.attributes,e);var n=this.validate(e,t);return n?(t&&t.error?t.error(this,n,t):this.trigger("error",this,n,t),!1):!0}});var a=r.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),t.comparator!==undefined&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,{silent:!0,parse:t.parse})};i.extend(a.prototype,o,{model:u,initialize:function(){},toJSON:function(e){return this.map(function(t){return t.toJSON(e)})},sync:function(){return r.sync.apply(this,arguments)},add:function(e,t){var r,s,o,u,a,f,l={},c={},h=[];t||(t={}),e=i.isArray(e)?e.slice():[e];for(r=0,o=e.length;r<o;r++){if(!(u=e[r]=this._prepareModel(e[r],t)))throw new Error("Can't add an invalid model to a collection");a=u.cid,f=u.id;if(l[a]||this._byCid[a]||f!=null&&(c[f]||this._byId[f])){h.push(r);continue}l[a]=c[f]=u}r=h.length;while(r--)h[r]=e.splice(h[r],1)[0];for(r=0,o=e.length;r<o;r++)(u=e[r]).on("all",this._onModelEvent,this),this._byCid[u.cid]=u,u.id!=null&&(this._byId[u.id]=u);this.length+=o,s=t.at!=null?t.at:this.models.length,n.apply(this.models,[s,0].concat(e));if(t.merge)for(r=0,o=h.length;r<o;r++)(u=this._byId[h[r].id])&&u.set(h[r],t);this.comparator&&t.at==null&&this.sort({silent:!0});if(t.silent)return this;for(r=0,o=this.models.length;r<o;r++){if(!l[(u=this.models[r]).cid])continue;t.index=r,u.trigger("add",u,this,t)}return this},remove:function(e,t){var n,r,s,o;t||(t={}),e=i.isArray(e)?e.slice():[e];for(n=0,r=e.length;n<r;n++){o=this.getByCid(e[n])||this.get(e[n]);if(!o)continue;delete this._byId[o.id],delete this._byCid[o.cid],s=this.indexOf(o),this.models.splice(s,1),this.length--,t.silent||(t.index=s,o.trigger("remove",o,this,t)),this._removeReference(o)}return this},push:function(e,t){return e=this._prepareModel(e,t),this.add(e,t),e},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e),t},unshift:function(e,t){return e=this._prepareModel(e,t),this.add(e,i.extend({at:0},t)),e},shift:function(e){var t=this.at(0);return this.remove(t,e),t},slice:function(e,t){return this.models.slice(e,t)},get:function(e){return e==null?void 0:this._byId[e.id!=null?e.id:e]},getByCid:function(e){return e&&this._byCid[e.cid||e]},at:function(e){return this.models[e]},where:function(e){return i.isEmpty(e)?[]:this.filter(function(t){for(var n in e)if(e[n]!==t.get(n))return!1;return!0})},sort:function(e){e||(e={});if(!this.comparator)throw new Error("Cannot sort a set without a comparator");var t=i.bind(this.comparator,this);return this.comparator.length==1?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("reset",this,e),this},pluck:function(e){return i.map(this.models,function(t){return t.get(e)})},reset:function(e,t){e||(e=[]),t||(t={});for(var n=0,r=this.models.length;n<r;n++)this._removeReference(this.models[n]);return this._reset(),this.add(e,i.extend({silent:!0},t)),t.silent||this.trigger("reset",this,t),this},fetch:function(e){e=e?i.clone(e):{},e.parse===undefined&&(e.parse=!0);var t=this,n=e.success;return e.success=function(r,i,s){t[e.add?"add":"reset"](t.parse(r,s),e),n&&n(t,r,e),t.trigger("sync",t,r,e)},e.error=r.wrapError(e.error,t,e),this.sync("read",this,e)},create:function(e,t){var n=this;t=t?i.clone(t):{},e=this._prepareModel(e,t);if(!e)return!1;t.wait||n.add(e,t);var r=t.success;return t.success=function(e,t,i){i.wait&&n.add(e,i),r&&r(e,t,i)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models)},chain:function(){return i(this.models).chain()},_reset:function(e){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(e,t){if(e instanceof u)return e.collection||(e.collection=this),e;t||(t={}),t.collection=this;var n=new this.model(e,t);return n._validate(n.attributes,t)?n:!1},_removeReference:function(e){this==e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if((e=="add"||e=="remove")&&n!=this)return;e=="destroy"&&this.remove(t,r),t&&e==="change:"+t.idAttribute&&(delete this._byId[t.previous(t.idAttribute)],t.id!=null&&(this._byId[t.id]=t)),this.trigger.apply(this,arguments)}});var f=["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","initial","rest","last","without","indexOf","shuffle","lastIndexOf","isEmpty","groupBy"];i.each(f,function(e){a.prototype[e]=function(){return i[e].apply(i,[this.models].concat(i.toArray(arguments)))}});var l=r.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},c=/:\w+/g,h=/\*\w+/g,p=/[-[\]{}()+?.,\\^$|#\s]/g;i.extend(l.prototype,o,{initialize:function(){},route:function(e,t,n){return r.history||(r.history=new d),i.isRegExp(e)||(e=this._routeToRegExp(e)),n||(n=this[t]),r.history.route(e,i.bind(function(i){var s=this._extractParameters(e,i);n&&n.apply(this,s),this.trigger.apply(this,["route:"+t].concat(s)),r.history.trigger("route",this,t,s)},this)),this},navigate:function(e,t){r.history.navigate(e,t)},_bindRoutes:function(){if(!this.routes)return;var e=[];for(var t in this.routes)e.unshift([t,this.routes[t]]);for(var n=0,r=e.length;n<r;n++)this.route(e[n][0],e[n][1],this[e[n][1]])},_routeToRegExp:function(e){return e=e.replace(p,"\\$&").replace(c,"([^/]+)").replace(h,"(.*?)"),new RegExp("^"+e+"$")},_extractParameters:function(e,t){return e.exec(t).slice(1)}});var d=r.History=function(t){this.handlers=[],i.bindAll(this,"checkUrl"),this.location=t&&t.location||e.location,this.history=t&&t.history||e.history},v=/^[#\/]/,m=/msie [\w.]+/,g=/\/$/;d.started=!1,i.extend(d.prototype,o,{interval:50,getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getFragment:function(e,t){if(e==null)if(this._hasPushState||!this._wantsHashChange||t){e=this.location.pathname;var n=this.options.root.replace(g,"");e.indexOf(n)||(e=e.substr(n.length))}else e=this.getHash();return decodeURIComponent(e.replace(v,""))},start:function(e){if(d.started)throw new Error("Backbone.history has already been started");d.started=!0,this.options=i.extend({},{root:"/"},this.options,e),this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var t=this.getFragment(),n=document.documentMode,s=m.exec(navigator.userAgent.toLowerCase())&&(!n||n<=7);s&&this._wantsHashChange&&(this.iframe=r.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(t)),this._hasPushState?r.$(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!s?r.$(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=t;var o=this.location,u=o.pathname==this.options.root&&!o.search;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!u)return this.fragment=this.getFragment(null,!0),this.location.replace(this.options.root+this.location.search+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&u&&o.hash&&(this.fragment=this.getHash().replace(v,""),this.history.replaceState({},document.title,o.protocol+"//"+o.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},stop:function(){r.$(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),d.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();t==this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe)));if(t==this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(e){var t=this.fragment=this.getFragment(e),n=i.any(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0});return n},navigate:function(e,t){if(!d.started)return!1;if(!t||t===!0)t={trigger:t};var n=(e||"").replace(v,"");if(this.fragment==n)return;this.fragment=n;var r=(n.indexOf(this.options.root)!=0?this.options.root:"")+n;if(this._hasPushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);this._updateHash(this.location,n,t.replace),this.iframe&&n!=this.getFragment(this.getHash(this.iframe))&&(t.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,n,t.replace))}t.trigger&&this.loadUrl(e)},_updateHash:function(e,t,n){n?e.replace(e.href.replace(/(javascript:|#).*$/,"")+"#"+t):e.hash=t}});var y=r.View=function(e){this.cid=i.uniqueId("view"),this._configure(e||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},b=/^(\S+)\s*(.*)$/,w=["model","collection","el","id","attributes","className","tagName"];i.extend(y.prototype,o,{tagName:"div",$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this},make:function(e,t,n){var i=document.createElement(e);return t&&r.$(i).attr(t),n!=null&&r.$(i).html(n),i},setElement:function(e,t){return this.$el&&this.undelegateEvents(),this.$el=e instanceof r.$?e:r.$(e),this.el=this.$el[0],t!==!1&&this.delegateEvents(),this},delegateEvents:function(e){if(!e&&!(e=N(this,"events")))return;this.undelegateEvents();for(var t in e){var n=e[t];i.isFunction(n)||(n=this[e[t]]);if(!n)throw new Error('Method "'+e[t]+'" does not exist');var r=t.match(b),s=r[1],o=r[2];n=i.bind(n,this),s+=".delegateEvents"+this.cid,o===""?this.$el.bind(s,n):this.$el.delegate(o,s,n)}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(e){this.options&&(e=i.extend({},this.options,e));for(var t=0,n=w.length;t<n;t++){var r=w[t];e[r]&&(this[r]=e[r])}this.options=e},_ensureElement:function(){if(!this.el){var e=i.extend({},N(this,"attributes"));this.id&&(e.id=this.id),this.className&&(e["class"]=this.className),this.setElement(this.make(N(this,"tagName"),e),!1)}else this.setElement(this.el,!1)}});var E=function(e,t){var n=T(this,e,t);return n.extend=this.extend,n};u.extend=a.extend=l.extend=y.extend=E;var S={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};r.sync=function(e,t,n){var s=S[e];n||(n={});var o={type:s,dataType:"json"};return n.url||(o.url=N(t,"url")||C()),!n.data&&t&&(e=="create"||e=="update")&&(o.contentType="application/json",o.data=JSON.stringify(t)),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&(s==="PUT"||s==="DELETE")&&(r.emulateJSON&&(o.data._method=s),o.type="POST",o.beforeSend=function(e){e.setRequestHeader("X-HTTP-Method-Override",s)}),o.type!=="GET"&&!r.emulateJSON&&(o.processData=!1),r.ajax(i.extend(o,n))},r.ajax=function(){return r.$.ajax.apply(r.$,arguments)},r.wrapError=function(e,t,n){return function(r,i){i=r===t?i:r,e?e(t,i,n):t.trigger("error",t,i,n)}};var x=function(){},T=function(e,t,n){var r;return t&&t.hasOwnProperty("constructor")?r=t.constructor:r=function(){e.apply(this,arguments)},i.extend(r,e),x.prototype=e.prototype,r.prototype=new x,t&&i.extend(r.prototype,t),n&&i.extend(r,n),r.prototype.constructor=r,r.__super__=e.prototype,r},N=function(e,t){return!e||!e[t]?null:i.isFunction(e[t])?e[t]():e[t]},C=function(){throw new Error('A "url" property or function must be specified')}}.call(this),define("Backbone",["Underscore","jQuery","libs/json2"],function(e){return function(){return e.Backbone}}(this)),define("fiddle_backbone/models/UsedFiddle",["Backbone"],function(e){var t=e.Model.extend({defaults:{fragment:"",full_name:"",ddl:"",sql:""},initialize:function(){this.set("last_used",new Date)}});return t}),define("fiddle_backbone/models/MyFiddleHistory",["Backbone","fiddle_backbone/models/UsedFiddle"],function(e,t){var n=e.Collection.extend({model:t,comparator:function(e,t){return e.get("last_used")==t.get("last_used")?0:e.get("last_used")>t.get("last_used")?-1:1},insert:function(e){if(!$("#user_choices",this).length){var t=this.find(function(t){return t.get("fragment")==e.get("fragment")});t?(t.set("last_used",e.get("last_used")),this.sort()):this.add(e),this.trigger("change")}},initialize:function(){try{if(localStorage){var e=localStorage.getItem("fiddleHistory");e&&e.length&&this.add($.parseJSON(e))}}catch(t){}}});return n}),define("fiddle_backbone/models/DBType",["Backbone"],function(e){var t=e.Model.extend({defaults:{sample_fragment:"",notes:"",simple_name:"",full_name:"",selected:!1,context:"host",className:""}});return t}),define("fiddle_backbone/models/DBTypesList",["Backbone","fiddle_backbone/models/DBType"],function(e,t){var n=e.Collection.extend({model:t,getSelectedType:function(){var e=this.filter(function(e){return e.get("selected")});return e.length?e[0]:!1},setSelectedType:function(e,t){this.each(function(t){t.set({selected:t.id==e},{silent:!0})}),t||this.trigger("change")}});return n}),define("fiddle_backbone/models/SchemaDef",["Backbone"],function(e){var t=e.Model.extend({defaults:{ddl:"",short_code:"",simple_name:"",full_name:"",valid:!0,errorMessage:"",loading:!1,ready:!1,schema_structure:[],statement_separator:";",browserEngines:{}},reset:function(){this.set(this.defaults),this.trigger("reloaded")},build:function(e){var t=e.getSelectedType(),n=this;if(!t)return!1;(!this.has("dbType")||this.get("dbType").id!=t.id)&&this.set("dbType",t),$.ajax({type:"POST",url:"index.cfm/fiddles/createSchema",data:{statement_separator:this.get("statement_separator"),db_type_id:this.get("dbType").id,schema_ddl:this.get("ddl")},dataType:"json",success:function(e,r,i){e.short_code?t.get("context")=="browser"?n.get("browserEngines")[t.get("className")].buildSchema({short_code:$.trim(e.short_code),statement_separator:n.get("statement_separator"),ddl:n.get("ddl"),success:function(){n.set({short_code:$.trim(e.short_code),ready:!0,valid:!0,errorMessage:""}),n.get("browserEngines")[t.get("className")].getSchemaStructure({callback:function(e){n.set({schema_structure:e}),n.trigger("built")}})},error:function(t){n.set({short_code:$.trim(e.short_code),ready:!1,valid:!1,errorMessage:t,schema_structure:[]}),n.trigger("failed")}}):(n.set({short_code:$.trim(e.short_code),ready:!0,valid:!0,errorMessage:"",schema_structure:e.schema_structure}),n.trigger("built")):(n.set({short_code:"",ready:!1,valid:!1,errorMessage:e.error,schema_structure:[]}),n.trigger("failed"))},error:function(e,t,r){n.set({short_code:"",ready:!1,valid:!1,errorMessage:r,schema_structure:[]}),n.trigger("failed")}})}});return t}),define("fiddle_backbone/models/Query",["jQuery","Backbone"],function(e,t){var n=t.Model.extend({defaults:{id:0,sql:"",sets:[],pendingChanges:!1,statement_separator:";"},reset:function(){this.set(this.defaults),this.trigger("reloaded")},execute:function(){var t=this;if(!this.has("schemaDef")||!this.get("schemaDef").has("dbType")||!this.get("schemaDef").get("ready"))return!1;e.ajax({type:"POST",url:"index.cfm/fiddles/runQuery",data:{db_type_id:this.get("schemaDef").get("dbType").id,schema_short_code:this.get("schemaDef").get("short_code"),statement_separator:this.get("statement_separator"),sql:this.get("sql")},dataType:"json",success:function(e,n,r){t.get("schemaDef").get("dbType").get("context")=="browser"?t.get("schemaDef").get("browserEngines")[t.get("schemaDef").get("dbType").get("className")].executeQuery({sql:t.get("sql"),statement_separator:t.get("statement_separator"),success:function(n){t.set({id:e.ID,sets:n}),t.trigger("executed")},error:function(e){t.set({sets:[{SUCCEEDED:!1,ERRORMESSAGE:e}]}),t.trigger("executed")}}):t.set({id:e.ID,sets:e.sets})},error:function(e,n,r){t.set({sets:[]})},complete:function(e,n){t.trigger("executed")}})}});return n});var Handlebars={};Handlebars.VERSION="1.0.beta.6",Handlebars.helpers={},Handlebars.partials={},Handlebars.registerHelper=function(e,t,n){n&&(t.not=n),this.helpers[e]=t},Handlebars.registerPartial=function(e,t){this.partials[e]=t},Handlebars.registerHelper("helperMissing",function(e){if(arguments.length===2)return undefined;throw new Error("Could not find property '"+e+"'")});var toString=Object.prototype.toString,functionType="[object Function]";Handlebars.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse||function(){},r=t.fn,i="",s=toString.call(e);s===functionType&&(e=e.call(this));if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(s==="[object Array]"){if(e.length>0)for(var o=0,u=e.length;o<u;o++)i+=r(e[o]);else i=n(this);return i}return r(e)}),Handlebars.registerHelper("each",function(e,t){var n=t.fn,r=t.inverse,i="";if(e&&e.length>0)for(var s=0,o=e.length;s<o;s++)i+=n(e[s]);else i=r(this);return i}),Handlebars.registerHelper("if",function(e,t){var n=toString.call(e);return n===functionType&&(e=e.call(this)),!e||Handlebars.Utils.isEmpty(e)?t.inverse(this):t.fn(this)}),Handlebars.registerHelper("unless",function(e,t){var n=t.fn,r=t.inverse;return t.fn=r,t.inverse=n,Handlebars.helpers["if"].call(this,e,t)}),Handlebars.registerHelper("with",function(e,t){return t.fn(e)}),Handlebars.registerHelper("log",function(e){Handlebars.log(e)});var handlebars=function(){var e={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,statements:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,inMustache:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,OPEN_PARTIAL:24,params:25,hash:26,param:27,STRING:28,INTEGER:29,BOOLEAN:30,hashSegments:31,hashSegment:32,ID:33,EQUALS:34,pathSegments:35,SEP:36,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"OPEN_PARTIAL",28:"STRING",29:"INTEGER",30:"BOOLEAN",33:"ID",34:"EQUALS",36:"SEP"},productions_:[0,[3,2],[4,3],[4,1],[4,0],[6,1],[6,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,3],[13,4],[7,2],[17,3],[17,2],[17,2],[17,1],[25,2],[25,1],[27,1],[27,1],[27,1],[27,1],[26,1],[31,2],[31,1],[32,3],[32,3],[32,3],[32,3],[21,1],[35,3],[35,1]],performAction:function(t,n,r,i,s,o,u){var a=o.length-1;switch(s){case 1:return o[a-1];case 2:this.$=new i.ProgramNode(o[a-2],o[a]);break;case 3:this.$=new i.ProgramNode(o[a]);break;case 4:this.$=new i.ProgramNode([]);break;case 5:this.$=[o[a]];break;case 6:o[a-1].push(o[a]),this.$=o[a-1];break;case 7:this.$=new i.InverseNode(o[a-2],o[a-1],o[a]);break;case 8:this.$=new i.BlockNode(o[a-2],o[a-1],o[a]);break;case 9:this.$=o[a];break;case 10:this.$=o[a];break;case 11:this.$=new i.ContentNode(o[a]);break;case 12:this.$=new i.CommentNode(o[a]);break;case 13:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 14:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 15:this.$=o[a-1];break;case 16:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1]);break;case 17:this.$=new i.MustacheNode(o[a-1][0],o[a-1][1],!0);break;case 18:this.$=new i.PartialNode(o[a-1]);break;case 19:this.$=new i.PartialNode(o[a-2],o[a-1]);break;case 20:break;case 21:this.$=[[o[a-2]].concat(o[a-1]),o[a]];break;case 22:this.$=[[o[a-1]].concat(o[a]),null];break;case 23:this.$=[[o[a-1]],o[a]];break;case 24:this.$=[[o[a]],null];break;case 25:o[a-1].push(o[a]),this.$=o[a-1];break;case 26:this.$=[o[a]];break;case 27:this.$=o[a];break;case 28:this.$=new i.StringNode(o[a]);break;case 29:this.$=new i.IntegerNode(o[a]);break;case 30:this.$=new i.BooleanNode(o[a]);break;case 31:this.$=new i.HashNode(o[a]);break;case 32:o[a-1].push(o[a]),this.$=o[a-1];break;case 33:this.$=[o[a]];break;case 34:this.$=[o[a-2],o[a]];break;case 35:this.$=[o[a-2],new i.StringNode(o[a])];break;case 36:this.$=[o[a-2],new i.IntegerNode(o[a])];break;case 37:this.$=[o[a-2],new i.BooleanNode(o[a])];break;case 38:this.$=new i.IdNode(o[a]);break;case 39:o[a-2].push(o[a]),this.$=o[a-2];break;case 40:this.$=[o[a]]}},table:[{3:1,4:2,5:[2,4],6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{1:[3]},{5:[1,16]},{5:[2,3],7:17,8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,19],20:[2,3],22:[1,13],23:[1,14],24:[1,15]},{5:[2,5],14:[2,5],15:[2,5],16:[2,5],19:[2,5],20:[2,5],22:[2,5],23:[2,5],24:[2,5]},{4:20,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{4:21,6:3,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],24:[1,15]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],24:[2,9]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],24:[2,10]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],24:[2,11]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],24:[2,12]},{17:22,21:23,33:[1,25],35:24},{17:26,21:23,33:[1,25],35:24},{17:27,21:23,33:[1,25],35:24},{17:28,21:23,33:[1,25],35:24},{21:29,33:[1,25],35:24},{1:[2,1]},{6:30,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],24:[1,15]},{5:[2,6],14:[2,6],15:[2,6],16:[2,6],19:[2,6],20:[2,6],22:[2,6],23:[2,6],24:[2,6]},{17:22,18:[1,31],21:23,33:[1,25],35:24},{10:32,20:[1,33]},{10:34,20:[1,33]},{18:[1,35]},{18:[2,24],21:40,25:36,26:37,27:38,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,38],28:[2,38],29:[2,38],30:[2,38],33:[2,38],36:[1,46]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],36:[2,40]},{18:[1,47]},{18:[1,48]},{18:[1,49]},{18:[1,50],21:51,33:[1,25],35:24},{5:[2,2],8:18,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,2],22:[1,13],23:[1,14],24:[1,15]},{14:[2,20],15:[2,20],16:[2,20],19:[2,20],22:[2,20],23:[2,20],24:[2,20]},{5:[2,7],14:[2,7],15:[2,7],16:[2,7],19:[2,7],20:[2,7],22:[2,7],23:[2,7],24:[2,7]},{21:52,33:[1,25],35:24},{5:[2,8],14:[2,8],15:[2,8],16:[2,8],19:[2,8],20:[2,8],22:[2,8],23:[2,8],24:[2,8]},{14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],24:[2,14]},{18:[2,22],21:40,26:53,27:54,28:[1,41],29:[1,42],30:[1,43],31:39,32:44,33:[1,45],35:24},{18:[2,23]},{18:[2,26],28:[2,26],29:[2,26],30:[2,26],33:[2,26]},{18:[2,31],32:55,33:[1,56]},{18:[2,27],28:[2,27],29:[2,27],30:[2,27],33:[2,27]},{18:[2,28],28:[2,28],29:[2,28],30:[2,28],33:[2,28]},{18:[2,29],28:[2,29],29:[2,29],30:[2,29],33:[2,29]},{18:[2,30],28:[2,30],29:[2,30],30:[2,30],33:[2,30]},{18:[2,33],33:[2,33]},{18:[2,40],28:[2,40],29:[2,40],30:[2,40],33:[2,40],34:[1,57],36:[2,40]},{33:[1,58]},{14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],24:[2,13]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],24:[2,16]},{5:[2,17],14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],24:[2,17]},{5:[2,18],14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],24:[2,18]},{18:[1,59]},{18:[1,60]},{18:[2,21]},{18:[2,25],28:[2,25],29:[2,25],30:[2,25],33:[2,25]},{18:[2,32],33:[2,32]},{34:[1,57]},{21:61,28:[1,62],29:[1,63],30:[1,64],33:[1,25],35:24},{18:[2,39],28:[2,39],29:[2,39],30:[2,39],33:[2,39],36:[2,39]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],24:[2,19]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],24:[2,15]},{18:[2,34],33:[2,34]},{18:[2,35],33:[2,35]},{18:[2,36],33:[2,36]},{18:[2,37],33:[2,37]}],defaultActions:{16:[2,1],37:[2,23],53:[2,21]},parseError:function(t,n){throw new Error(t)},parse:function(t){function d(e){r.length=r.length-2*e,i.length=i.length-e,s.length=s.length-e}function v(){var e;return e=n.lexer.lex()||1,typeof e!="number"&&(e=n.symbols_[e]||e),e}var n=this,r=[0],i=[null],s=[],o=this.table,u="",a=0,f=0,l=0,c=2,h=1;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var p=this.lexer.yylloc;s.push(p),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var m,g,y,b,w,E,S={},x,T,N,C;for(;;){y=r[r.length-1],this.defaultActions[y]?b=this.defaultActions[y]:(m==null&&(m=v()),b=o[y]&&o[y][m]);if(typeof b=="undefined"||!b.length||!b[0])if(!l){C=[];for(x in o[y])this.terminals_[x]&&x>2&&C.push("'"+this.terminals_[x]+"'");var k="";this.lexer.showPosition?k="Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+this.terminals_[m]+"'":k="Parse error on line "+(a+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[m]||m,line:this.lexer.yylineno,loc:p,expected:C})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+m);switch(b[0]){case 1:r.push(m),i.push(this.lexer.yytext),s.push(this.lexer.yylloc),r.push(b[1]),m=null,g?(m=g,g=null):(f=this.lexer.yyleng,u=this.lexer.yytext,a=this.lexer.yylineno,p=this.lexer.yylloc,l>0&&l--);break;case 2:T=this.productions_[b[1]][1],S.$=i[i.length-T],S._$={first_line:s[s.length-(T||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(T||1)].first_column,last_column:s[s.length-1].last_column},E=this.performAction.call(S,u,f,a,this.yy,b[1],i,s);if(typeof E!="undefined")return E;T&&(r=r.slice(0,-1*T*2),i=i.slice(0,-1*T),s=s.slice(0,-1*T)),r.push(this.productions_[b[1]][0]),i.push(S.$),s.push(S._$),N=o[r[r.length-2]][r[r.length-1]],r.push(N);break;case 3:return!0}}return!0}},t=function(){var e={EOF:1,parseError:function(t,n){if(!this.yy.parseError)throw new Error(t);this.yy.parseError(t,n)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e;var t=e.match(/\n/);return t&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=(new Array(e.length+1)).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext="",this.match="");var i=this._currentRules();for(var s=0;s<i.length;s++){t=this._input.match(this.rules[i[s]]);if(t){r=t[0].match(/\n.*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-1:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i[s],this.conditionStack[this.conditionStack.length-1]);if(e)return e;return}}if(this._input==="")return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return typeof t!="undefined"?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return e.performAction=function(t,n,r,i){var s=i;switch(r){case 0:n.yytext.slice(-1)!=="\\"&&this.begin("mu"),n.yytext.slice(-1)==="\\"&&(n.yytext=n.yytext.substr(0,n.yyleng-1),this.begin("emu"));if(n.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return 24;case 4:return 16;case 5:return 20;case 6:return 19;case 7:return 19;case 8:return 23;case 9:return 23;case 10:return n.yytext=n.yytext.substr(3,n.yyleng-5),this.popState(),15;case 11:return 22;case 12:return 34;case 13:return 33;case 14:return 33;case 15:return 36;case 16:break;case 17:return this.popState(),18;case 18:return this.popState(),18;case 19:return n.yytext=n.yytext.substr(1,n.yyleng-2).replace(/\\"/g,'"'),28;case 20:return 30;case 21:return 30;case 22:return 29;case 23:return 33;case 24:return n.yytext=n.yytext.substr(1,n.yyleng-2),33;case 25:return"INVALID";case 26:return 5}},e.rules=[/^[^\x00]*?(?=(\{\{))/,/^[^\x00]+/,/^[^\x00]{2,}?(?=(\{\{))/,/^\{\{>/,/^\{\{#/,/^\{\{\//,/^\{\{\^/,/^\{\{\s*else\b/,/^\{\{\{/,/^\{\{&/,/^\{\{![\s\S]*?\}\}/,/^\{\{/,/^=/,/^\.(?=[} ])/,/^\.\./,/^[\/.]/,/^\s+/,/^\}\}\}/,/^\}\}/,/^"(\\["]|[^"])*"/,/^true(?=[}\s])/,/^false(?=[}\s])/,/^[0-9]+(?=[}\s])/,/^[a-zA-Z0-9_$-]+(?=[=}\s\/.])/,/^\[[^\]]*\]/,/^./,/^$/],e.conditions={mu:{rules:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26],inclusive:!1},emu:{rules:[2],inclusive:!1},INITIAL:{rules:[0,1,26],inclusive:!0}},e}();return e.lexer=t,e}();typeof require!="undefined"&&typeof exports!="undefined"&&(exports.parser=handlebars,exports.parse=function(){return handlebars.parse.apply(handlebars,arguments)},exports.main=function(t){if(!t[1])throw new Error("Usage: "+t[0]+" FILE");if(typeof process!="undefined")var n=require("fs").readFileSync(require("path").join(process.cwd(),t[1]),"utf8");else var r=require("file").path(require("file").cwd()),n=r.join(t[1]).read({charset:"utf-8"});return exports.parser.parse(n)},typeof module!="undefined"&&require.main===module&&exports.main(typeof process!="undefined"?process.argv.slice(1):require("system").args)),Handlebars.Parser=handlebars,Handlebars.parse=function(e){return Handlebars.Parser.yy=Handlebars.AST,Handlebars.Parser.parse(e)},Handlebars.print=function(e){return(new Handlebars.PrintVisitor).accept(e)},Handlebars.logger={DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(e,t){}},Handlebars.log=function(e,t){Handlebars.logger.log(e,t)},function(){Handlebars.AST={},Handlebars.AST.ProgramNode=function(e,t){this.type="program",this.statements=e,t&&(this.inverse=new Handlebars.AST.ProgramNode(t))},Handlebars.AST.MustacheNode=function(e,t,n){this.type="mustache",this.id=e[0],this.params=e.slice(1),this.hash=t,this.escaped=!n},Handlebars.AST.PartialNode=function(e,t){this.type="partial",this.id=e,this.context=t};var e=function(e,t){if(e.original!==t.original)throw new Handlebars.Exception(e.original+" doesn't match "+t.original)};Handlebars.AST.BlockNode=function(t,n,r){e(t.id,r),this.type="block",this.mustache=t,this.program=n},Handlebars.AST.InverseNode=function(t,n,r){e(t.id,r),this.type="inverse",this.mustache=t,this.program=n},Handlebars.AST.ContentNode=function(e){this.type="content",this.string=e},Handlebars.AST.HashNode=function(e){this.type="hash",this.pairs=e},Handlebars.AST.IdNode=function(e){this.type="ID",this.original=e.join(".");var t=[],n=0;for(var r=0,i=e.length;r<i;r++){var s=e[r];s===".."?n++:s==="."||s==="this"?this.isScoped=!0:t.push(s)}this.parts=t,this.string=t.join("."),this.depth=n,this.isSimple=t.length===1&&n===0},Handlebars.AST.StringNode=function(e){this.type="STRING",this.string=e},Handlebars.AST.IntegerNode=function(e){this.type="INTEGER",this.integer=e},Handlebars.AST.BooleanNode=function(e){this.type="BOOLEAN",this.bool=e},Handlebars.AST.CommentNode=function(e){this.type="comment",this.comment=e}}(),Handlebars.Exception=function(e){var t=Error.prototype.constructor.apply(this,arguments);for(var n in t)t.hasOwnProperty(n)&&(this[n]=t[n]);this.message=t.message},Handlebars.Exception.prototype=new Error,Handlebars.SafeString=function(e){this.string=e},Handlebars.SafeString.prototype.toString=function(){return this.string.toString()},function(){var e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},t=/&(?!\w+;)|[<>"'`]/g,n=/[&<>"'`]/,r=function(t){return e[t]||"&amp;"};Handlebars.Utils={escapeExpression:function(e){return e instanceof Handlebars.SafeString?e.toString():e==null||e===!1?"":n.test(e)?e.replace(t,r):e},isEmpty:function(e){return typeof e=="undefined"?!0:e===null?!0:e===!1?!0:Object.prototype.toString.call(e)==="[object Array]"&&e.length===0?!0:!1}}}(),Handlebars.Compiler=function(){},Handlebars.JavaScriptCompiler=function(){},function(e,t){e.OPCODE_MAP={appendContent:1,getContext:2,lookupWithHelpers:3,lookup:4,append:5,invokeMustache:6,appendEscaped:7,pushString:8,truthyOrFallback:9,functionOrFallback:10,invokeProgram:11,invokePartial:12,push:13,assignToHash:15,pushStringParam:16},e.MULTI_PARAM_OPCODES={appendContent:1,getContext:1,lookupWithHelpers:2,lookup:1,invokeMustache:3,pushString:1,truthyOrFallback:1,functionOrFallback:1,invokeProgram:3,invokePartial:1,push:1,assignToHash:1,pushStringParam:1},e.DISASSEMBLE_MAP={};for(var n in e.OPCODE_MAP){var r=e.OPCODE_MAP[n];e.DISASSEMBLE_MAP[r]=n}e.multiParamSize=function(t){return e.MULTI_PARAM_OPCODES[e.DISASSEMBLE_MAP[t]]},e.prototype={compiler:e,disassemble:function(){var t=this.opcodes,n,r,i=[],s,o,u;for(var a=0,f=t.length;a<f;a++){n=t[a];if(n==="DECLARE")o=t[++a],u=t[++a],i.push("DECLARE "+o+" = "+u);else{s=e.DISASSEMBLE_MAP[n];var l=e.multiParamSize(n),c=[];for(var h=0;h<l;h++)r=t[++a],typeof r=="string"&&(r='"'+r.replace("\n","\\n")+'"'),c.push(r);s=s+" "+c.join(" "),i.push(s)}}return i.join("\n")},guid:0,compile:function(e,t){this.children=[],this.depths={list:[]},this.options=t;var n=this.options.knownHelpers;this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0};if(n)for(var r in n)this.options.knownHelpers[r]=n[r];return this.program(e)},accept:function(e){return this[e.type](e)},program:function(e){var t=e.statements,n;this.opcodes=[];for(var r=0,i=t.length;r<i;r++)n=t[r],this[n.type](n);return this.isSimple=i===1,this.depths.list=this.depths.list.sort(function(e,t){return e-t}),this},compileProgram:function(e){var t=(new this.compiler).compile(e,this.options),n=this.guid++;this.usePartial=this.usePartial||t.usePartial,this.children[n]=t;for(var r=0,i=t.depths.list.length;r<i;r++){depth=t.depths.list[r];if(depth<2)continue;this.addDepth(depth-1)}return n},block:function(e){var t=e.mustache,n,r,i,s,o=this.setupStackForMustache(t),u=this.compileProgram(e.program);e.program.inverse&&(s=this.compileProgram(e.program.inverse),this.declare("inverse",s)),this.opcode("invokeProgram",u,o.length,!!t.hash),this.declare("inverse",null),this.opcode("append")},inverse:function(e){var t=this.setupStackForMustache(e.mustache),n=this.compileProgram(e.program);this.declare("inverse",n),this.opcode("invokeProgram",null,t.length,!!e.mustache.hash),this.declare("inverse",null),this.opcode("append")},hash:function(e){var t=e.pairs,n,r;this.opcode("push","{}");for(var i=0,s=t.length;i<s;i++)n=t[i],r=n[1],this.accept(r),this.opcode("assignToHash",n[0])},partial:function(e){var t=e.id;this.usePartial=!0,e.context?this.ID(e.context):this.opcode("push","depth0"),this.opcode("invokePartial",t.original),this.opcode("append")},content:function(e){this.opcode("appendContent",e.string)},mustache:function(e){var t=this.setupStackForMustache(e);this.opcode("invokeMustache",t.length,e.id.original,!!e.hash),e.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ID:function(e){this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("lookupWithHelpers",e.parts[0]||null,e.isScoped||!1);for(var t=1,n=e.parts.length;t<n;t++)this.opcode("lookup",e.parts[t])},STRING:function(e){this.opcode("pushString",e.string)},INTEGER:function(e){this.opcode("push",e.integer)},BOOLEAN:function(e){this.opcode("push",e.bool)},comment:function(){},pushParams:function(e){var t=e.length,n;while(t--)n=e[t],this.options.stringParams?(n.depth&&this.addDepth(n.depth),this.opcode("getContext",n.depth||0),this.opcode("pushStringParam",n.string)):this[n.type](n)},opcode:function(t,n,r,i){this.opcodes.push(e.OPCODE_MAP[t]),n!==undefined&&this.opcodes.push(n),r!==undefined&&this.opcodes.push(r),i!==undefined&&this.opcodes.push(i)},declare:function(e,t){this.opcodes.push("DECLARE"),this.opcodes.push(e),this.opcodes.push(t)},addDepth:function(e){if(e===0)return;this.depths[e]||(this.depths[e]=!0,this.depths.list.push(e))},setupStackForMustache:function(e){var t=e.params;return this.pushParams(t),e.hash&&this.hash(e.hash),this.ID(e.id),t}},t.prototype={nameLookup:function(e,n,r){return/^[0-9]+$/.test(n)?e+"["+n+"]":t.isValidJavaScriptVariableName(n)?e+"."+n:e+"['"+n+"']"},appendToBuffer:function(e){return this.environment.isSimple?"return "+e+";":"buffer += "+e+";"},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(e,t,n,r){this.environment=e,this.options=t||{},this.name=this.environment.name,this.isChild=!!n,this.context=n||{programs:[],aliases:{self:"this"},registers:{list:[]}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.compileChildren(e,t);var i=e.opcodes,s;this.i=0;for(u=i.length;this.i<u;this.i++)s=this.nextOpcode(0),s[0]==="DECLARE"?(this.i=this.i+2,this[s[1]]=s[2]):(this.i=this.i+s[1].length,this[s[0]].apply(this,s[1]));return this.createFunctionContext(r)},nextOpcode:function(t){var n=this.environment.opcodes,r=n[this.i+t],i,s,o,u;if(r==="DECLARE")return i=n[this.i+1],s=n[this.i+2],["DECLARE",i,s];i=e.DISASSEMBLE_MAP[r],o=e.multiParamSize(r),u=[];for(var a=0;a<o;a++)u.push(n[this.i+a+1+t]);return[i,u]},eat:function(e){this.i=this.i+e.length},preamble:function(){var e=[];this.useRegister("foundHelper");if(!this.isChild){var t=this.namespace,n="helpers = helpers || "+t+".helpers;";this.environment.usePartial&&(n=n+" partials = partials || "+t+".partials;"),e.push(n)}else e.push("");this.environment.isSimple?e.push(""):e.push(", buffer = "+this.initializeBuffer()),this.lastContext=0,this.source=e},createFunctionContext:function(e){var t=this.stackVars;this.isChild||(t=t.concat(this.context.registers.list)),t.length>0&&(this.source[1]=this.source[1]+", "+t.join(", "));if(!this.isChild){var n=[];for(var r in this.context.aliases)this.source[1]=this.source[1]+", "+r+"="+this.context.aliases[r]}this.source[1]&&(this.source[1]="var "+this.source[1].substring(2)+";"),this.isChild||(this.source[1]+="\n"+this.context.programs.join("\n")+"\n"),this.environment.isSimple||this.source.push("return buffer;");var i=this.isChild?["depth0","data"]:["Handlebars","depth0","helpers","partials","data"];for(var s=0,o=this.environment.depths.list.length;s<o;s++)i.push("depth"+this.environment.depths.list[s]);if(e)return i.push(this.source.join("\n ")),Function.apply(this,i);var u="function "+(this.name||"")+"("+i.join(",")+") {\n "+this.source.join("\n ")+"}";return Handlebars.log(Handlebars.logger.DEBUG,u+"\n\n"),u},appendContent:function(e){this.source.push(this.appendToBuffer(this.quotedString(e)))},append:function(){var e=this.popStack();this.source.push("if("+e+" || "+e+" === 0) { "+this.appendToBuffer(e)+" }"),this.environment.isSimple&&this.source.push("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){var e=this.nextOpcode(1),t="";this.context.aliases.escapeExpression="this.escapeExpression",e[0]==="appendContent"&&(t=" + "+this.quotedString(e[1][0]),this.eat(e)),this.source.push(this.appendToBuffer("escapeExpression("+this.popStack()+")"+t))},getContext:function(e){this.lastContext!==e&&(this.lastContext=e)},lookupWithHelpers:function(e,t){if(e){var n=this.nextStack();this.usingKnownHelper=!1;var r;!t&&this.options.knownHelpers[e]?(r=n+" = "+this.nameLookup("helpers",e,"helper"),this.usingKnownHelper=!0):t||this.options.knownHelpersOnly?r=n+" = "+this.nameLookup("depth"+this.lastContext,e,"context"):(this.register("foundHelper",this.nameLookup("helpers",e,"helper")),r=n+" = foundHelper || "+this.nameLookup("depth"+this.lastContext,e,"context")),r+=";",this.source.push(r)}else this.pushStack("depth"+this.lastContext)},lookup:function(e){var t=this.topStack();this.source.push(t+" = ("+t+" === null || "+t+" === undefined || "+t+" === false ? "+t+" : "+this.nameLookup(t,e,"context")+");")},pushStringParam:function(e){this.pushStack("depth"+this.lastContext),this.pushString(e)},pushString:function(e){this.pushStack(this.quotedString(e))},push:function(e){this.pushStack(e)},invokeMustache:function(e,t,n){this.populateParams(e,this.quotedString(t),"{}",null,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.helperMissing="helpers.helperMissing",this.context.aliases.undef="void 0",this.source.push("else if("+n+"=== undef) { "+e+" = helperMissing.call("+t+"); }"),e!==n&&this.source.push("else { "+e+" = "+n+"; }"))})},invokeProgram:function(e,t,n){var r=this.programExpression(this.inverse),i=this.programExpression(e);this.populateParams(t,null,i,r,n,function(e,t,n){this.usingKnownHelper||(this.context.aliases.blockHelperMissing="helpers.blockHelperMissing",this.source.push("else { "+e+" = blockHelperMissing.call("+t+"); }"))})},populateParams:function(e,t,n,r,i,s){var o=i||this.options.stringParams||r||this.options.data,u=this.popStack(),a,f=[],l,c,h;o?(this.register("tmp1",n),h="tmp1"):h="{ hash: {} }";if(o){var p=i?this.popStack():"{}";this.source.push("tmp1.hash = "+p+";")}this.options.stringParams&&this.source.push("tmp1.contexts = [];");for(var d=0;d<e;d++)l=this.popStack(),f.push(l),this.options.stringParams&&this.source.push("tmp1.contexts.push("+this.popStack()+");");r&&(this.source.push("tmp1.fn = tmp1;"),this.source.push("tmp1.inverse = "+r+";")),this.options.data&&this.source.push("tmp1.data = data;"),f.push(h),this.populateCall(f,u,t||u,s,n!=="{}")},populateCall:function(e,t,n,r,i){var s=["depth0"].concat(e).join(", "),o=["depth0"].concat(n).concat(e).join(", "),u=this.nextStack();if(this.usingKnownHelper)this.source.push(u+" = "+t+".call("+s+");");else{this.context.aliases.functionType='"function"';var a=i?"foundHelper && ":"";this.source.push("if("+a+"typeof "+t+" === functionType) { "+u+" = "+t+".call("+s+"); }")}r.call(this,u,o,t),this.usingKnownHelper=!1},invokePartial:function(e){params=[this.nameLookup("partials",e,"partial"),"'"+e+"'",this.popStack(),"helpers","partials"],this.options.data&&params.push("data"),this.pushStack("self.invokePartial("+params.join(", ")+");")},assignToHash:function(e){var t=this.popStack(),n=this.topStack();this.source.push(n+"['"+e+"'] = "+t+";")},compiler:t,compileChildren:function(e,t){var n=e.children,r,i;for(var s=0,o=n.length;s<o;s++){r=n[s],i=new this.compiler,this.context.programs.push("");var u=this.context.programs.length;r.index=u,r.name="program"+u,this.context.programs[u]=i.compile(r,t,this.context)}},programExpression:function(e){if(e==null)return"self.noop";var t=this.environment.children[e],n=t.depths.list,r=[t.index,t.name,"data"];for(var i=0,s=n.length;i<s;i++)depth=n[i],depth===1?r.push("depth0"):r.push("depth"+(depth-1));return n.length===0?"self.program("+r.join(", ")+")":(r.shift(),"self.programWithDepth("+r.join(", ")+")")},register:function(e,t){this.useRegister(e),this.source.push(e+" = "+t+";")},useRegister:function(e){this.context.registers[e]||(this.context.registers[e]=!0,this.context.registers.list.push(e))},pushStack:function(e){return this.source.push(this.nextStack()+" = "+e+";"),"stack"+this.stackSlot},nextStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),"stack"+this.stackSlot},popStack:function(){return"stack"+this.stackSlot--},topStack:function(){return"stack"+this.stackSlot},quotedString:function(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r")+'"'}};var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),s=t.RESERVED_WORDS={};for(var o=0,u=i.length;o<u;o++)s[i[o]]=!0;t.isValidJavaScriptVariableName=function(e){return!t.RESERVED_WORDS[e]&&/^[a-zA-Z_$][0-9a-zA-Z_$]+$/.test(e)?!0:!1}}(Handlebars.Compiler,Handlebars.JavaScriptCompiler),Handlebars.precompile=function(e,t){t=t||{};var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t);return(new Handlebars.JavaScriptCompiler).compile(r,t)},Handlebars.compile=function(e,t){function r(){var n=Handlebars.parse(e),r=(new Handlebars.Compiler).compile(n,t),i=(new Handlebars.JavaScriptCompiler).compile(r,t,undefined,!0);return Handlebars.template(i)}t=t||{};var n;return function(e,t){return n||(n=r()),n.call(this,e,t)}},Handlebars.VM={template:function(e){var t={escapeExpression:Handlebars.Utils.escapeExpression,invokePartial:Handlebars.VM.invokePartial,programs:[],program:function(e,t,n){var r=this.programs[e];return n?Handlebars.VM.program(t,n):r?r:(r=this.programs[e]=Handlebars.VM.program(t),r)},programWithDepth:Handlebars.VM.programWithDepth,noop:Handlebars.VM.noop};return function(n,r){return r=r||{},e.call(t,Handlebars,n,r.helpers,r.partials,r.data)}},programWithDepth:function(e,t,n){var r=Array.prototype.slice.call(arguments,2);return function(n,i){return i=i||{},e.apply(this,[n,i.data||t].concat(r))}},program:function(e,t){return function(n,r){return r=r||{},e(n,r.data||t)}},noop:function(){return""},invokePartial:function(e,t,n,r,i,s){options={helpers:r,partials:i,data:s};if(e===undefined)throw new Handlebars.Exception("The partial "+t+" could not be found");if(e instanceof Function)return e(n,options);if(!Handlebars.compile)throw new Handlebars.Exception("The partial "+t+" could not be compiled when running in runtime-only mode");return i[t]=Handlebars.compile(e),i[t](n,options)}},Handlebars.template=Handlebars.VM.template,define("Handlebars",function(e){return function(){return e.Handlebars}}(this)),define("text",["module"],function(e){var t,n,r=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],i=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,s=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,o=typeof location!="undefined"&&location.href,u=o&&location.protocol&&location.protocol.replace(/\:/,""),a=o&&location.hostname,f=o&&(location.port||undefined),l=[],c=e.config&&e.config()||{};t={version:"2.0.3",strip:function(e){if(e){e=e.replace(i,"");var t=e.match(s);t&&(e=t[1])}else e="";return e},jsEscape:function(e){return e.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:c.createXhr||function(){var e,t,n;if(typeof XMLHttpRequest!="undefined")return new XMLHttpRequest;if(typeof ActiveXObject!="undefined")for(t=0;t<3;t+=1){n=r[t];try{e=new ActiveXObject(n)}catch(i){}if(e){r=[n];break}}return e},parseName:function(e){var t=!1,n=e.indexOf("."),r=e.substring(0,n),i=e.substring(n+1,e.length);return n=i.indexOf("!"),n!==-1&&(t=i.substring(n+1,i.length),t=t==="strip",i=i.substring(0,n)),{moduleName:r,ext:i,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(e,n,r,i){var s,o,u,a=t.xdRegExp.exec(e);return a?(s=a[2],o=a[3],o=o.split(":"),u=o[1],o=o[0],(!s||s===n)&&(!o||o.toLowerCase()===r.toLowerCase())&&(!u&&!o||u===i)):!0},finishLoad:function(e,n,r,i){r=n?t.strip(r):r,c.isBuild&&(l[e]=r),i(r)},load:function(e,n,r,i){if(i.isBuild&&!i.inlineText){r();return}c.isBuild=i.isBuild;var s=t.parseName(e),l=s.moduleName+"."+s.ext,h=n.toUrl(l),p=c.useXhr||t.useXhr;!o||p(h,u,a,f)?t.get(h,function(n){t.finishLoad(e,s.strip,n,r)},function(e){r.error&&r.error(e)}):n([l],function(e){t.finishLoad(s.moduleName+"."+s.ext,s.strip,e,r)})},write:function(e,n,r,i){if(l.hasOwnProperty(n)){var s=t.jsEscape(l[n]);r.asModule(e+"!"+n,"define(function () { return '"+s+"';});\n")}},writeFile:function(e,n,r,i,s){var o=t.parseName(n),u=o.moduleName+"."+o.ext,a=r.toUrl(o.moduleName+"."+o.ext)+".js";t.load(u,r,function(n){var r=function(e){return i(a,e)};r.asModule=function(e,t){return i.asModule(e,a,t)},t.write(e,u,r,s)},s)}};if(c.env==="node"||!c.env&&typeof process!="undefined"&&process.versions&&!!process.versions.node)n=require.nodeRequire("fs"),t.get=function(e,t){var r=n.readFileSync(e,"utf8");r.indexOf("")===0&&(r=r.substring(1)),t(r)};else if(c.env==="xhr"||!c.env&&t.createXhr())t.get=function(e,n,r){var i=t.createXhr();i.open("GET",e,!0),c.onXhr&&c.onXhr(i,e),i.onreadystatechange=function(t){var s,o;i.readyState===4&&(s=i.status,s>399&&s<600?(o=new Error(e+" HTTP status: "+s),o.xhr=i,r(o)):n(i.responseText))},i.send(null)};else if(c.env==="rhino"||!c.env&&typeof Packages!="undefined"&&typeof java!="undefined")t.get=function(e,t){var n,r,i="utf-8",s=new java.io.File(e),o=java.lang.System.getProperty("line.separator"),u=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),i)),a="";try{n=new java.lang.StringBuffer,r=u.readLine(),r&&r.length()&&r.charAt(0)===65279&&(r=r.substring(1)),n.append(r);while((r=u.readLine())!==null)n.append(o),n.append(r);a=String(n.toString())}finally{u.close()}t(a)};return t}),define("text!fiddle_backbone/templates/dbTypes.html",[],function(){return' <a class="dropdown-toggle" data-toggle="dropdown" href="#">\n {{selectedFullName}} <b class="caret"></b>\n </a>\n <ul class="dropdown-menu">\n {{#each dbTypes}}\n <li db_type_id="{{this.id}}" class="{{this.className}}"><a href="#"><i class="icon-tag"></i>{{this.full_name}}</a></li>\n {{/each}}\n </ul>'}),define("fiddle_backbone/views/DBTypesList",["jQuery","Backbone","Handlebars","text!fiddle_backbone/templates/dbTypes.html"],function(e,t,n,r){var i=t.View.extend({initialize:function(){this.compiledTemplate=n.compile(r)},events:{"click ul.dropdown-menu li":"clickDBType"},clickDBType:function(t){t.preventDefault(),this.collection.setSelectedType(e(t.currentTarget).attr("db_type_id"))},render:function(){var t=this.collection.getSelectedType();return e(this.el).html(this.compiledTemplate({dbTypes:this.collection.map(function(e){var t=e.toJSON();return t.className=t.selected?"active":"",t}),selectedFullName:t.get("full_name")})),e("#db_type_label_collapsed .navbar-text").text(t.get("full_name")),this}});return i});var CodeMirror=function(){function e(r,i){function Kt(e){return e>=0&&e<bt.size}function Gt(e){return E(bt,e)}function Yt(e,t){Bt=!0;var n=t-e.height;for(var r=e;r;r=r.parent)r.height+=n}function Zt(e){var t={line:0,ch:0};mn(t,{line:bt.size-1,ch:Gt(bt.size-1).text.length},ut(e),t,t),Ot=!0}function en(){var e=[];return bt.iter(0,bt.size,function(t){e.push(t.text)}),e.join("\n")}function tn(e){function c(e){var t=Hr(e,!0);if(t&&!Z(t,o)){Et||dn(),o=t,zn(r,t),Ot=!1;var n=Bn();if(t.line>=n.to||t.line<n.from)u=setTimeout(Jr(function(){c(e)}),150)}}function h(e){clearTimeout(u);var t=Hr(e);t&&zn(r,t),L(e),_n(),Ot=!0,p(),f()}Un(D(e,"shiftKey"));for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==V&&t!=J)return;for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==nt)return s.onGutterClick&&s.onGutterClick(Qt,st(nt.childNodes,t)+It,e),L(e);var r=Hr(e);switch(_(e)){case 3:j&&!n&&Br(e);return;case 2:r&&Vn(r.line,r.ch,!0);return}if(!r){M(e)==z&&L(e);return}Et||dn();var i=+(new Date);if(Nt&&Nt.time>i-400&&Z(Nt.pos,r))return L(e),setTimeout(_n,20),tr(r.line);if(Tt&&Tt.time>i-400&&Z(Tt.pos,r))return Nt={time:i,pos:r},L(e),er(r);Tt={time:i,pos:r};var o=r,u;if(s.dragDrop&&X&&!s.readOnly&&!Z(St.from,St.to)&&!et(r,St.from)&&!et(St.to,r)){R&&(rt.draggable=!0);function a(t){R&&(rt.draggable=!1),kt=!1,f(),l(),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(L(t),Vn(r.line,r.ch,!0),_n())}var f=P(document,"mouseup",Jr(a),!0),l=P(z,"drop",Jr(a),!0);kt=!0,rt.dragDrop&&rt.dragDrop();return}L(e),Vn(r.line,r.ch,!0);var p=P(document,"mousemove",Jr(function(e){clearTimeout(u),L(e),!F&&!_(e)?h(e):c(e)}),!0),f=P(document,"mouseup",Jr(h),!0)}function nn(e){for(var t=M(e);t!=y;t=t.parentNode)if(t.parentNode==nt)return L(e);var n=Hr(e);if(!n)return;Nt={time:+(new Date),pos:n},L(e),er(n)}function rn(e){if(s.onDragEvent&&s.onDragEvent(Qt,k(e)))return;e.preventDefault();var t=Hr(e,!0),n=e.dataTransfer.files;if(!t||s.readOnly)return;if(n&&n.length&&window.FileReader&&window.File){function r(e,n){var r=new FileReader;r.onload=function(){o[n]=r.result,++u==i&&(t=Jn(t),Jr(function(){var e=En(o.join(""),t,t);zn(t,e)})())},r.readAsText(e)}var i=n.length,o=Array(i),u=0;for(var a=0;a<i;++a)r(n[a],a)}else try{var o=e.dataTransfer.getData("Text");o&&Kr(function(){var e=St.from,n=St.to;zn(t,t),kt&&En("",e,n),Sn(o),_n()})}catch(e){}}function sn(e){var t=Nn();e.dataTransfer.setData("Text",t);if(j||U){var n=document.createElement("img");n.scr="data:image/gif;base64,R0lGODdhAgACAIAAAAAAAP///ywAAAAAAgACAAACAoRRADs=",e.dataTransfer.setDragImage(n,0,0)}}function on(e,t){if(typeof e=="string"){e=u[e];if(!e)return!1}var n=xt;try{s.readOnly&&(At=!0),t&&(xt=null),e(Qt)}catch(r){if(r!=B)throw r;return!1}finally{xt=n,At=!1}return!0}function un(e){function u(){o=!0}var t=f(s.keyMap),n=t.auto;clearTimeout(ln),n&&!c(e)&&(ln=setTimeout(function(){f(s.keyMap)==t&&(s.keyMap=n.call?n.call(null,Qt):n)},50));var r=ft[D(e,"keyCode")],i=!1;if(r==null||e.altGraphKey)return!1;D(e,"altKey")&&(r="Alt-"+r),D(e,"ctrlKey")&&(r="Ctrl-"+r),D(e,"metaKey")&&(r="Cmd-"+r);var o=!1;return D(e,"shiftKey")?i=l("Shift-"+r,s.extraKeys,s.keyMap,function(e){return on(e,!0)},u)||l(r,s.extraKeys,s.keyMap,function(e){if(typeof e=="string"&&/^go[A-Z]/.test(e))return on(e)},u):i=l(r,s.extraKeys,s.keyMap,on,u),o&&(i=!1),i&&(L(e),F&&(e.oldKeyCode=e.keyCode,e.keyCode=0)),i}function an(e,t){var n=l("'"+t+"'",s.extraKeys,s.keyMap,function(e){return on(e,!0)});return n&&L(e),n}function cn(e){Et||dn(),F&&e.keyCode==27&&(e.returnValue=!1),Cn&&On()&&(Cn=!1);if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;var t=D(e,"keyCode");Un(t==16||D(e,"shiftKey"));var r=un(e);window.opera&&(fn=r?t:null,!r&&t==88&&D(e,n?"metaKey":"ctrlKey")&&Sn(""))}function hn(e){Cn&&On();if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;var t=D(e,"keyCode"),n=D(e,"charCode");if(window.opera&&t==fn){fn=null,L(e);return}if((window.opera&&!e.which||W)&&un(e))return;var r=String.fromCharCode(n==null?t:n);s.electricChars&&yt.electricChars&&s.smartIndent&&!s.readOnly&&yt.electricChars.indexOf(r)>-1&&setTimeout(Jr(function(){rr(St.to.line,"smart")}),75);if(an(e,r))return;Ln()}function pn(e){if(s.onKeyEvent&&s.onKeyEvent(Qt,k(e)))return;D(e,"keyCode")==16&&(xt=null)}function dn(){if(s.readOnly=="nocursor")return;Et||(s.onFocus&&s.onFocus(Qt),Et=!0,y.className.search(/\bCodeMirror-focused\b/)==-1&&(y.className+=" CodeMirror-focused"),Ht||Mn(!0)),kn(),jr()}function vn(){Et&&(s.onBlur&&s.onBlur(Qt),Et=!1,Ut&&Jr(function(){Ut&&(Ut(),Ut=null)})(),y.className=y.className.replace(" CodeMirror-focused","")),clearInterval(gt),setTimeout(function(){Et||(xt=null)},150)}function mn(e,t,n,r,i){if(At)return;if(Vt){var o=[];bt.iter(e.line,t.line+1,function(e){o.push(e.text)}),Vt.addChange(e.line,n.length,o);while(Vt.done.length>s.undoDepth)Vt.done.shift()}wn(e,t,n,r,i)}function gn(e,t){if(!e.length)return;var n=e.pop(),r=[];for(var i=n.length-1;i>=0;i-=1){var s=n[i],o=[],u=s.start+s.added;bt.iter(s.start,u,function(e){o.push(e.text)}),r.push({start:s.start,added:s.old.length,old:o});var a=Jn({line:s.start+s.old.length-1,ch:it(o[o.length-1],s.old[s.old.length-1])});wn({line:s.start,ch:0},{line:u-1,ch:Gt(u-1).text.length},s.old,a,a)}Ot=!0,t.push(r)}function yn(){gn(Vt.done,Vt.undone)}function bn(){gn(Vt.undone,Vt.done)}function wn(e,t,n,r,i){function T(e){return e<=Math.min(t.line,t.line+y)?e:e+y}if(At)return;var o=!1,u=zt.length;s.lineWrapping||bt.iter(e.line,t.line+1,function(e){if(e.text.length==u)return o=!0,!0});if(e.line!=t.line||n.length>1)Bt=!0;var a=t.line-e.line,f=Gt(e.line),l=Gt(t.line);if(e.ch==0&&t.ch==0&&n[n.length-1]==""){var c=[],h=null;e.line?(h=Gt(e.line-1),h.fixMarkEnds(l)):l.fixMarkStarts();for(var p=0,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],h));a&&bt.remove(e.line,a,jt),c.length&&bt.insert(e.line,c)}else if(f==l)if(n.length==1)f.replace(e.ch,t.ch,n[0]);else{l=f.split(t.ch,n[n.length-1]),f.replace(e.ch,null,n[0]),f.fixMarkEnds(l);var c=[];for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));c.push(l),bt.insert(e.line+1,c)}else if(n.length==1)f.replace(e.ch,null,n[0]),l.replace(null,t.ch,""),f.append(l),bt.remove(e.line+1,a,jt);else{var c=[];f.replace(e.ch,null,n[0]),l.replace(null,t.ch,n[n.length-1]),f.fixMarkEnds(l);for(var p=1,d=n.length-1;p<d;++p)c.push(g.inheritMarks(n[p],f));a>1&&bt.remove(e.line+1,a-1,jt),bt.insert(e.line+1,c)}if(s.lineWrapping){var v=Math.max(5,z.clientWidth/_r()-3);bt.iter(e.line,e.line+n.length,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/v)||1;t!=e.height&&Yt(e,t)})}else bt.iter(e.line,e.line+n.length,function(e){var t=e.text;t.length>u&&(zt=t,u=t.length,Wt=null,o=!1)}),o&&(u=0,zt="",Wt=null,bt.iter(0,bt.size,function(e){var t=e.text;t.length>u&&(u=t.length,zt=t)}));var m=[],y=n.length-a-1;for(var p=0,b=wt.length;p<b;++p){var w=wt[p];w<e.line?m.push(w):w>t.line&&m.push(w+y)}var E=e.line+Math.min(n.length,500);Ur(e.line,E),m.push(E),wt=m,Wr(100),_t.push({from:e.line,to:t.line+1,diff:y});var S={from:e,to:t,text:n};if(Dt){for(var x=Dt;x.next;x=x.next);x.next=S}else Dt=S;Wn(r,i,T(St.from.line),T(St.to.line)),z.clientHeight&&(V.style.height=bt.height*Ar()+2*Dr()+"px")}function En(e,t,n){function r(r){if(et(r,t))return r;if(!et(n,r))return i;var s=r.line+e.length-(n.line-t.line)-1,o=r.ch;return r.line==n.line&&(o+=e[e.length-1].length-(n.ch-(n.line==t.line?t.ch:0))),{line:s,ch:o}}t=Jn(t),n?n=Jn(n):n=t,e=ut(e);var i;return xn(e,t,n,function(e){return i=e,{from:r(St.from),to:r(St.to)}}),i}function Sn(e,t){xn(ut(e),St.from,St.to,function(e){return t=="end"?{from:e,to:e}:t=="start"?{from:St.from,to:St.from}:{from:St.from,to:e}})}function xn(e,t,n,r){var i=e.length==1?e[0].length+t.ch:e[e.length-1].length,s=r({line:t.line+e.length-1,ch:i});mn(t,n,e,s.from,s.to)}function Tn(e,t){var n=e.line,r=t.line;if(n==r)return Gt(n).text.slice(e.ch,t.ch);var i=[Gt(n).text.slice(e.ch)];return bt.iter(n+1,r,function(e){i.push(e.text)}),i.push(Gt(r).text.slice(0,t.ch)),i.join("\n")}function Nn(){return Tn(St.from,St.to)}function kn(){if(Cn)return;vt.set(s.pollInterval,function(){Xr(),On(),Et&&kn(),Vr()})}function Ln(){function t(){Xr();var n=On();!n&&!e?(e=!0,vt.set(60,t)):(Cn=!1,kn()),Vr()}var e=!1;Cn=!0,vt.set(20,t)}function On(){if(Ht||!Et||at(A)||s.readOnly)return!1;var e=A.value;if(e==An)return!1;xt=null;var t=0,n=Math.min(An.length,e.length);while(t<n&&An[t]==e[t])++t;return t<An.length?St.from={line:St.from.line,ch:St.from.ch-(An.length-t)}:Lt&&Z(St.from,St.to)&&(St.to={line:St.to.line,ch:Math.min(Gt(St.to.line).text.length,St.to.ch+(e.length-t))}),Sn(e.slice(t),"end"),An=e,!0}function Mn(e){Z(St.from,St.to)?e&&(An=A.value=""):(An="",A.value=Nn(),Y(A))}function _n(){s.readOnly!="nocursor"&&A.focus()}function Dn(){if(!ct.getBoundingClientRect)return;var e=ct.getBoundingClientRect();if(F&&e.top==e.bottom)return;var t=window.innerHeight||Math.max(document.body.offsetHeight,document.documentElement.offsetHeight);(e.top<0||e.bottom>t)&&ct.scrollIntoView()}function Pn(){var e=xr(St.inverted?St.from:St.to),t=s.lineWrapping?Math.min(e.x,rt.offsetWidth):e.x;return Hn(t,e.y,t,e.yBot)}function Hn(e,t,n,r){var i=Pr(),o=Dr();t+=o,r+=o,e+=i,n+=i;var u=z.clientHeight,a=z.scrollTop,f=!1,l=!0;t<a?(z.scrollTop=Math.max(0,t),f=!0):r>a+u&&(z.scrollTop=r-u,f=!0);var c=z.clientWidth,h=z.scrollLeft,p=s.fixedGutter?K.clientWidth:0,d=e<p+i+10;return e<h+p||d?(d&&(e=0),z.scrollLeft=Math.max(0,e-10-p),f=!0):n>c+h-3&&(z.scrollLeft=n+10-c,f=!0,n>V.clientWidth&&(l=!1)),f&&s.onScroll&&s.onScroll(Qt),l}function Bn(){var e=Ar(),t=z.scrollTop-Dr(),n=Math.max(0,Math.floor(t/e)),r=Math.ceil((t+z.clientHeight)/e);return{from:x(bt,n),to:x(bt,r)}}function jn(e,t){function p(){Wt=z.clientWidth;var e=pt.firstChild,t=!1;return bt.iter(It,qt,function(n){if(!n.hidden){var r=Math.round(e.offsetHeight/l)||1;n.height!=r&&(Yt(n,r),Bt=t=!0)}e=e.nextSibling}),t&&(V.style.height=bt.height*l+2*Dr()+"px"),t}if(!z.clientWidth){It=qt=Ft=0;return}var n=Bn();if(e!==!0&&e.length==0&&n.from>It&&n.to<qt)return;var r=Math.max(n.from-100,0),i=Math.min(bt.size,n.to+100);It<r&&r-It<20&&(r=It),qt>i&&qt-i<20&&(i=Math.min(bt.size,qt));var o=e===!0?[]:Fn([{from:It,to:qt,domStart:0}],e),u=0;for(var a=0;a<o.length;++a){var f=o[a];f.from<r&&(f.domStart+=r-f.from,f.from=r),f.to>i&&(f.to=i),f.from>=f.to?o.splice(a--,1):u+=f.to-f.from}if(u==i-r&&r==It&&i==qt)return;o.sort(function(e,t){return e.domStart-t.domStart});var l=Ar(),c=K.style.display;pt.style.display="none",In(r,i,o),pt.style.display=K.style.display="";var h=r!=It||i!=qt||Rt!=z.clientHeight+l;h&&(Rt=z.clientHeight+l),It=r,qt=i,Ft=T(bt,r),J.style.top=Ft*l+"px",z.clientHeight&&(V.style.height=bt.height*l+2*Dr()+"px");if(pt.childNodes.length!=qt-It)throw new Error("BAD PATCH! "+JSON.stringify(o)+" size="+(qt-It)+" nodes="+pt.childNodes.length);return s.lineWrapping?p():(Wt==null&&(Wt=br(zt)),Wt>z.clientWidth?(rt.style.width=Wt+"px",V.style.width="",V.style.width=z.scrollWidth+"px"):rt.style.width=V.style.width=""),K.style.display=c,(h||Bt)&&qn()&&s.lineWrapping&&p()&&qn(),Rn(),!t&&s.onUpdate&&s.onUpdate(Qt),!0}function Fn(e,t){for(var n=0,r=t.length||0;n<r;++n){var i=t[n],s=[],o=i.diff||0;for(var u=0,a=e.length;u<a;++u){var f=e[u];i.to<=f.from&&i.diff?s.push({from:f.from+o,to:f.to+o,domStart:f.domStart}):i.to<=f.from||i.from>=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from,domStart:f.domStart}),i.to<f.to&&s.push({from:i.to+o,to:f.to+o,domStart:f.domStart+(i.to-f.from)}))}e=s}return e}function In(e,t,n){if(!n.length)pt.innerHTML="";else{function r(e){var t=e.nextSibling;return e.parentNode.removeChild(e),t}var i=0,s=pt.firstChild,o;for(var u=0;u<n.length;++u){var a=n[u];while(a.domStart>i)s=r(s),i++;for(var f=0,l=a.to-a.from;f<l;++f)s=s.nextSibling,i++}while(s)s=r(s)}var c=n.shift(),s=pt.firstChild,f=e,h=document.createElement("div");bt.iter(e,t,function(e){c&&c.to==f&&(c=n.shift());if(!c||c.from>f){if(e.hidden)var t=h.innerHTML="<pre></pre>";else{var t="<pre"+(e.className?' class="'+e.className+'"':"")+">"+e.getHTML(ur)+"</pre>";e.bgClassName&&(t='<div style="position: relative"><pre class="'+e.bgClassName+'" style="position: absolute; left: 0; right: 0; top: 0; bottom: 0; z-index: -2">&#160;</pre>'+t+"</div>")}h.innerHTML=t,pt.insertBefore(h.firstChild,s)}else s=s.nextSibling;++f})}function qn(){if(!s.gutter&&!s.lineNumbers)return;var e=J.offsetHeight,t=z.clientHeight;K.style.height=(e-t<2?t:e)+"px";var n=[],r=It,i;bt.iter(It,Math.max(qt,It+1),function(e){if(e.hidden)n.push("<pre></pre>");else{var t=e.gutterMarker,o=s.lineNumbers?r+s.firstLineNumber:null;t&&t.text?o=t.text.replace("%N%",o!=null?o:""):o==null&&(o=" "),n.push(t&&t.style?'<pre class="'+t.style+'">':"<pre>",o);for(var u=1;u<e.height;++u)n.push("<br/>&#160;");n.push("</pre>"),t||(i=r)}++r}),K.style.display="none",nt.innerHTML=n.join("");if(i!=null){var o=nt.childNodes[i-It],u=String(bt.size).length,a=G(o),f="";while(a.length+f.length<u)f+=" ";f&&o.insertBefore(document.createTextNode(f),o.firstChild)}K.style.display="";var l=Math.abs((parseInt(rt.style.marginLeft)||0)-K.offsetWidth)>2;return rt.style.marginLeft=K.offsetWidth+"px",Bt=!1,l}function Rn(){var e=Z(St.from,St.to),t=xr(St.from,!0),n=e?t:xr(St.to,!0),r=St.inverted?t:n,i=Ar(),o=Q(y),u=Q(pt);C.style.top=Math.max(0,Math.min(z.offsetHeight,r.y+u.top-o.top))+"px",C.style.left=Math.max(0,Math.min(z.offsetWidth,r.x+u.left-o.left))+"px";if(e)ct.style.top=r.y+"px",ct.style.left=(s.lineWrapping?Math.min(r.x,rt.offsetWidth):r.x)+"px",ct.style.display="",ht.style.display="none";else{var a=t.y==n.y,f="",l=rt.clientWidth||rt.offsetWidth,c=rt.clientHeight||rt.offsetHeight;function h(e,t,n,r){var i=q?"width: "+(n?l-n-e:l)+"px":"right: "+n+"px";f+='<div class="CodeMirror-selected" style="position: absolute; left: '+e+"px; top: "+t+"px; "+i+"; height: "+r+'px"></div>'}if(St.from.ch&&t.y>=0){var p=a?l-n.x:0;h(t.x,t.y,p,i)}var d=Math.max(0,t.y+(St.from.ch?i:0)),v=Math.min(n.y,c)-d;v>.2*i&&h(0,d,0,v),(!a||!St.from.ch)&&n.y<c-.5*i&&h(0,n.y,l-n.x,i),ht.innerHTML=f,ct.style.display="none",ht.style.display=""}}function Un(e){e?xt=xt||(St.inverted?St.to:St.from):xt=null}function zn(e,t){var n=xt&&Jn(xt);n&&(et(n,e)?e=n:et(t,n)&&(t=n)),Wn(e,t),Mt=!0}function Wn(e,t,n,r){Yn=null,n==null&&(n=St.from.line,r=St.to.line);if(Z(St.from,e)&&Z(St.to,t))return;if(et(t,e)){var i=t;t=e,e=i}if(e.line!=n){var o=Xn(e,n,St.from.ch);o?e=o:gr(e.line,!1)}t.line!=r&&(t=Xn(t,r,St.to.ch)),Z(e,t)?St.inverted=!1:Z(e,St.to)?St.inverted=!1:Z(t,St.from)&&(St.inverted=!0);if(s.autoClearEmptyLines&&Z(St.from,St.to)){var u=St.inverted?e:t;if(u.line!=St.from.line&&St.from.line<bt.size){var a=Gt(St.from.line);/^\s+$/.test(a.text)&&setTimeout(Jr(function(){if(a.parent&&/^\s+$/.test(a.text)){var e=S(a);En("",{line:e,ch:0},{line:e,ch:a.text.length})}},10))}}St.from=e,St.to=t,Pt=!0}function Xn(e,t,n){function r(t){var r=e.line+t,i=t==1?bt.size:-1;while(r!=i){var o=Gt(r);if(!o.hidden){var u=e.ch;if(s||u>n||u>o.text.length)u=o.text.length;return{line:r,ch:u}}r+=t}}var i=Gt(e.line),s=e.ch==i.text.length&&e.ch!=n;return i.hidden?e.line>=t?r(1)||r(-1):r(-1)||r(1):e}function Vn(e,t,n){var r=Jn({line:e,ch:t||0});(n?zn:Wn)(r,r)}function $n(e){return Math.max(0,Math.min(e,bt.size-1))}function Jn(e){if(e.line<0)return{line:0,ch:0};if(e.line>=bt.size)return{line:bt.size-1,ch:Gt(bt.size-1).text.length};var t=e.ch,n=Gt(e.line).text.length;return t==null||t>n?{line:e.line,ch:n}:t<0?{line:e.line,ch:0}:e}function Kn(e,t){function o(){for(var t=r+e,n=e<0?-1:bt.size;t!=n;t+=e){var i=Gt(t);if(!i.hidden)return r=t,s=i,!0}}function u(t){if(i==(e<0?0:s.text.length)){if(!!t||!o())return!1;i=e<0?s.text.length:0}else i+=e;return!0}var n=St.inverted?St.from:St.to,r=n.line,i=n.ch,s=Gt(r);if(t=="char")u();else if(t=="column")u(!0);else if(t=="word"){var a=!1;for(;;){if(e<0&&!u())break;if(ot(s.text.charAt(i)))a=!0;else if(a){e<0&&(e=1,u());break}if(e>0&&!u())break}}return{line:r,ch:i}}function Qn(e,t){var n=e<0?St.from:St.to;if(xt||Z(St.from,St.to))n=Kn(e,t);Vn(n.line,n.ch,!0)}function Gn(e,t){Z(St.from,St.to)?e<0?En("",Kn(e,t),St.to):En("",St.from,Kn(e,t)):En("",St.from,St.to),Mt=!0}function Zn(e,t){var n=0,r=xr(St.inverted?St.from:St.to,!0);Yn!=null&&(r.x=Yn),t=="page"?n=Math.min(z.clientHeight,window.innerHeight||document.documentElement.clientHeight):t=="line"&&(n=Ar());var i=Tr(r.x,r.y+n*e+2);t=="page"&&(z.scrollTop+=xr(i,!0).y-r.y),Vn(i.line,i.ch,!0),Yn=r.x}function er(e){var t=Gt(e.line).text,n=e.ch,r=e.ch;while(n>0&&ot(t.charAt(n-1)))--n;while(r<t.length&&ot(t.charAt(r)))++r;zn({line:e.line,ch:n},{line:e.line,ch:r})}function tr(e){zn({line:e,ch:0},Jn({line:e+1,ch:0}))}function nr(e){if(Z(St.from,St.to))return rr(St.from.line,e);var t=St.to.line-(St.to.ch?0:1);for(var n=St.from.line;n<=t;++n)rr(n,e)}function rr(e,t){t||(t="add");if(t=="smart")if(!yt.indent)t="prev";else var n=Rr(e);var r=Gt(e),i=r.indentation(s.tabSize),o=r.text.match(/^\s*/)[0],u;t=="prev"?e?u=Gt(e-1).indentation(s.tabSize):u=0:t=="smart"?u=yt.indent(n,r.text.slice(o.length),r.text):t=="add"?u=i+s.indentUnit:t=="subtract"&&(u=i-s.indentUnit),u=Math.max(0,u);var a=u-i;if(!a){if(St.from.line!=e&&St.to.line!=e)return;var f=o}else{var f="",l=0;if(s.indentWithTabs)for(var c=Math.floor(u/s.tabSize);c;--c)l+=s.tabSize,f+=" ";while(l<u)++l,f+=" "}En(f,{line:e,ch:0},{line:e,ch:o.length})}function ir(){yt=e.getMode(s,s.mode),bt.iter(0,bt.size,function(e){e.stateAfter=null}),wt=[0],Wr()}function sr(){var e=s.gutter||s.lineNumbers;K.style.display=e?"":"none",e?Bt=!0:pt.parentNode.style.marginLeft=0}function or(e,t){if(s.lineWrapping){y.className+=" CodeMirror-wrap";var n=z.clientWidth/_r()-3;bt.iter(0,bt.size,function(e){if(e.hidden)return;var t=Math.ceil(e.text.length/n)||1;t!=1&&Yt(e,t)}),rt.style.width=V.style.width=""}else y.className=y.className.replace(" CodeMirror-wrap",""),Wt=null,zt="",bt.iter(0,bt.size,function(e){e.height!=1&&!e.hidden&&Yt(e,1),e.text.length>zt.length&&(zt=e.text)});_t.push({from:0,to:bt.size})}function ur(e){var t=s.tabSize-e%s.tabSize,n=Xt[t];if(n)return n;for(var r='<span class="cm-tab">',i=0;i<t;++i)r+=" ";return Xt[t]={html:r+"</span>",width:t}}function ar(){z.className=z.className.replace(/\s*cm-s-\S+/g,"")+s.theme.replace(/(^|\s)\s*/g," cm-s-")}function fr(){this.set=[]}function lr(e,t,n){function i(e,t,n,i){Gt(e).addMark(new v(t,n,i,r))}e=Jn(e),t=Jn(t);var r=new fr;if(!et(e,t))return r;if(e.line==t.line)i(e.line,e.ch,t.ch,n);else{i(e.line,e.ch,null,n);for(var s=e.line+1,o=t.line;s<o;++s)i(s,null,null,n);i(t.line,null,t.ch,n)}return _t.push({from:e.line,to:t.line+1}),r}function cr(e){e=Jn(e);var t=new m(e.ch);return Gt(e.line).addMark(t),t}function hr(e){e=Jn(e);var t=[],n=Gt(e.line).marked;if(!n)return t;for(var r=0,i=n.length;r<i;++r){var s=n[r];(s.from==null||s.from<=e.ch)&&(s.to==null||s.to>=e.ch)&&t.push(s.marker||s)}return t}function pr(e,t,n){return typeof e=="number"&&(e=Gt($n(e))),e.gutterMarker={text:t,style:n},Bt=!0,e}function dr(e){typeof e=="number"&&(e=Gt($n(e))),e.gutterMarker=null,Bt=!0}function vr(e,t){var n=e,r=e;return typeof e=="number"?r=Gt($n(e)):n=S(e),n==null?null:t(r,n)?(_t.push({from:n,to:n+1}),r):null}function mr(e,t,n){return vr(e,function(e){if(e.className!=t||e.bgClassName!=n)return e.className=t,e.bgClassName=n,!0})}function gr(e,t){return vr(e,function(e,n){if(e.hidden!=t){e.hidden=t,Yt(e,t?0:1);var r=St.from.line,i=St.to.line;if(t&&(r==n||i==n)){var s=r==n?Xn({line:r,ch:0},r,0):St.from,o=i==n?Xn({line:i,ch:0},i,0):St.to;if(!o)return;Wn(s,o)}return Bt=!0}})}function yr(e){if(typeof e=="number"){if(!Kt(e))return null;var t=e;e=Gt(e);if(!e)return null}else{var t=S(e);if(t==null)return null}var n=e.gutterMarker;return{line:t,handle:e,text:e.text,markerText:n&&n.text,markerClass:n&&n.style,lineClass:e.className,bgClass:e.bgClassName}}function br(e){return lt.innerHTML="<pre><span>x</span></pre>",lt.firstChild.firstChild.firstChild.nodeValue=e,lt.firstChild.firstChild.offsetWidth||10}function wr(e,t){function i(e){return Sr(n,e).left}if(t<=0)return 0;var n=Gt(e),r=n.text,s=0,o=0,u=r.length,a,f=Math.min(u,Math.ceil(t/_r()));for(;;){var l=i(f);if(!(l<=t&&f<u)){a=l,u=f;break}f=Math.min(u,Math.ceil(f*1.2))}if(t>a)return u;f=Math.floor(u*.8),l=i(f),l<t&&(s=f,o=l);for(;;){if(u-s<=1)return a-t>t-o?s:u;var c=Math.ceil((s+u)/2),h=i(c);h>t?(u=c,a=h):(s=c,o=h)}}function Sr(e,t){if(t==0)return{top:0,left:0};var n=s.lineWrapping&&t<e.text.length&&$.test(e.text.slice(t-1,t+1));lt.innerHTML="<pre>"+e.getHTML(ur,t,Er,n)+"</pre>";var r=document.getElementById(Er),i=r.offsetTop,o=r.offsetLeft;if(F&&i==0&&o==0){var u=document.createElement("span");u.innerHTML="x",r.parentNode.insertBefore(u,r.nextSibling),i=u.offsetTop}return{top:i,left:o}}function xr(e,t){var n,r=Ar(),i=r*(T(bt,e.line)-(t?Ft:0));if(e.ch==0)n=0;else{var o=Sr(Gt(e.line),e.ch);n=o.left,s.lineWrapping&&(i+=Math.max(0,o.top))}return{x:n,y:i,yBot:i+r}}function Tr(e,t){function c(e){var t=Sr(u,e);if(f){var r=Math.round(t.top/n);return Math.max(0,t.left+(r-l)*z.clientWidth)}return t.left}t<0&&(t=0);var n=Ar(),r=_r(),i=Ft+Math.floor(t/n),o=x(bt,i);if(o>=bt.size)return{line:bt.size-1,ch:Gt(bt.size-1).text.length};var u=Gt(o),a=u.text,f=s.lineWrapping,l=f?i-T(bt,o):0;if(e<=0&&l==0)return{line:o,ch:0};var h=0,p=0,d=a.length,v,m=Math.min(d,Math.ceil((e+l*z.clientWidth*.9)/r));for(;;){var g=c(m);if(!(g<=e&&m<d)){v=g,d=m;break}m=Math.min(d,Math.ceil(m*1.2))}if(e>v)return{line:o,ch:d};m=Math.floor(d*.8),g=c(m),g<e&&(h=m,p=g);for(;;){if(d-h<=1)return{line:o,ch:v-e>e-p?h:d};var y=Math.ceil((h+d)/2),b=c(y);b>e?(d=y,v=b):(h=y,p=b)}}function Nr(e){var t=xr(e,!0),n=Q(rt);return{x:n.left+t.x,y:n.top+t.y,yBot:n.top+t.yBot}}function Ar(){if(Lr==null){Lr="<pre>";for(var e=0;e<49;++e)Lr+="x<br/>";Lr+="x</pre>"}var t=pt.clientHeight;return t==kr?Cr:(kr=t,lt.innerHTML=Lr,Cr=lt.firstChild.offsetHeight/50||1,lt.innerHTML="",Cr)}function _r(){return z.clientWidth==Mr?Or:(Mr=z.clientWidth,Or=br("x"))}function Dr(){return rt.offsetTop}function Pr(){return rt.offsetLeft}function Hr(e,t){var n=Q(z,!0),r,i;try{r=e.clientX,i=e.clientY}catch(e){return null}if(!t&&(r-n.left>z.clientWidth||i-n.top>z.clientHeight))return null;var s=Q(rt,!0);return Tr(r-s.left,i-s.top)}function Br(e){function s(){var e=ut(A.value).join("\n");e!=i&&Jr(Sn)(e,"end"),C.style.position="relative",A.style.cssText=r,I&&(z.scrollTop=n),Ht=!1,Mn(!0),kn()}var t=Hr(e),n=z.scrollTop;if(!t||window.opera)return;(Z(St.from,St.to)||et(t,St.from)||!et(t,St.to))&&Jr(Vn)(t.line,t.ch);var r=A.style.cssText;C.style.position="absolute",A.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(e.clientY-5)+"px; left: "+(e.clientX-5)+"px; z-index: 1000; background: white; "+"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",Ht=!0;var i=A.value=Nn();_n(),Y(A);if(j){O(e);var o=P(window,"mouseup",function(){o(),setTimeout(s,20)},!0)}else setTimeout(s,50)}function jr(){clearInterval(gt);var e=!0;ct.style.visibility="",gt=setInterval(function(){ct.style.visibility=(e=!e)?"":"hidden"},650)}function Ir(e){function v(e,t,n){if(!e.text)return;var r=e.styles,i=o?0:e.text.length-1,s;for(var a=o?0:r.length-2,f=o?r.length:-2;a!=f;a+=2*u){var l=r[a];if(r[a+1]!=null&&r[a+1]!=h){i+=u*l.length;continue}for(var c=o?0:l.length-1,v=o?l.length:-1;c!=v;c+=u,i+=u)if(i>=t&&i<n&&d.test(s=l.charAt(c))){var m=Fr[s];if(m.charAt(1)==">"==o)p.push(s);else{if(p.pop()!=m.charAt(0))return{pos:i,match:!1};if(!p.length)return{pos:i,match:!0}}}}}var t=St.inverted?St.from:St.to,n=Gt(t.line),r=t.ch-1,i=r>=0&&Fr[n.text.charAt(r)]||Fr[n.text.charAt(++r)];if(!i)return;var s=i.charAt(0),o=i.charAt(1)==">",u=o?1:-1,a=n.styles;for(var f=r+1,l=0,c=a.length;l<c;l+=2)if((f-=a[l].length)<=0){var h=a[l+1];break}var p=[n.text.charAt(r)],d=/[(){}[\]]/;for(var l=t.line,c=o?Math.min(l+100,bt.size):Math.max(-1,l-100);l!=c;l+=u){var n=Gt(l),m=l==t.line,g=v(n,m&&o?r+1:0,m&&!o?r:n.text.length);if(g)break}g||(g={pos:null,match:!1});var h=g.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",y=lr({line:t.line,ch:r},{line:t.line,ch:r+1},h),b=g.pos!=null&&lr({line:l,ch:g.pos},{line:l,ch:g.pos+1},h),w=Jr(function(){y.clear(),b&&b.clear()});e?setTimeout(w,800):Ut=w}function qr(e){var t,n;for(var r=e,i=e-40;r>i;--r){if(r==0)return 0;var o=Gt(r-1);if(o.stateAfter)return r;var u=o.indentation(s.tabSize);if(n==null||t>u)n=r-1,t=u}return n}function Rr(e){var t=qr(e),n=t&&Gt(t-1).stateAfter;return n?n=h(yt,n):n=p(yt),bt.iter(t,e,function(e){e.highlight(yt,n,s.tabSize),e.stateAfter=h(yt,n)}),t<e&&_t.push({from:t,to:e}),e<bt.size&&!Gt(e).stateAfter&&wt.push(e),n}function Ur(e,t){var n=Rr(e);bt.iter(e,t,function(e){e.highlight(yt,n,s.tabSize),e.stateAfter=h(yt,n)})}function zr(){var e=+(new Date)+s.workTime,t=wt.length;while(wt.length){if(!Gt(It).stateAfter)var n=It;else var n=wt.pop();if(n>=bt.size)continue;var r=qr(n),i=r&&Gt(r-1).stateAfter;i?i=h(yt,i):i=p(yt);var o=0,u=yt.compareStates,a=!1,f=r,l=!1;bt.iter(f,bt.size,function(t){var r=t.stateAfter;if(+(new Date)>e)return wt.push(f),Wr(s.workDelay),a&&_t.push({from:n,to:f+1}),l=!0;var c=t.highlight(yt,i,s.tabSize);c&&(a=!0),t.stateAfter=h(yt,i);var p=null;if(u){var d=r&&u(r,i);d!=B&&(p=!!d)}p==null&&(c!==!1||!r?o=0:++o>3&&(!yt.indent||yt.indent(r,"")==yt.indent(i,""))&&(p=!0));if(p)return!0;++f});if(l)return;a&&_t.push({from:n,to:f+1})}t&&s.onHighlightComplete&&s.onHighlightComplete(Qt)}function Wr(e){if(!wt.length)return;mt.set(e,Jr(zr))}function Xr(){Ot=Mt=Dt=null,_t=[],Pt=!1,jt=[]}function Vr(){var e=!1,t;Pt&&(e=!Pn()),_t.length?t=jn(_t,!0):(Pt&&Rn(),Bt&&qn()),e&&Pn(),Pt&&(Dn(),jr()),Et&&!Ht&&(Ot===!0||Ot!==!1&&Pt)&&Mn(Mt),Pt&&s.matchBrackets&&setTimeout(Jr(function(){Ut&&(Ut(),Ut=null),Z(St.from,St.to)&&Ir(!1)}),20);var n=Dt,r=jt;Pt&&s.onCursorActivity&&s.onCursorActivity(Qt),n&&s.onChange&&Qt&&s.onChange(Qt,n);for(var i=0;i<r.length;++i)r[i](Qt);t&&s.onUpdate&&s.onUpdate(Qt)}function Jr(e){return function(){$r++||Xr();try{var t=e.apply(this,arguments)}finally{--$r||Vr()}return t}}function Kr(e){Vt.startCompound();try{return e()}finally{Vt.endCompound()}}var s={},a=e.defaults;for(var d in a)a.hasOwnProperty(d)&&(s[d]=(i&&i.hasOwnProperty(d)?i:a)[d]);var y=document.createElement("div");y.className="CodeMirror"+(s.lineWrapping?" CodeMirror-wrap":""),y.innerHTML='<div style="overflow: hidden; position: relative; width: 3px; height: 0px;"><textarea style="position: absolute; padding: 0; width: 1px; height: 1em" wrap="off" autocorrect="off" autocapitalize="off"></textarea></div><div class="CodeMirror-scroll" tabindex="-1"><div style="position: relative"><div style="position: relative"><div class="CodeMirror-gutter"><div class="CodeMirror-gutter-text"></div></div><div class="CodeMirror-lines"><div style="position: relative; z-index: 0"><div style="position: absolute; width: 100%; height: 0; overflow: hidden; visibility: hidden;"></div><pre class="CodeMirror-cursor">&#160;</pre><div style="position: relative; z-index: -1"></div><div></div></div></div></div></div></div>',r.appendChild?r.appendChild(y):r(y);var C=y.firstChild,A=C.firstChild,z=y.lastChild,V=z.firstChild,J=V.firstChild,K=J.firstChild,nt=K.firstChild,rt=K.nextSibling.firstChild,lt=rt.firstChild,ct=lt.nextSibling,ht=ct.nextSibling,pt=ht.nextSibling;ar(),t&&(A.style.width="0px"),R||(rt.draggable=!0),rt.style.outline="none",s.tabindex!=null&&(A.tabIndex=s.tabindex),s.autofocus&&_n(),!s.gutter&&!s.lineNumbers&&(K.style.display="none"),W&&(C.style.height="1px",C.style.position="absolute");try{br("x")}catch(dt){throw dt.message.match(/runtime/i)&&(dt=new Error("A CodeMirror inside a P-style element does not work in Internet Explorer. (innerHTML bug)")),dt}var vt=new H,mt=new H,gt,yt,bt=new w([new b([new g("")])]),wt,Et;ir();var St={from:{line:0,ch:0},to:{line:0,ch:0},inverted:!1},xt,Tt,Nt,Ct=0,kt,Lt=!1,At=!1,Ot,Mt,_t,Dt,Pt,Ht,Bt,jt,Ft=0,It=0,qt=0,Rt=0,Ut,zt="",Wt,Xt={};Jr(function(){Zt(s.value||""),Ot=!1})();var Vt=new N;P(z,"mousedown",Jr(tn)),P(z,"dblclick",Jr(nn)),P(rt,"selectstart",L),j||P(z,"contextmenu",Br),P(z,"scroll",function(){Ct=z.scrollTop,jn([]),s.fixedGutter&&(K.style.left=z.scrollLeft+"px"),s.onScroll&&s.onScroll(Qt)}),P(window,"resize",function(){jn(!0)}),P(A,"keyup",Jr(pn)),P(A,"input",Ln),P(A,"keydown",Jr(cn)),P(A,"keypress",Jr(hn)),P(A,"focus",dn),P(A,"blur",vn);if(s.dragDrop){P(rt,"dragstart",sn);function $t(e){if(s.onDragEvent&&s.onDragEvent(Qt,k(e)))return;O(e)}P(z,"dragenter",$t),P(z,"dragover",$t),P(z,"drop",Jr(rn))}P(z,"paste",function(){_n(),Ln()}),P(A,"paste",Ln),P(A,"cut",Jr(function(){s.readOnly||Sn("")})),W&&P(V,"mouseup",function(){document.activeElement==A&&A.blur(),_n()});var Jt;try{Jt=document.activeElement==A}catch(dt){}Jt||s.autofocus?setTimeout(dn,20):vn();var Qt=y.CodeMirror={getValue:en,setValue:Jr(Zt),getSelection:Nn,replaceSelection:Jr(Sn),focus:function(){window.focus(),_n(),dn(),Ln()},setOption:function(e,t){var n=s[e];s[e]=t,e=="mode"||e=="indentUnit"?ir():e=="readOnly"&&t=="nocursor"?(vn(),A.blur()):e=="readOnly"&&!t?Mn(!0):e=="theme"?ar():e=="lineWrapping"&&n!=t?Jr(or)():e=="tabSize"&&jn(!0);if(e=="lineNumbers"||e=="gutter"||e=="firstLineNumber"||e=="theme")sr(),jn(!0)},getOption:function(e){return s[e]},undo:Jr(yn),redo:Jr(bn),indentLine:Jr(function(e,t){typeof t!="string"&&(t==null?t=s.smartIndent?"smart":"prev":t=t?"add":"subtract"),Kt(e)&&rr(e,t)}),indentSelection:Jr(nr),historySize:function(){return{undo:Vt.done.length,redo:Vt.undone.length}},clearHistory:function(){Vt=new N},matchBrackets:Jr(function(){Ir(!0)}),getTokenAt:Jr(function(e){return e=Jn(e),Gt(e.line).getTokenAt(yt,Rr(e.line),e.ch)}),getStateAfter:function(e){return e=$n(e==null?bt.size-1:e),Rr(e+1)},cursorCoords:function(e,t){return e==null&&(e=St.inverted),this.charCoords(e?St.from:St.to,t)},charCoords:function(e,t){return e=Jn(e),t=="local"?xr(e,!1):t=="div"?xr(e,!0):Nr(e)},coordsChar:function(e){var t=Q(rt);return Tr(e.x-t.left,e.y-t.top)},markText:Jr(lr),setBookmark:cr,findMarksAt:hr,setMarker:Jr(pr),clearMarker:Jr(dr),setLineClass:Jr(mr),hideLine:Jr(function(e){return gr(e,!0)}),showLine:Jr(function(e){return gr(e,!1)}),onDeleteLine:function(e,t){if(typeof e=="number"){if(!Kt(e))return null;e=Gt(e)}return(e.handlers||(e.handlers=[])).push(t),e},lineInfo:yr,addWidget:function(e,t,n,r,i){e=xr(Jn(e));var s=e.yBot,o=e.x;t.style.position="absolute",V.appendChild(t);if(r=="over")s=e.y;else if(r=="near"){var u=Math.max(z.offsetHeight,bt.height*Ar()),a=Math.max(V.clientWidth,rt.clientWidth)-Pr();e.yBot+t.offsetHeight>u&&e.y>t.offsetHeight&&(s=e.y-t.offsetHeight),o+t.offsetWidth>a&&(o=a-t.offsetWidth)}t.style.top=s+Dr()+"px",t.style.left=t.style.right="",i=="right"?(o=V.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?o=0:i=="middle"&&(o=(V.clientWidth-t.offsetWidth)/2),t.style.left=o+Pr()+"px"),n&&Hn(o,s,o+t.offsetWidth,s+t.offsetHeight)},lineCount:function(){return bt.size},clipPos:Jn,getCursor:function(e){return e==null&&(e=St.inverted),tt(e?St.from:St.to)},somethingSelected:function(){return!Z(St.from,St.to)},setCursor:Jr(function(e,t,n){t==null&&typeof e.line=="number"?Vn(e.line,e.ch,n):Vn(e,t,n)}),setSelection:Jr(function(e,t,n){(n?zn:Wn)(Jn(e),Jn(t||e))}),getLine:function(e){if(Kt(e))return Gt(e).text},getLineHandle:function(e){if(Kt(e))return Gt(e)},setLine:Jr(function(e,t){Kt(e)&&En(t,{line:e,ch:0},{line:e,ch:Gt(e).text.length})}),removeLine:Jr(function(e){Kt(e)&&En("",{line:e,ch:0},Jn({line:e+1,ch:0}))}),replaceRange:Jr(En),getRange:function(e,t){return Tn(Jn(e),Jn(t))},triggerOnKeyDown:Jr(cn),execCommand:function(e){return u[e](Qt)},moveH:Jr(Qn),deleteH:Jr(Gn),moveV:Jr(Zn),toggleOverwrite:function(){Lt?(Lt=!1,ct.className=ct.className.replace(" CodeMirror-overwrite","")):(Lt=!0,ct.className+=" CodeMirror-overwrite")},posFromIndex:function(e){var t=0,n;return bt.iter(0,bt.size,function(r){var i=r.text.length+1;if(i>e)return n=e,!0;e-=i,++t}),Jn({line:t,ch:n})},indexFromPos:function(e){if(e.line<0||e.ch<0)return 0;var t=e.ch;return bt.iter(0,e.line,function(e){t+=e.text.length+1}),t},scrollTo:function(e,t){e!=null&&(z.scrollLeft=e),t!=null&&(z.scrollTop=t),jn([])},operation:function(e){return Jr(e)()},compoundChange:function(e){return Kr(e)},refresh:function(){jn(!0),z.scrollHeight>Ct&&(z.scrollTop=Ct)},getInputField:function(){return A},getWrapperElement:function(){return y},getScrollerElement:function(){return z},getGutterElement:function(){return K}},fn=null,ln,Cn=!1,An="",Yn=null;fr.prototype.clear=Jr(function(){var e=Infinity,t=-Infinity;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;if(!s||!i.parent)continue;var o=S(i);e=Math.min(e,o),t=Math.max(t,o);for(var u=0;u<s.length;++u)s[u].marker==this&&s.splice(u--,1)}e!=Infinity&&_t.push({from:e,to:t+1})}),fr.prototype.find=function(){var e,t;for(var n=0,r=this.set.length;n<r;++n){var i=this.set[n],s=i.marked;for(var o=0;o<s.length;++o){var u=s[o];if(u.marker==this)if(u.from!=null||u.to!=null){var a=S(i);a!=null&&(u.from!=null&&(e={line:a,ch:u.from}),u.to!=null&&(t={line:a,ch:u.to}))}}}return{from:e,to:t}};var Er="CodeMirror-temp-"+Math.floor(Math.random()*16777215).toString(16),Cr,kr,Lr,Or,Mr=0,Fr={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},$r=0;for(var Qr in o)o.propertyIsEnumerable(Qr)&&!Qt.propertyIsEnumerable(Qr)&&(Qt[Qr]=o[Qr]);return Qt}function f(e){return typeof e=="string"?a[e]:e}function l(e,t,n,r,i){function s(t){t=f(t);var n=t[e];if(n!=null&&r(n))return!0;if(t.nofallthrough)return i&&i(),!0;var o=t.fallthrough;if(o==null)return!1;if(Object.prototype.toString.call(o)!="[object Array]")return s(o);for(var u=0,a=o.length;u<a;++u)if(s(o[u]))return!0;return!1}return t&&s(t)?!0:s(n)}function c(e){var t=ft[D(e,"keyCode")];return t=="Ctrl"||t=="Alt"||t=="Shift"||t=="Mod"}function h(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function p(e,t,n){return e.startState?e.startState(t,n):!0}function d(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8}function v(e,t,n,r){this.from=e,this.to=t,this.style=n,this.marker=r}function m(e){this.from=e,this.to=e,this.line=null}function g(e,t){this.styles=t||[e,null],this.text=e,this.height=1,this.marked=this.gutterMarker=this.className=this.bgClassName=this.handlers=null,this.stateAfter=this.parent=this.hidden=null}function y(e,t,n,r){for(var i=0,s=0,o=0;s<t;i+=2){var u=n[i],a=s+u.length;o==0?(a>e&&r.push(u.slice(e-s,Math.min(u.length,t-s)),n[i+1]),a>=e&&(o=1)):o==1&&(a>t?r.push(u.slice(0,t-s),n[i+1]):r.push(u,n[i+1])),s=a}}function b(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;t<n;++t)e[t].parent=this,r+=e[t].height;this.height=r}function w(e){this.children=e;var t=0,n=0;for(var r=0,i=e.length;r<i;++r){var s=e[r];t+=s.chunkSize(),n+=s.height,s.parent=this}this.size=t,this.height=n,this.parent=null}function E(e,t){while(!e.lines)for(var n=0;;++n){var r=e.children[n],i=r.chunkSize();if(t<i){e=r;break}t-=i}return e.lines[t]}function S(e){if(e.parent==null)return null;var t=e.parent,n=st(t.lines,e);for(var r=t.parent;r;t=r,r=r.parent)for(var i=0,s=r.children.length;;++i){if(r.children[i]==t)break;n+=r.children[i].chunkSize()}return n}function x(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.height;if(t<o){e=s;continue e}t-=o,n+=s.chunkSize()}return n}while(!e.lines);for(var r=0,i=e.lines.length;r<i;++r){var u=e.lines[r],a=u.height;if(t<a)break;t-=a}return n+r}function T(e,t){var n=0;e:do{for(var r=0,i=e.children.length;r<i;++r){var s=e.children[r],o=s.chunkSize();if(t<o){e=s;continue e}t-=o,n+=s.height}return n}while(!e.lines);for(var r=0;r<t;++r)n+=e.lines[r].height;return n}function N(){this.time=0,this.done=[],this.undone=[],this.compound=0,this.closed=!1}function C(){O(this)}function k(e){return e.stop||(e.stop=C),e}function L(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function A(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function O(e){L(e),A(e)}function M(e){return e.target||e.srcElement}function _(e){if(e.which)return e.which;if(e.button&1)return 1;if(e.button&2)return 3;if(e.button&4)return 2}function D(e,t){var n=e.override&&e.override.hasOwnProperty(t);return n?e.override[t]:e[t]}function P(e,t,n,r){if(typeof e.addEventListener=="function"){e.addEventListener(t,n,!1);if(r)return function(){e.removeEventListener(t,n,!1)}}else{var i=function(e){n(e||window.event)};e.attachEvent("on"+t,i);if(r)return function(){e.detachEvent("on"+t,i)}}}function H(){this.id=null}function J(e,t,n){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var r=0,i=0;r<t;++r)e.charAt(r)==" "?i+=n-i%n:++i;return i}function K(e){return e.currentStyle?e.currentStyle:window.getComputedStyle(e,null)}function Q(e,t){var n=e.ownerDocument.body,r=0,i=0,s=!1;for(var o=e;o;o=o.offsetParent){var u=o.offsetLeft,a=o.offsetTop;o==n?(r+=Math.abs(u),i+=Math.abs(a)):(r+=u,i+=a),t&&K(o).position=="fixed"&&(s=!0)}var f=t&&!s?null:n;for(var o=e.parentNode;o!=f;o=o.parentNode)o.scrollLeft!=null&&(r-=o.scrollLeft,i-=o.scrollTop);return{left:r,top:i}}function G(e){return e.textContent||e.innerText||e.nodeValue||""}function Y(e){t?(e.selectionStart=0,e.selectionEnd=e.value.length):e.select()}function Z(e,t){return e.line==t.line&&e.ch==t.ch}function et(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function tt(e){return{line:e.line,ch:e.ch}}function rt(e){return nt.textContent=e,nt.innerHTML}function it(e,t){if(!t)return 0;if(!e)return t.length;for(var n=e.length,r=t.length;n>=0&&r>=0;--n,--r)if(e.charAt(n)!=t.charAt(r))break;return r+1}function st(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;++n)if(e[n]==t)return n;return-1}function ot(e){return/\w/.test(e)||e.toUpperCase()!=e.toLowerCase()}e.defaults={value:"",mode:null,theme:"default",indentUnit:2,indentWithTabs:!1,smartIndent:!0,tabSize:4,keyMap:"default",extraKeys:null,electricChars:!0,autoClearEmptyLines:!1,onKeyEvent:null,onDragEvent:null,lineWrapping:!1,lineNumbers:!1,gutter:!1,fixedGutter:!1,firstLineNumber:1,readOnly:!1,dragDrop:!0,onChange:null,onCursorActivity:null,onGutterClick:null,onHighlightComplete:null,onUpdate:null,onFocus:null,onBlur:null,onScroll:null,matchBrackets:!1,workTime:100,workDelay:200,pollInterval:100,undoDepth:40,tabindex:null,autofocus:null};var t=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),n=t||/Mac/.test(navigator.platform),r=/Win/.test(navigator.platform),i=e.modes={},s=e.mimeModes={};e.defineMode=function(t,n){!e.defaults.mode&&t!="null"&&(e.defaults.mode=t);if(arguments.length>2){n.dependencies=[];for(var r=2;r<arguments.length;++r)n.dependencies.push(arguments[r])}i[t]=n},e.defineMIME=function(e,t){s[e]=t},e.resolveMode=function(t){if(typeof t=="string"&&s.hasOwnProperty(t))t=s[t];else if(typeof t=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return typeof t=="string"?{name:t}:t||{name:"null"}},e.getMode=function(t,n){var n=e.resolveMode(n),r=i[n.name];return r?r(t,n):e.getMode(t,"text/plain")},e.listModes=function(){var e=[];for(var t in i)i.propertyIsEnumerable(t)&&e.push(t);return e},e.listMIMEs=function(){var e=[];for(var t in s)s.propertyIsEnumerable(t)&&e.push({mime:t,mode:s[t]});return e};var o=e.extensions={};e.defineExtension=function(e,t){o[e]=t};var u=e.commands={selectAll:function(e){e.setSelection({line:0,ch:0},{line:e.lineCount()-1})},killLine:function(e){var t=e.getCursor(!0),n=e.getCursor(!1),r=!Z(t,n);!r&&e.getLine(t.line).length==t.ch?e.replaceRange("",t,{line:t.line+1,ch:0}):e.replaceRange("",t,r?n:{line:t.line})},deleteLine:function(e){var t=e.getCursor().line;e.replaceRange("",{line:t,ch:0},{line:t})},undo:function(e){e.undo()},redo:function(e){e.redo()},goDocStart:function(e){e.setCursor(0,0,!0)},goDocEnd:function(e){e.setSelection({line:e.lineCount()-1},null,!0)},goLineStart:function(e){e.setCursor(e.getCursor().line,0,!0)},goLineStartSmart:function(e){var t=e.getCursor(),n=e.getLine(t.line),r=Math.max(0,n.search(/\S/));e.setCursor(t.line,t.ch<=r&&t.ch?0:r,!0)},goLineEnd:function(e){e.setSelection({line:e.getCursor().line},null,!0)},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goWordRight:function(e){e.moveH(1,"word")},delCharLeft:function(e){e.deleteH(-1,"char")},delCharRight:function(e){e.deleteH(1,"char")},delWordLeft:function(e){e.deleteH(-1,"word")},delWordRight:function(e){e.deleteH(1,"word")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ","end")},transposeChars:function(e){var t=e.getCursor(),n=e.getLine(t.line);t.ch>0&&t.ch<n.length-1&&e.replaceRange(n.charAt(t.ch)+n.charAt(t.ch-1),{line:t.line,ch:t.ch-1},{line:t.line,ch:t.ch+1})},newlineAndIndent:function(e){e.replaceSelection("\n","end"),e.indentLine(e.getCursor().line)},toggleOverwrite:function(e){e.toggleOverwrite()}},a=e.keyMap={};a.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharRight",Backspace:"delCharLeft",Tab:"insertTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},a.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordLeft","Ctrl-Delete":"delWordRight","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},a.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordLeft","Ctrl-Alt-Backspace":"delWordRight","Alt-Delete":"delWordRight","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]},a["default"]=n?a.macDefault:a.pcDefault,a.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageUp","Shift-Ctrl-V":"goPageDown","Ctrl-D":"delCharRight","Ctrl-H":"delCharLeft","Alt-D":"delWordRight","Alt-Backspace":"delWordLeft","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},e.fromTextArea=function(t,n){function r(){t.value=u.getValue()}n||(n={}),n.value=t.value,!n.tabindex&&t.tabindex&&(n.tabindex=t.tabindex),n.autofocus==null&&t.getAttribute("autofocus")!=null&&(n.autofocus=!0);if(t.form){var i=P(t.form,"submit",r,!0);if(typeof t.form.submit=="function"){var s=t.form.submit;function o(){r(),t.form.submit=s,t.form.submit(),t.form.submit=o}t.form.submit=o}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},n);return u.save=r,u.getTextArea=function(){return t},u.toTextArea=function(){r(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(i(),typeof t.form.submit=="function"&&(t.form.submit=s))},u},e.copyState=h,e.startState=p,d.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if(typeof e=="string")var n=t==e;else var n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){var t=this.pos;while(this.eat(e));return this.pos>t},eatSpace:function(){var e=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos)))++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){return J(this.string,this.start,this.tabSize)},indentation:function(){return J(this.string,null,this.tabSize)},match:function(e,t,n){if(typeof e!="string"){var i=this.string.slice(this.pos).match(e);return i&&t!==!1&&(this.pos+=i[0].length),i}function r(e){return n?e.toLowerCase():e}if(r(this.string).indexOf(r(e),this.pos)==this.pos)return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},e.StringStream=d,v.prototype={attach:function(e){this.marker.set.push(e)},detach:function(e){var t=st(this.marker.set,e);t>-1&&this.marker.set.splice(t,1)},split:function(e,t){if(this.to<=e&&this.to!=null)return null;var n=this.from<e||this.from==null?null:this.from-e+t,r=this.to==null?null:this.to-e+t;return new v(n,r,this.style,this.marker)},dup:function(){return new v(null,null,this.style,this.marker)},clipTo:function(e,t,n,r,i){e&&r>this.from&&(r<this.to||this.to==null)?this.from=null:this.from!=null&&this.from>=t&&(this.from=Math.max(r,this.from)+i),n&&(t<this.to||this.to==null)&&(t>this.from||this.from==null)?this.to=null:this.to!=null&&this.to>t&&(this.to=r<this.to?this.to+i:t)},isDead:function(){return this.from!=null&&this.to!=null&&this.from>=this.to},sameSet:function(e){return this.marker==e.marker}},m.prototype={attach:function(e){this.line=e},detach:function(e){this.line==e&&(this.line=null)},split:function(e,t){if(e<this.from)return this.from=this.to=this.from-e+t,this},isDead:function(){return this.from>this.to},clipTo:function(e,t,n,r,i){(e||t<this.from)&&(n||r>this.to)?(this.from=0,this.to=-1):this.from>t&&(this.from=this.to=Math.max(r,this.from)+i)},sameSet:function(e){return!1},find:function(){return!this.line||!this.line.parent?null:{line:S(this.line),ch:this.from}},clear:function(){if(this.line){var e=st(this.line.marked,this);e!=-1&&this.line.marked.splice(e,1),this.line=null}}},g.inheritMarks=function(e,t){var n=new g(e),r=t&&t.marked;if(r)for(var i=0;i<r.length;++i)if(r[i].to==null&&r[i].style){var s=n.marked||(n.marked=[]),o=r[i],u=o.dup();s.push(u),u.attach(n)}return n},g.prototype={replace:function(e,t,n){var r=[],i=this.marked,s=t==null?this.text.length:t;y(0,e,this.styles,r),n&&r.push(n,null),y(s,this.text.length,this.styles,r),this.styles=r,this.text=this.text.slice(0,e)+n+this.text.slice(s),this.stateAfter=null;if(i){var o=n.length-(s-e);for(var u=0;u<i.length;++u){var a=i[u];a.clipTo(e==null,e||0,t==null,s,o),a.isDead()&&(a.detach(this),i.splice(u--,1))}}},split:function(e,t){var n=[t,null],r=this.marked;y(e,this.text.length,this.styles,n);var i=new g(t+this.text.slice(e),n);if(r)for(var s=0;s<r.length;++s){var o=r[s],u=o.split(e,t.length);u&&(i.marked||(i.marked=[]),i.marked.push(u),u.attach(i),u==o&&r.splice(s--,1))}return i},append:function(e){var t=this.text.length,n=e.marked,r=this.marked;this.text+=e.text,y(0,e.text.length,e.styles,this.styles);if(r)for(var i=0;i<r.length;++i)r[i].to==null&&(r[i].to=t);if(n&&n.length){r||(this.marked=r=[]);e:for(var i=0;i<n.length;++i){var s=n[i];if(!s.from)for(var o=0;o<r.length;++o){var u=r[o];if(u.to==t&&u.sameSet(s)){u.to=s.to==null?null:s.to+t,u.isDead()&&(u.detach(this),n.splice(i--,1));continue e}}r.push(s),s.attach(this),s.from+=t,s.to!=null&&(s.to+=t)}}},fixMarkEnds:function(e){var t=this.marked,n=e.marked;if(!t)return;for(var r=0;r<t.length;++r){var i=t[r],s=i.to==null;if(s&&n)for(var o=0;o<n.length;++o)if(n[o].sameSet(i)){s=!1;break}s&&(i.to=this.text.length)}},fixMarkStarts:function(){var e=this.marked;if(!e)return;for(var t=0;t<e.length;++t)e[t].from==null&&(e[t].from=0)},addMark:function(e){e.attach(this),this.marked==null&&(this.marked=[]),this.marked.push(e),this.marked.sort(function(e,t){return(e.from||0)-(t.from||0)})},highlight:function(e,t,n){var r=new d(this.text,n),i=this.styles,s=0,o=!1,u=i[0],a;this.text==""&&e.blankLine&&e.blankLine(t);while(!r.eol()){var f=e.token(r,t),l=this.text.slice(r.start,r.pos);r.start=r.pos,s&&i[s-1]==f?i[s-2]+=l:l&&(!o&&(i[s+1]!=f||s&&i[s-2]!=a)&&(o=!0),i[s++]=l,i[s++]=f,a=u,u=i[s]);if(r.pos>5e3){i[s++]=this.text.slice(r.pos),i[s++]=null;break}}return i.length!=s&&(i.length=s,o=!0),s&&i[s-2]!=a&&(o=!0),o||(i.length<5&&this.text.length<10?null:!1)},getTokenAt:function(e,t,n){var r=this.text,i=new d(r);while(i.pos<n&&!i.eol()){i.start=i.pos;var s=e.token(i,t)}return{start:i.start,end:i.pos,string:i.current(),className:s||null,state:t}},indentation:function(e){return J(this.text,null,e)},getHTML:function(e,t,n,r){function u(t,n){if(!t)return;s&&F&&t.charAt(0)==" "&&(t=" "+t.slice(1)),s=!1;if(t.indexOf(" ")==-1){o+=t.length;var r=rt(t)}else{var r="";for(var u=0;;){var a=t.indexOf(" ",u);if(a==-1){r+=rt(t.slice(u)),o+=t.length-u;break}o+=a-u;var f=e(o);r+=rt(t.slice(u,a))+f.html,o+=f.width,u=a+1}}n?i.push('<span class="',n,'">',r,"</span>"):i.push(r)}function v(e){return e?"cm-"+e.replace(/ +/g," cm-"):null}var i=[],s=!0,o=0,a=u;if(t!=null){var f=0,l='<span id="'+n+'">';a=function(e,n){var s=e.length;t>=f&&t<f+s?(t>f&&(u(e.slice(0,t-f),n),r&&i.push("<wbr>")),i.push(l),u(e.slice(t-f),n),i.push("</span>"),t--,f+=s):(f+=s,u(e,n),f==t&&f==d?i.push(l+"</span>"):f>t+10&&/\s/.test(e)&&(a=function(){}))}}var c=this.styles,h=this.text,p=this.marked,d=h.length;if(!h&&t==null)a(" ");else if(!p||!p.length)for(var m=0,g=0;g<d;m+=2){var y=c[m],b=c[m+1],w=y.length;g+w>d&&(y=y.slice(0,d-g)),g+=w,a(y,v(b))}else{var E=0,m=0,S="",b,x=0,T=p[0].from||0,N=[],C=0;function k(){var e;while(C<p.length&&((e=p[C]).from==E||e.from==null))e.style!=null&&N.push(e),++C;T=C<p.length?p[C].from:Infinity;for(var t=0;t<N.length;++t){var n=N[t].to||Infinity;n==E?N.splice(t--,1):T=Math.min(n,T)}}var L=0;while(E<d){T==E&&k();var A=Math.min(d,T);for(;;){if(S){var O=E+S.length,M=b;for(var _=0;_<N.length;++_)M=(M?M+" ":"")+N[_].style;a(O>A?S.slice(0,A-E):S,M);if(O>=A){S=S.slice(A-E),E=A;break}E=O}S=c[m++],b=v(c[m++])}}}return i.join("")},cleanUp:function(){this.parent=null;if(this.marked)for(var e=0,t=this.marked.length;e<t;++e)this.marked[e].detach(this)}},b.prototype={chunkSize:function(){return this.lines.length},remove:function(e,t,n){for(var r=e,i=e+t;r<i;++r){var s=this.lines[r];this.height-=s.height,s.cleanUp();if(s.handlers)for(var o=0;o<s.handlers.length;++o)n.push(s.handlers[o])}this.lines.splice(e,t)},collapse:function(e){e.splice.apply(e,[e.length,0].concat(this.lines))},insertHeight:function(e,t,n){this.height+=n,F?this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e)):this.lines.splice.apply(this.lines,[e,0].concat(t));for(var r=0,i=t.length;r<i;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},w.prototype={chunkSize:function(){return this.size},remove:function(e,t,n){this.size-=t;for(var r=0;r<this.children.length;++r){var i=this.children[r],s=i.chunkSize();if(e<s){var o=Math.min(t,s-e),u=i.height;i.remove(e,o,n),this.height-=u-i.height,s==o&&(this.children.splice(r--,1),i.parent=null);if((t-=o)==0)break;e=0}else e-=s}if(this.size-t<25){var a=[];this.collapse(a),this.children=[new b(a)],this.children[0].parent=this}},collapse:function(e){for(var t=0,n=this.children.length;t<n;++t)this.children[t].collapse(e)},insert:function(e,t){var n=0;for(var r=0,i=t.length;r<i;++r)n+=t[r].height;this.insertHeight(e,t,n)},insertHeight:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<=o){s.insertHeight(e,t,n);if(s.lines&&s.lines.length>50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new b(u);s.height-=a.height,this.children.splice(r+1,0,a),a.parent=this}this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(this.children.length<=10)return;var e=this;do{var t=e.children.splice(e.children.length-5,5),n=new w(t);if(!e.parent){var r=new w(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=st(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iter:function(e,t,n){this.iterN(e,t-e,n)},iterN:function(e,t,n){for(var r=0,i=this.children.length;r<i;++r){var s=this.children[r],o=s.chunkSize();if(e<o){var u=Math.min(t,o-e);if(s.iterN(e,u,n))return!0;if((t-=u)==0)break;e=0}else e-=o}}},N.prototype={addChange:function(e,t,n){this.undone.length=0;var r=+(new Date),i=this.done[this.done.length-1],s=i&&i[i.length-1],o=r-this.time;if(this.compound&&i&&!this.closed)i.push({start:e,added:t,old:n});else if(o>400||!s||this.closed||s.start>e+n.length||s.start+s.added<e)this.done.push([{start:e,added:t,old:n}]),this.closed=!1;else{var u=Math.max(0,s.start-e),a=Math.max(0,e+n.length-(s.start+s.added));for(var f=u;f>0;--f)s.old.unshift(n[f-1]);for(var f=a;f>0;--f)s.old.push(n[n.length-f]);u&&(s.start=e),s.added+=t-(n.length-u-a)}this.time=r},startCompound:function(){this.compound++||(this.closed=!0)},endCompound:function(){--this.compound||(this.closed=!0)}},e.e_stop=O,e.e_preventDefault=L,e.e_stopPropagation=A,e.connect=P,H.prototype={set:function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)}};var B=e.Pass={toString:function(){return"CodeMirror.Pass"}},j=/gecko\/\d{7}/i.test(navigator.userAgent),F=/MSIE \d/.test(navigator.userAgent),I=/MSIE [1-8]\b/.test(navigator.userAgent),q=F&&document.documentMode==5,R=/WebKit\//.test(navigator.userAgent),U=/Chrome\//.test(navigator.userAgent),z=/Apple Computer/.test(navigator.vendor),W=/KHTML\//.test(navigator.userAgent),X=function(){if(I)return!1;var e=document.createElement("div");return"draggable"in e||"dragDrop"in e}(),V=function(){var e=document.createElement("textarea");return e.value="foo\nbar",e.value.indexOf("\r")>-1?"\r\n":"\n"}(),$=/^$/;j?$=/$'/:z?$=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:U&&($=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/),document.documentElement.getBoundingClientRect!=null&&(Q=function(e,t){try{var n=e.getBoundingClientRect();n={top:n.top,left:n.left}}catch(r){n={top:0,left:0}}if(!t)if(window.pageYOffset==null){var i=document.documentElement||document.body.parentNode;i.scrollTop==null&&(i=document.body),n.top+=i.scrollTop,n.left+=i.scrollLeft}else n.top+=window.pageYOffset,n.left+=window.pageXOffset;return n});var nt=document.createElement("pre");rt("a")=="\na"?rt=function(e){return nt.textContent=e,nt.innerHTML.slice(1)}:rt(" ")!=" "&&(rt=function(e){return nt.innerHTML="",nt.appendChild(document.createTextNode(e)),nt.innerHTML}),e.htmlEscape=rt;var ut="\n\nb".split(/\n/).length!=3?function(e){var t=0,n,r=[];while((n=e.indexOf("\n",t))>-1)r.push(e.slice(t,e.charAt(n-1)=="\r"?n-1:n)),t=n+1;return r.push(e.slice(t)),r}:function(e){return e.split(/\r?\n/)};e.splitLines=ut;var at=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(n){}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0};e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ft={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};return e.keyNames=ft,function(){for(var e=0;e<10;e++)ft[e+48]=String(e);for(var e=65;e<=90;e++)ft[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)ft[e+111]=ft[e+63235]="F"+e}(),e}();define("CodeMirror",function(e){return function(){return e.CodeMirror}}(this)),CodeMirror.defineMode("mysql",function(e){function r(e){return new RegExp("^(?:"+e.join("|")+")$","i")}function u(e,t){var r=e.next();n=null;if(r=="$"||r=="?")return e.match(/^[\w\d]*/),"variable-2";if(r=="<"&&!e.match(/^[\s\u00a0=]/,!1))return e.match(/^[^\s\u00a0>]*>?/),"atom";if(r=='"'||r=="'")return t.tokenize=a(r),t.tokenize(e,t);if(r=="`")return t.tokenize=f(r),t.tokenize(e,t);if(/[{}\(\),\.;\[\]]/.test(r))return n=r,null;if(r!="-"){if(o.test(r))return e.eatWhile(o),null;if(r==":")return e.eatWhile(/[\w\d\._\-]/),"atom";e.eatWhile(/[_\w\d]/);if(e.eat(":"))return e.eatWhile(/[\w\d_\-]/),"atom";var u=e.current(),l;return i.test(u)?null:s.test(u)?"keyword":"variable"}ch2=e.next();if(ch2=="-")return e.skipToEnd(),"comment"}function a(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"string"}}function f(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=u;break}r=!r&&i=="\\"}return"variable-2"}}function l(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}}function c(e){e.indent=e.context.indent,e.context=e.context.prev}var t=e.indentUnit,n,i=r(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),s=r(["ACCESSIBLE","ALTER","AS","BEFORE","BINARY","BY","CASE","CHARACTER","COLUMN","CONTINUE","CROSS","CURRENT_TIMESTAMP","DATABASE","DAY_MICROSECOND","DEC","DEFAULT","DESC","DISTINCT","DOUBLE","EACH","ENCLOSED","EXIT","FETCH","FLOAT8","FOREIGN","GRANT","HIGH_PRIORITY","HOUR_SECOND","IN","INNER","INSERT","INT2","INT8","INTO","JOIN","KILL","LEFT","LINEAR","LOCALTIME","LONG","LOOP","MATCH","MEDIUMTEXT","MINUTE_SECOND","NATURAL","NULL","OPTIMIZE","OR","OUTER","PRIMARY","RANGE","READ_WRITE","REGEXP","REPEAT","RESTRICT","RIGHT","SCHEMAS","SENSITIVE","SHOW","SPECIFIC","SQLSTATE","SQL_CALC_FOUND_ROWS","STARTING","TERMINATED","TINYINT","TRAILING","UNDO","UNLOCK","USAGE","UTC_DATE","VALUES","VARCHARACTER","WHERE","WRITE","ZEROFILL","ALL","AND","ASENSITIVE","BIGINT","BOTH","CASCADE","CHAR","COLLATE","CONSTRAINT","CREATE","CURRENT_TIME","CURSOR","DAY_HOUR","DAY_SECOND","DECLARE","DELETE","DETERMINISTIC","DIV","DUAL","ELSEIF","EXISTS","FALSE","FLOAT4","FORCE","FULLTEXT","HAVING","HOUR_MINUTE","IGNORE","INFILE","INSENSITIVE","INT1","INT4","INTERVAL","ITERATE","KEYS","LEAVE","LIMIT","LOAD","LOCK","LONGTEXT","MASTER_SSL_VERIFY_SERVER_CERT","MEDIUMINT","MINUTE_MICROSECOND","MODIFIES","NO_WRITE_TO_BINLOG","ON","OPTIONALLY","OUT","PRECISION","PURGE","READS","REFERENCES","RENAME","REQUIRE","REVOKE","SCHEMA","SELECT","SET","SPATIAL","SQLEXCEPTION","SQL_BIG_RESULT","SSL","TABLE","TINYBLOB","TO","TRUE","UNIQUE","UPDATE","USING","UTC_TIMESTAMP","VARCHAR","WHEN","WITH","YEAR_MONTH","ADD","ANALYZE","ASC","BETWEEN","BLOB","CALL","CHANGE","CHECK","CONDITION","CONVERT","CURRENT_DATE","CURRENT_USER","DATABASES","DAY_MINUTE","DECIMAL","DELAYED","DESCRIBE","DISTINCTROW","DROP","ELSE","ESCAPED","EXPLAIN","FLOAT","FOR","FROM","GROUP","HOUR_MICROSECOND","IF","INDEX","INOUT","INT","INT3","INTEGER","IS","KEY","LEADING","LIKE","LINES","LOCALTIMESTAMP","LONGBLOB","LOW_PRIORITY","MEDIUMBLOB","MIDDLEINT","MOD","NOT","NUMERIC","OPTION","ORDER","OUTFILE","PROCEDURE","READ","REAL","RELEASE","REPLACE","RETURN","RLIKE","SECOND_MICROSECOND","SEPARATOR","SMALLINT","SQL","SQLWARNING","SQL_SMALL_RESULT","STRAIGHT_JOIN","THEN","TINYTEXT","TRIGGER","UNION","UNSIGNED","USE","UTC_TIME","VARBINARY","VARYING","WHILE","XOR","FULL","COLUMNS","MIN","MAX","STDEV","COUNT"]),o=/[*+\-<>=&|]/;return{startState:function(e){return{tokenize:u,context:null,indent:0,col:0}},token:function(e,t){e.sol()&&(t.context&&t.context.align==null&&(t.context.align=!1),t.indent=e.indentation());if(e.eatSpace())return null;var r=t.tokenize(e,t);r!="comment"&&t.context&&t.context.align==null&&t.context.type!="pattern"&&(t.context.align=!0);if(n=="(")l(t,")",e.column());else if(n=="[")l(t,"]",e.column());else if(n=="{")l(t,"}",e.column());else if(/[\]\}\)]/.test(n)){while(t.context&&t.context.type=="pattern")c(t);t.context&&n==t.context.type&&c(t)}else n=="."&&t.context&&t.context.type=="pattern"?c(t):/atom|string|variable/.test(r)&&t.context&&(/[\}\]]/.test(t.context.type)?l(t,"pattern",e.column()):t.context.type=="pattern"&&!t.context.align&&(t.context.align=!0,t.context.col=e.column()));return r},indent:function(e,n){var r=n&&n.charAt(0),i=e.context;if(/[\]\}]/.test(r))while(i&&i.type=="pattern")i=i.prev;var s=i&&r==i.type;return i?i.type=="pattern"?i.col:i.align?i.col+(s?0:1):i.indent+(s?0:t):0}}}),CodeMirror.defineMIME("text/x-mysql","mysql"),define("MySQLCodeMirror",function(){}),define("FiddleEditor",["CodeMirror","MySQLCodeMirror"],function(e,t){var n=function(t,n,r){return this.codeMirrorSupported=!/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent),this.codeMirrorSupported?this.codeMirror=e.fromTextArea(document.getElementById(t),{mode:"mysql",extraKeys:{Tab:"indentMore"},lineNumbers:!0,onChange:function(){n.call(r)}}):(this.textArea=document.getElementById(t),$(this.textArea).on("change",function(){n.call(r)}),$(this.textArea).on("keyup",function(){n.call(r)}),$(this.textArea).attr("fullscreen",!1)),this};return n.prototype.getValue=function(){return this.codeMirrorSupported?this.codeMirror.getValue():this.textArea.value},n.prototype.setValue=function(e){this.codeMirrorSupported?this.codeMirror.setValue(e):(this.textArea.value=e,$(this.textArea).trigger("change"))},n.prototype.refresh=function(){this.codeMirrorSupported&&this.codeMirror.refresh()},n.prototype.somethingSelected=function(){return this.codeMirrorSupported?this.codeMirror.somethingSelected():!1},n.prototype.getSelection=function(){return this.codeMirrorSupported?this.codeMirror.getSelection():this.textArea.value},n.prototype.getScrollerElement=function(){return this.codeMirrorSupported?this.codeMirror.getScrollerElement():null},n.prototype.getGutterElement=function(){return this.codeMirrorSupported?this.codeMirror.getGutterElement():null},n.prototype.isFullscreen=function(){return this.codeMirrorSupported?$(this.codeMirror.getScrollerElement()).hasClass("CodeMirror-fullscreen"):$(this.textArea).attr("fullscreen")==1},n.prototype.setFullscreen=function(e){if(e){var t=$(window).height()-40;this.codeMirrorSupported?($(this.codeMirror.getScrollerElement()).addClass("CodeMirror-fullscreen").height(t),$(this.codeMirror.getGutterElement()).height(t)):($(this.textArea).addClass("fullscreen"),$(this.textArea).height(t),$(this.textArea).attr("fullscreen",e))}else this.codeMirrorSupported?($(this.codeMirror.getScrollerElement()).removeClass("CodeMirror-fullscreen"),$(this.codeMirror.getGutterElement()).css("height","auto"),$(this.codeMirror.getScrollerElement()).css("height","200px")):($(this.textArea).removeClass("fullscreen"),$(this.textArea).height(100),$(this.textArea).attr("fullscreen",e))},n}),define("libs/renderTerminator",[],function(){var e=function(e,t){var n=e.find(".terminator a.btn");n.html(n.html().replace(/\[ .+ \]/,"[ "+t+" ]")),e.find(".terminator").data("statement_separator",t)};return e}),define("text!fiddle_backbone/templates/schemaOutput.html",[],function(){return' {{#if errorMessage}}\n <div class="alert alert-error database-error database-messages"><i class="icon-remove"></i>{{errorMessage}}</div> \n {{else}}\n <div class="alert alert-success database-messages"><i class="icon-ok"></i>Schema Ready</div> \n {{/if}}'}),define("text!fiddle_backbone/templates/schemaBrowser.html",[],function(){return' <h3>Schema Browser</h3>\n <ul class="tables">\n {{#each objects}}\n <li>\n <a href="#{{this.table_name}}"><i class="icon-plus"></i> {{this.table_name}}</a> ({{this.table_type}})\n <ul class="columns">\n {{#each this.columns}}\n <li>{{name}} {{type}}</li>\n {{/each}}\n </ul>\n </li>\n {{/each}}\n </ul>'}),define("fiddle_backbone/views/SchemaDef",["jQuery","Backbone","Handlebars","FiddleEditor","libs/renderTerminator","text!fiddle_backbone/templates/schemaOutput.html","text!fiddle_backbone/templates/schemaBrowser.html"],function(e,t,n,r,i,s,o){var u=t.View.extend({initialize:function(){this.editor=new r(this.id,this.handleSchemaChange,this),this.compiledOutputTemplate=n.compile(s),this.compiledSchemaBrowserTemplate=n.compile(o)},handleSchemaChange:function(){if(this.model.get("ddl")!=this.editor.getValue()||this.model.get("statement_separator")!=e(".panel.schema .terminator").data("statement_separator"))this.model.set({ddl:this.editor.getValue(),statement_separator:e(".panel.schema .terminator").data("statement_separator"),ready:!1}),e(".schema .helpTip").css("display",this.model.get("ddl").length?"none":"block"),e(".sql .helpTip").css("display",!this.model.get("ready")||this.model.get("loading")?"none":"block")},render:function(){this.editor.setValue(this.model.get("ddl")),this.updateDependents(),i(e(".panel.schema"),this.model.get("statement_separator"))},renderOutput:function(){this.options.output_el.html(this.compiledOutputTemplate(this.model.toJSON()))},renderSchemaBrowser:function(){this.options.browser_el.html(this.compiledSchemaBrowserTemplate({objects:this.model.get("schema_structure")}))},refresh:function(){this.editor.refresh()},updateDependents:function(){this.model.get("ready")?(e(".needsReadySchema").unblock(),e("#schemaBrowser").attr("disabled",!1),e(".schema .helpTip").css("display","none")):(e(".needsReadySchema").block({message:"Please build schema."}),e("#schemaBrowser").attr("disabled",!0),e(".schema .helpTip").css("display",this.model.get("loading")||this.model.get("ddl").length?"none":"block"))}});return u});var isIE=navigator.appVersion.indexOf("MSIE")!=-1?!0:!1,isWin=navigator.appVersion.toLowerCase().indexOf("win")!=-1?!0:!1,isOpera=navigator.userAgent.indexOf("Opera")!=-1?!0:!1;define("XPlans/oracle/flashver",function(){});var viewerMap={sqlmonitor:["11"],sqlpa:["11"],xplan:["11"],sql_detail:["11","11.2.0.2.0"],EmergencyADDM:["11"],ComparePeriodReport:["11"],AshViewer:["11"]},requiredMajorVersion=10,requiredMinorVersion=0,requiredRevision=0,hasProductInstall=DetectFlashVer(6,0,65),hasRequestedVersion=DetectFlashVer(requiredMajorVersion,requiredMinorVersion,requiredRevision);Vars=function(e){this.numVars=0;if(e!=null){var t,n,r=e.split("&"),i=r.length;for(var s=0;s<i;s++){var o=r[s];if(o.indexOf("=")!=-1&&o.length>3){var t=o.split("="),n=t[0],u=t[1];this[n]==null&&n.length>0&&u.length>0&&(this[n]=u,this.numVars++)}}}},Vars.prototype.toString=function(e){var t="";e==null&&(e="");for(var n in this)this[n]!=null&&typeof this[n]!="object"&&typeof this[n]!="function"&&n!="numVars"&&(t+=e+n+"="+this[n]+"&");return t.length>0&&(t=t.substr(0,t.length-1)),t},define("XPlans/oracle/loadswf",["XPlans/oracle/flashver"],function(e){return function(){return e.loadswf}}(this));if(typeof QP=="undefined"||!QP)var QP={};(function(){function e(e){var r=t(e),i=r[0];i.getContext!==null&&i.getContext!==undefined&&window.setTimeout(function(){var t=i.getContext("2d"),s=$(".qp-tr",e);i.width=s.outerWidth(!0),i.height=s.outerHeight(!0);var o=r.offset();$(".qp-tr",e).each(function(){var e=$("> * > .qp-node",$(this));$("> * > .qp-tr > * > .qp-node",$(this)).each(function(){n(t,o,e,$(this))})}),t.stroke()},1)}function t(e){var t=$("canvas",e);return t.length==0&&(e.prepend($("<canvas></canvas>").css("position","absolute").css("top",0).css("left",0)),t=$("canvas",e)),t}function n(e,t,n,r){var i=n.offset();i.top+=n.outerHeight()/2,i.left+=n.outerWidth();var s=r.offset();s.top+=r.outerHeight()/2;var o=i.left/2+s.left/2;e.moveTo(i.left-t.left,i.top-t.top),e.lineTo(o-t.left,i.top-t.top),e.lineTo(o-t.left,s.top-t.top),e.lineTo(s.left-t.left,s.top-t.top)}QP.drawLines=function(t){t===null||t===undefined?t=$(".qp-root").parent():t=$(t),e(t)}})(),define("XPlans/mssql",function(e){return function(){return e.QP}}(this)),define("text!fiddle_backbone/templates/queryTabularOutput.html",[],function(){return' {{#if id}}\n {{#each_with_index sets}}\n <div class="set" id="set_{{index}}">\n {{#if this.RESULTS.DATA.length}}\n <table class="results table table-bordered table-striped">\n <tr>\n {{#each this.RESULTS.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.RESULTS.DATA}}\n <tr>\n {{#each this}}\n <td>{{result_display this this}}</td>\n {{/each}}\n </tr>\n {{/each}}\n </table>\n {{/if}}\n {{#if this.SUCCEEDED}}\n <div id="messages_{{index}}" class="alert alert-success database-messages">\n <i class="icon-ok"></i>\n Record Count: {{this.RESULTS.DATA.length}}; Execution Time: {{this.EXECUTIONTIME}}ms\n {{#if this.EXECUTIONPLAN.DATA.length}}\n <a href="#executionPlan" class="executionPlanLink"><i class="icon-plus"></i>View Execution Plan</a> \n {{/if}}\n <a href="#!{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}" class="setLink"><i class="icon-share-alt"></i> link</a>\n </div> \n \n {{#if this.EXECUTIONPLAN.DATA.length}}\n <table class="executionPlan table table-bordered">\n <tr>\n {{#each this.EXECUTIONPLAN.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.EXECUTIONPLAN.DATA}}\n <tr>\n {{#each this}}\n <td><div style="position:relative">{{{this}}}</div></td>\n {{/each}}\n </tr>\n {{/each}}\n\n {{#if ../../../schemaDef/dbType/isSQLServer}}\n <tr>\n <td><a href="index.cfm/Fiddles/getSQLPlan?db_type_id={{../../../../schemaDef/dbType/id}}&short_code={{../../../../schemaDef/short_code}}&query_id={{../../../../id}}&id={{index}}">Download .sqlplan</a> | <a href="http://www.sqlsentry.net/plan-explorer/sql-server-query-view.asp?ad=201208-sqlfiddle-pe" target="_new">Download SQL Sentry Plan Explorer (free)</a></td>\n </tr>\n {{/if}}\n\n </table>\n {{/if}}\n \n {{else}}\n <div id="messages_{{index}}" class="alert alert-error database-messages"><i class="icon-remove"></i>{{this.ERRORMESSAGE}}</div> \n {{/if}}\n </div>\n {{/each_with_index}}\n \n <span id="donationSuggestion">Did this query solve the problem? If so, consider donating $5 to help make sure SQL Fiddle will be here next time you need help with a database problem. Thanks!</span>\n {{/if}}'}),define("text!fiddle_backbone/templates/queryPlaintextOutput.html",[],function(){return' {{#if id}}\n {{#each_with_index sets}}\n <div class="set" id="set_{{index}}">\n {{#if this.RESULTS.DATA.length}}\n <pre class="results">\n|{{#each_simple_value_with_index this.RESULTS.COLUMNS}} {{result_display_padded ../this/RESULTS/COLUMNWIDTHS}} |{{/each_simple_value_with_index}}\n-{{#each_simple_value_with_index this.RESULTS.COLUMNS}}-{{divider_display ../this/RESULTS/COLUMNWIDTHS}}--{{/each_simple_value_with_index}}{{#each this.RESULTS.DATA}}\n|{{#each_simple_value_with_index this}} {{result_display_padded ../../this/RESULTS/COLUMNWIDTHS}} |{{/each_simple_value_with_index}}{{/each}}\n </pre>\n {{/if}}\n {{#if this.SUCCEEDED}}\n <div id="messages_{{index}}" class="alert alert-success database-messages">\n <i class="icon-ok"></i>\n Record Count: {{this.RESULTS.DATA.length}}; Execution Time: {{this.EXECUTIONTIME}}ms\n {{#if this.EXECUTIONPLAN.DATA.length}}\n <a href="#executionPlan" class="executionPlanLink"><i class="icon-plus"></i>View Execution Plan</a>\n {{/if}}\n <a href="#!{{../../schemaDef/dbType/id}}/{{../../schemaDef/short_code}}/{{../../id}}/{{index}}" class="setLink"><i class="icon-share-alt"></i> link</a>\n </div> \n \n {{#if this.EXECUTIONPLAN.DATA.length}}\n <table class="executionPlan table table-bordered">\n <tr>\n {{#each this.EXECUTIONPLAN.COLUMNS}}\n <th>{{this}}</th>\n {{/each}}\n </tr>\n {{#each this.EXECUTIONPLAN.DATA}}\n <tr>\n {{#each this}}\n <td><div style="position:relative">{{{this}}}</div></td>\n {{/each}}\n </tr>\n {{/each}}\n\n {{#if ../../../schemaDef/dbType/isSQLServer}}\n <tr>\n <td><a href="index.cfm/Fiddles/getSQLPlan?db_type_id={{../../../../schemaDef/dbType/id}}&short_code={{../../../../schemaDef/short_code}}&query_id={{../../../../id}}&id={{index}}">Download .sqlplan</a></td>\n </tr>\n {{/if}}\n \n </table>\n {{/if}}\n \n {{else}}\n <div id="messages_{{index}}" class="alert alert-error database-error database-messages"><i class="icon-remove"></i>{{this.ERRORMESSAGE}}</div> \n {{/if}}\n </div>\n {{/each_with_index}}\n\n <span id="donationSuggestion">Did this query solve the problem? If so, consider donating $5 to help make sure SQL Fiddle will be here next time you need help with a database problem. Thanks!</span>\n {{/if}}'}),define("HandlebarsHelpers/divider_display",["Handlebars"],function(e){e.registerHelper("divider_display",function(e){var t=[];return t.length=e[this.index]+1,t.join("-")})}),define("HandlebarsHelpers/each_simple_value_with_index",["Handlebars"],function(e){e.registerHelper("each_simple_value_with_index",function(e,t){var n="";k=0;for(var r=0,i=e.length;r<i;r++){var s={value:e[r]};s.index=k,s.first=k==0,s.last=k==e.length,n+=t(s),k++}return n})}),define("HandlebarsHelpers/each_with_index",["Handlebars"],function(e){e.registerHelper("each_with_index",function(e,t){var n="",r=0;for(var i=0,s=e.length;i<s;i++)if(e[i]){var o=e[i];o.index=r,o.first=r==0,o.last=r==e.length,n+=t(o),r++}return n})}),define("HandlebarsHelpers/result_display_padded",["Handlebars"],function(e){e.registerHelper("result_display_padded",function(e){var t=[];return t.length=e[this.index]-this.value.toString().length+1,t.join(" ")+this.value.toString()})}),define("HandlebarsHelpers/result_display",["jQuery","Handlebars"],function(e,t){t.registerHelper("result_display",function(n){var r=/\b((?:https?:\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?������]))/ig;return e.isPlainObject(n)?JSON.stringify(n):n==null?"(null)":n===!1?"false":typeof n=="string"&&n.match(r)&&t.Utils.escapeExpression(n)==n?new t.SafeString(n.replace(r,"<a href='$1' target='_new'>$1</a>")):n})}),define("fiddle_backbone/views/Query",["jQuery","Backbone","Handlebars","FiddleEditor","libs/renderTerminator","XPlans/oracle/loadswf","XPlans/mssql","text!fiddle_backbone/templates/queryTabularOutput.html","text!fiddle_backbone/templates/queryPlaintextOutput.html","HandlebarsHelpers/divider_display","HandlebarsHelpers/each_simple_value_with_index","HandlebarsHelpers/each_with_index","HandlebarsHelpers/result_display_padded","HandlebarsHelpers/result_display"],function(e,t,n,r,i,s,o,u,a){var f=t.View.extend({initialize:function(){this.editor=new r(this.id,this.handleQueryChange,this),this.outputType="tabular",this.compiledOutputTemplate={},this.compiledOutputTemplate.tabular=n.compile(u),this.compiledOutputTemplate.plaintext=n.compile(a)},setOutputType:function(e){this.outputType=e},handleQueryChange:function(){var t=this.model.get("schemaDef");this.model.set({sql:this.editor.getValue()}),e(".sql .helpTip").css("display",!t.get("ready")||t.get("loading")||this.model.get("sql").length?"none":"block")},render:function(){this.editor.setValue(this.model.get("sql")),this.model.id&&this.renderOutput(),i(e(".panel.sql"),this.model.get("statement_separator"))},renderOutput:function(){var t=this.model,n=this.model.toJSON();_.each(n.sets,function(e,t){if(e.RESULTS){var r=_.map(e.RESULTS.COLUMNS,function(e){return e.length});_.each(e.RESULTS.DATA,function(e){r=_.map(e,function(e,t){return _.max([e.toString().length,r[t]])})}),n.sets[t].RESULTS.COLUMNWIDTHS=r}}),n.schemaDef=this.model.get("schemaDef").toJSON(),n.schemaDef.dbType=this.model.get("schemaDef").get("dbType").toJSON(),n.schemaDef.dbType.isSQLServer=this.model.get("schemaDef").get("dbType").get("simple_name")=="SQL Server",this.options.output_el.html(this.compiledOutputTemplate[this.outputType](n)),e("script.oracle_xplan_xml").each(function(){e(this).siblings("div.oracle_xplan").html(s(e(this).text()))}),this.options.output_el.find("a.executionPlanLink").click(function(n){n.preventDefault(),e("i",this).toggleClass("icon-minus icon-plus"),e(this).closest(".set").find(".executionPlan").toggle(),e("i",this).hasClass("icon-minus")&&t.get("schemaDef").get("dbType").get("simple_name")=="SQL Server"&&o.drawLines(e(this).closest(".set").find(".executionPlan div"))})},refresh:function(){this.editor.refresh()},checkForSelectedText:function(){this.editor.somethingSelected()?this.model.set("sql",this.editor.getSelection()):this.model.set("sql",this.editor.getValue())}});return f}),define("fiddle_backbone/router",["jQuery","Underscore","Backbone","libs/renderTerminator","fiddle_backbone/models/UsedFiddle"],function(e,t,n,r,i){var s=function(s,o,u,a,f){var l=n.Router.extend({routes:{"!:db_type_id":"DBType","!:db_type_id/:short_code":"SchemaDef","!:db_type_id/:short_code/:query_id":"Query","!:db_type_id/:short_code/:query_id/:set_id":"SetAnchor"},DBType:function(e){s.setSelectedType(e,!0),f.render()},SchemaDef:function(e,t){this.loadContent(e,"!"+e+"/"+t)},Query:function(e,t,n){this.loadContent(e,"!"+e+"/"+t+"/"+n)},SetAnchor:function(n,r,i,a){var f=function(){e("#set_"+a).length&&(window.scrollTo(0,e("#set_"+a).offset().top-50),e("#set_"+a).addClass("highlight"))};!s.getSelectedType()||s.getSelectedType().get("id")!=n||o.get("short_code")!=r||u.get("id")!=i?(u.bind("reloaded",t.once(f)),this.loadContent(n,"!"+n+"/"+r+"/"+i)):(e(".set").removeClass("highlight"),f())},loadContent:function(n,f){this.DBType(n);if(u.get("pendingChanges")&&!confirm("Warning! You have made changes to your query which will be lost. Continue?'"))return!1;o.set("loading",!0),e(".helpTip").css("display","none"),e("body").block({message:"Loading..."}),e.getJSON("index.cfm/fiddles/loadContent",{fragment:f},function(f){o.set("loading",!1);if(f.short_code){var l=s.getSelectedType();l.get("context")=="browser"?(l.get("className")=="sqljs"&&o.get("browserEngines").websql.nativeSQLite&&confirm("Fiddle originally built with SQL.js, but you have WebSQL available - would you like to use that instead (it'll be faster to load)?")&&(s.setSelectedType(e("#db_type_id a:contains('WebSQL')").closest("li").attr("db_type_id")),l=s.getSelectedType(),o.set({ddl:f.ddl,dbType:l,statement_separator:f.schema_statement_separator}),f.sql&&(u.set({schemaDef:o,sql:f.sql,statement_separator:f.query_statement_separator}),o.on("built",t.once(function(){u.execute()}))),o.build(s)),o.get("browserEngines")[l.get("className")].buildSchema({short_code:e.trim(f.short_code),statement_separator:f.schema_statement_separator,ddl:f.ddl,success:function(){o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!0,errorMessage:"",statement_separator:f.schema_statement_separator,dbType:s.getSelectedType()}),r(e(".panel.schema"),f.schema_statement_separator),f.sql?(a.insert(new i({fragment:"!"+n+"/"+f.short_code+"/"+f.id})),u.set({id:f.id,sql:f.sql,statement_separator:f.query_statement_separator})):a.insert(new i({fragment:"!"+n+"/"+f.short_code})),o.get("browserEngines")[l.get("className")].getSchemaStructure({callback:function(t){o.set({schema_structure:t}),o.trigger("reloaded"),f.sql?o.get("browserEngines")[l.get("className")].executeQuery({sql:f.sql,statement_separator:f.query_statement_separator,success:function(t){u.set({sets:t}),u.trigger("reloaded"),e("body").unblock()},error:function(t){u.set({sets:[]}),u.trigger("reloaded"),e("body").unblock()}}):e("body").unblock()}})},error:function(t){o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!1,errorMessage:t,dbType:s.getSelectedType(),statement_separator:f.schema_statement_separator,schema_structure:[]}),r(e(".panel.schema"),f.schema_statement_separator),f.sql&&(u.set({id:f.id,sql:f.sql,statement_separator:f.query_statement_separator,schemaDef:o}),u.trigger("reloaded")),o.trigger("failed"),o.trigger("reloaded"),e("body").unblock()}})):(o.set({short_code:f.short_code,ddl:f.ddl,ready:!0,valid:!0,errorMessage:"",statement_separator:f.schema_statement_separator,schema_structure:f.schema_structure}),r(e(".panel.schema"),f.schema_statement_separator),o.trigger("reloaded"),f.sql?(a.insert(new i({fragment:"!"+n+"/"+f.short_code+"/"+f.id})),u.set({id:f.id,sql:f.sql,sets:f.sets,statement_separator:f.query_statement_separator}),u.trigger("reloaded")):a.insert(new i({fragment:"!"+n+"/"+f.short_code})),e("body").unblock())}else e("body").unblock()})}}),c=new l;return n.history.start({pushState:!1}),c};return{initialize:s}}),function(e){function u(n,u){var f=n==window,c=u&&u.message!==undefined?u.message:undefined;u=e.extend({},e.blockUI.defaults,u||{}),u.overlayCSS=e.extend({},e.blockUI.defaults.overlayCSS,u.overlayCSS||{});var v=e.extend({},e.blockUI.defaults.css,u.css||{}),m=e.extend({},e.blockUI.defaults.themedCSS,u.themedCSS||{});c=c===undefined?u.message:c,f&&s&&a(window,{fadeOut:0});if(c&&typeof c!="string"&&(c.parentNode||c.jquery)){var g=c.jquery?c[0]:c,y={};e(n).data("blockUI.history",y),y.el=g,y.parent=g.parentNode,y.display=g.style.display,y.position=g.style.position,y.parent&&y.parent.removeChild(g)}e(n).data("blockUI.onUnblock",u.onUnblock);var b=u.baseZ,w=e.browser.msie||u.forceIframe?e('<iframe class="blockUI" style="z-index:'+b++ +';display:none;border:none;margin:0;padding:0;position:absolute;width:100%;height:100%;top:0;left:0" src="'+u.iframeSrc+'"></iframe>'):e('<div class="blockUI" style="display:none"></div>'),E=u.theme?e('<div class="blockUI blockOverlay ui-widget-overlay" style="z-index:'+b++ +';display:none"></div>'):e('<div class="blockUI blockOverlay" style="z-index:'+b++ +';display:none;border:none;margin:0;padding:0;width:100%;height:100%;top:0;left:0"></div>'),S,x;u.theme&&f?x='<div class="blockUI '+u.blockMsgClass+' blockPage ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:fixed">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(u.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":u.theme?x='<div class="blockUI '+u.blockMsgClass+' blockElement ui-dialog ui-widget ui-corner-all" style="z-index:'+(b+10)+';display:none;position:absolute">'+'<div class="ui-widget-header ui-dialog-titlebar ui-corner-all blockTitle">'+(u.title||"&nbsp;")+"</div>"+'<div class="ui-widget-content ui-dialog-content"></div>'+"</div>":f?x='<div class="blockUI '+u.blockMsgClass+' blockPage" style="z-index:'+(b+10)+';display:none;position:fixed"></div>':x='<div class="blockUI '+u.blockMsgClass+' blockElement" style="z-index:'+(b+10)+';display:none;position:absolute"></div>',S=e(x),c&&(u.theme?(S.css(m),S.addClass("ui-widget-content")):S.css(v)),!u.theme&&(!u.applyPlatformOpacityRules||!e.browser.mozilla||!/Linux/.test(navigator.platform))&&E.css(u.overlayCSS),E.css("position",f?"fixed":"absolute"),(e.browser.msie||u.forceIframe)&&w.css("opacity",0);var T=[w,E,S],N=f?e("body"):e(n);e.each(T,function(){this.appendTo(N)}),u.theme&&u.draggable&&e.fn.draggable&&S.draggable({handle:".ui-dialog-titlebar",cancel:"li"});var C=r&&(!e.boxModel||e("object,embed",f?null:n).length>0);if(i||C){f&&u.allowBodyStretch&&e.boxModel&&e("html,body").css("height","100%");if((i||!e.boxModel)&&!f)var k=d(n,"borderTopWidth"),L=d(n,"borderLeftWidth"),A=k?"(0 - "+k+")":0,O=L?"(0 - "+L+")":0;e.each([w,E,S],function(e,t){var n=t[0].style;n.position="absolute";if(e<2)f?n.setExpression("height","Math.max(document.body.scrollHeight, document.body.offsetHeight) - (jQuery.boxModel?0:"+u.quirksmodeOffsetHack+') + "px"'):n.setExpression("height",'this.parentNode.offsetHeight + "px"'),f?n.setExpression("width",'jQuery.boxModel && document.documentElement.clientWidth || document.body.clientWidth + "px"'):n.setExpression("width",'this.parentNode.offsetWidth + "px"'),O&&n.setExpression("left",O),A&&n.setExpression("top",A);else if(u.centerY)f&&n.setExpression("top",'(document.documentElement.clientHeight || document.body.clientHeight) / 2 - (this.offsetHeight / 2) + (blah = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "px"'),n.marginTop=0;else if(!u.centerY&&f){var r=u.css&&u.css.top?parseInt(u.css.top):0,i="((document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + "+r+') + "px"';n.setExpression("top",i)}})}c&&(u.theme?S.find(".ui-widget-content").append(c):S.append(c),(c.jquery||c.nodeType)&&e(c).show()),(e.browser.msie||u.forceIframe)&&u.showOverlay&&w.show();if(u.fadeIn){var M=u.onBlock?u.onBlock:t,_=u.showOverlay&&!c?M:t,D=c?M:t;u.showOverlay&&E._fadeIn(u.fadeIn,_),c&&S._fadeIn(u.fadeIn,D)}else u.showOverlay&&E.show(),c&&S.show(),u.onBlock&&u.onBlock();l(1,n,u),f?(s=S[0],o=e(":input:enabled:visible",s),u.focusInput&&setTimeout(h,20)):p(S[0],u.centerX,u.centerY);if(u.timeout){var P=setTimeout(function(){f?e.unblockUI(u):e(n).unblock(u)},u.timeout);e(n).data("blockUI.timeout",P)}}function a(t,n){var r=t==window,i=e(t),u=i.data("blockUI.history"),a=i.data("blockUI.timeout");a&&(clearTimeout(a),i.removeData("blockUI.timeout")),n=e.extend({},e.blockUI.defaults,n||{}),l(0,t,n),n.onUnblock===null&&(n.onUnblock=i.data("blockUI.onUnblock"),i.removeData("blockUI.onUnblock"));var c;r?c=e("body").children().filter(".blockUI").add("body > .blockUI"):c=e(".blockUI",t),r&&(s=o=null),n.fadeOut?(c.fadeOut(n.fadeOut),setTimeout(function(){f(c,u,n,t)},n.fadeOut)):f(c,u,n,t)}function f(t,n,r,i){t.each(function(e,t){this.parentNode&&this.parentNode.removeChild(this)}),n&&n.el&&(n.el.style.display=n.display,n.el.style.position=n.position,n.parent&&n.parent.appendChild(n.el),e(i).removeData("blockUI.history")),typeof r.onUnblock=="function"&&r.onUnblock(i,r)}function l(t,n,r){var i=n==window,o=e(n);if(!t&&(i&&!s||!i&&!o.data("blockUI.isBlocked")))return;i||o.data("blockUI.isBlocked",t);if(!r.bindEvents||t&&!r.showOverlay)return;var u="mousedown mouseup keydown keypress";t?e(document).bind(u,r,c):e(document).unbind(u,c)}function c(t){if(t.keyCode&&t.keyCode==9&&s&&t.data.constrainTabKey){var n=o,r=!t.shiftKey&&t.target===n[n.length-1],i=t.shiftKey&&t.target===n[0];if(r||i)return setTimeout(function(){h(i)},10),!1}var u=t.data;return e(t.target).parents("div."+u.blockMsgClass).length>0?!0:e(t.target).parents().children().filter("div.blockUI").length==0}function h(e){if(!o)return;var t=o[e===!0?o.length-1:0];t&&t.focus()}function p(e,t,n){var r=e.parentNode,i=e.style,s=(r.offsetWidth-e.offsetWidth)/2-d(r,"borderLeftWidth"),o=(r.offsetHeight-e.offsetHeight)/2-d(r,"borderTopWidth");t&&(i.left=s>0?s+"px":"0"),n&&(i.top=o>0?o+"px":"0")}function d(t,n){return parseInt(e.css(t,n))||0}if(/1\.(0|1|2)\.(0|1|2)/.test(e.fn.jquery)||/^1.1/.test(e.fn.jquery)){alert("blockUI requires jQuery v1.2.3 or later! You are using v"+e.fn.jquery);return}e.fn._fadeIn=e.fn.fadeIn;var t=function(){},n=document.documentMode||0,r=e.browser.msie&&(e.browser.version<8&&!n||n<8),i=e.browser.msie&&/MSIE 6.0/.test(navigator.userAgent)&&!n;e.blockUI=function(e){u(window,e)},e.unblockUI=function(e){a(window,e)},e.growlUI=function(t,n,r,i){var s=e('<div class="growlUI"></div>');t&&s.append("<h1>"+t+"</h1>"),n&&s.append("<h2>"+n+"</h2>"),r==undefined&&(r=3e3),e.blockUI({message:s,fadeIn:700,fadeOut:1e3,centerY:!1,timeout:r,showOverlay:!1,onUnblock:i,css:e.blockUI.defaults.growlCSS})},e.fn.block=function(t){return this.unblock({fadeOut:0}).each(function(){e.css(this,"position")=="static"&&(this.style.position="relative"),e.browser.msie&&(this.style.zoom=1),u(this,t)})},e.fn.unblock=function(e){return this.each(function(){a(this,e)})},e.blockUI.version=2.39,e.blockUI.defaults={message:"<h1>Please wait...</h1>",title:null,draggable:!0,theme:!1,css:{padding:0,margin:0,width:"30%",top:"40%",left:"35%",textAlign:"center",color:"#000",border:"3px solid #aaa",backgroundColor:"#fff",cursor:"wait"},themedCSS:{width:"30%",top:"40%",left:"35%"},overlayCSS:{backgroundColor:"#000",opacity:.6,cursor:"wait"},growlCSS:{width:"350px",top:"10px",left:"",right:"10px",border:"none",padding:"5px",opacity:.6,cursor:"default",color:"#fff",backgroundColor:"#000","-webkit-border-radius":"10px","-moz-border-radius":"10px","border-radius":"10px"},iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank",forceIframe:!1,baseZ:1e3,centerX:!0,centerY:!0,allowBodyStretch:!0,bindEvents:!0,constrainTabKey:!0,fadeIn:200,fadeOut:400,timeout:0,showOverlay:!0,focusInput:!0,applyPlatformOpacityRules:!0,onBlock:null,onUnblock:null,quirksmodeOffsetHack:4,blockMsgClass:"blockMsg"};var s=null,o=[]}(jQuery),define("libs/jquery/jquery.blockUI",function(){}),function(e){e.cookie=function(t,n,r){if(arguments.length>1&&(!/Object/.test(Object.prototype.toString.call(n))||n===null||n===undefined)){r=e.extend({},r);if(n===null||n===undefined)r.expires=-1;if(typeof r.expires=="number"){var i=r.expires,s=r.expires=new Date;s.setDate(s.getDate()+i)}return n=String(n),document.cookie=[encodeURIComponent(t),"=",r.raw?n:encodeURIComponent(n),r.expires?"; expires="+r.expires.toUTCString():"",r.path?"; path="+r.path:"",r.domain?"; domain="+r.domain:"",r.secure?"; secure":""].join("")}r=n||{};var o=r.raw?function(e){return e}:decodeURIComponent,u=document.cookie.split("; ");for(var a=0,f;f=u[a]&&u[a].split("=");a++)if(o(f[0])===t)return o(f[1]||"");return null}}(jQuery),define("libs/jquery/jquery.cookie",function(){}),!function(e){var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();e(i).collapse(s)})})}(window.jQuery),define("Bootstrap/bootstrap-collapse",function(){}),!function(e){var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),define("Bootstrap/bootstrap-tab",function(){}),!function(e){function r(){e(t).parent().removeClass("open")}var t='[data-toggle="dropdown"]',n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),i,s,o;if(n.is(".disabled, :disabled"))return;return s=n.attr("data-target"),s||(s=n.attr("href"),s=s&&s.replace(/.*(?=#[^\s]*$)/,"")),i=e(s),i.length||(i=n.parent()),o=i.hasClass("open"),r(),o||i.toggleClass("open"),!1}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api",r),e("body").on("click.dropdown",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api",t,n.prototype.toggle)})}(window.jQuery),define("Bootstrap/bootstrap-dropdown",function(){}),!function(e){function n(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),r.call(t)},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),r.call(t)})}function r(e){this.$element.hide().trigger("hidden"),i.call(this)}function i(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(s,this)):s.call(this)):t&&t()}function s(){this.$backdrop.remove(),this.$backdrop=null}function o(){var t=this;this.isShown&&this.options.keyboard?e(document).on("keyup.dismiss.modal",function(e){e.which==27&&t.hide()}):this.isShown||e(document).off("keyup.dismiss.modal")}var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this))};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,o.call(this),i.call(this,function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in"),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var i=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),o.call(this),this.$element.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?n.call(this):r.call(this)}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({},i.data(),n.data());t.preventDefault(),i.modal(s)})})}(window.jQuery),define("Bootstrap/bootstrap-modal",function(){}),!function(e){var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},isHTML:function(e){return typeof e!="string"||e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3||/^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(e)},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.isHTML(t)?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove()},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0}}(window.jQuery),define("Bootstrap/bootstrap-tooltip",function(){}),!function(e){var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.isHTML(t)?"html":"text"](t),e.find(".popover-content > *")[this.isHTML(n)?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),define("Bootstrap/bootstrap-popover",function(){}),define("fiddle_backbone/app",["BrowserEngines/engines","fiddle_backbone/models/UsedFiddle","fiddle_backbone/models/MyFiddleHistory","fiddle_backbone/models/DBTypesList","fiddle_backbone/models/SchemaDef","fiddle_backbone/models/Query","fiddle_backbone/views/DBTypesList","fiddle_backbone/views/SchemaDef","fiddle_backbone/views/Query","fiddle_backbone/router","libs/renderTerminator","libs/jquery/jquery.blockUI","libs/jquery/jquery.cookie","Bootstrap/bootstrap-collapse","Bootstrap/bootstrap-tab","Bootstrap/bootstrap-dropdown","Bootstrap/bootstrap-modal","Bootstrap/bootstrap-tooltip","Bootstrap/bootstrap-popover"],function(e,t,n,r,i,s,o,u,a,f,l){var c=function(c){var h={},p=new n,d=new r,v=new i({browserEngines:e}),m=new s({schemaDef:v}),g=new o({el:$("#db_type_id")[0],collection:d}),y=new u({id:"schema_ddl",model:v,output_el:$("#output"),browser_el:$("#browser")}),b=new a({id:"sql",model:m,output_el:$("#output")});d.on("change",function(){g.render(),v.has("dbType")&&v.set("ready",v.get("dbType").id==this.getSelectedType().id)}),v.on("change",function(){this.hasChanged("ready")&&y.updateDependents(),this.hasChanged("errorMessage")&&y.renderOutput(),this.hasChanged("schema_structure")&&y.renderSchemaBrowser()}),v.on("reloaded",function(){this.set("dbType",d.getSelectedType()),y.render()}),m.on("reloaded",function(){this.set({pendingChanges:!1},{silent:!0}),b.render()}),v.on("built failed",function(){$("#buildSchema label").prop("disabled",!1),$("#buildSchema label").html($("#buildSchema label").data("originalValue")),y.renderOutput(),y.renderSchemaBrowser()}),m.on("change",function(){(this.hasChanged("sql")||this.hasChanged("statement_separator"))&&!this.hasChanged("id")&&!this.get("pendingChanges")&&this.set({pendingChanges:!0},{silent:!0})}),m.on("executed",function(){var e=$(".runQuery");e.prop("disabled",!1),e.html(e.data("originalValue")),this.set({pendingChanges:!1},{silent:!0}),b.renderOutput()}),$("#buildSchema").click(function(e){var t=$("label",this);e.preventDefault();if(t.prop("disabled"))return!1;t.data("originalValue",t.html()),t.prop("disabled",!0).text("Building Schema..."),v.build(d)});var w=function(e){var t=$(".runQuery");e.preventDefault();if(t.prop("disabled"))return!1;t.data("originalValue",t.html()),t.prop("disabled",!0).text("Executing SQL..."),b.checkForSelectedText(),m.execute()};return $(".runQuery").click(w),$(document).keyup(function(e){e.keyCode==116&&(e.preventDefault(),w(e))}),$("#runQueryOptions li a").click(function(e){e.preventDefault(),b.setOutputType(this.id),b.renderOutput()}),$("#queryPrettify").click(function(e){var t=$(this);t.attr("disabled",!0),e.preventDefault(),$.post("index.cfm/proxy/formatSQL",{sql:m.get("sql")},function(e){m.set({sql:e}),m.trigger("reloaded"),m.set({pendingChanges:!0}),t.attr("disabled",!1)})}),$(".terminator .dropdown-menu a").on("click",function(e){e.preventDefault(),l($(this).closest(".panel"),$(this).attr("href")),$(this).closest(".panel").hasClass("schema")?y.handleSchemaChange():m.set({pendingChanges:!0,statement_separator:$(this).attr("href")},{silent:!0})}),$(window).bind("beforeunload",function(){if(m.get("pendingChanges"))return"Warning! You have made changes to your query which will be lost. Continue?'"}),d.on("reset",function(){h=f.initialize(d,v,m,p,g),this.length&&!this.getSelectedType()&&this.setSelectedType(this.first().id,!0),g.render(),y.render(),b.render()}),p.on("change reset remove",function(){localStorage&&localStorage.setItem("fiddleHistory",JSON.stringify(this.toJSON()))}),$("#clear").click(function(e){e.preventDefault(),v.reset(),m.reset(),h.navigate("!"+d.getSelectedType().id,{trigger:!0})}),$("#sample").click(function(e){e.preventDefault(),h.navigate("!"+d.getSelectedType().get("sample_fragment"),{trigger:!0})}),d.on("change",function(){g.render(),m.id&&v.get("short_code").length&&v.get("dbType").id==this.getSelectedType().id?h.navigate("!"+this.getSelectedType().id+"/"+v.get("short_code")+"/"+m.id):v.get("short_code").length&&v.get("dbType").id==this.getSelectedType().id?h.navigate("!"+this.getSelectedType().id+"/"+v.get("short_code")):h.navigate("!"+this.getSelectedType().id)}),v.on("built",function(){p.insert(new t({fragment:"!"+this.get("dbType").id+"/"+this.get("short_code")})),h.navigate("!"+this.get("dbType").id+"/"+this.get("short_code"))}),m.on("executed",function(){var e=this.get("schemaDef");p.insert(new t({fragment:"!"+e.get("dbType").id+"/"+e.get("short_code")+"/"+this.id})),h.navigate("!"+e.get("dbType").id+"/"+e.get("short_code")+"/"+this.id)}),d.reset(c),{dbTypes:d,schemaDef:v,schemaDefView:y,queryView:b}};return{initialize:c}});var dateFormat=function(){var e=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,t=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,n=/[^-+\dA-Z]/g,r=function(e,t){e=String(e),t=t||2;while(e.length<t)e="0"+e;return e};return function(i,s,o){var u=dateFormat;arguments.length==1&&Object.prototype.toString.call(i)=="[object String]"&&!/\d/.test(i)&&(s=i,i=undefined),i=i?new Date(i):new Date;if(isNaN(i))throw SyntaxError("invalid date");s=String(u.masks[s]||s||u.masks["default"]),s.slice(0,4)=="UTC:"&&(s=s.slice(4),o=!0);var a=o?"getUTC":"get",f=i[a+"Date"](),l=i[a+"Day"](),c=i[a+"Month"](),h=i[a+"FullYear"](),p=i[a+"Hours"](),d=i[a+"Minutes"](),v=i[a+"Seconds"](),m=i[a+"Milliseconds"](),g=o?0:i.getTimezoneOffset(),y={d:f,dd:r(f),ddd:u.i18n.dayNames[l],dddd:u.i18n.dayNames[l+7],m:c+1,mm:r(c+1),mmm:u.i18n.monthNames[c],mmmm:u.i18n.monthNames[c+12],yy:String(h).slice(2),yyyy:h,h:p%12||12,hh:r(p%12||12),H:p,HH:r(p),M:d,MM:r(d),s:v,ss:r(v),l:r(m,3),L:r(m>99?Math.round(m/10):m),t:p<12?"a":"p",tt:p<12?"am":"pm",T:p<12?"A":"P",TT:p<12?"AM":"PM",Z:o?"UTC":(String(i).match(t)||[""]).pop().replace(n,""),o:(g>0?"-":"+")+r(Math.floor(Math.abs(g)/60)*100+Math.abs(g)%60,4),S:["th","st","nd","rd"][f%10>3?0:(f%100-f%10!=10)*f%10]};return s.replace(e,function(e){return e in y?y[e]:e.slice(1,e.length-1)})}}();dateFormat.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"},dateFormat.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},Date.prototype.format=function(e,t){return dateFormat(this,e,t)},define("DateFormat",function(e){return function(){return e.dateFormat}}(this)),define("text!DDLBuilder/templates/generic.sql",[],function(){return"CREATE TABLE {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n \nINSERT INTO {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}}{{/each_with_index}})\nVALUES\n {{#each_with_index data}}{{#if index}},\n {{/if}}({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}}){{/each_with_index}}\n{{separator}}"}),define("text!DDLBuilder/templates/oracle.sql",[],function(){return"CREATE TABLE {{{tablePrefix}}}{{tableName}}{{{tableSuffix}}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n\nINSERT ALL {{#each_with_index data}}\n INTO {{{../tablePrefix}}}{{../tableName}}{{{../tableSuffix}}} ({{#each_with_index r}}{{#if index}}, {{/if}}{{{../../fieldPrefix}}}{{column_name_for_index ../..}}{{{../../fieldSuffix}}}{{/each_with_index}})\n VALUES ({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}}){{/each_with_index}}\nSELECT * FROM dual\n{{separator}}"}),define("text!DDLBuilder/templates/sqlite.sql",[],function(){return"CREATE TABLE {{tablePrefix}}{{tableName}}{{tableSuffix}}\n ({{#each_with_index columns}}{{#if index}}, {{/if}}{{{../fieldPrefix}}}{{name}}{{{../fieldSuffix}}} {{db_type}}{{/each_with_index}})\n{{separator}}\n\n{{#each_with_index data}}\nINSERT INTO {{tablePrefix}}{{../tableName}}{{tableSuffix}}\n ({{#each_with_index ../columns}}{{#if index}}, {{/if}}{{{../../fieldPrefix}}}{{name}}{{{../../fieldSuffix}}}{{/each_with_index}})\nVALUES\n ({{#each_with_index r}}{{#if index}}, {{/if}}{{formatted_field ../..}}{{/each_with_index}})\n{{../separator}}\n\n{{/each_with_index}}"}),define("DDLBuilder/ddl_builder",["jQuery","Handlebars","DateFormat","text!./templates/generic.sql","text!./templates/oracle.sql","text!./templates/sqlite.sql","HandlebarsHelpers/each_with_index"],function(e,t,n,r,i,s){return ddl_builder=function(e){return e||(e={}),this.fieldPrefix="",this.fieldSuffix="",this.tablePrefix="",this.tableSuffix="",this.dateFormatMask="yyyy-mm-dd HH:MM:ss",this.charType="varchar",this.intType="int",this.floatType="numeric",this.dateType="datetime",this.valueSeparator="",this.column_count=0,this.definition={tableName:"Table1",columns:[],data:[]},this.ddlTemplate=r,this.compiledTemplate=t.compile(this.ddlTemplate),this.setup(e),this},ddl_builder.prototype.setup=function(e){for(var n in e)this[n]=e[n];return e.ddlTemplate&&(this.compiledTemplate=t.compile(this.ddlTemplate)),e.tableName&&(this.definition.tableName=e.tableName),this},ddl_builder.prototype.setupForDBType=function(e,t){switch(e){case"SQL Server":this.setup({statement_separator:t,fieldPrefix:"[",fieldSuffix:"]",tablePrefix:"[",tableSuffix:"]"});break;case"MySQL":this.setup({statement_separator:t,fieldPrefix:"`",fieldSuffix:"`",tablePrefix:"`",tableSuffix:"`"});break;case"PostgreSQL":this.setup({statement_separator:t,dateType:"timestamp",fieldPrefix:'"',fieldSuffix:'"'});break;case"Oracle":var n=i;this.setup({dateFormatMask:"dd-mmm-yyyy hh:MM:ss TT",statement_separator:t,ddlTemplate:n,dateType:"timestamp",charType:"varchar2",fieldPrefix:'"',fieldSuffix:'"'});break;case"SQLite":var n=s;this.setup({fieldPrefix:'"',fieldSuffix:'"',tablePrefix:'"',tableSuffix:'"',statement_separator:t,ddlTemplate:n,dateType:"DATE",charType:"TEXT",intType:"INTEGER",floatType:"REAL"})}return this},ddl_builder.prototype.populateDBTypes=function(){for(var e=0;e<this.definition.columns.length;e++)this.definition.columns[e].type=="charType"?this.definition.columns[e].db_type=this[this.definition.columns[e].type]+"("+this.definition.columns[e].length+")":this.definition.columns[e].db_type=this[this.definition.columns[e].type];this.definition.dateFormatMask=this.dateFormatMask},ddl_builder.prototype.populateWrappers=function(){this.definition.fieldPrefix=this.fieldPrefix,this.definition.fieldSuffix=this.fieldSuffix},ddl_builder.prototype.guessValueSeparator=function(t){var n=t.split("\n"),r=!1,i=0,s="";for(var o=0;o<n.length;o++)if(n[o].search(/[A-Z0-9_]/i)!=-1&&!r){var u=e.trim(n[o]).match(/([A-Z0-9_]+ ?)+([^A-Z0-9_]*)/gi);u.length==1&&(u=e.trim(n[o]).match(/([A-Z0-9_]+ ?)+?([^A-Z0-9_]*)/gi)),r=!0;for(var a=0;a<u.length;a++){var f=u[a].match(/[A-Z0-9_]+([^A-Z0-9_]*)$/i).pop();f.search(/^\s\s+$/)!=-1?f=new RegExp("\\s\\s+"):f.search(/^\t+$/)!=-1?f=new RegExp("\\t+"):f.search(/^\s+$/)!=-1?f=new RegExp("\\s+"):f=e.trim(f);if(f instanceof RegExp||f.length)if(s instanceof RegExp||!!s.length){if(s.toString()!=f.toString())return{status:!1,message:"Unable to find consistent column separator in header row"}}else s=f;else!(f instanceof RegExp)&&!(s instanceof RegExp)&&!s.length&&(s="\n")}s instanceof RegExp||s.length?i=e.trim(n[o]).split(s).length:i=1}else if(n[o].search(/[A-Z0-9_]/i)!=-1&&e.trim(n[o]).split(s).length!=i&&(s.toString()!=/\s\s+/.toString()||e.trim(n[o]).split(/\s+/).length!=i))return{status:!1,message:"Line "+o+' does not have the same number of columns as the header, based on separator "'+s+'".'};return{status:!0,separator:s,column_count:i}},ddl_builder.prototype.parse=function(t){if(!this.valueSeparator.length){var n=this.guessValueSeparator(t);if(!n.status)return"ERROR! "+n.message;this.column_count=n.column_count,this.valueSeparator=n.separator}var r=t.split("\n");for(var i=0;i<r.length;i++){var s=e.trim(r[i]).split(this.valueSeparator);if(e.trim(r[i]).length&&(s.length==this.column_count||this.valueSeparator.toString()==/\s\s+/.toString()&&(s=e.trim(r[i]).split(/\s+/)).length==this.column_count))if(!this.definition.columns.length)for(var o=0;o<s.length;o++){var u=e.trim(s[o]);u.length?this.definition.columns.push({name:u}):this.definition.columns.push(!1)}else{var a=[];for(var o=0;o<s.length;o++)if(this.definition.columns[o]!==!1){var u=e.trim(s[o]).replace(/'/g,"''");isNaN(u)||this.definition.columns[o].type=="dateType"||this.definition.columns[o].type=="charType"?this.definition.columns[o].type!="charType"&&!isNaN(Date.parse(u))?this.definition.columns[o].type="dateType":this.definition.columns[o].type="charType":this.definition.columns[o].type!="floatType"&&u%1!=0?this.definition.columns[o].type="floatType":this.definition.columns[o].type="intType";if(!this.definition.columns[o].length||u.length>this.definition.columns[o].length)this.definition.columns[o].length=u.length;a.push({v:u})}this.definition.data.push({r:a})}}return this.populateDBTypes(),this.populateWrappers(),this.render()},t.registerHelper("formatted_field",function(e){var r="",i=-1;for(var s=0;s<e.columns.length;s++){e.columns[s]&&i++;if(i==this.index){r=e.columns[s].type;break}}return!this.v.length||this.v.toUpperCase()=="NULL"?"NULL":r=="charType"?new t.SafeString("'"+this.v.replace(/'/g,"''")+"'"):r=="dateType"?new t.SafeString("'"+n(this.v,e.dateFormatMask)+"'"):this.v}),t.registerHelper("column_name_for_index",function(e){return e.columns[this.index].name}),ddl_builder.prototype.render=function(){return this.compiledTemplate(e.extend(this.definition,{separator:this.statement_separator}))},ddl_builder}),function(){function e(){function t(e){window.console&&window.console.log("ID Selector: "+e)}function n(e){var t=e+"=",n=document.cookie.split(";");for(var r=0;r<n.length;r++){var i=n[r];while(i.charAt(0)==" ")i=i.substring(1,i.length);if(i.indexOf(t)==0)return decodeURIComponent(i.substring(t.length,i.length))}return null}function k(e,t){this.grid=e,this.idx=t;var n=this.td=y.createElement("td");o=n.style,o.fontWeight="bold",o.padding="4px",o.verticalAlign="middle",o.cursor="pointer";var r=this;n.onmouseover=function(){r.onMouseOver()},n.onmouseout=function(){r.onMouseOut()},n.onclick=function(){r.onClick()};var i=u[t],s=y.createElement("img");s.src=i?"https://www.idselector.com/static/opicons/"+i.icon:"https://www.idselector.com/images/openid.ico",s.style.width="16px",s.style.height="16px",s.style.verticalAlign="middle",n.appendChild(s),n.appendChild(y.createTextNode(" ")),n.appendChild(y.createTextNode(i?i.shortname:"Other OpenID")),this.selected=!1}function L(){this.table=y.createElement("table"),this.table.style.backgroundColor="#FFF",this.table.style.width="100%",this.table.style.border="1px solid #6e91af",this.tbody=y.createElement("tbody"),this.table.appendChild(this.tbody),this.maxOffset=(Math.ceil(u.length/12)-1)*12,this.cells=[];for(var e=0;e<u.length;e++)this.cells[e]=new k(this,e);this.rows=[y.createElement("tr"),y.createElement("tr"),y.createElement("tr"),y.createElement("tr")],this.otherCell=new k(this,-1);var t=y.createElement("td");t.style.padding="4px",t.style.textAlign="right",t.style.verticalAlign="middle",t.colSpan=2,t.innerHTML='<a href="http://openid.net/" style="color:#6e91af;" target="_blank">Help</a>';var n=y.createElement("tr");n.style.borderTop="1px solid #AAA",n.appendChild(this.otherCell.td),n.appendChild(t);for(var r=0;r<4;r++)this.tbody.appendChild(this.rows[r]);this.tbody.appendChild(n),this.offset=0}function O(){var t=window.ActiveXObject?e?document.body.scrollLeft:document.documentElement.scrollLeft:window.pageXOffset,n=e?document.body.clientWidth:document.documentElement.clientWidth,r=n+t-401,i=f.offsetLeft,s=f.offsetTop;if(f.clientTop)s+=f.clientTop;else if(document.defaultView&&document.defaultView.getComputedStyle){var o=document.defaultView.getComputedStyle(f,"");s+=parseInt(o.getPropertyValue("border-top-width")),s+=parseInt(o.getPropertyValue("border-bottom-width"))}var u=f.offsetParent;while(u){i+=u.offsetLeft,s+=u.offsetTop;if(u.clientLeft)i+=u.clientLeft,s+=u.clientTop;else if(document.defaultView&&document.defaultView.getComputedStyle){var o=document.defaultView.getComputedStyle(u,"");s+=parseInt(o.getPropertyValue("border-top-width")),i+=parseInt(o.getPropertyValue("border-left-width"))}u=u.offsetParent}s+=f.offsetHeight,i=Math.max(Math.min(i,r),0);var a=v.style;a.left=i+"px",a.top=s+"px",a.display="block",a.height=b.offsetHeight+2+"px";var l=document.body.parentNode}function M(){v.style.display="none"}function _(e){if(e.isTextEdit){var t=e.createTextRange();t&&(t.move("character",e.value.length),t.select())}}function D(){f.value=="Click to Sign In"&&(f.value="http://"),_(f),O()}function B(e,t,n){if(n){var r=new Date;r.setTime(r.getTime()+n*24*60*60*1e3);var i="; expires="+r.toGMTString()}else var i="";document.cookie=e+"="+encodeURIComponent(t)+i+"; path=/"}var e=document.compatMode!="CSS1Compat",r=n("__openid_selector_openid"),i=n("__openid_selector_op_id"),s=n("__openid_selector_uname"),o,u=[{shortname:"myOpenID",url_suffix:".myopenid.com/",openid1:!0,openid2:!0,id:8,icon:"myopenid.ico",url_prefix:"http://",website:"https://www.myopenid.com/",longname:"myOpenID",usercalled:"username"},{shortname:"claimID",url_suffix:"",openid1:!0,openid2:!1,id:4,icon:"claimid.ico",url_prefix:"http://claimid.com/",website:"http://claimid.com/",longname:"claimID",usercalled:"username"},{shortname:"Clickpass",url_suffix:"",openid1:!0,openid2:!0,id:5,icon:"clickpass.ico",url_prefix:"http://clickpass.com/public/",website:"http://www.clickpass.com/",longname:"Clickpass",usercalled:"username"},{shortname:"Wordpress",url_suffix:".wordpress.com/",openid1:!0,openid2:!1,id:14,icon:"wordpress.ico",url_prefix:"http://",website:"http://www.wordpress.com/",longname:"Wordpress",usercalled:"username"},{shortname:"Blogger",url_suffix:".blogspot.com/",openid1:!0,openid2:!1,id:2,icon:"blogger.ico",url_prefix:"http://",website:"http://www.blogger.com/",longname:"Google Blogger",usercalled:"blog name"},{shortname:"Livejournal",url_suffix:".livejournal.com/",openid1:!0,openid2:!1,id:7,icon:"lj.ico",url_prefix:"http://",website:"http://www.livejournal.com/",longname:"Livejournal",usercalled:"username"},{shortname:"Technorati",url_suffix:"",openid1:!0,openid2:!1,id:10,icon:"technorati.ico",url_prefix:"http://technorati.com/people/technorati/",website:"http://www.technorati.com/",longname:"Technorati",usercalled:"username"},{shortname:"Flickr",url_suffix:"",openid1:!1,openid2:!0,id:6,icon:"flickr.ico",url_prefix:"http://www.flickr.com/photos/",website:"http://www.flickr.com/",longname:"Flickr",usercalled:"username"},{shortname:"Identity.net",url_suffix:".identity.net/",openid1:!0,openid2:!0,id:23,icon:"identity.ico",url_prefix:"http://",website:"http://identity.net/",longname:"Identity.net",usercalled:"username"},{shortname:"Google",url_suffix:"",openid1:!1,openid2:!0,id:26,icon:"google.ico",url_prefix:"",website:"https://www.google.com/accounts/o8/id",longname:"Google",usercalled:"username"},{shortname:"Yahoo!",url_suffix:"",openid1:!1,openid2:!0,id:15,icon:"yahoo.ico",url_prefix:"http://me.yahoo.com/",website:"http://yahoo.com/",longname:"Yahoo!",usercalled:"yahoo id"},{shortname:"AOL",url_suffix:"",openid1:!0,openid2:!1,id:1,icon:"aol.ico",url_prefix:"http://openid.aol.com/",website:"http://www.aol.com/",longname:"America Online/AIM",usercalled:"screenname"}],a=window.idselector_input_id?window.idselector_input_id:"openid_identifier",f=document.getElementById(a);if(f==null){t("couldn't find openid input box with id = "+a);for(H=0;!f&&H<document.forms.length;H++)f=document.forms[H].openid_identifier;for(H=0;!f&&H<document.forms.length;H++)f=document.forms[H].openid_url}if(f==null){t("couldn't find openid input box");return}var l=f.value,c=document.createElement("img");o=c.style,o.width="16px",o.height="16px",o.verticalAlign="middle",o.padding="0px",o.border="0px",o.margin="0px",o.display="inline";var h=document.createElement("div");h.innerHTML='<button type="button"></button>';var p=document.createElement("img");p.src="https://www.idselector.com/images/arrow.gif",p.style.display="inline";var d=h.firstChild;h.removeChild(d),d.id="__idselector_button",d.style.cursor="pointer",d.appendChild(c),d.appendChild(document.createTextNode(" ")),d.appendChild(p);var v=document.createElement("iframe");v.frameBorder=0,v.scrolling="no",o=v.style,o.display="none",o.position="absolute",o.width="400px",o.height="0px",o.margin="0px",o.padding="0px",o.zIndex=1e4,o.border="0px";var m=f.parentNode,g=null;window.idselector_target_id&&(g=document.getElementById(window.idselector_target_id),g||t("couldn't find element with id "+window.idselector_target_id)),g?g.insertBefore(d,g.firstChild):(m.insertBefore(d,f.nextSibling),m.insertBefore(document.createTextNode(" "),d)),document.body.appendChild(v);var y=v.contentWindow.document;y.open(),y.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><title>ID Selector</title><style type="text/css">html{color:#000;background:#6e91af;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:\'\';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}body {border:1px solid #6e91af;font:13px/1.231 arial,helvetica,clean,sans-serif;*font-size:small;*font:x-small;}table {font-size:inherit;font:100%;}pre,code,kbd,samp,tt{font-family:monospace;*font-size:108%;line-height:100%;}</style></head><body></body></html>'),y.close();var b=y.body,w=y.createElement("img");w.style.verticalAlign="middle",w.style.cursor="pointer",w.src="https://www.idselector.com/images/arrow_white_back.png";var E=y.createElement("img");E.style.verticalAlign="middle",E.style.cursor="pointer",E.src="https://www.idselector.com/images/arrow_white_forward.png";var S=y.createElement("div");S.style[document.all?"styleFloat":"cssFloat"]="right",S.innerHTML='<a href="https://www.myopenid.com/signup?affiliate_id=21239" style="color:#fff;" target="_blank">Get an OpenID</a>';var x=y.createElement("div");o=x.style,o.fontWeight="bold",o.color="#fff",o.padding="2px 8px 2px 8px",x.appendChild(S),x.appendChild(y.createTextNode("Sign in with OpenID using"));var T=y.createElement("span");T.appendChild(y.createTextNode("xxx:"));var N=y.createElement("input");N.type="text",N.size=20,o=N.style,o.verticalAlign="middle",o.padding="2px 2px 2px 20px",o.backgroundRepeat="no-repeat",o.backgroundPosition="2px 2px";var C=y.createElement("div");o=C.style,o.color="#fff",o.padding="2px 8px 2px 8px",o.textAlign="right",o.position="relative",C.appendChild(T),C.appendChild(y.createTextNode(" ")),C.appendChild(N),_id=k.prototype={},_id.onMouseOver=function(){this.selected||(this.td.style.backgroundColor="#eee")},_id.onMouseOut=function(){this.selected||(this.td.style.backgroundColor="")},_id.onClick=function(){this.grid.select(this),provider=u[this.idx],this.idx==-1?(f.value="http://",f.focus()):provider.openid2&&!provider.openid1?(f.focus(),setTimeout(M,1)):(N.focus(),N.select())},_id.setSelected=function(e){this.td.style.backgroundColor=e?"#c6d9e8":"",this.selected=e},_id=L.prototype={},_id.forward=function(){this.offset=Math.min(this.offset+12,this.maxOffset),this.gen()},_id.back=function(){this.offset=Math.max(this.offset-12,0),this.gen()},_id.gen=function(){for(var e=0;e<4;e++){var t=this.rows[e];while(t.firstChild)t.removeChild(t.firstChild)}for(var e=0;e<12;e++){var t=this.rows[Math.floor(e/3)],n=this.cells[this.offset+e];n?t.appendChild(n.td):t.appendChild(y.createElement("td"))}E.style.visibility=this.offset==this.maxOffset?"hidden":"",w.style.visibility=this.offset==0?"hidden":"",v.style.height=b.offsetHeight+2+"px"},_id.select=function(e){this.curr&&this.curr.setSelected(!1),this.curr=e,e.setSelected(!0);if(e.idx>-1){var t=u[e.idx];if(t.openid2&&!t.openid1)T.style.visibility="hidden",N.style.visibility="hidden",f.value=t.website;else{T.style.visibility="",N.style.visibility="",T.removeChild(T.firstChild);var n=y.createTextNode(t.longname+" "+t.usercalled+":");T.appendChild(n),N.style.backgroundImage="url(https://www.idselector.com/static/opicons/"+t.icon+")",f.value=t.url_prefix+"username"+t.url_suffix,N.value="username"}c.src="https://www.idselector.com/static/opicons/"+t.icon}else T.style.visibility="hidden",N.style.visibility="hidden",c.src="https://www.idselector.com/images/openid.ico"},_id.setName=function(e){var t=u[this.curr.idx];f.value=t.url_prefix+e+t.url_suffix};var A=new L;A.gen(),b.appendChild(x),b.appendChild(A.table),b.appendChild(C),d.onclick=function(e){return v.style.display=="none"?O():M(),e&&(e.cancelBubble=!0),!1},d.onfocus=function(){d.blur()},E.onclick=function(){A.forward()},w.onclick=function(){A.back()},f.onkeypress=function(e){var t;window.event?t=window.event.keyCode:e.which&&(t=e.which),t!=13&&t!=9&&A.select(A.otherCell)},N.onkeydown=function(e){var t;v.contentWindow.event?t=v.contentWindow.event.keyCode:e.which&&(t=e.which),(t==13||t==9)&&setTimeout(function(){f.onfocus=D,f.focus(),setTimeout(M,1)},1)},N.onkeyup=function(){var e=this.value;e||(e="username",this.value=e,this.select()),A.setName(e)},oldOnResize=window.onresize,window.onresize=function(e){try{v.style.display=="block"&&O()}finally{oldOnResize&&oldOnResize(e)}},oldOnScroll=window.onscroll,window.onscroll=function(e){try{v.style.display=="block"&&O()}finally{oldOnScroll&&oldOnScroll(e)}};if(i){var P=null;for(var H=0;H<u.length;H++)u[H].id==i&&(P=A.cells[H]);P&&(A.select(P),N.value=s)}A.curr||A.select(A.otherCell),r?f.value=r:l.length==0&&(f.value="Click to Sign In"),f.onfocus=D;var j=null;m=f.parentNode;while(m&&m.nodeType==1){if(m.nodeName=="FORM"){j=m;break}m=m.parentNode}if(j){var F=j.onsubmit;j.onsubmit=function(e){try{B("__openid_selector_openid",f.value,365);if(A.curr.idx>-1){var t=u[A.curr.idx].id;B("__openid_selector_op_id",t,365),B("__openid_selector_uname",N.value,365)}else B("__openid_selector_op_id","",-1),B("__openid_selector_uname","",-1)}finally{if(F)return F(e)}}}window.ActiveXObject?document.body.parentNode.attachEvent("onclick",function(){window.event.srcElement!=f&&window.event.srcElement!=d&&M()}):document.body.parentNode.addEventListener("click",function(e){e.target!=f&&e.target!=d&&M()},!1)}var t=window.onload;window.onload=function(n){try{e()}finally{return t&&t(n)}}}(),define("libs/idselector",function(){}),requirejs.config({paths:{jQuery:"libs/jquery/jquery",Underscore:"libs/underscore",Backbone:"libs/backbone",Bootstrap:"libs/bootstrap",Handlebars:"libs/handlebars-1.0.0.beta.6",HandlebarsHelpers:"libs/handlebarsHelpers",DateFormat:"libs/date.format",BrowserEngines:"libs/browserEngines",FiddleEditor:"libs/fiddleEditor",CodeMirror:"libs/codemirror/codemirror",MySQLCodeMirror:"libs/codemirror/mode/mysql/mysql",XPlans:"libs/xplans",DDLBuilder:"libs/ddl_builder"},shim:{Backbone:{deps:["Underscore","jQuery","libs/json2"],exports:"Backbone"},jQuery:{exports:"$"},Underscore:{exports:"_"},CodeMirror:{exports:"CodeMirror"},Handlebars:{exports:"Handlebars"},DateFormat:{exports:"dateFormat"},"XPlans/oracle/loadswf":{deps:["XPlans/oracle/flashver"],exports:"loadswf"},"XPlans/mssql":{exports:"QP"},MySQLCodeMirror:["CodeMirror"],"libs/jquery/jquery.blockUI":["jQuery"],"libs/jquery/jquery.cookie":["jQuery"],"Bootstrap/bootstrap-collapse":["jQuery"],"Bootstrap/bootstrap-tab":["jQuery"],"Bootstrap/bootstrap-dropdown":["jQuery"],"Bootstrap/bootstrap-modal":["jQuery"],"Bootstrap/bootstrap-tooltip":["jQuery"],"Bootstrap/bootstrap-popover":["jQuery","Bootstrap/bootstrap-tooltip"]}}),require(["jQuery","Underscore","dbTypes_cached","fiddle_backbone/app","DDLBuilder/ddl_builder","libs/idselector"],function(e,t,n,r,i){function u(t){e("#exit_fullscreen").css("display")=="none"?(e("body").css("overflow-y","hidden"),e(".navbar-fixed-top").css("position","fixed").css("margin",0),e("#exit_fullscreen").css("display","block"),e("#exit_fullscreen span").text("Exit Fullscreen "+t),e(".nav-collapse, .btn-navbar, #db_type_label_collapsed .navbar-text").css("display","none")):(e("body").css("overflow-y","auto"),e("body").css("height","100%"),e(".navbar-fixed-top").css("position","").css("margin",""),e("#exit_fullscreen").css("display","none"),e(".nav-collapse, .btn-navbar, #db_type_label_collapsed .navbar-text").css("display",""))}function a(){var t=e(window).height()-165;if(t>400){var n=e("#schema-output").width();e("#schema-output").height((t-10)*.7),e("#output").css("min-height",(t-10)*.3+"px"),fiddleBackbone.schemaDefView.editor.isFullscreen()?(e("#fiddleFormDDL .CodeMirror-scroll, #schema_ddl").css("height",e(window).height()+"px"),e("#fiddleFormDDL .CodeMirror-scroll .CodeMirror-gutter").height("height",e(window).height()+"px")):(e("#fiddleFormDDL .CodeMirror-scroll").css("height",e("#fiddleFormDDL").height()-(5+e("#fiddleFormDDL .action_buttons").height())+"px"),e("#schema_ddl").css("height",e("#fiddleFormDDL").height()-(15+e("#fiddleFormDDL .action_buttons").height())+"px"),e("#fiddleFormDDL .CodeMirror-scroll .CodeMirror-gutter").height(e("#fiddleFormDDL .CodeMirror-scroll").height()-2)),fiddleBackbone.queryView.editor.isFullscreen()?(e("#fiddleFormSQL .CodeMirror-scroll, #sql").css("height",e(window).height()+"px"),e("#fiddleFormSQL .CodeMirror-scroll .CodeMirror-gutter").css("height",e(window).height()+"px")):(e("#fiddleFormSQL .CodeMirror-scroll").css("height",e("#fiddleFormSQL").height()-(5+e("#fiddleFormSQL .action_buttons").height())+"px"),e("#sql").css("height",e("#fiddleFormSQL").height()-(15+e("#fiddleFormSQL .action_buttons").height())+"px"),e("#fiddleFormSQL .CodeMirror-scroll .CodeMirror-gutter").height(e("#fiddleFormSQL .CodeMirror-scroll").height()-2)),e("#browser").height(e("#fiddleFormDDL .CodeMirror-scroll").height());var r=function(t){var n={height:e(".blockMsg",t).height(),width:e(".blockMsg",t).width()},r={height:e(t).height(),width:e(t).width()};e(".blockMsg",t).css("top",(r.height-n.height)/2).css("left",(r.width-n.width)/2)};r(e("div.sql.panel")),r(e("#output")),fiddleBackbone.schemaDefView.refresh(),fiddleBackbone.queryView.refresh()}}e.blockUI.defaults.overlayCSS.cursor="auto",e.blockUI.defaults.css.cursor="auto",fiddleBackbone=r.initialize(n),e("#userInfo").on("click","#myFiddles",function(t){t.preventDefault(),e("#myFiddlesModal").modal("show"),e("#myFiddlesModal .modal-body").block({message:"Loading..."});var n=function(){var t=e(this);e(".tab-pane",this).removeClass("active"),e(e("#myFiddlesTabs li.active a").attr("href")).addClass("active"),t.unblock(),e(".preview-schema").popover({placement:"left",title:"Schema Structure",content:function(){return e(this).closest("td").find(".schemaPreviewWrapper").html()}}),e(".preview-ddl").popover({placement:"left",title:"Schema DDL",content:function(){return e(this).closest("td").find(".schemaPreviewWrapper").html()}}),e(".result-sets").popover({placement:"left",title:"Query Results",content:function(){return e(this).closest("td").find(".resultSetWrapper").html()}}),e(".preview-sql").popover({placement:"left",title:"SQL Statements",content:function(){return e(this).closest("td").find(".resultSetWrapper").html()}}),e(".showAll",this).click(function(t){t.preventDefault(),e("tr.for-schema-"+e(this).closest("tr").attr("id")).show("fast"),e(this).hide()}),e(".favorite",this).click(function(t){t.preventDefault();var r=this,i=e(this).closest("tr.queryLog");e.post("index.cfm/UserFiddles/setFavorite",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id"),favorite:e(this).attr("href")=="#addFavorite"?1:0},function(){e(r).attr("href")=="#addFavorite"?e(r).attr("href","#removeFavorite").attr("title","Remove from favorites"):e(r).attr("href","#addFavorite").attr("title","Add to favorites"),e("i",r).toggleClass("icon-star-empty icon-star"),e(r).closest(".tab-pane").attr("id")=="favorites"&&e(".queryLog[schema_def_id="+e(r).attr("schema_def_id")+"][query_id="+e(r).attr("query_id")+"] a.favorite").replaceWith(r),e("#favorites").load("index.cfm/UserFiddles/getFavorites",{tz:(new Date).getTimezoneOffset()/60},n)})}),e(".forgetSchema",this).click(function(n){n.preventDefault();var r=e(this).closest("tr.schemaLog").attr("id");e.post("index.cfm/UserFiddles/forgetSchema",{schema_def_id:e(this).attr("schema_def_id")},function(){e("#"+r+",tr.for-schema-"+r,t).remove()})}),e(".forgetQuery",this).click(function(t){t.preventDefault();var n=e(this).closest("tr.queryLog");e.post("index.cfm/UserFiddles/forgetQuery",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id")},function(){n.remove()})}),e(".forgetOtherQueries",this).click(function(t){t.preventDefault();var n=e(this).closest("tbody").find('tr.queryLog[schema_def_id="'+e(this).attr("schema_def_id")+'"][query_id!="'+e(this).attr("query_id")+'"]');e.post("index.cfm/UserFiddles/forgetOtherQueries",{schema_def_id:e(this).attr("schema_def_id"),query_id:e(this).attr("query_id")},function(){n.remove()})})};e("#myFiddlesModal .modal-body").load("index.cfm/UserFiddles",{tz:(new Date).getTimezoneOffset()/60},n)}),e("#myFiddlesTabs a").on("click",function(t){t.preventDefault(),e(this).tab("show")}),e("#myFiddlesModal .modal-body").on("click","a",function(t){e(this).hasClass("favorite")||e("#myFiddlesModal").modal("hide")}),e("#myFiddlesModal").on("hidden",function(){e(".popover-anchor",this).popover("hide")});if(e("#user_choices",this).length){var s=[];try{fullHistory=e.parseJSON(localStorage.getItem("fiddleHistory")),fullHistory.length&&(s=t.map(fullHistory,function(e,t){return[e.fragment,dateFormat(e.last_used,"mm/dd/yyyy HH:MM:ss")]}),e.post("index.cfm/UserFiddles/loadFromLocalStorage",{localHistory:JSON.stringify(s)},function(n){var r=e.parseJSON(n);fullHistory=t.reject(fullHistory,function(e){return t.find(r,function(t){return t[0]==e.fragment})}),localStorage.setItem("fiddleHistory",JSON.stringify(fullHistory))}))}catch(o){}}e("#loginModal form").submit(function(){e("#hash",this).val(window.location.hash)}),e("#loginModal").on("hidden",function(){e("iframe").css("display","none")}),e("#userInfo").on("click","#logout",function(t){t.preventDefault(),e("<form>",{action:e(this).attr("href"),method:"GET"}).append(e("<input>",{type:"hidden",name:"hash",value:window.location.hash})).submit()}),e("#textToDDLModal .btn").click(function(t){t.preventDefault();var n=(new i({tableName:e("#tableName").val()})).setupForDBType(fiddleBackbone.dbTypes.getSelectedType().get("simple_name"),fiddleBackbone.schemaDef.get("statement_separator")),r=n.parse(e("#raw").val());e("#parseResults").text(r),e(this).attr("id")=="appendDDL"&&(fiddleBackbone.schemaDef.set("ddl",fiddleBackbone.schemaDef.get("ddl")+"\n\n"+r),fiddleBackbone.schemaDef.trigger("reloaded"),e("#textToDDLModal").modal("hide"))}),e("#exit_fullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.schemaDefView.editor.setFullscreen(!1),fiddleBackbone.queryView.editor.setFullscreen(!1),u(""),a()}),e("#schemaFullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.schemaDefView.editor.setFullscreen(!0),u("Schema Editor")}),e("#queryFullscreen").on("click",function(e){e.preventDefault(),fiddleBackbone.queryView.editor.setFullscreen(!0),u("Query Editor")}),e("#schemaBrowser").on("click",function(t){t.preventDefault(),e(this).attr("disabled")||(e("#fiddleFormDDL .CodeMirror, .ddl_actions").css("display","none"),e("#browser, .browser_actions").css("display","block"))}),e("#browser").on("click",".tables a",function(t){t.preventDefault(),e("i",this).toggleClass("icon-minus icon-plus"),e(this).siblings(".columns").toggle()}),e("#ddlEdit").on("click",function(t){t.preventDefault(),e("#fiddleFormDDL .CodeMirror, .ddl_actions").css("display","block"),e("#browser, .browser_actions").css("display","none")}),e(window).bind("resize",a),setTimeout(a,1),e(".nav").on("click","a",function(t){e(".nav-collapse.in").collapse("hide")})}),define("main",function(){}) \ No newline at end of file