diff --git a/images/github.svg b/images/github.svg index 7f485e46..8a515251 100644 --- a/images/github.svg +++ b/images/github.svg @@ -1,5 +1,5 @@ - - + + + + diff --git a/images/gplus.svg b/images/gplus.svg index 75ecfc71..97c9004e 100644 --- a/images/gplus.svg +++ b/images/gplus.svg @@ -1,5 +1,5 @@ - - + + + + diff --git a/images/twitter.svg b/images/twitter.svg index 5b452e93..29f7267d 100644 --- a/images/twitter.svg +++ b/images/twitter.svg @@ -1,5 +1,5 @@ - - + + + + diff --git a/index.html b/index.html index 22f5bfe9..a2dcfba0 100644 --- a/index.html +++ b/index.html @@ -30,26 +30,24 @@ -
-

+
+

2 your chart will show up here ☟

-
+
-
-
+
+

@@ -137,6 +135,6 @@

- + diff --git a/script/mscgen-main.js b/script/mscgen-main.js index 05a389fd..0825109a 100644 --- a/script/mscgen-main.js +++ b/script/mscgen-main.js @@ -65,4 +65,4 @@ OTHER DEALINGS IN THE SOFTWARE. * @license Use it if you like it */ -function stackBlurImage(e,t,n,r){var i=document.getElementById(e),s=i.naturalWidth,o=i.naturalHeight,u=document.getElementById(t);u.style.width=s+"px",u.style.height=o+"px",u.width=s,u.height=o;var a=u.getContext("2d");a.clearRect(0,0,s,o),a.drawImage(i,0,0);if(isNaN(n)||n<1)return;r?stackBlurCanvasRGBA(t,0,0,s,o,n):stackBlurCanvasRGB(t,0,0,s,o,n)}function stackBlurCanvasRGBA(e,t,n,r,i,s){if(isNaN(s)||s<1)return;s|=0;var o=document.getElementById(e),u=o.getContext("2d"),a;try{try{a=u.getImageData(t,n,r,i)}catch(f){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),a=u.getImageData(t,n,r,i)}catch(f){throw alert("Cannot access local image"),new Error("unable to access local image data: "+f)}}}catch(f){throw alert("Cannot access image"),new Error("unable to access image data: "+f)}var l=a.data,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H=s+s+1,B=r<<2,j=r-1,F=i-1,I=s+1,q=I*(I+1)/2,R=new BlurStack,U=R;for(p=1;p>$,D!=0?(D=255/D,l[m]=(y*V>>$)*D,l[m+1]=(b*V>>$)*D,l[m+2]=(w*V>>$)*D):l[m]=l[m+1]=l[m+2]=0,y-=S,b-=x,w-=T,E-=N,S-=W.r,x-=W.g,T-=W.b,N-=W.a,d=g+((d=c+s+1)>$,D>0?(D=255/D,l[d]=(y*V>>$)*D,l[d+1]=(b*V>>$)*D,l[d+2]=(w*V>>$)*D):l[d]=l[d+1]=l[d+2]=0,y-=S,b-=x,w-=T,E-=N,S-=W.r,x-=W.g,T-=W.b,N-=W.a,d=c+((d=h+I)>z,l[m+1]=b*U>>z,l[m+2]=w*U>>z,y-=E,b-=S,w-=x,E-=q.r,S-=q.g,x-=q.b,d=g+((d=c+s+1)>z,l[d+1]=b*U>>z,l[d+2]=w*U>>z,y-=E,b-=S,w-=x,E-=q.r,S-=q.g,x-=q.b,d=c+((d=h+H)255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return e.length==1&&(e="0"+e),t.length==1&&(t="0"+t),n.length==1&&(n="0"+n),"#"+e+t+n},this.getHelpXML=function(){var e=new Array;for(var n=0;n "+f.toRGB()+" -> "+f.toHex());a.appendChild(l),a.appendChild(c),u.appendChild(a)}catch(h){}return u}}(function(e,t){function n(e){return H.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}function r(e){if(!vn[e]){var t=_.body,n=H("<"+e+">").appendTo(t),r=n.css("display");n.remove();if(r==="none"||r===""){mn||(mn=_.createElement("iframe"),mn.frameBorder=mn.width=mn.height=0),t.appendChild(mn);if(!gn||!mn.createElement)gn=(mn.contentWindow||mn.contentDocument).document,gn.write((H.support.boxModel?"":"")+""),gn.close();n=gn.createElement(e),gn.body.appendChild(n),r=H.css(n,"display"),t.removeChild(mn)}vn[e]=r}return vn[e]}function i(e,t){var n={};return H.each(En.concat.apply([],En.slice(0,t)),function(){n[this]=e}),n}function s(){Sn=t}function o(){return setTimeout(s,0),Sn=H.now()}function u(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function a(){try{return new e.XMLHttpRequest}catch(t){}}function f(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},s,o,u=r.length,a,f=r[0],l,c,h,p,d;for(s=1;s0){if(n!=="border")for(;i=0===n})}function N(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function C(){return!0}function k(){return!1}function L(e,t,n){var r=t+"defer",i=t+"queue",s=t+"mark",o=H._data(e,r);o&&(n==="queue"||!H._data(e,i))&&(n==="mark"||!H._data(e,s))&&setTimeout(function(){!H._data(e,i)&&!H._data(e,s)&&(H.removeData(e,r,!0),o.fire())},0)}function A(e){for(var t in e){if(t==="data"&&H.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function O(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:H.isNumeric(r)?+r:F.test(r)?H.parseJSON(r):r}catch(s){}H.data(e,n,r)}else r=t}return r}function M(e){var t=B[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n)[^>]*$|#([\w\-]*)$)/,a=/\S/,f=/^\s+/,l=/\s+$/,c=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,m=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,y=/(msie) ([\w.]+)/,b=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,E=/^-ms-/,S=function(e,t){return(t+"").toUpperCase()},x=D.userAgent,T,N,C,k=Object.prototype.toString,L=Object.prototype.hasOwnProperty,A=Array.prototype.push,O=Array.prototype.slice,M=String.prototype.trim,P=Array.prototype.indexOf,H={};return r.fn=r.prototype={constructor:r,init:function(e,n,i){var s,o,a,f;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!n&&_.body)return this.context=_,this[0]=_.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)!=="<"||e.charAt(e.length-1)!==">"||e.length<3?s=u.exec(e):s=[null,e,null];if(s&&(s[1]||!n)){if(s[1])return n=n instanceof r?n[0]:n,f=n?n.ownerDocument||n:_,a=c.exec(e),a?r.isPlainObject(n)?(e=[_.createElement(a[1])],r.fn.attr.call(e,n,!0)):e=[f.createElement(a[1])]:(a=r.buildFragment([s[1]],[f]),e=(a.cacheable?r.clone(a.fragment):a.fragment).childNodes),r.merge(this,e);o=_.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return i.find(e);this.length=1,this[0]=o}return this.context=_,this.selector=e,this}return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e)}return r.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),r.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return O.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 i=this.constructor();return r.isArray(e)?A.apply(i,e):r.merge(i,e),i.prevObject=this,i.context=this.context,t==="find"?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return r.each(this,e,t)},ready:function(e){return r.bindReady(),N.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(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(e){return this.pushStack(r.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:A,sort:[].sort,splice:[].splice},r.fn.init.prototype=r.fn,r.extend=r.fn.extend=function(){var e,n,i,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"&&!r.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f0)return;N.fireWith(_,[r]),r.fn.trigger&&r(_).trigger("ready").off("ready")}},bindReady:function(){if(!N){N=r.Callbacks("once memory");if(_.readyState==="complete")return setTimeout(r.ready,1);if(_.addEventListener)_.addEventListener("DOMContentLoaded",C,!1),e.addEventListener("load",r.ready,!1);else if(_.attachEvent){_.attachEvent("onreadystatechange",C),e.attachEvent("onload",r.ready);var t=!1;try{t=e.frameElement==null}catch(i){}_.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return r.type(e)==="function"},isArray:Array.isArray||function(e){return r.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):H[k.call(e)]||"object"},isPlainObject:function(e){if(!e||r.type(e)!=="object"||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!L.call(e,"constructor")&&!L.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||L.call(e,i)},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=r.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(h.test(t.replace(p,"@").replace(d,"]").replace(v,"")))return(new Function("return "+t))();r.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var i,s;try{e.DOMParser?(s=new DOMParser,i=s.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(o){i=t}return(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)&&r.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&a.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(E,"ms-").replace(w,S)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,i){var s,o=0,u=e.length,a=u===t||r.isFunction(e);if(i){if(a){for(s in e)if(n.apply(e[s],i)===!1)break}else for(;o0&&e[0]&&e[f-1]||f===0||r.isArray(e));if(l)for(;a1?j.call(arguments,0):t,f.notifyWith(l,o)}}function n(e){return function(t){r[e]=arguments.length>1?j.call(arguments,0):t,--u||f.resolveWith(f,r)}}var r=j.call(arguments,0),i=0,s=r.length,o=Array(s),u=s,a=s,f=s<=1&&e&&H.isFunction(e.promise)?e:H.Deferred(),l=f.promise();if(s>1){for(;i
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!n.length||!r)return{};i=_.createElement("select"),s=i.appendChild(_.createElement("option")),o=p.getElementsByTagName("input")[0],t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.55/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:o.value==="on",optSelected:s.selected,getSetAttribute:p.className!=="t",enctype:!!_.createElement("form").enctype,html5Clone:_.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},H.boxModel=t.boxModel=_.compatMode==="CSS1Compat",o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete p.test}catch(v){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),o=_.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","checked"),o.setAttribute("name","t"),p.appendChild(o),u=_.createDocumentFragment(),u.appendChild(p.lastChild),t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,u.removeChild(o),u.appendChild(p);if(p.attachEvent)for(c in{submit:1,change:1,focusin:1})l="on"+c,h=l in p,h||(p.setAttribute(l,"return;"),h=typeof p[l]=="function"),t[c+"Bubbles"]=h;return u.removeChild(p),u=i=s=p=o=null,H(function(){var n,r,i,s,o,u,f,l,c,d,v,m,g,y=_.getElementsByTagName("body")[0];!y||(l=1,g="padding:0;margin:0;border:",v="position:absolute;top:0;left:0;width:1px;height:1px;",m=g+"0;visibility:hidden;",c="style='"+v+g+"5px solid #000;",d="
"+""+"
",n=_.createElement("div"),n.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+l+"px",y.insertBefore(n,y.firstChild),p=_.createElement("div"),n.appendChild(p),p.innerHTML="
t
",a=p.getElementsByTagName("td"),h=a[0].offsetHeight===0,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=h&&a[0].offsetHeight===0,e.getComputedStyle&&(p.innerHTML="",f=_.createElement("div"),f.style.width="0",f.style.marginRight="0",p.style.width="2px",p.appendChild(f),t.reliableMarginRight=(parseInt((e.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,t.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",t.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=v+m,p.innerHTML=d,r=p.firstChild,i=r.firstChild,o=r.nextSibling.firstChild.firstChild,u={doesNotAddBorder:i.offsetTop!==5,doesAddBorderForTableAndCells:o.offsetTop===5},i.style.position="fixed",i.style.top="20px",u.fixedPosition=i.offsetTop===20||i.offsetTop===15,i.style.position=i.style.top="",r.style.overflow="hidden",r.style.position="relative",u.subtractsBorderForOverflowNotVisible=i.offsetTop===-5,u.doesNotIncludeMarginInBodyOffset=y.offsetTop!==l,e.getComputedStyle&&(p.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof n.style.zoom!="undefined"&&(n.style.zoom=1),y.removeChild(n),f=p=n=null,H.extend(t,u))}),t}();var F=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;H.extend({cache:{},uuid:0,expando:"jQuery"+(H.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?H.cache[e[H.expando]]:e[H.expando],!!e&&!A(e)},data:function(e,n,r,i){if(!!H.acceptData(e)){var s,o,u,a=H.expando,f=typeof n=="string",l=e.nodeType,c=l?H.cache:e,h=l?e[a]:e[a]&&a,p=n==="events";if((!h||!c[h]||!p&&!i&&!c[h].data)&&f&&r===t)return;h||(l?e[a]=h=++H.uuid:h=a),c[h]||(c[h]={},l||(c[h].toJSON=H.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=H.extend(c[h],n):c[h].data=H.extend(c[h].data,n);return s=o=c[h],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[H.camelCase(n)]=r),p&&!o[n]?s.events:(f?(u=o[n],u==null&&(u=o[H.camelCase(n)])):u=o,u)}},removeData:function(e,t,n){if(!!H.acceptData(e)){var r,i,s,o=H.expando,u=e.nodeType,a=u?H.cache:e,f=u?e[o]:o;if(!a[f])return;if(t){r=n?a[f]:a[f].data;if(r){H.isArray(t)||(t in r?t=[t]:(t=H.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){H.removeData(this,e)})}}),H.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",H._data(e,t,(H._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:(H._data(t,r)||1)-1;i?H._data(t,r,i):(H.removeData(t,r,!0),L(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=H._data(e,t),n&&(!r||H.isArray(n)?r=H._data(e,t,H.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=H.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),H._data(e,t+".run",i),r.call(e,function(){H.dequeue(e,t)},i)),n.length||(H.removeData(e,t+"queue "+t+".run",!0),L(e,t,"queue"))}}),H.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){H.removeAttr(this,e)})},prop:function(e,t){return H.access(this,H.prop,e,t,arguments.length>1)},removeProp:function(e){return e=H.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(H.isFunction(e))return this.each(function(t){H(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(R);for(n=0,r=this.length;n-1)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!!arguments.length)return i=H.isFunction(e),this.each(function(r){var s=H(this),o;if(this.nodeType===1){i?o=e.call(this,r,s.val()):o=e,o==null?o="":typeof o=="number"?o+="":H.isArray(o)&&(o=H.map(o,function(e){return e==null?"":e+""})),n=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,o,"value")===t)this.value=o}});if(s)return n=H.valHooks[s.type]||H.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(U,""):r==null?"":r)}}),H.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,s=e.selectedIndex,o=[],u=e.options,a=e.type==="select-one";if(s<0)return null;n=a?s:0,r=a?s+1:u.length;for(;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 s,o,u,a=e.nodeType;if(!!e&&a!==3&&a!==8&&a!==2){if(i&&n in H.attrFn)return H(e)[n](r);if(typeof e.getAttribute=="undefined")return H.prop(e,n,r);u=a!==1||!H.isXMLDoc(e),u&&(n=n.toLowerCase(),o=H.attrHooks[n]||(V.test(n)?K:J));if(r!==t){if(r===null){H.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,""+r),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)}},removeAttr:function(e,t){var n,r,i,s,o,u=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(R),s=r.length;for(;u=0}})});var G=/^(?:textarea|input|select)$/i,Y=/^([^\.]*)?(?:\.(.+))?$/,Z=/(?:^|\s)hover(\.\S+)?\b/,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,it=function(e){var t=rt.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},st=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))},ot=function(e){return H.event.special.hover?e:e.replace(Z,"mouseenter$1 mouseleave$1")};H.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g;if(!(e.nodeType===3||e.nodeType===8||!n||!r||!(o=H._data(e)))){r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=H.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof H=="undefined"||!!e&&H.event.triggered===e.type?t:H.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=H.trim(ot(n)).split(" ");for(f=0;f=0&&(o=o.slice(0,-1),f=!0),o.indexOf(".")>=0&&(u=o.split("."),o=u.shift(),u.sort());if((!i||H.event.customEvent[o])&&!H.event.global[o])return;n=typeof n=="object"?n[H.expando]?n:new H.Event(o,n):new H.Event(o),n.type=o,n.isTrigger=!0,n.exclusive=f,n.namespace=u.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,p=o.indexOf(":")<0?"on"+o:"";if(!i){a=H.cache;for(l in a)a[l].events&&a[l].events[o]&&H.event.trigger(n,r,a[l].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?H.makeArray(r):[],r.unshift(n),d=H.event.special[o]||{};if(d.trigger&&d.trigger.apply(i,r)===!1)return;m=[[i,d.bindType||o]];if(!s&&!d.noBubble&&!H.isWindow(i)){g=d.delegateType||o,c=nt.test(g+o)?i:i.parentNode,h=null;for(;c;c=c.parentNode)m.push([c,g]),h=c;h&&h===i.ownerDocument&&m.push([h.defaultView||h.parentWindow||e,g])}for(l=0;li&&a.push({elem:this,matches:r.slice(i)});for(f=0;f0?this.on(t,null,e,n):this.trigger(t)},H.attrFn&&(H.attrFn[t]=!0),et.test(t)&&(H.event.fixHooks[t]=H.event.keyHooks),tt.test(t)&&(H.event.fixHooks[t]=H.event.mouseHooks)}),function(){function e(e,t,n,r,s,o){for(var u=0,a=r.length;u0){l=f;break}}f=f[e]}r[u]=l}}}function n(e,t,n,r,s,o){for(var u=0,a=r.length;u+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),s=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(e,t,n,i){n=n||[],t=t||_;var s=t;if(t.nodeType!==1&&t.nodeType!==9)return[];if(!e||typeof e!="string")return n;var u,a,f,l,c,p,m,g,b=!0,w=h.isXML(t),E=[],x=e;do{r.exec(""),u=r.exec(x);if(u){x=u[3],E.push(u[1]);if(u[2]){l=u[3];break}}}while(u);if(E.length>1&&v.exec(e))if(E.length===2&&d.relative[E[0]])a=S(E[0]+E[1],t,i);else{a=d.relative[E[0]]?[t]:h(E.shift(),t);while(E.length)e=E.shift(),d.relative[e]&&(e+=E.shift()),a=S(e,a,i)}else{!i&&E.length>1&&t.nodeType===9&&!w&&d.match.ID.test(E[0])&&!d.match.ID.test(E[E.length-1])&&(c=h.find(E.shift(),t,w),t=c.expr?h.filter(c.expr,c.set)[0]:c.set[0]);if(t){c=i?{expr:E.pop(),set:y(i)}:h.find(E.pop(),E.length!==1||E[0]!=="~"&&E[0]!=="+"||!t.parentNode?t:t.parentNode,w),a=c.expr?h.filter(c.expr,c.set):c.set,E.length>0?f=y(a):b=!1;while(E.length)p=E.pop(),m=p,d.relative[p]?m=E.pop():p="",m==null&&(m=t),d.relative[p](f,m,w)}else f=E=[]}f||(f=a),f||h.error(p||e);if(o.call(f)==="[object Array]")if(!b)n.push.apply(n,f);else if(t&&t.nodeType===1)for(g=0;f[g]!=null;g++)f[g]&&(f[g]===!0||f[g].nodeType===1&&h.contains(t,f[g]))&&n.push(a[g]);else for(g=0;f[g]!=null;g++)f[g]&&f[g].nodeType===1&&n.push(a[g]);else y(f,n);return l&&(h(l,s,n,i),h.uniqueSort(n)),n};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i=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]=s++,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(e,t,n,i,s){if(e[1]==="not"){if(!((r.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var o=h.filter(e[3],t,n,!0^s);return n||i.push.apply(i,o),!1}e[3]=h(e[3],null,null,t)}else if(d.match.POS.test(e[0])||d.match.CHILD.test(e[0]))return!0;return e},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 tn[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=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(_.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",r.insertBefore(e,r.firstChild),_.getElementById(n)&&(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}),r.removeChild(e),r=e=null}(),function(){var e=_.createElement("div");e.appendChild(_.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="",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),_.querySelectorAll&&function(){var e=h,t=_.createElement("div"),n="__sizzle__";t.innerHTML="

";if(!t.querySelectorAll||t.querySelectorAll(".TEST").length!==0){h=function(t,r,i,s){r=r||_;if(!s&&!h.isXML(r)){var o=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(o&&(r.nodeType===1||r.nodeType===9)){if(o[1])return y(r.getElementsByTagName(t),i);if(o[2]&&d.find.CLASS&&r.getElementsByClassName)return y(r.getElementsByClassName(o[2]),i)}if(r.nodeType===9){if(t==="body"&&r.body)return y([r.body],i);if(o&&o[3]){var u=r.getElementById(o[3]);if(!u||!u.parentNode)return y([],i);if(u.id===o[3])return y([u],i)}try{return y(r.querySelectorAll(t),i)}catch(a){}}else if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){var f=r,l=r.getAttribute("id"),c=l||n,p=r.parentNode,v=/^\s*[+~]/.test(t);l?c=c.replace(/'/g,"\\$&"):r.setAttribute("id",c),v&&p&&(r=r.parentNode);try{if(!v||p)return y(r.querySelectorAll("[id='"+c+"'] "+t),i)}catch(m){}finally{l||f.removeAttribute("id")}}}return e(t,r,i,s)};for(var r in e)h[r]=e[r];t=null}}(),function(){var e=_.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(_.createElement("div"),"div"),r=!1;try{t.call(_.documentElement,"[test!='']:sizzle")}catch(i){r=!0}h.matchesSelector=function(e,i){i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(r||!d.match.PSEUDO.test(i)&&!/!=/.test(i)){var s=t.call(e,i);if(s||!n||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(i,null,null,[e]).length>0}}}(),function(){var e=_.createElement("div");e.innerHTML="
";if(!!e.getElementsByClassName&&e.getElementsByClassName("e").length!==0){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}}(),_.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:_.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 S=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;u0)for(o=s;o=0:H.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,s=this[0];if(H.isArray(e)){var o=1;while(s&&s.ownerDocument&&s!==t){for(r=0;r-1:H.find.matchesSelector(s,e)){n.push(s);break}s=s.parentNode;if(!s||!s.ownerDocument||s===t||s.nodeType===11)break}}return n=n.length>1?H.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?H.inArray(this[0],H(e)):H.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"?H(e,t):H.makeArray(e&&e.nodeType?[e]:e),r=H.merge(this.get(),n);return this.pushStack(N(n[0])||N(r[0])?r:H.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),H.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return H.dir(e,"parentNode")},parentsUntil:function(e,t,n){return H.dir(e,"parentNode",n)},next:function(e){return H.nth(e,2,"nextSibling")},prev:function(e){return H.nth(e,2,"previousSibling")},nextAll:function(e){return H.dir(e,"nextSibling")},prevAll:function(e){return H.dir(e,"previousSibling")},nextUntil:function(e,t,n){return H.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return H.dir(e,"previousSibling",n)},siblings:function(e){return H.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return H.sibling(e.firstChild)},contents:function(e){return H.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:H.makeArray(e.childNodes)}},function(e,t){H.fn[e]=function(n,r){var i=H.map(this,t,n);return ut.test(e)||(r=n),r&&typeof r=="string"&&(i=H.filter(r,i)),i=this.length>1&&!pt[e]?H.unique(i):i,(this.length>1||ft.test(r))&&at.test(e)&&(i=i.reverse()),this.pushStack(i,e,ct.call(arguments).join(","))}}),H.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?H.find.matchesSelector(t[0],e)?[t[0]]:[]:H.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!H(s).is(r)))s.nodeType===1&&i.push(s),s=s[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 dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:\d+|null)"/g,mt=/^\s+/,gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,yt=/<([\w:]+)/,bt=/]","i"),Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/\/(java|ecma)script/i,Ct=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Lt=x(_);kt.optgroup=kt.option,kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,H.support.htmlSerialize||(kt._default=[1,"div
","
"]),H.fn.extend({text:function(e){return H.access(this,function(e){return e===t?H.text(this):this.empty().append((this[0]&&this[0].ownerDocument||_).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(H.isFunction(e))return this.each(function(t){H(this).wrapAll(e.call(this,t))});if(this[0]){var t=H(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 H.isFunction(e)?this.each(function(t){H(this).wrapInner(e.call(this,t))}):this.each(function(){var t=H(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=H.isFunction(e);return this.each(function(n){H(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){H.nodeName(this,"body")||H(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=H.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,H.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||H.filter(e,[r]).length)!t&&r.nodeType===1&&(H.cleanData(r.getElementsByTagName("*")),H.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&&H.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 H.clone(this,e,t)})},html:function(e){return H.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(vt,""):null;if(typeof e=="string"&&!Et.test(e)&&(H.support.leadingWhitespace||!mt.test(e))&&!kt[(yt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(gt,"<$1>");try{for(;r1&&l0?this.clone(!0):this).get();H(i[o])[t](a),r=r.concat(a)}return this.pushStack(r,e,i.selector)}}),H.extend({clone:function(e,t,n){var r,i,s,o=H.support.html5Clone||H.isXMLDoc(e)||!xt.test("<"+e.nodeName+">")?e.cloneNode(!0):m(e);if((!H.support.noCloneEvent||!H.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!H.isXMLDoc(e)){w(e,o),r=b(e),i=b(o);for(s=0;r[s];++s)i[s]&&w(r[s],i[s])}if(t){E(e,o);if(n){r=b(e),i=b(o);for(s=0;r[s];++s)E(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var i,s,o,u=[];t=t||_,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||_);for(var a=0,f;(f=e[a])!=null;a++){typeof f=="number"&&(f+="");if(!f)continue;if(typeof f=="string")if(!wt.test(f))f=t.createTextNode(f);else{f=f.replace(gt,"<$1>");var l=(yt.exec(f)||["",""])[1].toLowerCase(),c=kt[l]||kt._default,h=c[0],p=t.createElement("div"),d=Lt.childNodes,v;t===_?Lt.appendChild(p):x(t).appendChild(p),p.innerHTML=c[1]+f+c[2];while(h--)p=p.lastChild;if(!H.support.tbody){var m=bt.test(f),y=l==="table"&&!m?p.firstChild&&p.firstChild.childNodes:c[1]===""&&!m?p.childNodes:[];for(o=y.length-1;o>=0;--o)H.nodeName(y[o],"tbody")&&!y[o].childNodes.length&&y[o].parentNode.removeChild(y[o])}!H.support.leadingWhitespace&&mt.test(f)&&p.insertBefore(t.createTextNode(mt.exec(f)[0]),p.firstChild),f=p.childNodes,p&&(p.parentNode.removeChild(p),d.length>0&&(v=d[d.length-1],v&&v.parentNode&&v.parentNode.removeChild(v)))}var b;if(!H.support.appendChecked)if(f[0]&&typeof (b=f.length)=="number")for(o=0;o1)},H.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ft(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":H.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!!e&&e.nodeType!==3&&e.nodeType!==8&&!!e.style){var s,o,u=H.camelCase(n),a=e.style,f=H.cssHooks[u];n=H.cssProps[u]||u;if(r===t)return f&&"get"in f&&(s=f.get(e,!1,i))!==t?s:a[n];o=typeof r,o==="string"&&(s=Pt.exec(r))&&(r=+(s[1]+1)*+s[2]+parseFloat(H.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!H.cssNumber[u]&&(r+="px");if(!f||!("set"in f)||(r=f.set(e,r))!==t)try{a[n]=r}catch(l){}}},css:function(e,n,r){var i,s;n=H.camelCase(n),s=H.cssHooks[n],n=H.cssProps[n]||n,n==="cssFloat"&&(n="float");if(s&&"get"in s&&(i=s.get(e,!0,r))!==t)return i;if(Ft)return Ft(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}}),H.curCSS=H.css,_.defaultView&&_.defaultView.getComputedStyle&&(It=function(e,t){var n,r,i,s,o=e.style;return t=t.replace(Mt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!H.contains(e.ownerDocument.documentElement,e)&&(n=H.style(e,t))),!H.support.pixelMargin&&i&&Ht.test(t)&&Dt.test(n)&&(s=o.width,o.width=n,n=i.width,o.width=s),n}),_.documentElement.currentStyle&&(qt=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),Dt.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}),Ft=It||qt,H.each(["height","width"],function(e,t){H.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?v(e,t,r):H.swap(e,Bt,function(){return v(e,t,r)})},set:function(e,t){return _t.test(t)?t+"px":t}}}),H.support.opacity||(H.cssHooks.opacity={get:function(e,t){return Ot.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=H.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&H.trim(s.replace(At,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=At.test(s)?s.replace(At,i):s+" "+i}}),H(function(){H.support.reliableMarginRight||(H.cssHooks.marginRight={get:function(e,t){return H.swap(e,{display:"inline-block"},function(){return t?Ft(e,"margin-right"):e.style.marginRight})}})}),H.expr&&H.expr.filters&&(H.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!H.support.reliableHiddenOffsets&&(e.style&&e.style.display||H.css(e,"display"))==="none"},H.expr.filters.visible=function(e){return!H.expr.filters.hidden(e)}),H.each({margin:"",padding:"",border:"Width"},function(e,t){H.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+jt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Rt=/%20/g,Ut=/\[\]$/,zt=/\r?\n/g,Wt=/#.*$/,Xt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Vt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,$t=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Jt=/^(?:GET|HEAD)$/,Kt=/^\/\//,Qt=/\?/,Gt=/)<[^<]*)*<\/script>/gi,Yt=/^(?:select|textarea)/i,Zt=/\s+/,en=/([?&])_=[^&]*/,tn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,nn=H.fn.load,rn={},sn={},on,un,an=["*/"]+["*"];try{on=P.href}catch(fn){on=_.createElement("a"),on.href="",on=on.href}un=tn.exec(on.toLowerCase())||[],H.fn.extend({load:function(e,n,r){if(typeof e!="string"&&nn)return nn.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var s=e.slice(i,e.length);e=e.slice(0,i)}var o="GET";n&&(H.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=H.param(n,H.ajaxSettings.traditional),o="POST"));var u=this;return H.ajax({url:e,type:o,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),u.html(s?H("
").append(n.replace(Gt,"")).find(s):n)),r&&u.each(r,[n,t,e])}}),this},serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?H.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Yt.test(this.nodeName)||Vt.test(this.type))}).map(function(e,t){var n=H(this).val();return n==null?null:H.isArray(n)?H.map(n,function(e,n){return{name:t.name,value:e.replace(zt,"\r\n")}}):{name:t.name,value:n.replace(zt,"\r\n")}}).get()}}),H.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){H.fn[t]=function(e){return this.on(t,e)}}),H.each(["get","post"],function(e,n){H[n]=function(e,r,i,s){return H.isFunction(r)&&(s=s||i,i=r,r=t),H.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),H.extend({getScript:function(e,n){return H.get(e,t,n,"script")},getJSON:function(e,t,n){return H.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?h(e,H.ajaxSettings):(t=e,e=H.ajaxSettings),h(e,t),e},ajaxSettings:{url:on,isLocal:$t.test(un[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","*":an},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":H.parseJSON,"text xml":H.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:d(rn),ajaxTransport:d(sn),ajax:function(e,n){function r(e,n,r,p){if(E!==2){E=2,b&&clearTimeout(b),y=t,m=p||"",T.readyState=e>0?4:0;var d,v,g,w=n,x=r?l(i,T,r):t,N,C;if(e>=200&&e<300||e===304){if(i.ifModified){if(N=T.getResponseHeader("Last-Modified"))H.lastModified[h]=N;if(C=T.getResponseHeader("Etag"))H.etag[h]=C}if(e===304)w="notmodified",d=!0;else try{v=f(i,x),w="success",d=!0}catch(k){w="parsererror",g=k}}else{g=w;if(!w||e)w="error",e<0&&(e=0)}T.status=e,T.statusText=""+(n||w),d?u.resolveWith(s,[v,w,T]):u.rejectWith(s,[T,w,g]),T.statusCode(c),c=t,S&&o.trigger("ajax"+(d?"Success":"Error"),[T,i,d?v:g]),a.fireWith(s,[T,w]),S&&(o.trigger("ajaxComplete",[T,i]),--H.active||H.event.trigger("ajaxStop"))}}typeof e=="object"&&(n=e,e=t),n=n||{};var i=H.ajaxSetup({},n),s=i.context||i,o=s!==i&&(s.nodeType||s instanceof H)?H(s):H.event,u=H.Deferred(),a=H.Callbacks("once memory"),c=i.statusCode||{},h,d={},v={},m,g,y,b,w,E=0,S,x,T={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=v[n]=v[n]||e,d[e]=t}return this},getAllResponseHeaders:function(){return E===2?m:null},getResponseHeader:function(e){var n;if(E===2){if(!g){g={};while(n=Xt.exec(m))g[n[1].toLowerCase()]=n[2]}n=g[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(i.mimeType=e),this},abort:function(e){return e=e||"abort",y&&y.abort(e),r(0,e),this}};u.promise(T),T.success=T.done,T.error=T.fail,T.complete=a.add,T.statusCode=function(e){if(e){var t;if(E<2)for(t in e)c[t]=[c[t],e[t]];else t=e[T.status],T.then(t,t)}return this},i.url=((e||i.url)+"").replace(Wt,"").replace(Kt,un[1]+"//"),i.dataTypes=H.trim(i.dataType||"*").toLowerCase().split(Zt),i.crossDomain==null&&(w=tn.exec(i.url.toLowerCase()),i.crossDomain=!(!w||w[1]==un[1]&&w[2]==un[2]&&(w[3]||(w[1]==="http:"?80:443))==(un[3]||(un[1]==="http:"?80:443)))),i.data&&i.processData&&typeof i.data!="string"&&(i.data=H.param(i.data,i.traditional)),p(rn,i,n,T);if(E===2)return!1;S=i.global,i.type=i.type.toUpperCase(),i.hasContent=!Jt.test(i.type),S&&H.active++===0&&H.event.trigger("ajaxStart");if(!i.hasContent){i.data&&(i.url+=(Qt.test(i.url)?"&":"?")+i.data,delete i.data),h=i.url;if(i.cache===!1){var N=H.now(),C=i.url.replace(en,"$1_="+N);i.url=C+(C===i.url?(Qt.test(i.url)?"&":"?")+"_="+N:"")}}(i.data&&i.hasContent&&i.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",i.contentType),i.ifModified&&(h=h||i.url,H.lastModified[h]&&T.setRequestHeader("If-Modified-Since",H.lastModified[h]),H.etag[h]&&T.setRequestHeader("If-None-Match",H.etag[h])),T.setRequestHeader("Accept",i.dataTypes[0]&&i.accepts[i.dataTypes[0]]?i.accepts[i.dataTypes[0]]+(i.dataTypes[0]!=="*"?", "+an+"; q=0.01":""):i.accepts["*"]);for(x in i.headers)T.setRequestHeader(x,i.headers[x]);if(!i.beforeSend||i.beforeSend.call(s,T,i)!==!1&&E!==2){for(x in{success:1,error:1,complete:1})T[x](i[x]);y=p(sn,i,n,T);if(!y)r(-1,"No Transport");else{T.readyState=1,S&&o.trigger("ajaxSend",[T,i]),i.async&&i.timeout>0&&(b=setTimeout(function(){T.abort("timeout")},i.timeout));try{E=1,y.send(d,r)}catch(k){if(!(E<2))throw k;r(-1,k)}}return T}return T.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=H.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=H.ajaxSettings.traditional);if(H.isArray(e)||e.jquery&&!H.isPlainObject(e))H.each(e,function(){i(this.name,this.value)});else for(var s in e)c(s,e[s],n,i);return r.join("&").replace(Rt,"+")}}),H.extend({active:0,lastModified:{},etag:{}});var ln=H.now(),cn=/(\=)\?(&|$)|\?\?/i;H.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return H.expando+"_"+ln++}}),H.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&&(cn.test(t.url)||i&&cn.test(t.data))){var s,o=t.jsonpCallback=H.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u=e[o],a=t.url,f=t.data,l="$1"+o+"$2";return t.jsonp!==!1&&(a=a.replace(cn,l),t.url===a&&(i&&(f=f.replace(cn,l)),t.data===f&&(a+=(/\?/.test(a)?"&":"?")+t.jsonp+"="+o))),t.url=a,t.data=f,e[o]=function(e){s=[e]},r.always(function(){e[o]=u,s&&H.isFunction(u)&&e[o](s[0])}),t.converters["script json"]=function(){return s||H.error(o+" was not called"),s[0]},t.dataTypes[0]="json","script"}}),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return H.globalEval(e),e}}}),H.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),H.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=_.head||_.getElementsByTagName("head")[0]||_.documentElement;return{send:function(i,s){n=_.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var hn=e.ActiveXObject?function(){for(var e in dn)dn[e](0,1)}:!1,pn=0,dn;H.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&a()||u()}:a,function(e){H.extend(H.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(H.ajaxSettings.xhr()),H.support.ajax&&H.ajaxTransport(function(n){if(!n.crossDomain||H.support.cors){var r;return{send:function(i,s){var o=n.xhr(),u,a;n.username?o.open(n.type,n.url,n.async,n.username,n.password):o.open(n.type,n.url,n.async);if(n.xhrFields)for(a in n.xhrFields)o[a]=n.xhrFields[a];n.mimeType&&o.overrideMimeType&&o.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(a in i)o.setRequestHeader(a,i[a])}catch(f){}o.send(n.hasContent&&n.data||null),r=function(e,i){var a,f,l,c,h;try{if(r&&(i||o.readyState===4)){r=t,u&&(o.onreadystatechange=H.noop,hn&&delete dn[u]);if(i)o.readyState!==4&&o.abort();else{a=o.status,l=o.getAllResponseHeaders(),c={},h=o.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=o.responseText}catch(e){}try{f=o.statusText}catch(p){f=""}!a&&n.isLocal&&!n.crossDomain?a=c.text?200:404:a===1223&&(a=204)}}}catch(d){i||s(-1,d)}c&&s(a,f,c,l)},!n.async||o.readyState===4?r():(u=++pn,hn&&(dn||(dn={},H(e).unload(hn)),dn[u]=r),o.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var vn={},mn,gn,yn=/^(?:toggle|show|hide)$/,bn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,wn,En=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Sn;H.fn.extend({show:function(e,t,n){var s,o;if(e||e===0)return this.animate(i("show",3),e,t,n);for(var u=0,a=this.length;u=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&&(s=!1);if(s){a.overflow!=null&&!H.support.shrinkWrapBlocks&&H.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&H(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)H.style(u,t,a.orig[t]),H.removeData(u,"fxshow"+t,!0),H.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=H.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}},H.extend(H.fx,{tick:function(){var e,t=H.timers,n=0;for(;n-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),H.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Nn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(H.css(e,"marginTop"))||0,n.left-=parseFloat(H.css(e,"marginLeft"))||0,r.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(H.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||_.body;while(e&&!Nn.test(e.nodeName)&&H.css(e,"position")==="static")e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var i=/Y/.test(r);H.fn[e]=function(s){return H.access(this,function(e,s,o){var u=n(e);if(o===t)return u?r in u?u[r]:H.support.boxModel&&u.document.documentElement[s]||u.document.body[s]:e[s];u?u.scrollTo(i?H(u).scrollLeft():o,i?o:H(u).scrollTop()):e[s]=o},e,s,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,s="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,n,"padding")):this[n]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,n,e?"margin":"border")):this[n]():null},H.fn[n]=function(e){return H.access(this,function(e,n,o){var u,a,f,l;if(H.isWindow(e))return u=e.document,a=u.documentElement[r],H.support.boxModel&&a||u.body&&u.body[r]||a;if(e.nodeType===9)return u=e.documentElement,u[r]>=u[i]?u[r]:Math.max(e.body[i],u[i],e.body[s],u[s]);if(o===t)return f=H.css(e,n),l=parseFloat(f),H.isNumeric(l)?l:f;H(e).css(n,o)},n,e,arguments.length,null)}}),e.jQuery=e.$=H,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})})(window);var mscparser=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,n){function a(e,t,n){var r=e,i=n-e.length;for(var s=0;so&&(o=i,u=[]),u.push(e)}function c(){var e,n,r,o,u,a,f,c,d,v,m;return v=i,m=i,e=I(),e!==null?(n=h(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===123?(o="{",i++):(o=null,s===0&&l('"{"')),o!==null?(u=I(),u!==null?(a=p(),a!==null?(f=I(),f!==null?(t.charCodeAt(i)===125?(c="}",i++):(c=null,s===0&&l('"}"')),c!==null?(d=I(),d!==null?e=[e,n,r,o,u,a,f,c,d]:(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m),e!==null&&(e=function(e,t,n){return n[1]=K(n[1],n[2]),V(n[0],V(n[1],n[2]))}(v,e[1],e[5])),e===null&&(i=v),e}function h(){var e;return t.substr(i,3).toLowerCase()==="msc"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"msc"')),e}function p(){var e,t,n,r,s;return r=i,s=i,e=d(),e!==null&&(e=function(e,t){return{options:t}}(s,e)),e===null&&(i=s),e=e!==null?e:"",e!==null?(s=i,t=g(),t!==null&&(t=function(e,t){return{entities:t}}(s,t)),t===null&&(i=s),t=t!==null?t:"",t!==null?(s=i,n=b(),n!==null&&(n=function(e,t){return{arcs:t}}(s,n)),n===null&&(i=s),n=n!==null?n:"",n!==null?e=[e,t,n]:(e=null,i=r)):(e=null,i=r)):(e=null,i=r),e}function d(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=V(n,t[1]),n}(o,e)),e===null&&(i=o),e}function v(){var e,n,r,o,u,a,f,c,h,p;return c=i,h=i,e=I(),e!==null?(n=m(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=I(),u!==null?(p=i,a=D(),a!==null&&(a=function(e,t){return t}(p,a)),a===null&&(i=p),a===null&&(p=i,a=q(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p),a===null&&(p=i,a=z(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p))),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function m(){var e;return t.substr(i,6).toLowerCase()==="hscale"?(e=t.substr(i,6),i+=6):(e=null,s===0&&l('"hscale"')),e===null&&(t.substr(i,5).toLowerCase()==="width"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"width"')),e===null&&(t.substr(i,11).toLowerCase()==="arcgradient"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"arcgradient"')),e===null&&(t.substr(i,12).toLowerCase()==="wordwraparcs"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"wordwraparcs"'))))),e}function g(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1]),t[0]}(o,e)),e===null&&(i=o),e}function y(){var e,n,r,o,u,a,f,c,h,p;return s++,f=i,c=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(h=i,p=i,t.charCodeAt(i)===91?(o="[",i++):(o=null,s===0&&l('"["')),o!==null?(u=O(),u!==null?(t.charCodeAt(i)===93?(a="]",i++):(a=null,s===0&&l('"]"')),a!==null?o=[o,u,a]:(o=null,i=p)):(o=null,i=p)):(o=null,i=p),o!==null&&(o=function(e,t){return t}(h,o[1])),o===null&&(i=h),o=o!==null?o:"",o!==null?(u=I(),u!==null?e=[e,n,r,o,u]:(e=null,i=c)):(e=null,i=c)):(e=null,i=c)):(e=null,i=c)):(e=null,i=c),e!==null&&(e=function(e,t,n){var r=new Object;return r.name=t,r=V(r,n),r}(f,e[1],e[3])),e===null&&(i=f),s--,s===0&&e===null&&l("entity"),e}function b(){var e,n,r,o,u,a;u=i,a=i,n=w(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u);if(n!==null){e=[];while(n!==null)e.push(n),u=i,a=i,n=w(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u)}else e=null;return e}function w(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=E(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=E(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=E(),n!==null&&(n=function(e,t){return[t]}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1][0]),t[0]}(o,e)),e===null&&(i=o),e}function E(){var e,n,r,o,u,a,f,c;return u=i,a=i,f=i,e=S(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f),e===null&&(f=i,e=T(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f),e===null&&(f=i,e=x(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f))),e!==null?(f=i,c=i,t.charCodeAt(i)===91?(n="[",i++):(n=null,s===0&&l('"["')),n!==null?(r=O(),r!==null?(t.charCodeAt(i)===93?(o="]",i++):(o=null,s===0&&l('"]"')),o!==null?n=[n,r,o]:(n=null,i=c)):(n=null,i=c)):(n=null,i=c),n!==null&&(n=function(e,t){return t}(f,n[1])),n===null&&(i=f),n=n!==null?n:"",n!==null?e=[e,n]:(e=null,i=a)):(e=null,i=a),e!==null&&(e=function(e,t,n){return t=V(t,n),t}(u,e[0],e[1])),e===null&&(i=u),e}function S(){var e,t,n,r,s;return r=i,s=i,e=I(),e!==null?(t=N(),t!==null?(n=I(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function x(){var e,t,n,r,s;return r=i,s=i,e=I(),e!==null?(t=C(),t!==null?(n=I(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function T(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(o=k(),o!==null?(u=I(),u!==null?(a=H(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n,r){return{kind:n,from:t,to:r}}(c,e[1],e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=I(),e!==null?(t.charCodeAt(i)===42?(n="*",i++):(n=null,s===0&&l('"*"')),n!==null?(r=I(),r!==null?(o=A(),o!==null?(u=I(),u!==null?(a=H(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:t,from:"*",to:n}}(c,e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(o=L(),o!==null?(u=I(),u!==null?(t.charCodeAt(i)===42?(a="*",i++):(a=null,s===0&&l('"*"')),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:n,from:t,to:"*"}}(c,e[1],e[3])),e===null&&(i=c))),e}function N(){var e;return t.substr(i,3)==="|||"?(e="|||",i+=3):(e=null,s===0&&l('"|||"')),e===null&&(t.substr(i,3)==="..."?(e="...",i+=3):(e=null,s===0&&l('"..."'))),e}function C(){var e;return t.substr(i,3)==="---"?(e="---",i+=3):(e=null,s===0&&l('"---"')),e}function k(){var e;return t.substr(i,2)==="--"?(e="--",i+=2):(e=null,s===0&&l('"--"')),e===null&&(t.substr(i,3)==="<->"?(e="<->",i+=3):(e=null,s===0&&l('"<->"')),e===null&&(t.substr(i,2)==="=="?(e="==",i+=2):(e=null,s===0&&l('"=="')),e===null&&(t.substr(i,5)==="<<=>>"?(e="<<=>>",i+=5):(e=null,s===0&&l('"<<=>>"')),e===null&&(t.substr(i,3)==="<=>"?(e="<=>",i+=3):(e=null,s===0&&l('"<=>"')),e===null&&(t.substr(i,2)===".."?(e="..",i+=2):(e=null,s===0&&l('".."')),e===null&&(t.substr(i,4)==="<<>>"?(e="<<>>",i+=4):(e=null,s===0&&l('"<<>>"')),e===null&&(t.substr(i,2)==="::"?(e="::",i+=2):(e=null,s===0&&l('"::"')),e===null&&(t.substr(i,3)==="<:>"?(e="<:>",i+=3):(e=null,s===0&&l('"<:>"')),e===null&&(e=L(),e===null&&(e=A(),e===null&&(t.substr(i,4).toLowerCase()==="note"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"note"')),e===null&&(t.substr(i,4).toLowerCase()==="abox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"abox"')),e===null&&(t.substr(i,4).toLowerCase()==="rbox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"rbox"')),e===null&&(t.substr(i,3).toLowerCase()==="box"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"box"')))))))))))))))),e}function L(){var e;return s++,t.substr(i,2)==="->"?(e="->",i+=2):(e=null,s===0&&l('"->"')),e===null&&(t.substr(i,3)==="=>>"?(e="=>>",i+=3):(e=null,s===0&&l('"=>>"')),e===null&&(t.substr(i,2)==="=>"?(e="=>",i+=2):(e=null,s===0&&l('"=>"')),e===null&&(t.substr(i,2)===">>"?(e=">>",i+=2):(e=null,s===0&&l('">>"')),e===null&&(t.substr(i,2)===":>"?(e=":>",i+=2):(e=null,s===0&&l('":>"')),e===null&&(t.substr(i,2).toLowerCase()==="-x"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"-x"'))))))),s--,s===0&&e===null&&l("left to right arrow"),e}function A(){var e;return s++,t.substr(i,2)==="<-"?(e="<-",i+=2):(e=null,s===0&&l('"<-"')),e===null&&(t.substr(i,3)==="<<="?(e="<<=",i+=3):(e=null,s===0&&l('"<<="')),e===null&&(t.substr(i,2)==="<="?(e="<=",i+=2):(e=null,s===0&&l('"<="')),e===null&&(t.substr(i,2)==="<<"?(e="<<",i+=2):(e=null,s===0&&l('"<<"')),e===null&&(t.substr(i,2)==="<:"?(e="<:",i+=2):(e=null,s===0&&l('"<:"')),e===null&&(t.substr(i,2).toLowerCase()==="x-"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"x-"'))))))),s--,s===0&&e===null&&l("right to left arrow"),e}function O(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=M(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=M(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=M(),n!==null&&(n=function(e,t){return t}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=V(n,t[1]),n}(o,e)),e===null&&(i=o),e}function M(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=I(),e!==null?(n=_(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=I(),u!==null?(a=D(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),t=t.replace("colour","color"),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function _(){var e;return s++,t.substr(i,5).toLowerCase()==="label"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"label"')),e===null&&(t.substr(i,5).toLowerCase()==="idurl"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"idurl"')),e===null&&(t.substr(i,2).toLowerCase()==="id"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"id"')),e===null&&(t.substr(i,3).toLowerCase()==="url"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"url"')),e===null&&(t.substr(i,9).toLowerCase()==="linecolor"?(e=t.substr(i,9),i+=9):(e=null,s===0&&l('"linecolor"')),e===null&&(t.substr(i,10).toLowerCase()==="linecolour"?(e=t.substr(i,10),i+=10):(e=null,s===0&&l('"linecolour"')),e===null&&(t.substr(i,9).toLowerCase()==="textcolor"?(e=t.substr(i,9),i+=9):(e=null,s===0&&l('"textcolor"')),e===null&&(t.substr(i,10).toLowerCase()==="textcolour"?(e=t.substr(i,10),i+=10):(e=null,s===0&&l('"textcolour"')),e===null&&(t.substr(i,11).toLowerCase()==="textbgcolor"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"textbgcolor"')),e===null&&(t.substr(i,12).toLowerCase()==="textbgcolour"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"textbgcolour"')),e===null&&(t.substr(i,12).toLowerCase()==="arclinecolor"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"arclinecolor"')),e===null&&(t.substr(i,13).toLowerCase()==="arclinecolour"?(e=t.substr(i,13),i+=13):(e=null,s===0&&l('"arclinecolour"')),e===null&&(t.substr(i,12).toLowerCase()==="arctextcolor"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"arctextcolor"')),e===null&&(t.substr(i,13).toLowerCase()==="arctextcolour"?(e=t.substr(i,13),i+=13):(e=null,s===0&&l('"arctextcolour"')),e===null&&(t.substr(i,14).toLowerCase()==="arctextbgcolor"?(e=t.substr(i,14),i+=14):(e=null,s===0&&l('"arctextbgcolor"')),e===null&&(t.substr(i,15).toLowerCase()==="arctextbgcolour"?(e=t.substr(i,15),i+=15):(e=null,s===0&&l('"arctextbgcolour"')),e===null&&(t.substr(i,7).toLowerCase()==="arcskip"?(e=t.substr(i,7),i+=7):(e=null,s===0&&l('"arcskip"')))))))))))))))))),s--,s===0&&e===null&&l("attribute name"),e}function D(){var e,n,r,o,u;return o=i,u=i,t.charCodeAt(i)===34?(e='"',i++):(e=null,s===0&&l('"\\""')),e!==null?(n=P(),n!==null?(t.charCodeAt(i)===34?(r='"',i++):(r=null,s===0&&l('"\\""')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t.join("")}(o,e[1])),e===null&&(i=o),e}function P(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function H(){var e,n,r;s++,r=i,/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"))}else e=null;return e!==null&&(e=function(e,t){return t.join("")}(r,e)),e===null&&(i=r),e===null&&(e=D()),s--,s===0&&e===null&&l("identifier"),e}function B(){var e;return s++,/^[ \t]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[ \\t]")),s--,s===0&&e===null&&l("whitespace"),e}function j(){var e;return s++,/^[\r\n]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[\\r\\n]")),s--,s===0&&e===null&&l("lineend"),e}function F(){var e,n,r,o,u,a,f;s++,u=i,t.substr(i,2)==="//"?(e="//",i+=2):(e=null,s===0&&l('"//"')),e===null&&(t.charCodeAt(i)===35?(e="#",i++):(e=null,s===0&&l('"#"')));if(e!==null){n=[],/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));while(r!==null)n.push(r),/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));n!==null?e=[e,n]:(e=null,i=u)}else e=null,i=u;if(e===null){u=i,t.substr(i,2)==="/*"?(e="/*",i+=2):(e=null,s===0&&l('"/*"'));if(e!==null){n=[],a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);while(r!==null)n.push(r),a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);n!==null?(t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)}else e=null,i=u}return s--,s===0&&e===null&&l("comment"),e}function I(){var e,t,n;e=[],n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null;if(t===null){n=F();if(n!==null){t=[];while(n!==null)t.push(n),n=F()}else t=null}}while(t!==null){e.push(t),n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null;if(t===null){n=F();if(n!==null){t=[];while(n!==null)t.push(n),n=F()}else t=null}}}return e}function q(){var e;return e=U(),e===null&&(e=R()),e}function R(){var e,n,r;s++,r=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;return e!==null&&(e=function(e,t){return parseInt(t.join(""),10)}(r,e)),e===null&&(i=r),s--,s===0&&e===null&&l("integer"),e}function U(){var e,n,r,o,u,a;s++,u=i,a=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;if(e!==null){t.charCodeAt(i)===46?(n=".",i++):(n=null,s===0&&l('"."'));if(n!==null){/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"));if(o!==null){r=[];while(o!==null)r.push(o),/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"))}else r=null;r!==null?e=[e,n,r]:(e=null,i=a)}else e=null,i=a}else e=null,i=a;return e!==null&&(e=function(e,t){return parseFloat(t.join(""))}(u,e)),e===null&&(i=u),s--,s===0&&e===null&&l("real"),e}function z(){var e;return s++,t.substr(i,4).toLowerCase()==="true"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"true"')),e===null&&(t.substr(i,5).toLowerCase()==="false"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"false"'))),s--,s===0&&e===null&&l("boolean"),e}function W(e){e.sort();var t=null,n=[];for(var r=0;ro&&(o=i,u=[]),u.push(e)}function c(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=h(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return t[1]=J(t[1],t[2]),X(t[0],X(t[1],t[2]))}(r,e[1])),e===null&&(i=r),e}function h(){var e,t,n,r,s;return r=i,s=i,e=p(),e!==null&&(e=function(e,t){return{options:t}}(s,e)),e===null&&(i=s),e=e!==null?e:"",e!==null?(s=i,t=m(),t!==null&&(t=function(e,t){return{entities:t}}(s,t)),t===null&&(i=s),t=t!==null?t:"",t!==null?(s=i,n=y(),n!==null&&(n=function(e,t){return{arcs:t}}(s,n)),n===null&&(i=s),n=n!==null?n:"",n!==null?e=[e,t,n]:(e=null,i=r)):(e=null,i=r)):(e=null,i=r),e}function p(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=X(n,t[1]),n}(o,e)),e===null&&(i=o),e}function d(){var e,n,r,o,u,a,f,c,h,p;return c=i,h=i,e=F(),e!==null?(n=v(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=F(),u!==null?(p=i,a=O(),a!==null&&(a=function(e,t){return t}(p,a)),a===null&&(i=p),a===null&&(p=i,a=I(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p),a===null&&(p=i,a=U(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p))),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function v(){var e;return t.substr(i,6).toLowerCase()==="hscale"?(e=t.substr(i,6),i+=6):(e=null,s===0&&l('"hscale"')),e===null&&(t.substr(i,5).toLowerCase()==="width"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"width"')),e===null&&(t.substr(i,11).toLowerCase()==="arcgradient"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"arcgradient"')),e===null&&(t.substr(i,12).toLowerCase()==="wordwraparcs"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"wordwraparcs"'))))),e}function m(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1]),t[0]}(o,e)),e===null&&(i=o),e}function g(){var e,n,r,o,u,a,f,c,h,p,d;return s++,c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(p=i,d=i,t.charCodeAt(i)===58?(o=":",i++):(o=null,s===0&&l('":"')),o!==null?(u=F(),u!==null?(a=A(),a!==null?(f=F(),f!==null?o=[o,u,a,f]:(o=null,i=d)):(o=null,i=d)):(o=null,i=d)):(o=null,i=d),o!==null&&(o=function(e,t){return t}(p,o[2])),o===null&&(i=p),o=o!==null?o:"",o!==null?e=[e,n,r,o]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return r.name=t,n&&(r.label=n),r}(c,e[1],e[3])),e===null&&(i=c),s--,s===0&&e===null&&l("entity"),e}function y(){var e,n,r,o,u,a;u=i,a=i,n=b(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u);if(n!==null){e=[];while(n!==null)e.push(n),u=i,a=i,n=b(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u)}else e=null;return e}function b(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=w(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=w(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=w(),n!==null&&(n=function(e,t){return[t]}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1][0]),t[0]}(o,e)),e===null&&(i=o),e}function w(){var e,n,r,o,u,a,f,c,h;return a=i,f=i,c=i,e=E(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c),e===null&&(c=i,e=x(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c),e===null&&(c=i,e=S(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c))),e!==null?(c=i,h=i,t.charCodeAt(i)===58?(n=":",i++):(n=null,s===0&&l('":"')),n!==null?(r=F(),r!==null?(o=A(),o!==null?(u=F(),u!==null?n=[n,r,o,u]:(n=null,i=h)):(n=null,i=h)):(n=null,i=h)):(n=null,i=h),n!==null&&(n=function(e,t){return t}(c,n[2])),n===null&&(i=c),n=n!==null?n:"",n!==null?e=[e,n]:(e=null,i=f)):(e=null,i=f),e!==null&&(e=function(e,t,n){return n&&(t.label=n),t}(a,e[0],e[1])),e===null&&(i=a),e}function E(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=T(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function S(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=N(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function x(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(o=C(),o!==null?(u=F(),u!==null?(a=P(),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n,r){return{kind:n,from:t,to:r}}(c,e[1],e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=F(),e!==null?(t.charCodeAt(i)===42?(n="*",i++):(n=null,s===0&&l('"*"')),n!==null?(r=F(),r!==null?(o=L(),o!==null?(u=F(),u!==null?(a=P(),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:t,from:"*",to:n}}(c,e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(o=k(),o!==null?(u=F(),u!==null?(t.charCodeAt(i)===42?(a="*",i++):(a=null,s===0&&l('"*"')),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:n,from:t,to:"*"}}(c,e[1],e[3])),e===null&&(i=c))),e}function T(){var e;return t.substr(i,3)==="|||"?(e="|||",i+=3):(e=null,s===0&&l('"|||"')),e===null&&(t.substr(i,3)==="..."?(e="...",i+=3):(e=null,s===0&&l('"..."'))),e}function N(){var e;return t.substr(i,3)==="---"?(e="---",i+=3):(e=null,s===0&&l('"---"')),e}function C(){var e;return t.substr(i,2)==="--"?(e="--",i+=2):(e=null,s===0&&l('"--"')),e===null&&(t.substr(i,3)==="<->"?(e="<->",i+=3):(e=null,s===0&&l('"<->"')),e===null&&(t.substr(i,2)==="=="?(e="==",i+=2):(e=null,s===0&&l('"=="')),e===null&&(t.substr(i,5)==="<<=>>"?(e="<<=>>",i+=5):(e=null,s===0&&l('"<<=>>"')),e===null&&(t.substr(i,3)==="<=>"?(e="<=>",i+=3):(e=null,s===0&&l('"<=>"')),e===null&&(t.substr(i,2)===".."?(e="..",i+=2):(e=null,s===0&&l('".."')),e===null&&(t.substr(i,4)==="<<>>"?(e="<<>>",i+=4):(e=null,s===0&&l('"<<>>"')),e===null&&(t.substr(i,2)==="::"?(e="::",i+=2):(e=null,s===0&&l('"::"')),e===null&&(t.substr(i,3)==="<:>"?(e="<:>",i+=3):(e=null,s===0&&l('"<:>"')),e===null&&(e=k(),e===null&&(e=L(),e===null&&(t.substr(i,4).toLowerCase()==="note"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"note"')),e===null&&(t.substr(i,4).toLowerCase()==="abox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"abox"')),e===null&&(t.substr(i,4).toLowerCase()==="rbox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"rbox"')),e===null&&(t.substr(i,3).toLowerCase()==="box"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"box"')))))))))))))))),e}function k(){var e;return s++,t.substr(i,2)==="->"?(e="->",i+=2):(e=null,s===0&&l('"->"')),e===null&&(t.substr(i,3)==="=>>"?(e="=>>",i+=3):(e=null,s===0&&l('"=>>"')),e===null&&(t.substr(i,2)==="=>"?(e="=>",i+=2):(e=null,s===0&&l('"=>"')),e===null&&(t.substr(i,2)===">>"?(e=">>",i+=2):(e=null,s===0&&l('">>"')),e===null&&(t.substr(i,2)===":>"?(e=":>",i+=2):(e=null,s===0&&l('":>"')),e===null&&(t.substr(i,2).toLowerCase()==="-x"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"-x"'))))))),s--,s===0&&e===null&&l("left to right arrow"),e}function L(){var e;return s++,t.substr(i,2)==="<-"?(e="<-",i+=2):(e=null,s===0&&l('"<-"')),e===null&&(t.substr(i,3)==="<<="?(e="<<=",i+=3):(e=null,s===0&&l('"<<="')),e===null&&(t.substr(i,2)==="<="?(e="<=",i+=2):(e=null,s===0&&l('"<="')),e===null&&(t.substr(i,2)==="<<"?(e="<<",i+=2):(e=null,s===0&&l('"<<"')),e===null&&(t.substr(i,2)==="<:"?(e="<:",i+=2):(e=null,s===0&&l('"<:"')),e===null&&(t.substr(i,2).toLowerCase()==="x-"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"x-"'))))))),s--,s===0&&e===null&&l("right to left arrow"),e}function A(){var e;return e=O(),e===null&&(e=_()),e}function O(){var e,n,r,o,u;return o=i,u=i,t.charCodeAt(i)===34?(e='"',i++):(e=null,s===0&&l('"\\""')),e!==null?(n=M(),n!==null?(t.charCodeAt(i)===34?(r='"',i++):(r=null,s===0&&l('"\\""')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t.join("")}(o,e[1])),e===null&&(i=o),e}function M(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function _(){var e,t;return t=i,e=D(),e!==null&&(e=function(e,t){return t.join("")}(t,e)),e===null&&(i=t),e}function D(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===44?(n=",",i++):(n=null,s===0&&l('","')),n===null&&(t.charCodeAt(i)===59?(n=";",i++):(n=null,s===0&&l('";"'))),s--,n===null?n="":(n=null,i=a),n!==null?(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character")),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===44?(n=",",i++):(n=null,s===0&&l('","')),n===null&&(t.charCodeAt(i)===59?(n=";",i++):(n=null,s===0&&l('";"'))),s--,n===null?n="":(n=null,i=a),n!==null?(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character")),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function P(){var e,n,r;s++,r=i,/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"))}else e=null;return e!==null&&(e=function(e,t){return t.join("")}(r,e)),e===null&&(i=r),e===null&&(e=O()),s--,s===0&&e===null&&l("identifier"),e}function H(){var e;return s++,/^[ \t]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[ \\t]")),s--,s===0&&e===null&&l("whitespace"),e}function B(){var e;return s++,/^[\r\n]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[\\r\\n]")),s--,s===0&&e===null&&l("lineend"),e}function j(){var e,n,r,o,u,a,f;s++,u=i,t.substr(i,2)==="//"?(e="//",i+=2):(e=null,s===0&&l('"//"')),e===null&&(t.charCodeAt(i)===35?(e="#",i++):(e=null,s===0&&l('"#"')));if(e!==null){n=[],/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));while(r!==null)n.push(r),/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));n!==null?e=[e,n]:(e=null,i=u)}else e=null,i=u;if(e===null){u=i,t.substr(i,2)==="/*"?(e="/*",i+=2):(e=null,s===0&&l('"/*"'));if(e!==null){n=[],a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);while(r!==null)n.push(r),a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);n!==null?(t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)}else e=null,i=u}return s--,s===0&&e===null&&l("comment"),e}function F(){var e,t,n;e=[],n=H();if(n!==null){t=[];while(n!==null)t.push(n),n=H()}else t=null;if(t===null){n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null}}while(t!==null){e.push(t),n=H();if(n!==null){t=[];while(n!==null)t.push(n),n=H()}else t=null;if(t===null){n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null}}}return e}function I(){var e;return e=R(),e===null&&(e=q()),e}function q(){var e,n,r;s++,r=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;return e!==null&&(e=function(e,t){return parseInt(t.join(""),10)}(r,e)),e===null&&(i=r),s--,s===0&&e===null&&l("integer"),e}function R(){var e,n,r,o,u,a;s++,u=i,a=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;if(e!==null){t.charCodeAt(i)===46?(n=".",i++):(n=null,s===0&&l('"."'));if(n!==null){/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"));if(o!==null){r=[];while(o!==null)r.push(o),/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"))}else r=null;r!==null?e=[e,n,r]:(e=null,i=a)}else e=null,i=a}else e=null,i=a;return e!==null&&(e=function(e,t){return parseFloat(t.join(""))}(u,e)),e===null&&(i=u),s--,s===0&&e===null&&l("real"),e}function U(){var e;return s++,t.substr(i,4).toLowerCase()==="true"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"true"')),e===null&&(t.substr(i,5).toLowerCase()==="false"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"false"'))),s--,s===0&&e===null&&l("boolean"),e}function z(e){e.sort();var t=null,n=[];for(var r=0;re?l=1:l=-1,c=l*(r-t)/(n-e);return u+="l"+l.toString()+","+c.toString(),u+="M"+e.toString()+","+(t-o).toString(),u+=" l"+a.toString()+","+f.toString(),u+="M"+e.toString()+","+(t+o).toString(),u+=" l"+a.toString()+","+f.toString(),u+="M"+(n-l).toString()+","+r.toString(),u+="l"+l.toString()+","+c.toString(),i(u,s)}function p(e,t,n,r,i,s){return s?h(e,t,n,r,i):c(e,t,n,r,i)}function d(e,t,n,r,s){var o="M"+e.toString()+", -"+t.toString();return o+=" l"+r.toString()+",0",o+=" l0,"+n.toString(),o+=" l-"+r.toString()+",0",i(o,s)}function v(t){var n=document.createElementNS(e,"g");return n.setAttribute("id",t),n}function m(n,r,i){var s=document.createElementNS(e,"use");return s.setAttribute("x",n.toString()),s.setAttribute("y",r.toString()),s.setAttributeNS(t,"xlink:href","#"+i),s}function g(t,n,r){var i=document.createElementNS(e,"marker");return i.setAttribute("orient",r),i.setAttribute("id",t),i.setAttribute("class",n),i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("refX","9"),i.setAttribute("refY","3"),i.setAttribute("markerUnits","strokeWidth"),i.setAttribute("markerWidth","10"),i.setAttribute("markerHeight","10"),i.setAttribute("refX","9"),i.setAttribute("refX","9"),i}function y(e,t,n,r,s){var o=g(e,t,n),u=i(r,s);return o.appendChild(u),o}function b(e,t,n,r,i){var o=g(e,t,n),u=s(r,i);return o.appendChild(u),o}var e=new String("http://www.w3.org/2000/svg"),t=new String("http://www.w3.org/1999/xlink"),n="vertical-align : text-top;";return n+="font-size: 0.7em; text-anchor: start;",{createPath:function(e,t){return i(e,t)},createRect:function(e,t,n,r,i,s,u){return o(e,t,n,r,i,s,u)},createABox:function(e,t,n,r,i){return u(e,t,n,r,i)},createNote:function(e,t,n,r,i){return a(e,t,n,r,i)},createText:function(e,t,n,r,i,s,o){return l(e,t,n,r,i,s,o)},createLine:function(e,t,n,r,i,s){return p(e,t,n,r,i,s)},createUTurn:function(e,t,n,r,i){return d(e,t,n,r,i)},createGroup:function(e){return v(e)},createUse:function(e,t,n){return m(e,t,n)},createMarkerPath:function(e,t,n,r,i){return y(e,t,n,r,i)},createMarkerPolygon:function(e,t,n,r,i){return b(e,t,n,r,i)},getTextWidth:function(e,t){return r(e,t)}}}),define("mscrender",["mscrenderutensils"],function(e){function x(e){lChildElement=document.getElementById("svg_output"),lChildElement&&lChildElement!==null&&lChildElement!==undefined&&(lParentElement=document.getElementById(e),lParentElement.removeChild(lChildElement))}function T(t,n){var r=new String("http://www.w3.org/2000/svg"),i=new String("http://www.w3.org/1999/xlink"),s=document.getElementById(t),o=document.createElementNS(r,"svg");o.setAttribute("version","1.1"),o.setAttribute("id",n),o.setAttribute("xmlns",r),o.setAttribute("xmlns:xlink",i);var u=document.createElementNS(r,"desc");u.setAttribute("id","msc_source");var a=document.createElementNS(r,"defs"),f=document.createElement("style");f.setAttribute("type","text/css"),f.appendChild(document.createTextNode(gSvgStyleElementString)),a.appendChild(f),a.appendChild(e.createMarkerPath("signal","arrow-marker","auto","M 9 3 l -8 2","arrow-style")),a.appendChild(e.createMarkerPath("signal-l","arrow-marker","auto","M 9 3 l 8 2","arrow-style")),a.appendChild(e.createMarkerPolygon("method","arrow-marker","auto","1,1 9,3 1,5","filled arrow-style")),a.appendChild(e.createMarkerPolygon("method-l","arrow-marker","auto","17,1 9,3 17,5","filled arrow-style")),a.appendChild(e.createMarkerPath("callback","arrow-marker","auto","M 1 1 l 8 2 l -8 2","arrow-style")),a.appendChild(e.createMarkerPath("callback-l","arrow-marker","auto","M 17 1 l -8 2 l 8 2","arrow-style")),a.appendChild(e.createMarkerPath("lost","arrow-marker","auto","M6.5,-0.5 L11.5,5.5 M6.5,5.5 L11.5,-0.5","arrow-style")),a.appendChild(e.createGroup("defs")),o.appendChild(u),o.appendChild(a);var l=e.createGroup("body");l.appendChild(e.createGroup("__background")),l.appendChild(e.createGroup("sequence")),l.appendChild(e.createGroup("notelayer")),o.appendChild(l),s.appendChild(o)}function N(u,f,p){T(p,"svg_output"),i=r,o=s,l=a,h=c,u.options&&(u.options.hscale&&(i=u.options.hscale*r,o=u.options.hscale*s),u.options.arcgradient&&(l=parseInt(u.options.arcgradient)+a,h=parseInt(u.options.arcgradient)+c)),C(u.entities),k(u.arcs,u.entities);var d=document.getElementById("body"),v=g-2*n+i/4,m=y-l/2+2*t,b=n+i/4,w=t,E=document.getElementById("svg_output"),S=document.getElementById("__background"),x=e.createRect(v,m,"bglayer",0-b,0-w);S.appendChild(x);if(f){var N=document.getElementById("msc_source"),L=document.createTextNode(f);N.appendChild(L)}d.setAttribute("transform","translate("+b+","+w+")"),E.setAttribute("width",v.toString()),E.setAttribute("height",m.toString());if(u.options&&u.options.width){var A=d.getAttribute("transform");A+=" scale("+u.options.width/v+",1)",d.setAttribute("transform",A)}}function C(t){var n=document.getElementById("defs"),r=document.getElementById("sequence"),s=0,u;b=new Object,E=new Object;var a=new Object;if(t)for(u=0;u":o="signal",n.direction=p;break;case"<-":o="signal",n.direction=d;var c=i;i=r,r=c;break;case"<->":o="signal-both",n.direction=v;break;case"--":n.direction=m;break;case"=>":o="method",n.direction=p;break;case"<=":o="method",n.direction=d;var c=i;i=r,r=c;break;case"<=>":o="method-both",n.direction=v;break;case"==":n.direction=m;break;case">>":o="returnvalue",n.direction=p;break;case"<<":o="returnvalue",n.direction=d;var c=i;i=r,r=c;break;case"<<>>":o="returnvalue-both",n.direction=v;break;case"..":o="dotted",n.direction=m;break;case"=>>":o="callback",n.direction=p;break;case"<<=":o="callback",n.direction=d;var c=i;i=r,r=c;break;case"<<=>>":o="callback-both",n.direction=v;break;case":>":o="emphasised",n.direction=p,f=!0;break;case"<:":o="emphasised",n.direction=d,f=!0;var c=i;i=r,r=c;break;case"<:>":f=!0,n.direction=v,o="emphasised-both";break;case"::":o="double",n.direction=m,f=!0;break;case"-x":case"-X":o="lost",n.direction=p,i=r+(i-r)*.75;break;case"x-":case"X-":o="lost",n.direction=d;var c=i;i=r,r=c,i=r+(i-r)*.75;break;default:n.direction=m}n=M(n);var g=0;return n.arcskip&&(g=n.arcskip*l,a=g),r===i?(lLine=O(o,r,g,f),s.appendChild(P(t+"_txt",n,r+2,0-l/5-S/2,i-r,"anchor-start",!1))):(lLine=e.createLine(r,0,i,a,o,f),s.appendChild(P(t+"_txt",n,r,0-S/2,i-r))),n.linecolor&&lLine.setAttribute("style","stroke: "+n.linecolor+";"),s.appendChild(lLine),s}function D(e){var t=e.replace(/\\\"/g,'"');return t.replace(/\\n/g," ")}function P(t,n,r,i,s,o,u){var a=e.createGroup(t);if(n.label){var c=r+s/2,h=e.getTextWidth(n.label),p=l-2*f;n.label=D(n.label),n.id=n.id?D(n.id):undefined;var d=e.createText(n.label,c,i+S/4,o,n.url,n.id,n.idurl);if(u===undefined||u===!0)var v=e.createRect(h,S,"textbg",c-h/2,i-S/2);else var v=e.createRect(h,S,"textbg",r,i-S/2);j(d,n),n.textbgcolor&&v.setAttribute("style","fill: "+n.textbgcolor+"; stroke:"+n.textbgcolor+";"),n.url&&!n.textcolor&&(n.textcolor="blue",j(d,n)),a.appendChild(v),a.appendChild(d)}return a}function H(t,n){var r=g-i+o,s=r/2,u=e.createGroup(t);return u.appendChild(P(t,n,0,0,r)),u}function B(t,n){var r=g-i+o,s=e.createGroup(t),u=e.createLine(0,0,r,0,"dotted");return s.appendChild(u),s.appendChild(H(t+"_txt",n)),n.linecolor&&u.setAttribute("style","stroke: "+n.linecolor+";"),s}function j(e,t){if(t.textcolor){var n=new String;n+="fill:"+t.textcolor+";",n+="stroke:"+t.textcolor+";",e.setAttribute("style",n)}}function F(e,t){var n=new String;t.textbgcolor&&(n+="fill:"+t.textbgcolor+";"),t.linecolor&&(n+="stroke:"+t.linecolor+";"),e.setAttribute("style",n)}function I(t,n,r,s){if(n>r){var o=n;n=r,r=o}var u=r-n+i-2*f,a=l-2*f,c=n-(i-2*f)/2,h=e.createGroup(t),p;switch(s.kind){case"rbox":p=e.createRect(u,a,"box",c,0-a/2,6,6);break;case"abox":p=e.createABox(u,a,"box",c,0);break;case"note":p=e.createNote(u,a,"box",c,0-a/2);break;default:p=e.createRect(u,a,"box",c,0-a/2)}return F(p,s),h.appendChild(p),h.appendChild(P(t+"_txt",s,c,0,u)),h}var t=3,n=3,r=160,i=r,s=100,o=s,u=30,a=25,f=2,l=a,c=0,h=c,p=2,d=3,v=5,m=8,g=0,y=0,b=new Object,w=new Object,E=new Object,S=12;return gSvgStyleElementString="svg { font-family: Helvetica, sans-serif; font-size: 9pt; background-color: white; stroke : black; color : black; } rect { fill: none; stroke: black; stroke-width: 2; } .bglayer { fill:white; stroke: white; stroke-width: 0; } rect.textbg { fill:white; stroke:white; stroke-width:0; } line { stroke: black; stroke-width: 2; } .arcrowomit { stroke-dasharray: 2,2; } text { color: inherit; stroke: inherit; text-anchor: middle; stroke-width:0.1; /* makes font seem more crisp */ } text.entity { text-decoration : underline; } text.anchor-start { text-anchor: start; } path { stroke : black; stroke-width : 2; fill : none; } .dotted { stroke-dasharray: 5,2; } .arrow-marker { overflow:visible; } .arrow-style { stroke : black; stroke-dasharray : 100,1; /* 'none' should work, but doesn't in webkit */ stroke-width : 1; } .filled { stroke:inherit; fill:black; /* no-inherit */ } .signal { marker-end : url(#signal); } .signal-both { marker-end : url(#signal); marker-start : url(#signal-l); } .method { marker-end : url(#method); } .method-both { marker-end : url(#method); marker-start : url(#method-l); } .returnvalue { stroke-dasharray: 5,2; marker-end : url(#callback); } .returnvalue-both { stroke-dasharray: 5,2; marker-end : url(#callback); marker-start : url(#callback-l); } .callback { marker-end : url(#callback); } .callback-both { marker-end : url(#callback); marker-start : url(#callback-l); } .emphasised { marker-end : url(#method); } .emphasised-both { marker-end : url(#method); marker-start : url(#method-l); } .lost { marker-end : url(#lost); } .arcrowomit { stroke-dasharray: 2,2; } .box { /* fill: #ffc; no-inherit */ fill : white; opacity: 0.9; } .boxtext, .arctext { font-size: 0.8em; text-anchor: middle; } .comment { stroke-dasharray: 5,2; }",{clean:function(e){x(e)},renderAST:function(e,t,n){N(e,t,n)}}});var tomsgenny=function(){function e(e){var t=new String("");return e&&(e.options&&(t+=i(e.options)+"\n"),e.entities&&(t+=o(e.entities)+"\n"),e.arcs&&(t+=a(e.arcs))),t}function t(e){function t(e){var t=e.match(/[a-z0-9]+/gi);return t?t.length!=1:!0}return t(e)?'"'+e+'"':e}function n(e){function t(e){var t=e.match(/[;,]/);return t?t.length===1:!1}return t(e)?'"'+e+'"':e}function r(e,t,n){t&&e.push(n+'="'+t+'"')}function i(e){var t=[],n=new String("# options\n"),i=0;r(t,e.hscale,"hscale"),r(t,e.width,"width"),r(t,e.arcgradient,"arcgradient");for(i=0;i0)for(n=0;n0){for(r=0;r0){var r=0;n=" [";for(r=0;r0)for(r=0;r0){for(i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function P(e){var t=!1;for(var n=0;nt.scroller.clientWidth+1,o=i>t.scroller.clientHeight+1;o?(t.scrollbarV.style.display="block",t.scrollbarV.style.bottom=s?vs(t.measure)+"px":"0",t.scrollbarV.firstChild.style.height=i-t.scroller.clientHeight+t.scrollbarV.clientHeight+"px"):t.scrollbarV.style.display="",s?(t.scrollbarH.style.display="block",t.scrollbarH.style.right=o?vs(t.measure)+"px":"0",t.scrollbarH.firstChild.style.width=t.scroller.scrollWidth-t.scroller.clientWidth+t.scrollbarH.clientWidth+"px"):t.scrollbarH.style.display="",s&&o?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=t.scrollbarFiller.style.width=vs(t.measure)+"px"):t.scrollbarFiller.style.display="",s&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=vs(t.measure)+"px",t.gutterFiller.style.width=t.gutters.offsetWidth+"px"):t.gutterFiller.style.display="",l&&vs(t.measure)===0&&(t.scrollbarV.style.minWidth=t.scrollbarH.style.minHeight=c?"18px":"12px")}function B(e,t,n){var r=e.scroller.scrollTop,i=e.wrapper.clientHeight;typeof n=="number"?r=n:n&&(r=n.top,i=n.bottom-n.top),r=Math.floor(r-it(e));var s=Math.ceil(r+i);return{from:pi(t,r),to:pi(t,s)}}function j(e){var t=e.display;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;var n=q(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=n+"px";for(var s=t.lineDiv.firstChild;s;s=s.nextSibling)if(s.alignable)for(var o=0,u=s.alignable;o=e.display.showingFrom&&u.to<=e.display.showingTo)break;t=[]}return o&&(Ii(e,"update",e),(e.display.showingFrom!=i||e.display.showingTo!=s)&&Ii(e,"viewportChange",e,e.display.showingFrom,e.display.showingTo)),o}function U(e,t,n,r){var i=e.display,s=e.doc;if(!i.wrapper.clientWidth){i.showingFrom=i.showingTo=s.first,i.viewOffset=0;return}if(!r&&t.length==0&&n.from>i.showingFrom&&n.toc&&i.showingTo-c<20&&(c=Math.min(f,i.showingTo));if(E){l=hi(Lr(s,ai(s,l)));while(c=h[0].to?h=[]:h=X(h,t);if(E)for(var a=0;ap.from)){h.splice(a--,1);break}p.to=v}}var m=0;for(var a=0;ac&&(p.to=c),p.from>=p.to?h.splice(a--,1):m+=p.to-p.from}if(!r&&m==c-l&&l==i.showingFrom&&c==i.showingTo){W(e);return}h.sort(function(e,t){return e.from-t.from});try{var g=document.activeElement}catch(y){}m<(c-l)*.7&&(i.lineDiv.style.display="none"),$(e,l,c,h,u),i.lineDiv.style.display="",g&&document.activeElement!=g&&g.offsetHeight&&g.focus();var b=l!=i.showingFrom||c!=i.showingTo||i.lastSizeC!=i.wrapper.clientHeight;return b&&(i.lastSizeC=i.wrapper.clientHeight,et(e,400)),i.showingFrom=l,i.showingTo=c,z(e),W(e),!0}function z(e){var t=e.display,r=t.lineDiv.offsetTop;for(var i=t.lineDiv.firstChild,s;i;i=i.nextSibling)if(i.lineObj){if(n){var o=i.offsetTop+i.offsetHeight;s=o-r,r=o}else{var u=cs(i);s=u.bottom-u.top}var a=i.lineObj.height-s;s<2&&(s=Tt(t));if(a>.001||a<-0.001){ci(i.lineObj,s);var f=i.lineObj.widgets;if(f)for(var l=0;l=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from}),i.top){while(l.lineObj!=t)l=c(l);a&&s<=p&&l.lineNumber&&ls(l.lineNumber,I(e.options,p)),l=l.nextSibling}else{if(t.widgets)for(var m=0,g=l,y;g&&m<20;++m,g=g.nextSibling)if(g.lineObj==t&&/div/i.test(g.nodeName)){y=g;break}var b=J(e,t,p,o,y);if(b!=y)f.insertBefore(b,l);else{while(l!=y)l=c(l);l=l.nextSibling}b.lineObj=t}++p});while(l)l=c(l)}function J(e,t,r,i,s){var o=Vr(e,t),u=t.gutterMarkers,a=e.display,f;if(!e.options.lineNumbers&&!u&&!t.bgClass&&!t.wrapClass&&!t.widgets)return o;if(s){s.alignable=null;var l=!0,c=0,h=null;for(var p=s.firstChild,d;p;p=d){d=p.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(p.className))s.removeChild(p);else{for(var v=0;v3&&(u(d,a.top,null,a.bottom),d=o,a.bottomc.bottom||p.bottom==c.bottom&&p.right>c.right)c=p;d=e.display.showingTo)return;var n=+(new Date)+e.options.workTime,r=ir(t.mode,rt(e,t.frontier)),i=[],s;t.iter(t.frontier,Math.min(t.first+t.size,e.display.showingTo+500),function(o){if(t.frontier>=e.display.showingFrom){var u=o.styles;o.styles=Rr(e,o,r);var a=!u||u.length!=o.styles.length;for(var f=0;!a&&fn)return et(e,e.options.workDelay),!0}),i.length&&At(e,function(){for(var e=0;eu;--o){if(o<=s.first)return s.first;var a=ai(s,o-1);if(a.stateAfter&&(!n||o<=s.frontier))return o;var f=$i(a.text,null,e.options.tabSize);if(i==null||r>f)i=o-1,r=f}return i}function rt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var s=nt(e,t,n),o=s>r.first&&ai(r,s-1).stateAfter;return o?o=ir(r.mode,o):o=sr(r.mode),r.iter(s,t,function(n){zr(e,n,o);var u=s==t-1||s%5==0||s>=i.showingFrom&&sn?"left":on?u.left:u.right,top:u.top,bottom:u.bottom}}function at(e,t){var n=e.display.measureLineCache;for(var r=0;ry&&(n=y),t<0&&(t=0);for(var r=m.length-2;r>=0;r-=2){var i=m[r],s=m[r+1];if(i>n||s=n||t<=i&&n>=s||Math.min(n,s)-Math.max(t,i)>=n-t>>1){m[r]=Math.min(t,i),m[r+1]=Math.max(n,s);break}}return r<0&&(r=m.length,m.push(t,n)),{left:e.left-v.left,right:e.right-v.left,top:r,bottom:null}}function w(e){e.bottom=m[e.top+1],e.top=m[e.top]}var s=e.display,o=ts(i.text.length),u=Vr(e,i,o,!0);if(t&&!n&&!e.options.lineWrapping&&u.childNodes.length>100){var a=document.createDocumentFragment(),f=10,l=u.childNodes.length;for(var c=0,h=Math.ceil(l/f);c1&&(x=g[c]=b(T[0]),x.rightSide=b(T[T.length-1]))}x||(x=g[c]=b(cs(S))),E.measureRight&&(x.right=cs(E.measureRight).left),E.leftSide&&(x.leftSide=b(cs(E.leftSide)))}for(var c=0,E;cn.from?s(e-1):s(e,r)}r=r||ai(e.doc,t.line),i||(i=lt(e,r));var u=vi(r),a=t.ch;if(!u)return s(a);var f=Ms(u,a),l=o(a,f);return Os!=null&&(l.other=o(a,Os)),l}function wt(e,t,n,r){var i=new Tn(e,t);return i.xRel=r,n&&(i.outside=!0),i}function Et(e,t,n){var r=e.doc;n+=e.display.viewOffset;if(n<0)return wt(r.first,0,!0,-1);var i=pi(r,n),s=r.first+r.size-1;if(i>s)return wt(r.first+r.size-1,ai(r,s).text.length,!0,1);t<0&&(t=0);for(;;){var o=ai(r,i),u=St(e,o,i,t,n),a=kr(o),f=a&&a.find();if(!a||!(u.ch>f.from.ch||u.ch==f.from.ch&&u.xRel>0))return u;i=f.to.line}}function St(e,t,n,r,i){function f(r){var i=bt(e,Tn(n,r),"line",t,a);return o=!0,s>i.bottom?i.left-u:sm)return wt(n,p,g,1);for(;;){if(l?p==h||p==Ds(t,h,1):p-h<=1){var y=rr){p=S,m=T;if(g=o)m+=1e3;c=E}else h=S,d=T,v=o,c-=E}}function Tt(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(xt==null){xt=us("pre");for(var t=0;t<49;++t)xt.appendChild(document.createTextNode("x")),xt.appendChild(us("br"));xt.appendChild(document.createTextNode("x"))}fs(e.measure,xt);var n=xt.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),as(e.measure),n||1}function Nt(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=us("span","x"),n=us("pre",[t]);fs(e.measure,n);var r=t.offsetWidth;return r>2&&(e.cachedCharWidth=r),r||10}function kt(e){e.curOp={changes:[],forceUpdate:!1,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++Ct},Fi++||(ji=[])}function Lt(e){var t=e.curOp,n=e.doc,r=e.display;e.curOp=null,t.updateMaxLine&&D(e);if(r.maxLineChanged&&!e.options.lineWrapping&&r.maxLine){var i=ht(e,r.maxLine);r.sizer.style.minWidth=Math.max(0,i+3+Wi)+"px",r.maxLineChanged=!1;var s=Math.max(0,r.sizer.offsetLeft+r.sizer.offsetWidth-r.scroller.clientWidth);s1e3||u.indexOf("\n")>-1?n.value=e.display.prevInput="":e.display.prevInput=u,a&&Lt(e),e.state.pasteIncoming=!1,!0}function Bt(e,n){var i,s,o=e.doc;if(!Nn(o.sel.from,o.sel.to)){e.display.prevInput="",i=ws&&(o.sel.to.line-o.sel.from.line>100||(s=e.getSelection()).length>1e3);var u=i?"-":s||e.getSelection();e.display.input.value=u,e.state.focused&&Gi(e.display.input),t&&!r&&(e.display.inputHasSelection=u)}else n&&(e.display.prevInput=e.display.input.value="",t&&!r&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=i}function jt(e){e.options.readOnly!="nocursor"&&(!d||document.activeElement!=e.display.input)&&e.display.input.focus()}function Ft(e){return e.options.readOnly||e.doc.cantEdit}function It(e){function r(){e.state.focused&&setTimeout(ns(jt,e),0)}function s(){i==null&&(i=setTimeout(function(){i=null,n.cachedCharWidth=n.cachedTextHeight=ds=null,pt(e),Mt(e,ns(_t,e))},100))}function o(){for(var e=n.wrapper.parentNode;e&&e!=document.body;e=e.parentNode);e?setTimeout(o,5e3):Hi(window,"resize",s)}function u(t){if(qi(e,t)||e.options.onDragEvent&&e.options.onDragEvent(e,ki(t)))return;Mi(t)}function a(){n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,n.input.value=e.getSelection(),Gi(n.input))}var n=e.display;Pi(n.scroller,"mousedown",At(e,Wt)),t?Pi(n.scroller,"dblclick",At(e,function(t){if(qi(e,t))return;var n=Rt(e,t);if(!n||Xt(e,t)||qt(e.display,t))return;Li(t);var r=$n(ai(e.doc,n.line).text,n);_n(e.doc,r.from,r.to)})):Pi(n.scroller,"dblclick",function(t){qi(e,t)||Li(t)}),Pi(n.lineSpace,"selectstart",function(e){qt(n,e)||Li(e)}),b||Pi(n.scroller,"contextmenu",function(t){hn(e,t)}),Pi(n.scroller,"scroll",function(){n.scroller.clientHeight&&(Kt(e,n.scroller.scrollTop),Qt(e,n.scroller.scrollLeft,!0),Bi(e,"scroll",e))}),Pi(n.scrollbarV,"scroll",function(){n.scroller.clientHeight&&Kt(e,n.scrollbarV.scrollTop)}),Pi(n.scrollbarH,"scroll",function(){n.scroller.clientHeight&&Qt(e,n.scrollbarH.scrollLeft)}),Pi(n.scroller,"mousewheel",function(t){Zt(e,t)}),Pi(n.scroller,"DOMMouseScroll",function(t){Zt(e,t)}),Pi(n.scrollbarH,"mousedown",r),Pi(n.scrollbarV,"mousedown",r),Pi(n.wrapper,"scroll",function(){n.wrapper.scrollTop=n.wrapper.scrollLeft=0});var i;Pi(window,"resize",s),setTimeout(o,5e3),Pi(n.input,"keyup",At(e,function(t){if(qi(e,t)||e.options.onKeyEvent&&e.options.onKeyEvent(e,ki(t)))return;t.keyCode==16&&(e.doc.sel.shift=!1)})),Pi(n.input,"input",ns(Pt,e)),Pi(n.input,"keydown",At(e,un)),Pi(n.input,"keypress",At(e,an)),Pi(n.input,"focus",ns(fn,e)),Pi(n.input,"blur",ns(ln,e)),e.options.dragDrop&&(Pi(n.scroller,"dragstart",function(t){Jt(e,t)}),Pi(n.scroller,"dragenter",u),Pi(n.scroller,"dragover",u),Pi(n.scroller,"drop",At(e,$t))),Pi(n.scroller,"paste",function(t){if(qt(n,t))return;jt(e),Pt(e)}),Pi(n.input,"paste",function(){e.state.pasteIncoming=!0,Pt(e)}),Pi(n.input,"cut",a),Pi(n.input,"copy",a),f&&Pi(n.sizer,"mouseup",function(){document.activeElement==n.input&&n.input.blur(),jt(e)})}function qt(e,t){for(var n=_i(t);n!=e.wrapper;n=n.parentNode)if(!n||n.ignoreEvents||n.parentNode==e.sizer&&n!=e.mover)return!0}function Rt(e,t,n){var r=e.display;if(!n){var i=_i(t);if(i==r.scrollbarH||i==r.scrollbarH.firstChild||i==r.scrollbarV||i==r.scrollbarV.firstChild||i==r.scrollbarFiller||i==r.gutterFiller)return null}var s,o,u=cs(r.lineSpace);try{s=t.clientX,o=t.clientY}catch(t){return null}return Et(e,s-u.left,o-u.top)}function Wt(e){function m(e){if(Nn(v,e))return;v=e;if(f=="single"){_n(n.doc,An(s,u),e);return}p=An(s,p),d=An(s,d);if(f=="double"){var t=$n(ai(s,e.line).text,e);Cn(e,p)?_n(n.doc,t.from,d):_n(n.doc,p,t.to)}else f=="triple"&&(Cn(e,p)?_n(n.doc,d,An(s,Tn(e.line,0))):_n(n.doc,p,An(s,Tn(e.line+1,0))))}function w(e){var t=++y,i=Rt(n,e,!0);if(!i)return;if(!Nn(i,c)){n.state.focused||fn(n),c=i,m(i);var o=B(r,s);(i.line>=o.to||i.lineg.bottom?20:0;u&&setTimeout(At(n,function(){if(y!=t)return;r.scroller.scrollTop+=u,w(e)}),50)}}function E(e){y=Infinity,Li(e),jt(n),Hi(document,"mousemove",S),Hi(document,"mouseup",x)}if(qi(this,e))return;var n=this,r=n.display,s=n.doc,o=s.sel;o.shift=e.shiftKey;if(qt(r,e)){i||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100));return}if(Xt(n,e))return;var u=Rt(n,e);switch(Di(e)){case 3:b&&hn.call(n,n,e);return;case 2:u&&_n(n.doc,u),setTimeout(ns(jt,n),20),Li(e);return}if(!u){_i(e)==r.scroller&&Li(e);return}n.state.focused||fn(n);var a=+(new Date),f="single";if(zt&&zt.time>a-400&&Nn(zt.pos,u))f="triple",Li(e),setTimeout(ns(jt,n),20),Jn(n,u.line);else if(Ut&&Ut.time>a-400&&Nn(Ut.pos,u)){f="double",zt={time:a,pos:u},Li(e);var l=$n(ai(s,u.line).text,u);_n(n.doc,l.from,l.to)}else Ut={time:a,pos:u};var c=u;if(n.options.dragDrop&&hs&&!Ft(n)&&!Nn(o.from,o.to)&&!Cn(u,o.from)&&!Cn(o.to,u)&&f=="single"){var h=At(n,function(t){i&&(r.scroller.draggable=!1),n.state.draggingText=!1,Hi(document,"mouseup",h),Hi(r.scroller,"drop",h),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(Li(t),_n(n.doc,u),jt(n))});i&&(r.scroller.draggable=!0),n.state.draggingText=h,r.scroller.dragDrop&&r.scroller.dragDrop(),Pi(document,"mouseup",h),Pi(r.scroller,"drop",h);return}Li(e),f=="single"&&_n(n.doc,An(s,u));var p=o.from,d=o.to,v=u,g=cs(r.wrapper),y=0,S=At(n,function(e){!t&&!Di(e)?E(e):w(e)}),x=At(n,E);Pi(document,"mousemove",S),Pi(document,"mouseup",x)}function Xt(e,t){var n=e.display;try{var r=t.clientX,i=t.clientY}catch(t){return!1}if(r>=Math.floor(cs(n.gutters).right))return!1;Li(t);if(!Ui(e,"gutterClick"))return!0;var s=cs(n.lineDiv);if(i>s.bottom)return!0;i-=s.top-n.viewOffset;for(var o=0;o=r){var a=pi(e.doc,i),f=e.options.gutters[o];Ii(e,"gutterClick",e,a,f,t);break}}return!0}function $t(e){var n=this;if(qi(n,e)||qt(n.display,e)||n.options.onDragEvent&&n.options.onDragEvent(n,ki(e)))return;Li(e),t&&(Vt=+(new Date));var r=Rt(n,e,!0),i=e.dataTransfer.files;if(!r||Ft(n))return;if(i&&i.length&&window.FileReader&&window.File){var s=i.length,o=Array(s),u=0,a=function(e,t){var i=new FileReader;i.onload=function(){o[t]=i.result,++u==s&&(r=An(n.doc,r),gn(n.doc,{from:r,to:r,text:ys(o.join("\n")),origin:"paste"},"around"))},i.readAsText(e)};for(var f=0;fa.clientWidth||s&&a.scrollHeight>a.clientHeight))return;if(s&&v&&i)for(var f=n.target;f!=a;f=f.parentNode)if(f.lineObj){t.display.currentWheelTarget=f;break}if(r&&!e&&!u&&Yt!=null){s&&Kt(t,Math.max(0,Math.min(a.scrollTop+s*Yt,a.scrollHeight-a.clientHeight))),Qt(t,Math.max(0,Math.min(a.scrollLeft+r*Yt,a.scrollWidth-a.clientWidth))),Li(n),o.wheelStartX=null;return}if(s&&Yt!=null){var l=s*Yt,c=t.doc.scrollTop,h=c+o.wrapper.clientHeight;l<0?c=Math.max(0,c+l-50):h=Math.min(t.doc.height,h+l+50),R(t,[],{top:c,bottom:h})}Gt<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=s,setTimeout(function(){if(o.wheelStartX==null)return;var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null;if(!n)return;Yt=(Yt*Gt+n)/(Gt+1),++Gt},200)):(o.wheelDX+=r,o.wheelDY+=s))}function en(e,t,n){if(typeof t=="string"){t=or[t];if(!t)return!1}e.display.pollingFast&&Ht(e)&&(e.display.pollingFast=!1);var r=e.doc,i=r.sel.shift,s=!1;try{Ft(e)&&(e.state.suppressEdits=!0),n&&(r.sel.shift=!1),s=t(e)!=Xi}finally{r.sel.shift=i,e.state.suppressEdits=!1}return s}function tn(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function rn(e,t){var n=ar(e.options.keyMap),i=n.auto;clearTimeout(nn),i&&!lr(t)&&(nn=setTimeout(function(){ar(e.options.keyMap)==n&&(e.options.keyMap=i.call?i.call(null,e):i,L(e))},50));var s=cr(t,!0),o=!1;if(!s)return!1;var u=tn(e);return t.shiftKey?o=fr("Shift-"+s,u,function(t){return en(e,t,!0)})||fr(s,u,function(t){if(typeof t=="string"?/^go[A-Z]/.test(t):t.motion)return en(e,t)}):o=fr(s,u,function(t){return en(e,t)}),o&&(Li(t),Z(e),r&&(t.oldKeyCode=t.keyCode,t.keyCode=0),Ii(e,"keyHandled",e,s,t)),o}function sn(e,t,n){var r=fr("'"+n+"'",tn(e),function(t){return en(e,t,!0)});return r&&(Li(t),Z(e),Ii(e,"keyHandled",e,"'"+n+"'",t)),r}function un(e){var n=this;n.state.focused||fn(n),t&&e.keyCode==27&&(e.returnValue=!1);if(qi(n,e)||n.options.onKeyEvent&&n.options.onKeyEvent(n,ki(e)))return;var r=e.keyCode;n.doc.sel.shift=r==16||e.shiftKey;var i=rn(n,e);u&&(on=i?r:null,!i&&r==88&&!ws&&(v?e.metaKey:e.ctrlKey)&&n.replaceSelection(""))}function an(e){var n=this;if(qi(n,e)||n.options.onKeyEvent&&n.options.onKeyEvent(n,ki(e)))return;var i=e.keyCode,s=e.charCode;if(u&&i==on){on=null,Li(e);return}if((u&&(!e.which||e.which<10)||f)&&rn(n,e))return;var o=String.fromCharCode(s==null?i:s);this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Ft(this)&&this.doc.mode.electricChars.indexOf(o)>-1&&setTimeout(At(n,function(){zn(n,n.doc.sel.to.line,"smart")}),75);if(sn(n,e,o))return;t&&!r&&(n.display.inputHasSelection=null),Pt(n)}function fn(e){if(e.options.readOnly=="nocursor")return;e.state.focused||(Bi(e,"focus",e),e.state.focused=!0,e.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1&&(e.display.wrapper.className+=" CodeMirror-focused"),Bt(e,!0)),Dt(e),Z(e)}function ln(e){e.state.focused&&(Bi(e,"blur",e),e.state.focused=!1,e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.doc.sel.shift=!1)},150)}function hn(e,n){function l(){if(i.input.selectionStart!=null){var e=i.input.value=" "+(Nn(s.from,s.to)?"":i.input.value);i.prevInput=" ",i.input.selectionStart=1,i.input.selectionEnd=e.length}}function c(){i.inputDiv.style.position="relative",i.input.style.cssText=f,r&&(i.scrollbarV.scrollTop=i.scroller.scrollTop=a),Dt(e);if(i.input.selectionStart!=null){(!t||r)&&l(),clearTimeout(cn);var n=0,s=function(){i.prevInput==" "&&i.input.selectionStart==0?At(e,or.selectAll)(e):n++<10?cn=setTimeout(s,500):Bt(e)};cn=setTimeout(s,200)}}if(qi(e,n,"contextmenu"))return;var i=e.display,s=e.doc.sel;if(qt(i,n))return;var o=Rt(e,n),a=i.scroller.scrollTop;if(!o||u)return;(Nn(s.from,s.to)||Cn(o,s.from)||!Cn(o,s.to))&&At(e,Pn)(e.doc,o,o);var f=i.input.style.cssText;i.inputDiv.style.position="absolute",i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(n.clientY-5)+"px; left: "+(n.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",jt(e),Bt(e,!0),Nn(s.from,s.to)&&(i.input.value=i.prevInput=" "),t&&!r&&l();if(b){Mi(n);var h=function(){Hi(window,"mouseup",h),setTimeout(c,20)};Pi(window,"mouseup",h)}else setTimeout(c,50)}function dn(e,t,n){if(!Cn(t.from,n))return An(e,n);var r=t.text.length-1-(t.to.line-t.from.line);if(n.line>t.to.line+r){var i=n.line-r,s=e.first+e.size-1;return i>s?Tn(s,ai(e,s).text.length):On(n,ai(e,i).text.length)}if(n.line==t.to.line+r)return On(n,Qi(t.text).length+(t.text.length==1?t.from.ch:0)+ai(e,t.to.line).text.length-t.to.ch);var o=n.line-t.from.line;return On(n,t.text[o].length+(o?0:t.from.ch))}function vn(e,t,n){if(n&&typeof n=="object")return{anchor:dn(e,t,n.anchor),head:dn(e,t,n.head)};if(n=="start")return{anchor:t.from,head:t.from};var r=pn(t);if(n=="around")return{anchor:t.from,head:r};if(n=="end")return{anchor:r,head:r};var i=function(e){if(Cn(e,t.from))return e;if(!Cn(t.to,e))return r;var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=r.ch-t.to.ch),Tn(n,i)};return{anchor:i(e.sel.anchor),head:i(e.sel.head)}}function mn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=An(e,t)),n&&(this.to=An(e,n)),r&&(this.text=r),i!==undefined&&(this.origin=i)}),Bi(e,"beforeChange",e,r),e.cm&&Bi(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function gn(e,t,n,r){if(e.cm){if(!e.cm.curOp)return At(e.cm,gn)(e,t,n,r);if(e.cm.state.suppressEdits)return}if(Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange")){t=mn(e,t,!0);if(!t)return}var i=w&&!r&&Tr(e,t.from,t.to);if(i){for(var s=i.length-1;s>=1;--s)yn(e,{from:i[s].from,to:i[s].to,text:[""]});i.length&&yn(e,{from:i[0].from,to:i[0].to,text:t.text},n)}else yn(e,t,n)}function yn(e,t,n){var r=vn(e,t,n);bi(e,t,r,e.cm?e.cm.curOp.id:NaN),En(e,t,r,Sr(e,t));var i=[];oi(e,function(e,n){!n&&Yi(i,e.history)==-1&&(Ni(e.history,t),i.push(e.history)),En(e,t,null,Sr(e,t))})}function bn(e,t){if(e.cm&&e.cm.state.suppressEdits)return;var n=e.history,r=(t=="undo"?n.done:n.undone).pop();if(!r)return;var i={changes:[],anchorBefore:r.anchorAfter,headBefore:r.headAfter,anchorAfter:r.anchorBefore,headAfter:r.headBefore,generation:n.generation};(t=="undo"?n.undone:n.done).push(i),n.generation=r.generation||++n.maxGeneration;var s=Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange");for(var o=r.changes.length-1;o>=0;--o){var u=r.changes[o];u.origin=t;if(s&&!mn(e,u,!1)){(t=="undo"?n.done:n.undone).length=0;return}i.changes.push(yi(e,u));var a=o?vn(e,u,null):{anchor:r.anchorBefore,head:r.headBefore};En(e,u,a,xr(e,u));var f=[];oi(e,function(e,t){!t&&Yi(f,e.history)==-1&&(Ni(e.history,u),f.push(e.history)),En(e,u,null,xr(e,u))})}}function wn(e,t){function n(e){return Tn(e.line+t,e.ch)}e.first+=t,e.cm&&_t(e.cm,e.first,e.first,t),e.sel.head=n(e.sel.head),e.sel.anchor=n(e.sel.anchor),e.sel.from=n(e.sel.from),e.sel.to=n(e.sel.to)}function En(e,t,n,r){if(e.cm&&!e.cm.curOp)return At(e.cm,En)(e,t,n,r);if(t.to.linee.lastLine())return;if(t.from.lines&&(t={from:t.from,to:Tn(s,ai(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=fi(e,t.from,t.to),n||(n=vn(e,t,null)),e.cm?Sn(e.cm,t,r,n):Zr(e,t,r,n)}function Sn(e,t,n,r){var i=e.doc,s=e.display,o=t.from,u=t.to,a=!1,f=o.line;e.options.lineWrapping||(f=hi(Lr(i,ai(i,o.line))),i.iter(f,u.line+1,function(e){if(e==s.maxLine)return a=!0,!0})),!Cn(i.sel.head,t.from)&&!Cn(t.to,i.sel.head)&&(e.curOp.cursorActivity=!0),Zr(i,t,n,r,C(e)),e.options.lineWrapping||(i.iter(f,o.line+t.text.length,function(e){var t=_(i,e);t>s.maxLineLength&&(s.maxLine=e,s.maxLineLength=t,s.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),et(e,400);var l=t.text.length-(u.line-o.line)-1;_t(e,o.line,u.line+1,l);if(Ui(e,"change")){var c={from:o,to:u,text:t.text,removed:t.removed,origin:t.origin};if(e.curOp.textChanged){for(var h=e.curOp.textChanged;h.next;h=h.next);h.next=c}else e.curOp.textChanged=c}}function xn(e,t,n,r,i){r||(r=n);if(Cn(r,n)){var s=r;r=n,n=s}typeof t=="string"&&(t=ys(t)),gn(e,{from:n,to:r,text:t,origin:i},null)}function Tn(e,t){if(!(this instanceof Tn))return new Tn(e,t);this.line=e,this.ch=t}function Nn(e,t){return e.line==t.line&&e.ch==t.ch}function Cn(e,t){return e.linen?Tn(n,ai(e,n).text.length):On(t,ai(e,t.line).text.length)}function On(e,t){var n=e.ch;return n==null||n>t?Tn(e.line,t):n<0?Tn(e.line,0):e}function Mn(e,t){return t>=e.first&&t=s.ch:f.to>s.ch))){if(r){Bi(l,"beforeCursorEnter");if(l.explicitlyCleared){if(!u.markedSpans)break;--a;continue}}if(!l.atomic)continue;var c=l.find()[o<0?"from":"to"];if(Nn(c,s)){c.ch+=o,c.ch<0?c.line>e.first?c=An(e,Tn(c.line-1)):c=null:c.ch>u.text.length&&(c.line(window.innerHeight||document.documentElement.clientHeight)&&(i=!1);if(i!=null&&!h){var s=n.cursor.style.display=="none";s&&(n.cursor.style.display="",n.cursor.style.left=t.left+"px",n.cursor.style.top=t.top-n.viewOffset+"px"),n.cursor.scrollIntoView(i),s&&(n.cursor.style.display="none")}}function Fn(e,t,n){n==null&&(n=0);for(;;){var r=!1,i=bt(e,t),s=qn(e,i.left,i.top-n,i.left,i.bottom+n),o=e.doc.scrollTop,u=e.doc.scrollLeft;s.scrollTop!=null&&(Kt(e,s.scrollTop),Math.abs(e.doc.scrollTop-o)>1&&(r=!0)),s.scrollLeft!=null&&(Qt(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(r=!0));if(!r)return i}}function In(e,t,n,r,i){var s=qn(e,t,n,r,i);s.scrollTop!=null&&Kt(e,s.scrollTop),s.scrollLeft!=null&&Qt(e,s.scrollLeft)}function qn(e,t,n,r,i){var s=e.display,o=Tt(e.display);n<0&&(n=0);var u=s.scroller.clientHeight-Wi,a=s.scroller.scrollTop,f={},l=e.doc.height+st(s),c=nl-o;if(na+u){var p=Math.min(n,(h?l:i)-u);p!=a&&(f.scrollTop=p)}var d=s.scroller.clientWidth-Wi,v=s.scroller.scrollLeft;t+=s.gutters.offsetWidth,r+=s.gutters.offsetWidth;var m=s.gutters.offsetWidth,g=td+v-3&&(f.scrollLeft=r+10-d),f}function Rn(e,t,n){e.curOp.updateScrollPos={scrollLeft:t==null?e.doc.scrollLeft:t,scrollTop:n==null?e.doc.scrollTop:n}}function Un(e,t,n){var r=e.curOp.updateScrollPos||(e.curOp.updateScrollPos={scrollLeft:e.doc.scrollLeft,scrollTop:e.doc.scrollTop}),i=e.display.scroller;r.scrollTop=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,r.scrollTop+n)),r.scrollLeft=Math.max(0,Math.min(i.scrollWidth-i.clientWidth,r.scrollLeft+t))}function zn(e,t,n,r){var i=e.doc;n==null&&(n="add");if(n=="smart")if(!e.doc.mode.indent)n="prev";else var s=rt(e,t);var o=e.options.tabSize,u=ai(i,t),a=$i(u.text,null,o),f=u.text.match(/^\s*/)[0],l;if(n=="smart"){l=e.doc.mode.indent(s,u.text.slice(f.length),u.text);if(l==Xi){if(!r)return;n="prev"}}n=="prev"?t>i.first?l=$i(ai(i,t-1).text,null,o):l=0:n=="add"?l=a+e.options.indentUnit:n=="subtract"?l=a-e.options.indentUnit:typeof n=="number"&&(l=a+n),l=Math.max(0,l);var c="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/o);p;--p)h+=o,c+=" ";h=e.first+e.size?f=!1:(s=t,a=ai(e,t))}function c(e){var t=(i?Ds:Ps)(a,o,n,!0);if(t==null){if(!!e||!l())return f=!1;i?o=(n<0?Cs:Ns)(a):o=n<0?a.text.length:0}else o=t;return!0}var s=t.line,o=t.ch,u=n,a=ai(e,s),f=!0;if(r=="char")c();else if(r=="column")c(!0);else if(r=="word"||r=="group"){var h=null,p=r=="group";for(var d=!0;;d=!1){if(n<0&&!c(!d))break;var v=a.text.charAt(o)||"\n",m=is(v)?"w":p?/\s/.test(v)?null:"p":null;if(h&&h!=m){n<0&&(n=1,c());break}m&&(h=m);if(n>0&&!c(!d))break}}var g=Bn(e,Tn(s,o),u,!0);return f||(g.hitSide=!0),g}function Vn(e,t,n,r){var i=e.doc,s=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+n*(u-(n<0?1.5:.5)*Tt(e.display))}else r=="line"&&(o=n>0?t.bottom+3:t.top-3);for(;;){var a=Et(e,s,o);if(!a.outside)break;if(n<0?o<=0:o>=i.height){a.hitSide=!0;break}o+=n*5}return a}function $n(e,t){var n=t.ch,r=t.ch;if(e){(t.xRel<0||r==e.length)&&n?--n:++r;var i=e.charAt(n),s=is(i)?is:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!is(e)};while(n>0&&s(e.charAt(n-1)))--n;while(r=t:s.to>t);(i||(i=[])).push({from:s.from,to:a?null:s.to,marker:o})}}return i}function Er(e,t,n){if(e)for(var r=0,i;r=t:s.to>t);if(u||o.type=="bookmark"&&s.from==t&&(!n||s.marker.insertLeft)){var a=s.from==null||(o.inclusiveLeft?s.from<=t:s.from0&&u)for(var c=0;ct)&&(!r||r.widthe.options.maxHighlightLength?(s=!1,a.pos=Math.min(t.length,a.start+5e4),f=null):f=n.token(a,r);if(!s||u!=f)oe&&r.splice(o,1,e,r[o+1],i),o+=2,u=Math.min(e,i)}if(!t)return;if(s.opaque)r.splice(n,o-n,e,t),o=n+2;else for(;n="í €"&&a<"í¯¿"&&ua)?(b.to!=null&&c>b.to&&(c=b.to,p=""),w.className&&(h+=" "+w.className),w.startStyle&&b.from==a&&(d+=" "+w.startStyle),w.endStyle&&b.to==c&&(p+=" "+w.endStyle),w.title&&!v&&(v=w.title),w.collapsed&&(!m||m.marker.sizea&&c>b.from&&(c=b.from),w.type=="bookmark"&&b.from==a&&w.replacedWith&&(g=w)}if(m&&(m.from||0)==a){Gr(t,(m.to==null?u:m.to)-a,m.marker,m.from==null);if(m.to==null)return m.marker.find()}g&&!m&&Gr(t,0,g)}if(a>=u)break;var E=Math.min(u,c);for(;;){if(f){var S=a+f.length;if(!m){var x=S>E?f.slice(0,E-a):f;t.addToken(t,x,l?l+h:h,d,a+x.length==c?p:"",v)}if(S>=E){f=f.slice(E-a),a=E;break}a=S,d=""}f=i.slice(s,s=n[o++]),l=Xr(n[o++])}}}function Zr(e,t,n,r,i){function s(e){return n?n[e]:null}function o(e,n,r){Fr(e,n,r,i),Ii(e,"change",e,t)}var u=t.from,a=t.to,f=t.text,l=ai(e,u.line),c=ai(e,a.line),h=Qi(f),p=s(f.length-1),d=a.line-u.line;if(u.ch==0&&a.ch==0&&h==""){for(var v=0,m=f.length-1,g=[];v1&&e.remove(u.line+1,d-1),e.insert(u.line+1,g)}Ii(e,"change",e,t),Pn(e,r.anchor,r.head,null,!0)}function ei(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;ts-e.cm.options.historyEventDelay||t.origin.charAt(0)=="*"))){var u=Qi(o.changes);Nn(t.from,t.to)&&Nn(t.from,u.to)?u.to=pn(t):o.changes.push(yi(e,t)),o.anchorAfter=n.anchor,o.headAfter=n.head}else{o={changes:[yi(e,t)],generation:i.generation,anchorBefore:e.sel.anchor,headBefore:e.sel.head,anchorAfter:n.anchor,headAfter:n.head},i.done.push(o),i.generation=++i.maxGeneration;while(i.done.length>i.undoDepth)i.done.shift()}i.lastTime=s,i.lastOp=r,i.lastOrigin=t.origin}function wi(e){if(!e)return null;for(var t=0,n;t-1&&(Qi(o)[l]=a[l],delete a[l])}}return r}function xi(e,t,n,r){n0}function zi(e){e.prototype.on=function(e,t){Pi(this,e,t)},e.prototype.off=function(e,t){Hi(this,e,t)}}function Vi(){this.id=null}function $i(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=r||0,o=i||0;s"€"&&(e.toUpperCase()!=e.toLowerCase()||rs.test(e))}function ss(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function us(e,t,n,r){var i=document.createElement(e);n&&(i.className=n),r&&(i.style.cssText=r);if(typeof t=="string")ls(i,t);else if(t)for(var s=0;s0;--t)e.removeChild(e.firstChild);return e}function fs(e,t){return as(e).appendChild(t)}function ls(e,t){r?(e.innerHTML="",e.appendChild(document.createTextNode(t))):e.textContent=t}function cs(e){return e.getBoundingClientRect()}function ps(){return!1}function vs(e){if(ds!=null)return ds;var t=us("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return fs(e,t),t.offsetWidth&&(ds=t.offsetHeight-t.clientHeight),ds||0}function gs(e){if(ms==null){var t=us("span","​");fs(e,us("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ms=t.offsetWidth<=1&&t.offsetHeight>2&&!n)}return ms?us("span","​"):us("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Ss(e,t,n,r){if(!e)return r(t,n,"ltr");var i=!1;for(var s=0;st||t==n&&o.to==t)r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?"rtl":"ltr"),i=!0}i||r(t,n,"ltr")}function xs(e){return e.level%2?e.to:e.from}function Ts(e){return e.level%2?e.from:e.to}function Ns(e){var t=vi(e);return t?xs(t[0]):0}function Cs(e){var t=vi(e);return t?Ts(Qi(t)):e.text.length}function ks(e,t){var n=ai(e.doc,t),r=Lr(e.doc,n);r!=n&&(t=hi(r));var i=vi(r),s=i?i[0].level%2?Cs(r):Ns(r):0;return Tn(t,s)}function Ls(e,t){var n,r;while(n=kr(r=ai(e.doc,t)))t=n.find().to.line;var i=vi(r),s=i?i[0].level%2?Ns(r):Cs(r):r.text.length;return Tn(t,s)}function As(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:tt)return Os=null,n;if(i.from==t||i.to==t){if(r!=null)return As(e,i.level,e[r].level)?(Os=r,n):(Os=n,r);r=n}}return Os=null,r}function _s(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&os.test(e.text.charAt(t)));return t}function Ds(e,t,n,r){var i=vi(e);if(!i)return Ps(e,t,n,r);var s=Ms(i,t),o=i[s],u=_s(e,t,o.level%2?-n:n,r);for(;;){if(u>o.from&&u0==o.level%2?o.to:o.from);o=i[s+=n];if(!o)return null;n>0==o.level%2?u=_s(e,o.to,-1,r):u=_s(e,o.from,1,r)}}function Ps(e,t,n,r){var i=t+n;if(r)while(i>0&&os.test(e.text.charAt(i)))i+=n;return i<0||i>e.text.length?null:i}var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=t&&(document.documentMode==null||document.documentMode<8),r=t&&(document.documentMode==null||document.documentMode<9),i=/WebKit\//.test(navigator.userAgent),s=i&&/Qt\/\d+\.\d+/.test(navigator.userAgent),o=/Chrome\//.test(navigator.userAgent),u=/Opera\//.test(navigator.userAgent),a=/Apple Computer/.test(navigator.vendor),f=/KHTML\//.test(navigator.userAgent),l=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),h=/PhantomJS/.test(navigator.userAgent),p=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),d=p||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),v=p||/Mac/.test(navigator.platform),m=/windows/i.test(navigator.platform),g=u&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1])),g&&g>=15&&(u=!1,i=!0);var y=v&&(s||u&&(g==null||g<12.11)),b=e||t&&!r,w=!1,E=!1,xt,Ct=0,Ut,zt,Vt=0,Gt=0,Yt=null;t?Yt=-0.53:e?Yt=15:o?Yt=-0.7:a&&(Yt=-1/3);var nn,on=null,cn,pn=S.changeEnd=function(e){return e.text?Tn(e.from.line+e.text.length-1,Qi(e.text).length+(e.text.length==1?e.from.ch:0)):e.to};S.Pos=Tn,S.prototype={constructor:S,focus:function(){window.focus(),jt(this),fn(this),Pt(this)},setOption:function(e,t){var n=this.options,r=n[e];if(n[e]==t&&e!="mode")return;n[e]=t,Kn.hasOwnProperty(e)&&At(this,Kn[e])(this,t,r)},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){var t=this.state.keyMaps;for(var n=0;n>1;if((s?t[s*2-1]:0)>=i)r=s;else{if(!(t[s*2+1]r&&(e=r,n=!0);var i=ai(this.doc,e);return mt(this,ai(this.doc,e),{top:0,left:0},t||"page").top+(n?i.height:0)},defaultTextHeight:function(){return Tt(this.display)},defaultCharWidth:function(){return Nt(this.display)},setGutterMarker:At(null,function(e,t,n){return Wn(this,e,function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ss(r)&&(e.gutterMarkers=null),!0})}),clearGutter:At(null,function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,_t(t,r,r+1),ss(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),addLineClass:At(null,function(e,t,n){return Wn(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass";if(!e[r])e[r]=n;else{if((new RegExp("(?:^|\\s)"+n+"(?:$|\\s)")).test(e[r]))return!1;e[r]+=" "+n}return!0})}),removeLineClass:At(null,function(e,t,n){return Wn(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass",i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var s=i.match(new RegExp("(?:^|\\s+)"+n+"(?:$|\\s+)"));if(!s)return!1;var o=s.index+s[0].length;e[r]=i.slice(0,s.index)+(!s.index||o==i.length?"":" ")+i.slice(o)||null}return!0})}),addLineWidget:At(null,function(e,t,n){return Br(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if(typeof e=="number"){if(!Mn(this.doc,e))return null;var t=e;e=ai(this.doc,e);if(!e)return null}else{var t=hi(e);if(t==null)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(e,t,n,r,i){var s=this.display;e=bt(this,An(this.doc,e));var o=e.bottom,u=e.left;t.style.position="absolute",s.sizer.appendChild(t);if(r=="over")o=e.top;else if(r=="above"||r=="near"){var a=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(r=="above"||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(o=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="",i=="right"?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?u=0:i=="middle"&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&In(this,u,o,u+t.offsetWidth,o+t.offsetHeight)},triggerOnKeyDown:At(null,un),execCommand:function(e){return or[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var s=0,o=An(this.doc,e);s2){t.dependencies=[];for(var n=2;n0&&t.ch=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},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 this.lastColumnPos0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},S.StringStream=hr,S.TextMarker=pr,zi(pr),pr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;t&&kt(e);if(Ui(this,"clear")){var n=this.find();n&&Ii(this,"clear",n.from,n.to)}var r=null,i=null;for(var s=0;se.display.maxLineLength&&(e.display.maxLine=a,e.display.maxLineLength=f,e.display.maxLineChanged=!0)}r!=null&&e&&_t(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Hn(e)),t&&Lt(e)},pr.prototype.find=function(){var e,t;for(var n=0;n=t.display.showingFrom&&e.from.line50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new ei(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 ti(t);if(!e.parent){var r=new ti(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=Yi(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0,i=this.children.length;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n}),An(this,Tn(n,t))},indexFromPos:function(e){e=An(this,e);var t=e.ch;return e.linet&&(t=e.from),e.to!=null&&e.to1&&e.charCodeAt(t-1)==45){if(/\w/.test(e.charAt(t-2))&&/[^\-?\.]/.test(e.charAt(t)))return!0;if(t>2&&/[\d\.,]/.test(e.charAt(t-2))&&/[\d\.,]/.test(e.charAt(t)))return!1}return/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(e.slice(t-1,t+1))});var ds,ms,ys="\n\nb".split(/\n/).length!=3?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=s.indexOf("\r");o!=-1?(n.push(s.slice(0,o)),t+=o+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)};S.splitLines=ys;var bs=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},ws=function(){var e=us("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Es={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",109:"-",107:"=",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"};S.keyNames=Es,function(){for(var e=0;e<10;e++)Es[e+48]=String(e);for(var e=65;e<=90;e++)Es[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)Es[e+111]=Es[e+63235]="F"+e}();var Os,Hs=function(){function n(n){return n<=255?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1791?t.charAt(n-1536):1792<=n&&n<=2220?"r":"L"}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",t="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,o=/[Lb1n]/,u=/[1n]/,a="L";return function(e){if(!r.test(e))return!1;var t=e.length,f=[];for(var l=0,c;l0?f.charAt(u.ch-1):"";if(e==r&&CodeMirror.isWordChar(c))return CodeMirror.Pass;if(!(f.length==u.ch||i.indexOf(l)>=0||n.test(l)))return CodeMirror.Pass;t.replaceSelection(e+r,{head:a,anchor:a})},e!=r&&(t["'"+r+"'"]=o)})(e.charAt(s),e.charAt(s+1));return t}function s(e){return function(t){var n=t.getCursor(),i=r(t,n);if(!i||e.indexOf(i)%2!=0)return CodeMirror.Pass;t.operation(function(){var e=CodeMirror.Pos(n.line+1,0);t.replaceSelection("\n\n",{anchor:e,head:e},"+input"),t.indentLine(n.line+1,null,!0),t.indentLine(n.line+2,null,!0)})}}var e="()[]{}''\"\"",t="[]{}",n=/\s/;CodeMirror.defineOption("autoCloseBrackets",!1,function(n,r,o){o!=CodeMirror.Init&&o&&n.removeKeyMap("autoCloseBrackets");if(!r)return;var u=e,a=t;typeof r=="string"?u=r:typeof r=="object"&&(r.pairs!=null&&(u=r.pairs),r.explode!=null&&(a=r.explode));var f=i(u);a&&(f.Enter=s(a)),n.addKeyMap(f)})}(),define("../lib/codemirror/addon/edit/closebrackets",function(){}),function(){function r(e,r,i){function m(r,i,s){if(!r.text)return;var u=c?0:r.text.length-1,a=c?r.text.length:-1;if(r.text.length>o)return null;s!=null&&(u=s+h);for(;u!=a;u+=h){var f=r.text.charAt(u);if(v.test(f)&&e.getTokenTypeAt(t(i,u+1))==p){var l=n[f];if(l.charAt(1)==">"==c)d.push(f);else{if(d.pop()!=l.charAt(0))return{pos:u,match:!1};if(!d.length)return{pos:u,match:!0}}}}}var s=e.state.matchBrackets,o=s&&s.maxScanLineLength||1e4,u=r||e.getCursor(),a=e.getLineHandle(u.line),f=u.ch-1,l=f>=0&&n[a.text.charAt(f)]||n[a.text.charAt(++f)];if(!l)return null;var c=l.charAt(1)==">",h=c?1:-1;if(i&&c!=(f==u.ch))return null;var p=e.getTokenTypeAt(t(u.line,f+1)),d=[a.text.charAt(f)],v=/[(){}[\]]/;for(var g=u.line,y,b=c?Math.min(g+100,e.lineCount()):Math.max(-1,g-100);g!=b;g+=h){g==u.line?y=m(a,g,f):y=m(e.getLineHandle(g),g);if(y)break}return{from:t(u.line,f),to:y&&t(g,y.pos),match:y&&y.match,forward:c}}function i(n,i){var s=n.state.matchBrackets.maxHighlightLineLength||1e3,o=r(n);if(!o||n.getLine(o.from.line).length>s||o.to&&n.getLine(o.to.line).length>s)return;var u=o.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",a=n.markText(o.from,t(o.from.line,o.from.ch+1),{className:u}),f=o.to&&n.markText(o.to,t(o.to.line,o.to.ch+1),{className:u});e&&n.state.focused&&n.display.input.focus();var l=function(){n.operation(function(){a.clear(),f&&f.clear()})};if(!i)return l;setTimeout(l,800)}function o(e){e.operation(function(){s&&(s(),s=null),e.somethingSelected()||(s=i(e,!1))})}var e=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),t=CodeMirror.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;CodeMirror.defineOption("matchBrackets",!1,function(e,t,n){n&&n!=CodeMirror.Init&&e.off("cursorActivity",o),t&&(e.state.matchBrackets=typeof t=="object"?t:{},e.on("cursorActivity",o))}),CodeMirror.defineExtension("matchBrackets",function(){i(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(e,t){return r(this,e,t)})}(),define("../lib/codemirror/addon/edit/matchbrackets",function(){}),function(){function e(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function t(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder",n.appendChild(document.createTextNode(t.getOption("placeholder"))),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function n(t){e(t)}function r(e){s(e)&&t(e)}function i(n){var r=n.getWrapperElement(),i=s(n);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":"");if(n.hasFocus())return;i?t(n):e(n)}function s(e){return e.lineCount()===1&&e.getLine(0)===""}CodeMirror.defineOption("placeholder","",function(t,s,o){var u=o&&o!=CodeMirror.Init;if(s&&!u)t.on("focus",n),t.on("blur",r),t.on("change",i),i(t);else if(!s&&u){t.off("focus",n),t.off("blur",r),t.off("change",i),e(t);var a=t.getWrapperElement();a.className=a.className.replace(" CodeMirror-empty","")}s&&!t.hasFocus()&&r(t)})}(),define("../lib/codemirror/addon/display/placeholder",function(){}),function(){function e(){var e={};return e.FRAMERATE=30,e.MAX_VIRTUAL_PIXELS=3e4,e.init=function(t){var n=0;e.UniqueId=function(){return n++,"canvg"+n},e.Definitions={},e.Styles={},e.Animations=[],e.Images=[],e.ctx=t,e.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(e,t){this.viewPorts.push({width:e,height:t})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(e){return e!=null&&typeof e=="number"?e:e=="x"?this.width():e=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},e.init(),e.ImagesLoaded=function(){for(var t=0;t]*>/,"");var n=new ActiveXObject("Microsoft.XMLDOM");return n.async="false",n.loadXML(e),n},e.Property=function(e,t){this.name=e,this.value=t},e.Property.prototype.getValue=function(){return this.value},e.Property.prototype.hasValue=function(){return this.value!=null&&this.value!==""},e.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var e=parseFloat(this.value);return(this.value+"").match(/%$/)&&(e/=100),e},e.Property.prototype.valueOrDefault=function(e){return this.hasValue()?this.value:e},e.Property.prototype.numValueOrDefault=function(e){return this.hasValue()?this.numValue():e},e.Property.prototype.addOpacity=function(t){var n=this.value;if(t!=null&&t!=""&&typeof this.value=="string"){var r=new RGBColor(this.value);r.ok&&(n="rgba("+r.r+", "+r.g+", "+r.b+", "+t+")")}return new e.Property(this.name,n)},e.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),e.Definitions[t]},e.Property.prototype.isUrlDefinition=function(){return this.value.indexOf("url(")==0},e.Property.prototype.getFillStyleDefinition=function(t,n){var r=this.getDefinition();if(r!=null&&r.createGradient)return r.createGradient(e.ctx,t,n);if(r!=null&&r.createPattern){if(r.getHrefAttribute().hasValue()){var i=r.attribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&(r.attribute("patternTransform",!0).value=i.value)}return r.createPattern(e.ctx,t)}return null},e.Property.prototype.getDPI=function(e){return 96},e.Property.prototype.getEM=function(t){var n=12,r=new e.Property("fontSize",e.Font.Parse(e.ctx.font).fontSize);return r.hasValue()&&(n=r.toPixels(t)),n},e.Property.prototype.getUnits=function(){var e=this.value+"";return e.replace(/[0-9\.\-]/g,"")},e.Property.prototype.toPixels=function(t,n){if(!this.hasValue())return 0;var r=this.value+"";if(r.match(/em$/))return this.numValue()*this.getEM(t);if(r.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(r.match(/px$/))return this.numValue();if(r.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(r.match(/pc$/))return this.numValue()*15;if(r.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(r.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(r.match(/in$/))return this.numValue()*this.getDPI(t);if(r.match(/%$/))return this.numValue()*e.ViewPort.ComputeSize(t);var i=this.numValue();return n&&i<1?i*e.ViewPort.ComputeSize(t):i},e.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var e=this.value+"";return e.match(/s$/)?this.numValue()*1e3:e.match(/ms$/)?this.numValue():this.numValue()},e.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var e=this.value+"";return e.match(/deg$/)?this.numValue()*(Math.PI/180):e.match(/grad$/)?this.numValue()*(Math.PI/200):e.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)},e.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,n,r,i,s,o){var u=o!=null?this.Parse(o):this.CreateFont("","","","","",e.ctx.font);return{fontFamily:s||u.fontFamily,fontSize:i||u.fontSize,fontStyle:t||u.fontStyle,fontWeight:r||u.fontWeight,fontVariant:n||u.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var t=this;this.Parse=function(n){var r={},i=e.trim(e.compressSpaces(n||"")).split(" "),s={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},o="";for(var u=0;uthis.x2&&(this.x2=e)}if(t!=null){if(isNaN(this.y1)||isNaN(this.y2))this.y1=t,this.y2=t;tthis.y2&&(this.y2=t)}},this.addX=function(e){this.addPoint(e,null)},this.addY=function(e){this.addPoint(null,e)},this.addBoundingBox=function(e){this.addPoint(e.x1,e.y1),this.addPoint(e.x2,e.y2)},this.addQuadraticCurve=function(e,t,n,r,i,s){var o=e+2/3*(n-e),u=t+2/3*(r-t),a=o+1/3*(i-e),f=u+1/3*(s-t);this.addBezierCurve(e,t,o,a,u,f,i,s)},this.addBezierCurve=function(e,t,n,r,s,o,u,a){var f=[e,t],l=[n,r],c=[s,o],h=[u,a];this.addPoint(f[0],f[1]),this.addPoint(h[0],h[1]);for(i=0;i<=1;i++){var p=function(e){return Math.pow(1-e,3)*f[i]+3*Math.pow(1-e,2)*e*l[i]+3*(1-e)*Math.pow(e,2)*c[i]+Math.pow(e,3)*h[i]},d=6*f[i]-12*l[i]+6*c[i],v=-3*f[i]+9*l[i]-9*c[i]+3*h[i],m=3*l[i]-3*f[i];if(v==0){if(d==0)continue;var g=-m/d;0=0;t--)this.transforms[t].unapply(e)},this.applyToPoint=function(e){for(var t=0;t=this.tokens.length-1},this.isCommandOrEnd=function(){return this.isEnd()?!0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new e.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var e=this.getPoint();return this.control=e,e},this.getAsCurrentPoint=function(){var e=this.getPoint();return this.current=e,e},this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t")return this.current;var t=new e.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return t},this.makeAbsolute=function(e){return this.isRelativeCommand()&&(e.x+=this.current.x,e.y+=this.current.y),e},this.addMarker=function(e,t,n){n!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(n)),this.addMarkerAngle(e,t==null?null:t.angleTo(e))},this.addMarkerAngle=function(e,t){this.points.push(e),this.angles.push(t)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var e=0;e1&&(c*=Math.sqrt(g),h*=Math.sqrt(g));var y=(d==v?-1:1)*Math.sqrt((Math.pow(c,2)*Math.pow(h,2)-Math.pow(c,2)*Math.pow(m.y,2)-Math.pow(h,2)*Math.pow(m.x,2))/(Math.pow(c,2)*Math.pow(m.y,2)+Math.pow(h,2)*Math.pow(m.x,2)));isNaN(y)&&(y=0);var b=new e.Point(y*c*m.y/h,y*-h*m.x/c),w=new e.Point((u.x+l.x)/2+Math.cos(p)*b.x-Math.sin(p)*b.y,(u.y+l.y)/2+Math.sin(p)*b.x+Math.cos(p)*b.y),E=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2))},S=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(E(e)*E(t))},x=function(e,t){return(e[0]*t[1]=1&&(k=0);var L=1-v?1:-1,A=T+L*(k/2),O=new e.Point(w.x+c*Math.cos(A),w.y+h*Math.sin(A));n.addMarkerAngle(O,A-L*Math.PI/2),n.addMarkerAngle(l,A-L*Math.PI),r.addPoint(l.x,l.y);if(t!=null){var S=c>h?c:h,M=c>h?1:c/h,_=c>h?h/c:1;t.translate(w.x,w.y),t.rotate(p),t.scale(M,_),t.arc(0,0,S,T,T+k,1-v),t.scale(1/M,1/_),t.rotate(-p),t.translate(-w.x,-w.y)}}break;case"Z":case"z":t!=null&&t.closePath(),n.current=n.start}}return r},this.getMarkers=function(){var e=this.PathParser.getMarkerPoints(),t=this.PathParser.getMarkerAngles(),n=[];for(var r=0;r1&&(this.offset=1);var n=this.style("stop-color");this.style("stop-opacity").hasValue()&&(n=n.addOpacity(this.style("stop-opacity").value)),this.color=n.value},e.Element.stop.prototype=new e.Element.ElementBase,e.Element.AnimateBase=function(t){this.base=e.Element.ElementBase,this.base(t),e.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var e=this.attribute("attributeType").value,t=this.attribute("attributeName").value;return e=="CSS"?this.parent.style(t,!0):this.parent.attribute(t,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(e){this.initialValue==null&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits());if(this.duration>this.maxDuration){if(this.attribute("repeatCount").value!="indefinite"&&this.attribute("repeatDur").value!="indefinite")return this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed?(this.removed=!0,this.getProperty().value=this.initialValue,!0):!1;this.duration=0}this.duration=this.duration+e;var t=!1;if(this.beginn&&o.attribute("x").hasValue())break;i+=o.measureTextRecursive(e)}return-1*(r=="end"?i:i/2)}return 0},this.renderChild=function(e,t,n){var r=t.children[n];r.attribute("x").hasValue()?r.x=r.attribute("x").toPixels("x")+this.getAnchorDelta(e,t,n):(this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),r.attribute("dx").hasValue()&&(this.x+=r.attribute("dx").toPixels("x")),r.x=this.x),this.x=r.x+r.measureText(e),r.attribute("y").hasValue()?r.y=r.attribute("y").toPixels("y"):(this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),r.attribute("dy").hasValue()&&(this.y+=r.attribute("dy").toPixels("y")),r.y=this.y),this.y=r.y,r.render(e);for(var n=0;n0&&t[n-1]!=" "&&n0&&t[n-1]!=" "&&(n==t.length-1||t[n+1]==" ")&&(s="initial"),typeof e.glyphs[r]!="undefined"&&(i=e.glyphs[r][s],i==null&&e.glyphs[r].type=="glyph"&&(i=e.glyphs[r]))}else i=e.glyphs[r];return i==null&&(i=e.missingGlyph),i},this.renderChildren=function(t){var n=this.parent.style("font-family").getDefinition();if(n!=null){var r=this.parent.style("font-size").numValueOrDefault(e.Font.Parse(e.ctx.font).fontSize),i=this.parent.style("font-style").valueOrDefault(e.Font.Parse(e.ctx.font).fontStyle),s=this.getText();n.isRTL&&(s=s.split("").reverse().join(""));var o=e.ToNumberArray(this.parent.attribute("dx").value);for(var u=0;u0){var y=m[g].indexOf("url"),b=m[g].indexOf(")",y),w=m[g].substr(y+5,b-y-6),E=e.parseXml(e.ajax(w)),S=E.getElementsByTagName("font");for(var x=0;x17?(v=0,ga("send","event","17 characters typed","textarea")):v++}),e("#textcopybox").bind({cut:function(e){ga("send","event","cut","svgsource")},copy:function(e){ga("send","event","copy","svgsource")}}),e("#langlink").bind({click:function(t){ga("send","event","link",e("#langlink").attr("href"))}}),e("#tweetme").bind({click:function(t){ga("send","event","link",e("#tweetme").attr("href"))}}),e("#gplusme").bind({click:function(t){ga("send","event","link",e("#gplusme").attr("href"))}}),e("#forkme").bind({click:function(t){ga("send","event","link",e("#forkme").attr("href"))}}),e("body").bind({keydown:function(t){var n=t.keyCode,r=e(t.currentTarget);switch(n){case m:H();break;default:}}})})}),require(["mscgenui"],function(e){}),define("mscgen-main",function(){}); \ No newline at end of file +function stackBlurImage(e,t,n,r){var i=document.getElementById(e),s=i.naturalWidth,o=i.naturalHeight,u=document.getElementById(t);u.style.width=s+"px",u.style.height=o+"px",u.width=s,u.height=o;var a=u.getContext("2d");a.clearRect(0,0,s,o),a.drawImage(i,0,0);if(isNaN(n)||n<1)return;r?stackBlurCanvasRGBA(t,0,0,s,o,n):stackBlurCanvasRGB(t,0,0,s,o,n)}function stackBlurCanvasRGBA(e,t,n,r,i,s){if(isNaN(s)||s<1)return;s|=0;var o=document.getElementById(e),u=o.getContext("2d"),a;try{try{a=u.getImageData(t,n,r,i)}catch(f){try{netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead"),a=u.getImageData(t,n,r,i)}catch(f){throw alert("Cannot access local image"),new Error("unable to access local image data: "+f)}}}catch(f){throw alert("Cannot access image"),new Error("unable to access image data: "+f)}var l=a.data,c,h,p,d,v,m,g,y,b,w,E,S,x,T,N,C,k,L,A,O,M,_,D,P,H=s+s+1,B=r<<2,j=r-1,F=i-1,I=s+1,q=I*(I+1)/2,R=new BlurStack,U=R;for(p=1;p>$,D!=0?(D=255/D,l[m]=(y*V>>$)*D,l[m+1]=(b*V>>$)*D,l[m+2]=(w*V>>$)*D):l[m]=l[m+1]=l[m+2]=0,y-=S,b-=x,w-=T,E-=N,S-=W.r,x-=W.g,T-=W.b,N-=W.a,d=g+((d=c+s+1)>$,D>0?(D=255/D,l[d]=(y*V>>$)*D,l[d+1]=(b*V>>$)*D,l[d+2]=(w*V>>$)*D):l[d]=l[d+1]=l[d+2]=0,y-=S,b-=x,w-=T,E-=N,S-=W.r,x-=W.g,T-=W.b,N-=W.a,d=c+((d=h+I)>z,l[m+1]=b*U>>z,l[m+2]=w*U>>z,y-=E,b-=S,w-=x,E-=q.r,S-=q.g,x-=q.b,d=g+((d=c+s+1)>z,l[d+1]=b*U>>z,l[d+2]=w*U>>z,y-=E,b-=S,w-=x,E-=q.r,S-=q.g,x-=q.b,d=c+((d=h+H)255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return e.length==1&&(e="0"+e),t.length==1&&(t="0"+t),n.length==1&&(n="0"+n),"#"+e+t+n},this.getHelpXML=function(){var e=new Array;for(var n=0;n "+f.toRGB()+" -> "+f.toHex());a.appendChild(l),a.appendChild(c),u.appendChild(a)}catch(h){}return u}}(function(e,t){function n(e){return H.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}function r(e){if(!vn[e]){var t=_.body,n=H("<"+e+">").appendTo(t),r=n.css("display");n.remove();if(r==="none"||r===""){mn||(mn=_.createElement("iframe"),mn.frameBorder=mn.width=mn.height=0),t.appendChild(mn);if(!gn||!mn.createElement)gn=(mn.contentWindow||mn.contentDocument).document,gn.write((H.support.boxModel?"":"")+""),gn.close();n=gn.createElement(e),gn.body.appendChild(n),r=H.css(n,"display"),t.removeChild(mn)}vn[e]=r}return vn[e]}function i(e,t){var n={};return H.each(En.concat.apply([],En.slice(0,t)),function(){n[this]=e}),n}function s(){Sn=t}function o(){return setTimeout(s,0),Sn=H.now()}function u(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function a(){try{return new e.XMLHttpRequest}catch(t){}}function f(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r=e.dataTypes,i={},s,o,u=r.length,a,f=r[0],l,c,h,p,d;for(s=1;s0){if(n!=="border")for(;i=0===n})}function N(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function C(){return!0}function k(){return!1}function L(e,t,n){var r=t+"defer",i=t+"queue",s=t+"mark",o=H._data(e,r);o&&(n==="queue"||!H._data(e,i))&&(n==="mark"||!H._data(e,s))&&setTimeout(function(){!H._data(e,i)&&!H._data(e,s)&&(H.removeData(e,r,!0),o.fire())},0)}function A(e){for(var t in e){if(t==="data"&&H.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function O(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(I,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:H.isNumeric(r)?+r:F.test(r)?H.parseJSON(r):r}catch(s){}H.data(e,n,r)}else r=t}return r}function M(e){var t=B[e]={},n,r;e=e.split(/\s+/);for(n=0,r=e.length;n)[^>]*$|#([\w\-]*)$)/,a=/\S/,f=/^\s+/,l=/\s+$/,c=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,m=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,y=/(msie) ([\w.]+)/,b=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,E=/^-ms-/,S=function(e,t){return(t+"").toUpperCase()},x=D.userAgent,T,N,C,k=Object.prototype.toString,L=Object.prototype.hasOwnProperty,A=Array.prototype.push,O=Array.prototype.slice,M=String.prototype.trim,P=Array.prototype.indexOf,H={};return r.fn=r.prototype={constructor:r,init:function(e,n,i){var s,o,a,f;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(e==="body"&&!n&&_.body)return this.context=_,this[0]=_.body,this.selector=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)!=="<"||e.charAt(e.length-1)!==">"||e.length<3?s=u.exec(e):s=[null,e,null];if(s&&(s[1]||!n)){if(s[1])return n=n instanceof r?n[0]:n,f=n?n.ownerDocument||n:_,a=c.exec(e),a?r.isPlainObject(n)?(e=[_.createElement(a[1])],r.fn.attr.call(e,n,!0)):e=[f.createElement(a[1])]:(a=r.buildFragment([s[1]],[f]),e=(a.cacheable?r.clone(a.fragment):a.fragment).childNodes),r.merge(this,e);o=_.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return i.find(e);this.length=1,this[0]=o}return this.context=_,this.selector=e,this}return!n||n.jquery?(n||i).find(e):this.constructor(n).find(e)}return r.isFunction(e)?i.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),r.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return O.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 i=this.constructor();return r.isArray(e)?A.apply(i,e):r.merge(i,e),i.prevObject=this,i.context=this.context,t==="find"?i.selector=this.selector+(this.selector?" ":"")+n:t&&(i.selector=this.selector+"."+t+"("+n+")"),i},each:function(e,t){return r.each(this,e,t)},ready:function(e){return r.bindReady(),N.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(O.apply(this,arguments),"slice",O.call(arguments).join(","))},map:function(e){return this.pushStack(r.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:A,sort:[].sort,splice:[].splice},r.fn.init.prototype=r.fn,r.extend=r.fn.extend=function(){var e,n,i,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"&&!r.isFunction(a)&&(a={}),l===f&&(a=this,--f);for(;f0)return;N.fireWith(_,[r]),r.fn.trigger&&r(_).trigger("ready").off("ready")}},bindReady:function(){if(!N){N=r.Callbacks("once memory");if(_.readyState==="complete")return setTimeout(r.ready,1);if(_.addEventListener)_.addEventListener("DOMContentLoaded",C,!1),e.addEventListener("load",r.ready,!1);else if(_.attachEvent){_.attachEvent("onreadystatechange",C),e.attachEvent("onload",r.ready);var t=!1;try{t=e.frameElement==null}catch(i){}_.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return r.type(e)==="function"},isArray:Array.isArray||function(e){return r.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):H[k.call(e)]||"object"},isPlainObject:function(e){if(!e||r.type(e)!=="object"||e.nodeType||r.isWindow(e))return!1;try{if(e.constructor&&!L.call(e,"constructor")&&!L.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var i;for(i in e);return i===t||L.call(e,i)},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=r.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(h.test(t.replace(p,"@").replace(d,"]").replace(v,"")))return(new Function("return "+t))();r.error("Invalid JSON: "+t)},parseXML:function(n){if(typeof n!="string"||!n)return null;var i,s;try{e.DOMParser?(s=new DOMParser,i=s.parseFromString(n,"text/xml")):(i=new ActiveXObject("Microsoft.XMLDOM"),i.async="false",i.loadXML(n))}catch(o){i=t}return(!i||!i.documentElement||i.getElementsByTagName("parsererror").length)&&r.error("Invalid XML: "+n),i},noop:function(){},globalEval:function(t){t&&a.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(E,"ms-").replace(w,S)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,i){var s,o=0,u=e.length,a=u===t||r.isFunction(e);if(i){if(a){for(s in e)if(n.apply(e[s],i)===!1)break}else for(;o0&&e[0]&&e[f-1]||f===0||r.isArray(e));if(l)for(;a1?j.call(arguments,0):t,f.notifyWith(l,o)}}function n(e){return function(t){r[e]=arguments.length>1?j.call(arguments,0):t,--u||f.resolveWith(f,r)}}var r=j.call(arguments,0),i=0,s=r.length,o=Array(s),u=s,a=s,f=s<=1&&e&&H.isFunction(e.promise)?e:H.Deferred(),l=f.promise();if(s>1){for(;i
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!n.length||!r)return{};i=_.createElement("select"),s=i.appendChild(_.createElement("option")),o=p.getElementsByTagName("input")[0],t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.55/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:o.value==="on",optSelected:s.selected,getSetAttribute:p.className!=="t",enctype:!!_.createElement("form").enctype,html5Clone:_.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},H.boxModel=t.boxModel=_.compatMode==="CSS1Compat",o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!s.disabled;try{delete p.test}catch(v){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),o=_.createElement("input"),o.value="t",o.setAttribute("type","radio"),t.radioValue=o.value==="t",o.setAttribute("checked","checked"),o.setAttribute("name","t"),p.appendChild(o),u=_.createDocumentFragment(),u.appendChild(p.lastChild),t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=o.checked,u.removeChild(o),u.appendChild(p);if(p.attachEvent)for(c in{submit:1,change:1,focusin:1})l="on"+c,h=l in p,h||(p.setAttribute(l,"return;"),h=typeof p[l]=="function"),t[c+"Bubbles"]=h;return u.removeChild(p),u=i=s=p=o=null,H(function(){var n,r,i,s,o,u,f,l,c,d,v,m,g,y=_.getElementsByTagName("body")[0];!y||(l=1,g="padding:0;margin:0;border:",v="position:absolute;top:0;left:0;width:1px;height:1px;",m=g+"0;visibility:hidden;",c="style='"+v+g+"5px solid #000;",d="
"+""+"
",n=_.createElement("div"),n.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+l+"px",y.insertBefore(n,y.firstChild),p=_.createElement("div"),n.appendChild(p),p.innerHTML="
t
",a=p.getElementsByTagName("td"),h=a[0].offsetHeight===0,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=h&&a[0].offsetHeight===0,e.getComputedStyle&&(p.innerHTML="",f=_.createElement("div"),f.style.width="0",f.style.marginRight="0",p.style.width="2px",p.appendChild(f),t.reliableMarginRight=(parseInt((e.getComputedStyle(f,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,t.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
",t.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=v+m,p.innerHTML=d,r=p.firstChild,i=r.firstChild,o=r.nextSibling.firstChild.firstChild,u={doesNotAddBorder:i.offsetTop!==5,doesAddBorderForTableAndCells:o.offsetTop===5},i.style.position="fixed",i.style.top="20px",u.fixedPosition=i.offsetTop===20||i.offsetTop===15,i.style.position=i.style.top="",r.style.overflow="hidden",r.style.position="relative",u.subtractsBorderForOverflowNotVisible=i.offsetTop===-5,u.doesNotIncludeMarginInBodyOffset=y.offsetTop!==l,e.getComputedStyle&&(p.style.marginTop="1%",t.pixelMargin=(e.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof n.style.zoom!="undefined"&&(n.style.zoom=1),y.removeChild(n),f=p=n=null,H.extend(t,u))}),t}();var F=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;H.extend({cache:{},uuid:0,expando:"jQuery"+(H.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?H.cache[e[H.expando]]:e[H.expando],!!e&&!A(e)},data:function(e,n,r,i){if(!!H.acceptData(e)){var s,o,u,a=H.expando,f=typeof n=="string",l=e.nodeType,c=l?H.cache:e,h=l?e[a]:e[a]&&a,p=n==="events";if((!h||!c[h]||!p&&!i&&!c[h].data)&&f&&r===t)return;h||(l?e[a]=h=++H.uuid:h=a),c[h]||(c[h]={},l||(c[h].toJSON=H.noop));if(typeof n=="object"||typeof n=="function")i?c[h]=H.extend(c[h],n):c[h].data=H.extend(c[h].data,n);return s=o=c[h],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[H.camelCase(n)]=r),p&&!o[n]?s.events:(f?(u=o[n],u==null&&(u=o[H.camelCase(n)])):u=o,u)}},removeData:function(e,t,n){if(!!H.acceptData(e)){var r,i,s,o=H.expando,u=e.nodeType,a=u?H.cache:e,f=u?e[o]:o;if(!a[f])return;if(t){r=n?a[f]:a[f].data;if(r){H.isArray(t)||(t in r?t=[t]:(t=H.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){H.removeData(this,e)})}}),H.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",H._data(e,t,(H._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:(H._data(t,r)||1)-1;i?H._data(t,r,i):(H.removeData(t,r,!0),L(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=H._data(e,t),n&&(!r||H.isArray(n)?r=H._data(e,t,H.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=H.queue(e,t),r=n.shift(),i={};r==="inprogress"&&(r=n.shift()),r&&(t==="fx"&&n.unshift("inprogress"),H._data(e,t+".run",i),r.call(e,function(){H.dequeue(e,t)},i)),n.length||(H.removeData(e,t+"queue "+t+".run",!0),L(e,t,"queue"))}}),H.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){H.removeAttr(this,e)})},prop:function(e,t){return H.access(this,H.prop,e,t,arguments.length>1)},removeProp:function(e){return e=H.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(H.isFunction(e))return this.each(function(t){H(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(R);for(n=0,r=this.length;n-1)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!!arguments.length)return i=H.isFunction(e),this.each(function(r){var s=H(this),o;if(this.nodeType===1){i?o=e.call(this,r,s.val()):o=e,o==null?o="":typeof o=="number"?o+="":H.isArray(o)&&(o=H.map(o,function(e){return e==null?"":e+""})),n=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,o,"value")===t)this.value=o}});if(s)return n=H.valHooks[s.type]||H.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(U,""):r==null?"":r)}}),H.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,s=e.selectedIndex,o=[],u=e.options,a=e.type==="select-one";if(s<0)return null;n=a?s:0,r=a?s+1:u.length;for(;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 s,o,u,a=e.nodeType;if(!!e&&a!==3&&a!==8&&a!==2){if(i&&n in H.attrFn)return H(e)[n](r);if(typeof e.getAttribute=="undefined")return H.prop(e,n,r);u=a!==1||!H.isXMLDoc(e),u&&(n=n.toLowerCase(),o=H.attrHooks[n]||(V.test(n)?K:J));if(r!==t){if(r===null){H.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,""+r),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)}},removeAttr:function(e,t){var n,r,i,s,o,u=0;if(t&&e.nodeType===1){r=t.toLowerCase().split(R),s=r.length;for(;u=0}})});var G=/^(?:textarea|input|select)$/i,Y=/^([^\.]*)?(?:\.(.+))?$/,Z=/(?:^|\s)hover(\.\S+)?\b/,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,it=function(e){var t=rt.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},st=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))},ot=function(e){return H.event.special.hover?e:e.replace(Z,"mouseenter$1 mouseleave$1")};H.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,v,m,g;if(!(e.nodeType===3||e.nodeType===8||!n||!r||!(o=H._data(e)))){r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=H.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof H=="undefined"||!!e&&H.event.triggered===e.type?t:H.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=H.trim(ot(n)).split(" ");for(f=0;f=0&&(o=o.slice(0,-1),f=!0),o.indexOf(".")>=0&&(u=o.split("."),o=u.shift(),u.sort());if((!i||H.event.customEvent[o])&&!H.event.global[o])return;n=typeof n=="object"?n[H.expando]?n:new H.Event(o,n):new H.Event(o),n.type=o,n.isTrigger=!0,n.exclusive=f,n.namespace=u.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+u.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,p=o.indexOf(":")<0?"on"+o:"";if(!i){a=H.cache;for(l in a)a[l].events&&a[l].events[o]&&H.event.trigger(n,r,a[l].handle.elem,!0);return}n.result=t,n.target||(n.target=i),r=r!=null?H.makeArray(r):[],r.unshift(n),d=H.event.special[o]||{};if(d.trigger&&d.trigger.apply(i,r)===!1)return;m=[[i,d.bindType||o]];if(!s&&!d.noBubble&&!H.isWindow(i)){g=d.delegateType||o,c=nt.test(g+o)?i:i.parentNode,h=null;for(;c;c=c.parentNode)m.push([c,g]),h=c;h&&h===i.ownerDocument&&m.push([h.defaultView||h.parentWindow||e,g])}for(l=0;li&&a.push({elem:this,matches:r.slice(i)});for(f=0;f0?this.on(t,null,e,n):this.trigger(t)},H.attrFn&&(H.attrFn[t]=!0),et.test(t)&&(H.event.fixHooks[t]=H.event.keyHooks),tt.test(t)&&(H.event.fixHooks[t]=H.event.mouseHooks)}),function(){function e(e,t,n,r,s,o){for(var u=0,a=r.length;u0){l=f;break}}f=f[e]}r[u]=l}}}function n(e,t,n,r,s,o){for(var u=0,a=r.length;u+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),s=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(e,t,n,i){n=n||[],t=t||_;var s=t;if(t.nodeType!==1&&t.nodeType!==9)return[];if(!e||typeof e!="string")return n;var u,a,f,l,c,p,m,g,b=!0,w=h.isXML(t),E=[],x=e;do{r.exec(""),u=r.exec(x);if(u){x=u[3],E.push(u[1]);if(u[2]){l=u[3];break}}}while(u);if(E.length>1&&v.exec(e))if(E.length===2&&d.relative[E[0]])a=S(E[0]+E[1],t,i);else{a=d.relative[E[0]]?[t]:h(E.shift(),t);while(E.length)e=E.shift(),d.relative[e]&&(e+=E.shift()),a=S(e,a,i)}else{!i&&E.length>1&&t.nodeType===9&&!w&&d.match.ID.test(E[0])&&!d.match.ID.test(E[E.length-1])&&(c=h.find(E.shift(),t,w),t=c.expr?h.filter(c.expr,c.set)[0]:c.set[0]);if(t){c=i?{expr:E.pop(),set:y(i)}:h.find(E.pop(),E.length!==1||E[0]!=="~"&&E[0]!=="+"||!t.parentNode?t:t.parentNode,w),a=c.expr?h.filter(c.expr,c.set):c.set,E.length>0?f=y(a):b=!1;while(E.length)p=E.pop(),m=p,d.relative[p]?m=E.pop():p="",m==null&&(m=t),d.relative[p](f,m,w)}else f=E=[]}f||(f=a),f||h.error(p||e);if(o.call(f)==="[object Array]")if(!b)n.push.apply(n,f);else if(t&&t.nodeType===1)for(g=0;f[g]!=null;g++)f[g]&&(f[g]===!0||f[g].nodeType===1&&h.contains(t,f[g]))&&n.push(a[g]);else for(g=0;f[g]!=null;g++)f[g]&&f[g].nodeType===1&&n.push(a[g]);else y(f,n);return l&&(h(l,s,n,i),h.uniqueSort(n)),n};h.uniqueSort=function(e){if(w){u=a,e.sort(w);if(u)for(var t=1;t0},h.find=function(e,t,n){var r,i,s,o,u,a;if(!e)return[];for(i=0,s=d.order.length;i":function(e,t){var n,r=typeof t=="string",i=0,s=e.length;if(r&&!c.test(t)){t=t.toLowerCase();for(;i=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]=s++,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(e,t,n,i,s){if(e[1]==="not"){if(!((r.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var o=h.filter(e[3],t,n,!0^s);return n||i.push.apply(i,o),!1}e[3]=h(e[3],null,null,t)}else if(d.match.POS.test(e[0])||d.match.CHILD.test(e[0]))return!0;return e},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 tn[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=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(_.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",r.insertBefore(e,r.firstChild),_.getElementById(n)&&(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}),r.removeChild(e),r=e=null}(),function(){var e=_.createElement("div");e.appendChild(_.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="",e.firstChild&&typeof e.firstChild.getAttribute!="undefined"&&e.firstChild.getAttribute("href")!=="#"&&(d.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),_.querySelectorAll&&function(){var e=h,t=_.createElement("div"),n="__sizzle__";t.innerHTML="

";if(!t.querySelectorAll||t.querySelectorAll(".TEST").length!==0){h=function(t,r,i,s){r=r||_;if(!s&&!h.isXML(r)){var o=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(o&&(r.nodeType===1||r.nodeType===9)){if(o[1])return y(r.getElementsByTagName(t),i);if(o[2]&&d.find.CLASS&&r.getElementsByClassName)return y(r.getElementsByClassName(o[2]),i)}if(r.nodeType===9){if(t==="body"&&r.body)return y([r.body],i);if(o&&o[3]){var u=r.getElementById(o[3]);if(!u||!u.parentNode)return y([],i);if(u.id===o[3])return y([u],i)}try{return y(r.querySelectorAll(t),i)}catch(a){}}else if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){var f=r,l=r.getAttribute("id"),c=l||n,p=r.parentNode,v=/^\s*[+~]/.test(t);l?c=c.replace(/'/g,"\\$&"):r.setAttribute("id",c),v&&p&&(r=r.parentNode);try{if(!v||p)return y(r.querySelectorAll("[id='"+c+"'] "+t),i)}catch(m){}finally{l||f.removeAttribute("id")}}}return e(t,r,i,s)};for(var r in e)h[r]=e[r];t=null}}(),function(){var e=_.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(_.createElement("div"),"div"),r=!1;try{t.call(_.documentElement,"[test!='']:sizzle")}catch(i){r=!0}h.matchesSelector=function(e,i){i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!h.isXML(e))try{if(r||!d.match.PSEUDO.test(i)&&!/!=/.test(i)){var s=t.call(e,i);if(s||!n||e.document&&e.document.nodeType!==11)return s}}catch(o){}return h(i,null,null,[e]).length>0}}}(),function(){var e=_.createElement("div");e.innerHTML="
";if(!!e.getElementsByClassName&&e.getElementsByClassName("e").length!==0){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}}(),_.documentElement.contains?h.contains=function(e,t){return e!==t&&(e.contains?e.contains(t):!0)}:_.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 S=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;u0)for(o=s;o=0:H.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n=[],r,i,s=this[0];if(H.isArray(e)){var o=1;while(s&&s.ownerDocument&&s!==t){for(r=0;r-1:H.find.matchesSelector(s,e)){n.push(s);break}s=s.parentNode;if(!s||!s.ownerDocument||s===t||s.nodeType===11)break}}return n=n.length>1?H.unique(n):n,this.pushStack(n,"closest",e)},index:function(e){return e?typeof e=="string"?H.inArray(this[0],H(e)):H.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"?H(e,t):H.makeArray(e&&e.nodeType?[e]:e),r=H.merge(this.get(),n);return this.pushStack(N(n[0])||N(r[0])?r:H.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),H.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return H.dir(e,"parentNode")},parentsUntil:function(e,t,n){return H.dir(e,"parentNode",n)},next:function(e){return H.nth(e,2,"nextSibling")},prev:function(e){return H.nth(e,2,"previousSibling")},nextAll:function(e){return H.dir(e,"nextSibling")},prevAll:function(e){return H.dir(e,"previousSibling")},nextUntil:function(e,t,n){return H.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return H.dir(e,"previousSibling",n)},siblings:function(e){return H.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return H.sibling(e.firstChild)},contents:function(e){return H.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:H.makeArray(e.childNodes)}},function(e,t){H.fn[e]=function(n,r){var i=H.map(this,t,n);return ut.test(e)||(r=n),r&&typeof r=="string"&&(i=H.filter(r,i)),i=this.length>1&&!pt[e]?H.unique(i):i,(this.length>1||ft.test(r))&&at.test(e)&&(i=i.reverse()),this.pushStack(i,e,ct.call(arguments).join(","))}}),H.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?H.find.matchesSelector(t[0],e)?[t[0]]:[]:H.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!H(s).is(r)))s.nodeType===1&&i.push(s),s=s[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 dt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",vt=/ jQuery\d+="(?:\d+|null)"/g,mt=/^\s+/,gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,yt=/<([\w:]+)/,bt=/]","i"),Tt=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/\/(java|ecma)script/i,Ct=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Lt=x(_);kt.optgroup=kt.option,kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,H.support.htmlSerialize||(kt._default=[1,"div
","
"]),H.fn.extend({text:function(e){return H.access(this,function(e){return e===t?H.text(this):this.empty().append((this[0]&&this[0].ownerDocument||_).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(H.isFunction(e))return this.each(function(t){H(this).wrapAll(e.call(this,t))});if(this[0]){var t=H(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 H.isFunction(e)?this.each(function(t){H(this).wrapInner(e.call(this,t))}):this.each(function(){var t=H(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=H.isFunction(e);return this.each(function(n){H(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){H.nodeName(this,"body")||H(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=H.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,H.clean(arguments)),e}},remove:function(e,t){for(var n=0,r;(r=this[n])!=null;n++)if(!e||H.filter(e,[r]).length)!t&&r.nodeType===1&&(H.cleanData(r.getElementsByTagName("*")),H.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&&H.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 H.clone(this,e,t)})},html:function(e){return H.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(vt,""):null;if(typeof e=="string"&&!Et.test(e)&&(H.support.leadingWhitespace||!mt.test(e))&&!kt[(yt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(gt,"<$1>");try{for(;r1&&l0?this.clone(!0):this).get();H(i[o])[t](a),r=r.concat(a)}return this.pushStack(r,e,i.selector)}}),H.extend({clone:function(e,t,n){var r,i,s,o=H.support.html5Clone||H.isXMLDoc(e)||!xt.test("<"+e.nodeName+">")?e.cloneNode(!0):m(e);if((!H.support.noCloneEvent||!H.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!H.isXMLDoc(e)){w(e,o),r=b(e),i=b(o);for(s=0;r[s];++s)i[s]&&w(r[s],i[s])}if(t){E(e,o);if(n){r=b(e),i=b(o);for(s=0;r[s];++s)E(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var i,s,o,u=[];t=t||_,typeof t.createElement=="undefined"&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||_);for(var a=0,f;(f=e[a])!=null;a++){typeof f=="number"&&(f+="");if(!f)continue;if(typeof f=="string")if(!wt.test(f))f=t.createTextNode(f);else{f=f.replace(gt,"<$1>");var l=(yt.exec(f)||["",""])[1].toLowerCase(),c=kt[l]||kt._default,h=c[0],p=t.createElement("div"),d=Lt.childNodes,v;t===_?Lt.appendChild(p):x(t).appendChild(p),p.innerHTML=c[1]+f+c[2];while(h--)p=p.lastChild;if(!H.support.tbody){var m=bt.test(f),y=l==="table"&&!m?p.firstChild&&p.firstChild.childNodes:c[1]===""&&!m?p.childNodes:[];for(o=y.length-1;o>=0;--o)H.nodeName(y[o],"tbody")&&!y[o].childNodes.length&&y[o].parentNode.removeChild(y[o])}!H.support.leadingWhitespace&&mt.test(f)&&p.insertBefore(t.createTextNode(mt.exec(f)[0]),p.firstChild),f=p.childNodes,p&&(p.parentNode.removeChild(p),d.length>0&&(v=d[d.length-1],v&&v.parentNode&&v.parentNode.removeChild(v)))}var b;if(!H.support.appendChecked)if(f[0]&&typeof (b=f.length)=="number")for(o=0;o1)},H.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ft(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":H.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!!e&&e.nodeType!==3&&e.nodeType!==8&&!!e.style){var s,o,u=H.camelCase(n),a=e.style,f=H.cssHooks[u];n=H.cssProps[u]||u;if(r===t)return f&&"get"in f&&(s=f.get(e,!1,i))!==t?s:a[n];o=typeof r,o==="string"&&(s=Pt.exec(r))&&(r=+(s[1]+1)*+s[2]+parseFloat(H.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!H.cssNumber[u]&&(r+="px");if(!f||!("set"in f)||(r=f.set(e,r))!==t)try{a[n]=r}catch(l){}}},css:function(e,n,r){var i,s;n=H.camelCase(n),s=H.cssHooks[n],n=H.cssProps[n]||n,n==="cssFloat"&&(n="float");if(s&&"get"in s&&(i=s.get(e,!0,r))!==t)return i;if(Ft)return Ft(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}}),H.curCSS=H.css,_.defaultView&&_.defaultView.getComputedStyle&&(It=function(e,t){var n,r,i,s,o=e.style;return t=t.replace(Mt,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(n=i.getPropertyValue(t),n===""&&!H.contains(e.ownerDocument.documentElement,e)&&(n=H.style(e,t))),!H.support.pixelMargin&&i&&Ht.test(t)&&Dt.test(n)&&(s=o.width,o.width=n,n=i.width,o.width=s),n}),_.documentElement.currentStyle&&(qt=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),Dt.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}),Ft=It||qt,H.each(["height","width"],function(e,t){H.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth!==0?v(e,t,r):H.swap(e,Bt,function(){return v(e,t,r)})},set:function(e,t){return _t.test(t)?t+"px":t}}}),H.support.opacity||(H.cssHooks.opacity={get:function(e,t){return Ot.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=H.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&H.trim(s.replace(At,""))===""){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=At.test(s)?s.replace(At,i):s+" "+i}}),H(function(){H.support.reliableMarginRight||(H.cssHooks.marginRight={get:function(e,t){return H.swap(e,{display:"inline-block"},function(){return t?Ft(e,"margin-right"):e.style.marginRight})}})}),H.expr&&H.expr.filters&&(H.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return t===0&&n===0||!H.support.reliableHiddenOffsets&&(e.style&&e.style.display||H.css(e,"display"))==="none"},H.expr.filters.visible=function(e){return!H.expr.filters.hidden(e)}),H.each({margin:"",padding:"",border:"Width"},function(e,t){H.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+jt[r]+t]=i[r]||i[r-2]||i[0];return s}}});var Rt=/%20/g,Ut=/\[\]$/,zt=/\r?\n/g,Wt=/#.*$/,Xt=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,Vt=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,$t=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Jt=/^(?:GET|HEAD)$/,Kt=/^\/\//,Qt=/\?/,Gt=/)<[^<]*)*<\/script>/gi,Yt=/^(?:select|textarea)/i,Zt=/\s+/,en=/([?&])_=[^&]*/,tn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,nn=H.fn.load,rn={},sn={},on,un,an=["*/"]+["*"];try{on=P.href}catch(fn){on=_.createElement("a"),on.href="",on=on.href}un=tn.exec(on.toLowerCase())||[],H.fn.extend({load:function(e,n,r){if(typeof e!="string"&&nn)return nn.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var s=e.slice(i,e.length);e=e.slice(0,i)}var o="GET";n&&(H.isFunction(n)?(r=n,n=t):typeof n=="object"&&(n=H.param(n,H.ajaxSettings.traditional),o="POST"));var u=this;return H.ajax({url:e,type:o,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),u.html(s?H("
").append(n.replace(Gt,"")).find(s):n)),r&&u.each(r,[n,t,e])}}),this},serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?H.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||Yt.test(this.nodeName)||Vt.test(this.type))}).map(function(e,t){var n=H(this).val();return n==null?null:H.isArray(n)?H.map(n,function(e,n){return{name:t.name,value:e.replace(zt,"\r\n")}}):{name:t.name,value:n.replace(zt,"\r\n")}}).get()}}),H.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){H.fn[t]=function(e){return this.on(t,e)}}),H.each(["get","post"],function(e,n){H[n]=function(e,r,i,s){return H.isFunction(r)&&(s=s||i,i=r,r=t),H.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),H.extend({getScript:function(e,n){return H.get(e,t,n,"script")},getJSON:function(e,t,n){return H.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?h(e,H.ajaxSettings):(t=e,e=H.ajaxSettings),h(e,t),e},ajaxSettings:{url:on,isLocal:$t.test(un[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","*":an},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":H.parseJSON,"text xml":H.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:d(rn),ajaxTransport:d(sn),ajax:function(e,n){function r(e,n,r,p){if(E!==2){E=2,b&&clearTimeout(b),y=t,m=p||"",T.readyState=e>0?4:0;var d,v,g,w=n,x=r?l(i,T,r):t,N,C;if(e>=200&&e<300||e===304){if(i.ifModified){if(N=T.getResponseHeader("Last-Modified"))H.lastModified[h]=N;if(C=T.getResponseHeader("Etag"))H.etag[h]=C}if(e===304)w="notmodified",d=!0;else try{v=f(i,x),w="success",d=!0}catch(k){w="parsererror",g=k}}else{g=w;if(!w||e)w="error",e<0&&(e=0)}T.status=e,T.statusText=""+(n||w),d?u.resolveWith(s,[v,w,T]):u.rejectWith(s,[T,w,g]),T.statusCode(c),c=t,S&&o.trigger("ajax"+(d?"Success":"Error"),[T,i,d?v:g]),a.fireWith(s,[T,w]),S&&(o.trigger("ajaxComplete",[T,i]),--H.active||H.event.trigger("ajaxStop"))}}typeof e=="object"&&(n=e,e=t),n=n||{};var i=H.ajaxSetup({},n),s=i.context||i,o=s!==i&&(s.nodeType||s instanceof H)?H(s):H.event,u=H.Deferred(),a=H.Callbacks("once memory"),c=i.statusCode||{},h,d={},v={},m,g,y,b,w,E=0,S,x,T={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=v[n]=v[n]||e,d[e]=t}return this},getAllResponseHeaders:function(){return E===2?m:null},getResponseHeader:function(e){var n;if(E===2){if(!g){g={};while(n=Xt.exec(m))g[n[1].toLowerCase()]=n[2]}n=g[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(i.mimeType=e),this},abort:function(e){return e=e||"abort",y&&y.abort(e),r(0,e),this}};u.promise(T),T.success=T.done,T.error=T.fail,T.complete=a.add,T.statusCode=function(e){if(e){var t;if(E<2)for(t in e)c[t]=[c[t],e[t]];else t=e[T.status],T.then(t,t)}return this},i.url=((e||i.url)+"").replace(Wt,"").replace(Kt,un[1]+"//"),i.dataTypes=H.trim(i.dataType||"*").toLowerCase().split(Zt),i.crossDomain==null&&(w=tn.exec(i.url.toLowerCase()),i.crossDomain=!(!w||w[1]==un[1]&&w[2]==un[2]&&(w[3]||(w[1]==="http:"?80:443))==(un[3]||(un[1]==="http:"?80:443)))),i.data&&i.processData&&typeof i.data!="string"&&(i.data=H.param(i.data,i.traditional)),p(rn,i,n,T);if(E===2)return!1;S=i.global,i.type=i.type.toUpperCase(),i.hasContent=!Jt.test(i.type),S&&H.active++===0&&H.event.trigger("ajaxStart");if(!i.hasContent){i.data&&(i.url+=(Qt.test(i.url)?"&":"?")+i.data,delete i.data),h=i.url;if(i.cache===!1){var N=H.now(),C=i.url.replace(en,"$1_="+N);i.url=C+(C===i.url?(Qt.test(i.url)?"&":"?")+"_="+N:"")}}(i.data&&i.hasContent&&i.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",i.contentType),i.ifModified&&(h=h||i.url,H.lastModified[h]&&T.setRequestHeader("If-Modified-Since",H.lastModified[h]),H.etag[h]&&T.setRequestHeader("If-None-Match",H.etag[h])),T.setRequestHeader("Accept",i.dataTypes[0]&&i.accepts[i.dataTypes[0]]?i.accepts[i.dataTypes[0]]+(i.dataTypes[0]!=="*"?", "+an+"; q=0.01":""):i.accepts["*"]);for(x in i.headers)T.setRequestHeader(x,i.headers[x]);if(!i.beforeSend||i.beforeSend.call(s,T,i)!==!1&&E!==2){for(x in{success:1,error:1,complete:1})T[x](i[x]);y=p(sn,i,n,T);if(!y)r(-1,"No Transport");else{T.readyState=1,S&&o.trigger("ajaxSend",[T,i]),i.async&&i.timeout>0&&(b=setTimeout(function(){T.abort("timeout")},i.timeout));try{E=1,y.send(d,r)}catch(k){if(!(E<2))throw k;r(-1,k)}}return T}return T.abort(),!1},param:function(e,n){var r=[],i=function(e,t){t=H.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=H.ajaxSettings.traditional);if(H.isArray(e)||e.jquery&&!H.isPlainObject(e))H.each(e,function(){i(this.name,this.value)});else for(var s in e)c(s,e[s],n,i);return r.join("&").replace(Rt,"+")}}),H.extend({active:0,lastModified:{},etag:{}});var ln=H.now(),cn=/(\=)\?(&|$)|\?\?/i;H.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return H.expando+"_"+ln++}}),H.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&&(cn.test(t.url)||i&&cn.test(t.data))){var s,o=t.jsonpCallback=H.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,u=e[o],a=t.url,f=t.data,l="$1"+o+"$2";return t.jsonp!==!1&&(a=a.replace(cn,l),t.url===a&&(i&&(f=f.replace(cn,l)),t.data===f&&(a+=(/\?/.test(a)?"&":"?")+t.jsonp+"="+o))),t.url=a,t.data=f,e[o]=function(e){s=[e]},r.always(function(){e[o]=u,s&&H.isFunction(u)&&e[o](s[0])}),t.converters["script json"]=function(){return s||H.error(o+" was not called"),s[0]},t.dataTypes[0]="json","script"}}),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return H.globalEval(e),e}}}),H.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),H.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=_.head||_.getElementsByTagName("head")[0]||_.documentElement;return{send:function(i,s){n=_.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||s(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var hn=e.ActiveXObject?function(){for(var e in dn)dn[e](0,1)}:!1,pn=0,dn;H.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&a()||u()}:a,function(e){H.extend(H.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(H.ajaxSettings.xhr()),H.support.ajax&&H.ajaxTransport(function(n){if(!n.crossDomain||H.support.cors){var r;return{send:function(i,s){var o=n.xhr(),u,a;n.username?o.open(n.type,n.url,n.async,n.username,n.password):o.open(n.type,n.url,n.async);if(n.xhrFields)for(a in n.xhrFields)o[a]=n.xhrFields[a];n.mimeType&&o.overrideMimeType&&o.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(a in i)o.setRequestHeader(a,i[a])}catch(f){}o.send(n.hasContent&&n.data||null),r=function(e,i){var a,f,l,c,h;try{if(r&&(i||o.readyState===4)){r=t,u&&(o.onreadystatechange=H.noop,hn&&delete dn[u]);if(i)o.readyState!==4&&o.abort();else{a=o.status,l=o.getAllResponseHeaders(),c={},h=o.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=o.responseText}catch(e){}try{f=o.statusText}catch(p){f=""}!a&&n.isLocal&&!n.crossDomain?a=c.text?200:404:a===1223&&(a=204)}}}catch(d){i||s(-1,d)}c&&s(a,f,c,l)},!n.async||o.readyState===4?r():(u=++pn,hn&&(dn||(dn={},H(e).unload(hn)),dn[u]=r),o.onreadystatechange=r)},abort:function(){r&&r(0,1)}}}});var vn={},mn,gn,yn=/^(?:toggle|show|hide)$/,bn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,wn,En=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],Sn;H.fn.extend({show:function(e,t,n){var s,o;if(e||e===0)return this.animate(i("show",3),e,t,n);for(var u=0,a=this.length;u=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&&(s=!1);if(s){a.overflow!=null&&!H.support.shrinkWrapBlocks&&H.each(["","X","Y"],function(e,t){u.style["overflow"+t]=a.overflow[e]}),a.hide&&H(u).hide();if(a.hide||a.show)for(t in a.animatedProperties)H.style(u,t,a.orig[t]),H.removeData(u,"fxshow"+t,!0),H.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=H.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}},H.extend(H.fx,{tick:function(){var e,t=H.timers,n=0;for(;n-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),H.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Nn.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(H.css(e,"marginTop"))||0,n.left-=parseFloat(H.css(e,"marginLeft"))||0,r.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(H.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||_.body;while(e&&!Nn.test(e.nodeName)&&H.css(e,"position")==="static")e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var i=/Y/.test(r);H.fn[e]=function(s){return H.access(this,function(e,s,o){var u=n(e);if(o===t)return u?r in u?u[r]:H.support.boxModel&&u.document.documentElement[s]||u.document.body[s]:e[s];u?u.scrollTo(i?H(u).scrollLeft():o,i?o:H(u).scrollTop()):e[s]=o},e,s,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,s="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,n,"padding")):this[n]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,n,e?"margin":"border")):this[n]():null},H.fn[n]=function(e){return H.access(this,function(e,n,o){var u,a,f,l;if(H.isWindow(e))return u=e.document,a=u.documentElement[r],H.support.boxModel&&a||u.body&&u.body[r]||a;if(e.nodeType===9)return u=e.documentElement,u[r]>=u[i]?u[r]:Math.max(e.body[i],u[i],e.body[s],u[s]);if(o===t)return f=H.css(e,n),l=parseFloat(f),H.isNumeric(l)?l:f;H(e).css(n,o)},n,e,arguments.length,null)}}),e.jQuery=e.$=H,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})})(window);var mscparser=function(){function e(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,n){function a(e,t,n){var r=e,i=n-e.length;for(var s=0;so&&(o=i,u=[]),u.push(e)}function c(){var e,n,r,o,u,a,f,c,d,v,m;return v=i,m=i,e=I(),e!==null?(n=h(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===123?(o="{",i++):(o=null,s===0&&l('"{"')),o!==null?(u=I(),u!==null?(a=p(),a!==null?(f=I(),f!==null?(t.charCodeAt(i)===125?(c="}",i++):(c=null,s===0&&l('"}"')),c!==null?(d=I(),d!==null?e=[e,n,r,o,u,a,f,c,d]:(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m)):(e=null,i=m),e!==null&&(e=function(e,t,n){return n[1]=K(n[1],n[2]),V(n[0],V(n[1],n[2]))}(v,e[1],e[5])),e===null&&(i=v),e}function h(){var e;return t.substr(i,3).toLowerCase()==="msc"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"msc"')),e}function p(){var e,t,n,r,s;return r=i,s=i,e=d(),e!==null&&(e=function(e,t){return{options:t}}(s,e)),e===null&&(i=s),e=e!==null?e:"",e!==null?(s=i,t=g(),t!==null&&(t=function(e,t){return{entities:t}}(s,t)),t===null&&(i=s),t=t!==null?t:"",t!==null?(s=i,n=b(),n!==null&&(n=function(e,t){return{arcs:t}}(s,n)),n===null&&(i=s),n=n!==null?n:"",n!==null?e=[e,t,n]:(e=null,i=r)):(e=null,i=r)):(e=null,i=r),e}function d(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=v(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=V(n,t[1]),n}(o,e)),e===null&&(i=o),e}function v(){var e,n,r,o,u,a,f,c,h,p;return c=i,h=i,e=I(),e!==null?(n=m(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=I(),u!==null?(p=i,a=D(),a!==null&&(a=function(e,t){return t}(p,a)),a===null&&(i=p),a===null&&(p=i,a=q(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p),a===null&&(p=i,a=z(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p))),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function m(){var e;return t.substr(i,6).toLowerCase()==="hscale"?(e=t.substr(i,6),i+=6):(e=null,s===0&&l('"hscale"')),e===null&&(t.substr(i,5).toLowerCase()==="width"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"width"')),e===null&&(t.substr(i,11).toLowerCase()==="arcgradient"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"arcgradient"')),e===null&&(t.substr(i,12).toLowerCase()==="wordwraparcs"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"wordwraparcs"'))))),e}function g(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=y(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1]),t[0]}(o,e)),e===null&&(i=o),e}function y(){var e,n,r,o,u,a,f,c,h,p;return s++,f=i,c=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(h=i,p=i,t.charCodeAt(i)===91?(o="[",i++):(o=null,s===0&&l('"["')),o!==null?(u=O(),u!==null?(t.charCodeAt(i)===93?(a="]",i++):(a=null,s===0&&l('"]"')),a!==null?o=[o,u,a]:(o=null,i=p)):(o=null,i=p)):(o=null,i=p),o!==null&&(o=function(e,t){return t}(h,o[1])),o===null&&(i=h),o=o!==null?o:"",o!==null?(u=I(),u!==null?e=[e,n,r,o,u]:(e=null,i=c)):(e=null,i=c)):(e=null,i=c)):(e=null,i=c)):(e=null,i=c),e!==null&&(e=function(e,t,n){var r=new Object;return r.name=t,r=V(r,n),r}(f,e[1],e[3])),e===null&&(i=f),s--,s===0&&e===null&&l("entity"),e}function b(){var e,n,r,o,u,a;u=i,a=i,n=w(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u);if(n!==null){e=[];while(n!==null)e.push(n),u=i,a=i,n=w(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u)}else e=null;return e}function w(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=E(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=E(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=E(),n!==null&&(n=function(e,t){return[t]}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1][0]),t[0]}(o,e)),e===null&&(i=o),e}function E(){var e,n,r,o,u,a,f,c;return u=i,a=i,f=i,e=S(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f),e===null&&(f=i,e=T(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f),e===null&&(f=i,e=x(),e!==null&&(e=function(e,t){return t}(f,e)),e===null&&(i=f))),e!==null?(f=i,c=i,t.charCodeAt(i)===91?(n="[",i++):(n=null,s===0&&l('"["')),n!==null?(r=O(),r!==null?(t.charCodeAt(i)===93?(o="]",i++):(o=null,s===0&&l('"]"')),o!==null?n=[n,r,o]:(n=null,i=c)):(n=null,i=c)):(n=null,i=c),n!==null&&(n=function(e,t){return t}(f,n[1])),n===null&&(i=f),n=n!==null?n:"",n!==null?e=[e,n]:(e=null,i=a)):(e=null,i=a),e!==null&&(e=function(e,t,n){return t=V(t,n),t}(u,e[0],e[1])),e===null&&(i=u),e}function S(){var e,t,n,r,s;return r=i,s=i,e=I(),e!==null?(t=N(),t!==null?(n=I(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function x(){var e,t,n,r,s;return r=i,s=i,e=I(),e!==null?(t=C(),t!==null?(n=I(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function T(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(o=k(),o!==null?(u=I(),u!==null?(a=H(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n,r){return{kind:n,from:t,to:r}}(c,e[1],e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=I(),e!==null?(t.charCodeAt(i)===42?(n="*",i++):(n=null,s===0&&l('"*"')),n!==null?(r=I(),r!==null?(o=A(),o!==null?(u=I(),u!==null?(a=H(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:t,from:"*",to:n}}(c,e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=I(),e!==null?(n=H(),n!==null?(r=I(),r!==null?(o=L(),o!==null?(u=I(),u!==null?(t.charCodeAt(i)===42?(a="*",i++):(a=null,s===0&&l('"*"')),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:n,from:t,to:"*"}}(c,e[1],e[3])),e===null&&(i=c))),e}function N(){var e;return t.substr(i,3)==="|||"?(e="|||",i+=3):(e=null,s===0&&l('"|||"')),e===null&&(t.substr(i,3)==="..."?(e="...",i+=3):(e=null,s===0&&l('"..."'))),e}function C(){var e;return t.substr(i,3)==="---"?(e="---",i+=3):(e=null,s===0&&l('"---"')),e}function k(){var e;return t.substr(i,2)==="--"?(e="--",i+=2):(e=null,s===0&&l('"--"')),e===null&&(t.substr(i,3)==="<->"?(e="<->",i+=3):(e=null,s===0&&l('"<->"')),e===null&&(t.substr(i,2)==="=="?(e="==",i+=2):(e=null,s===0&&l('"=="')),e===null&&(t.substr(i,5)==="<<=>>"?(e="<<=>>",i+=5):(e=null,s===0&&l('"<<=>>"')),e===null&&(t.substr(i,3)==="<=>"?(e="<=>",i+=3):(e=null,s===0&&l('"<=>"')),e===null&&(t.substr(i,2)===".."?(e="..",i+=2):(e=null,s===0&&l('".."')),e===null&&(t.substr(i,4)==="<<>>"?(e="<<>>",i+=4):(e=null,s===0&&l('"<<>>"')),e===null&&(t.substr(i,2)==="::"?(e="::",i+=2):(e=null,s===0&&l('"::"')),e===null&&(t.substr(i,3)==="<:>"?(e="<:>",i+=3):(e=null,s===0&&l('"<:>"')),e===null&&(e=L(),e===null&&(e=A(),e===null&&(t.substr(i,4).toLowerCase()==="note"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"note"')),e===null&&(t.substr(i,4).toLowerCase()==="abox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"abox"')),e===null&&(t.substr(i,4).toLowerCase()==="rbox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"rbox"')),e===null&&(t.substr(i,3).toLowerCase()==="box"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"box"')))))))))))))))),e}function L(){var e;return s++,t.substr(i,2)==="->"?(e="->",i+=2):(e=null,s===0&&l('"->"')),e===null&&(t.substr(i,3)==="=>>"?(e="=>>",i+=3):(e=null,s===0&&l('"=>>"')),e===null&&(t.substr(i,2)==="=>"?(e="=>",i+=2):(e=null,s===0&&l('"=>"')),e===null&&(t.substr(i,2)===">>"?(e=">>",i+=2):(e=null,s===0&&l('">>"')),e===null&&(t.substr(i,2)===":>"?(e=":>",i+=2):(e=null,s===0&&l('":>"')),e===null&&(t.substr(i,2).toLowerCase()==="-x"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"-x"'))))))),s--,s===0&&e===null&&l("left to right arrow"),e}function A(){var e;return s++,t.substr(i,2)==="<-"?(e="<-",i+=2):(e=null,s===0&&l('"<-"')),e===null&&(t.substr(i,3)==="<<="?(e="<<=",i+=3):(e=null,s===0&&l('"<<="')),e===null&&(t.substr(i,2)==="<="?(e="<=",i+=2):(e=null,s===0&&l('"<="')),e===null&&(t.substr(i,2)==="<<"?(e="<<",i+=2):(e=null,s===0&&l('"<<"')),e===null&&(t.substr(i,2)==="<:"?(e="<:",i+=2):(e=null,s===0&&l('"<:"')),e===null&&(t.substr(i,2).toLowerCase()==="x-"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"x-"'))))))),s--,s===0&&e===null&&l("right to left arrow"),e}function O(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=M(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=M(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=M(),n!==null&&(n=function(e,t){return t}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=V(n,t[1]),n}(o,e)),e===null&&(i=o),e}function M(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=I(),e!==null?(n=_(),n!==null?(r=I(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=I(),u!==null?(a=D(),a!==null?(f=I(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),t=t.replace("colour","color"),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function _(){var e;return s++,t.substr(i,5).toLowerCase()==="label"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"label"')),e===null&&(t.substr(i,5).toLowerCase()==="idurl"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"idurl"')),e===null&&(t.substr(i,2).toLowerCase()==="id"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"id"')),e===null&&(t.substr(i,3).toLowerCase()==="url"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"url"')),e===null&&(t.substr(i,9).toLowerCase()==="linecolor"?(e=t.substr(i,9),i+=9):(e=null,s===0&&l('"linecolor"')),e===null&&(t.substr(i,10).toLowerCase()==="linecolour"?(e=t.substr(i,10),i+=10):(e=null,s===0&&l('"linecolour"')),e===null&&(t.substr(i,9).toLowerCase()==="textcolor"?(e=t.substr(i,9),i+=9):(e=null,s===0&&l('"textcolor"')),e===null&&(t.substr(i,10).toLowerCase()==="textcolour"?(e=t.substr(i,10),i+=10):(e=null,s===0&&l('"textcolour"')),e===null&&(t.substr(i,11).toLowerCase()==="textbgcolor"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"textbgcolor"')),e===null&&(t.substr(i,12).toLowerCase()==="textbgcolour"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"textbgcolour"')),e===null&&(t.substr(i,12).toLowerCase()==="arclinecolor"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"arclinecolor"')),e===null&&(t.substr(i,13).toLowerCase()==="arclinecolour"?(e=t.substr(i,13),i+=13):(e=null,s===0&&l('"arclinecolour"')),e===null&&(t.substr(i,12).toLowerCase()==="arctextcolor"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"arctextcolor"')),e===null&&(t.substr(i,13).toLowerCase()==="arctextcolour"?(e=t.substr(i,13),i+=13):(e=null,s===0&&l('"arctextcolour"')),e===null&&(t.substr(i,14).toLowerCase()==="arctextbgcolor"?(e=t.substr(i,14),i+=14):(e=null,s===0&&l('"arctextbgcolor"')),e===null&&(t.substr(i,15).toLowerCase()==="arctextbgcolour"?(e=t.substr(i,15),i+=15):(e=null,s===0&&l('"arctextbgcolour"')),e===null&&(t.substr(i,7).toLowerCase()==="arcskip"?(e=t.substr(i,7),i+=7):(e=null,s===0&&l('"arcskip"')))))))))))))))))),s--,s===0&&e===null&&l("attribute name"),e}function D(){var e,n,r,o,u;return o=i,u=i,t.charCodeAt(i)===34?(e='"',i++):(e=null,s===0&&l('"\\""')),e!==null?(n=P(),n!==null?(t.charCodeAt(i)===34?(r='"',i++):(r=null,s===0&&l('"\\""')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t.join("")}(o,e[1])),e===null&&(i=o),e}function P(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function H(){var e,n,r;s++,r=i,/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"))}else e=null;return e!==null&&(e=function(e,t){return t.join("")}(r,e)),e===null&&(i=r),e===null&&(e=D()),s--,s===0&&e===null&&l("identifier"),e}function B(){var e;return s++,/^[ \t]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[ \\t]")),s--,s===0&&e===null&&l("whitespace"),e}function j(){var e;return s++,/^[\r\n]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[\\r\\n]")),s--,s===0&&e===null&&l("lineend"),e}function F(){var e,n,r,o,u,a,f;s++,u=i,t.substr(i,2)==="//"?(e="//",i+=2):(e=null,s===0&&l('"//"')),e===null&&(t.charCodeAt(i)===35?(e="#",i++):(e=null,s===0&&l('"#"')));if(e!==null){n=[],/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));while(r!==null)n.push(r),/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));n!==null?e=[e,n]:(e=null,i=u)}else e=null,i=u;if(e===null){u=i,t.substr(i,2)==="/*"?(e="/*",i+=2):(e=null,s===0&&l('"/*"'));if(e!==null){n=[],a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);while(r!==null)n.push(r),a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);n!==null?(t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)}else e=null,i=u}return s--,s===0&&e===null&&l("comment"),e}function I(){var e,t,n;e=[],n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null;if(t===null){n=F();if(n!==null){t=[];while(n!==null)t.push(n),n=F()}else t=null}}while(t!==null){e.push(t),n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null;if(t===null){n=F();if(n!==null){t=[];while(n!==null)t.push(n),n=F()}else t=null}}}return e}function q(){var e;return e=U(),e===null&&(e=R()),e}function R(){var e,n,r;s++,r=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;return e!==null&&(e=function(e,t){return parseInt(t.join(""),10)}(r,e)),e===null&&(i=r),s--,s===0&&e===null&&l("integer"),e}function U(){var e,n,r,o,u,a;s++,u=i,a=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;if(e!==null){t.charCodeAt(i)===46?(n=".",i++):(n=null,s===0&&l('"."'));if(n!==null){/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"));if(o!==null){r=[];while(o!==null)r.push(o),/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"))}else r=null;r!==null?e=[e,n,r]:(e=null,i=a)}else e=null,i=a}else e=null,i=a;return e!==null&&(e=function(e,t){return parseFloat(t.join(""))}(u,e)),e===null&&(i=u),s--,s===0&&e===null&&l("real"),e}function z(){var e;return s++,t.substr(i,4).toLowerCase()==="true"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"true"')),e===null&&(t.substr(i,5).toLowerCase()==="false"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"false"'))),s--,s===0&&e===null&&l("boolean"),e}function W(e){e.sort();var t=null,n=[];for(var r=0;ro&&(o=i,u=[]),u.push(e)}function c(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=h(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return t[1]=J(t[1],t[2]),X(t[0],X(t[1],t[2]))}(r,e[1])),e===null&&(i=r),e}function h(){var e,t,n,r,s;return r=i,s=i,e=p(),e!==null&&(e=function(e,t){return{options:t}}(s,e)),e===null&&(i=s),e=e!==null?e:"",e!==null?(s=i,t=m(),t!==null&&(t=function(e,t){return{entities:t}}(s,t)),t===null&&(i=s),t=t!==null?t:"",t!==null?(s=i,n=y(),n!==null&&(n=function(e,t){return{arcs:t}}(s,n)),n===null&&(i=s),n=n!==null?n:"",n!==null?e=[e,t,n]:(e=null,i=r)):(e=null,i=r)):(e=null,i=r),e}function p(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=d(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){var n=new Object,r,i;for(r in t[0])for(i in t[0][r])n[i]=t[0][r][i];return n=X(n,t[1]),n}(o,e)),e===null&&(i=o),e}function d(){var e,n,r,o,u,a,f,c,h,p;return c=i,h=i,e=F(),e!==null?(n=v(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===61?(o="=",i++):(o=null,s===0&&l('"="')),o!==null?(u=F(),u!==null?(p=i,a=O(),a!==null&&(a=function(e,t){return t}(p,a)),a===null&&(i=p),a===null&&(p=i,a=I(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p),a===null&&(p=i,a=U(),a!==null&&(a=function(e,t){return t.toString()}(p,a)),a===null&&(i=p))),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return t=t.toLowerCase(),r[t]=n,r}(c,e[1],e[5])),e===null&&(i=c),e}function v(){var e;return t.substr(i,6).toLowerCase()==="hscale"?(e=t.substr(i,6),i+=6):(e=null,s===0&&l('"hscale"')),e===null&&(t.substr(i,5).toLowerCase()==="width"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"width"')),e===null&&(t.substr(i,11).toLowerCase()==="arcgradient"?(e=t.substr(i,11),i+=11):(e=null,s===0&&l('"arcgradient"')),e===null&&(t.substr(i,12).toLowerCase()==="wordwraparcs"?(e=t.substr(i,12),i+=12):(e=null,s===0&&l('"wordwraparcs"'))))),e}function m(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,f=i,n=g(),n!==null?(t.charCodeAt(i)===59?(r=";",i++):(r=null,s===0&&l('";"')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1]),t[0]}(o,e)),e===null&&(i=o),e}function g(){var e,n,r,o,u,a,f,c,h,p,d;return s++,c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(p=i,d=i,t.charCodeAt(i)===58?(o=":",i++):(o=null,s===0&&l('":"')),o!==null?(u=F(),u!==null?(a=A(),a!==null?(f=F(),f!==null?o=[o,u,a,f]:(o=null,i=d)):(o=null,i=d)):(o=null,i=d)):(o=null,i=d),o!==null&&(o=function(e,t){return t}(p,o[2])),o===null&&(i=p),o=o!==null?o:"",o!==null?e=[e,n,r,o]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){var r=new Object;return r.name=t,n&&(r.label=n),r}(c,e[1],e[3])),e===null&&(i=c),s--,s===0&&e===null&&l("entity"),e}function y(){var e,n,r,o,u,a;u=i,a=i,n=b(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u);if(n!==null){e=[];while(n!==null)e.push(n),u=i,a=i,n=b(),n!==null?(r=F(),r!==null?(t.charCodeAt(i)===59?(o=";",i++):(o=null,s===0&&l('";"')),o!==null?n=[n,r,o]:(n=null,i=a)):(n=null,i=a)):(n=null,i=a),n!==null&&(n=function(e,t){return t}(u,n[0])),n===null&&(i=u)}else e=null;return e}function b(){var e,n,r,o,u,a,f;o=i,u=i,e=[],a=i,f=i,n=w(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);while(n!==null)e.push(n),a=i,f=i,n=w(),n!==null?(t.charCodeAt(i)===44?(r=",",i++):(r=null,s===0&&l('","')),r!==null?n=[n,r]:(n=null,i=f)):(n=null,i=f),n!==null&&(n=function(e,t){return t}(a,n[0])),n===null&&(i=a);return e!==null?(a=i,n=w(),n!==null&&(n=function(e,t){return[t]}(a,n)),n===null&&(i=a),n!==null?e=[e,n]:(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t[0].push(t[1][0]),t[0]}(o,e)),e===null&&(i=o),e}function w(){var e,n,r,o,u,a,f,c,h;return a=i,f=i,c=i,e=E(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c),e===null&&(c=i,e=x(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c),e===null&&(c=i,e=S(),e!==null&&(e=function(e,t){return t}(c,e)),e===null&&(i=c))),e!==null?(c=i,h=i,t.charCodeAt(i)===58?(n=":",i++):(n=null,s===0&&l('":"')),n!==null?(r=F(),r!==null?(o=A(),o!==null?(u=F(),u!==null?n=[n,r,o,u]:(n=null,i=h)):(n=null,i=h)):(n=null,i=h)):(n=null,i=h),n!==null&&(n=function(e,t){return t}(c,n[2])),n===null&&(i=c),n=n!==null?n:"",n!==null?e=[e,n]:(e=null,i=f)):(e=null,i=f),e!==null&&(e=function(e,t,n){return n&&(t.label=n),t}(a,e[0],e[1])),e===null&&(i=a),e}function E(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=T(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function S(){var e,t,n,r,s;return r=i,s=i,e=F(),e!==null?(t=N(),t!==null?(n=F(),n!==null?e=[e,t,n]:(e=null,i=s)):(e=null,i=s)):(e=null,i=s),e!==null&&(e=function(e,t){return{kind:t}}(r,e[1])),e===null&&(i=r),e}function x(){var e,n,r,o,u,a,f,c,h;return c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(o=C(),o!==null?(u=F(),u!==null?(a=P(),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n,r){return{kind:n,from:t,to:r}}(c,e[1],e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=F(),e!==null?(t.charCodeAt(i)===42?(n="*",i++):(n=null,s===0&&l('"*"')),n!==null?(r=F(),r!==null?(o=L(),o!==null?(u=F(),u!==null?(a=P(),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:t,from:"*",to:n}}(c,e[3],e[5])),e===null&&(i=c),e===null&&(c=i,h=i,e=F(),e!==null?(n=P(),n!==null?(r=F(),r!==null?(o=k(),o!==null?(u=F(),u!==null?(t.charCodeAt(i)===42?(a="*",i++):(a=null,s===0&&l('"*"')),a!==null?(f=F(),f!==null?e=[e,n,r,o,u,a,f]:(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h)):(e=null,i=h),e!==null&&(e=function(e,t,n){return{kind:n,from:t,to:"*"}}(c,e[1],e[3])),e===null&&(i=c))),e}function T(){var e;return t.substr(i,3)==="|||"?(e="|||",i+=3):(e=null,s===0&&l('"|||"')),e===null&&(t.substr(i,3)==="..."?(e="...",i+=3):(e=null,s===0&&l('"..."'))),e}function N(){var e;return t.substr(i,3)==="---"?(e="---",i+=3):(e=null,s===0&&l('"---"')),e}function C(){var e;return t.substr(i,2)==="--"?(e="--",i+=2):(e=null,s===0&&l('"--"')),e===null&&(t.substr(i,3)==="<->"?(e="<->",i+=3):(e=null,s===0&&l('"<->"')),e===null&&(t.substr(i,2)==="=="?(e="==",i+=2):(e=null,s===0&&l('"=="')),e===null&&(t.substr(i,5)==="<<=>>"?(e="<<=>>",i+=5):(e=null,s===0&&l('"<<=>>"')),e===null&&(t.substr(i,3)==="<=>"?(e="<=>",i+=3):(e=null,s===0&&l('"<=>"')),e===null&&(t.substr(i,2)===".."?(e="..",i+=2):(e=null,s===0&&l('".."')),e===null&&(t.substr(i,4)==="<<>>"?(e="<<>>",i+=4):(e=null,s===0&&l('"<<>>"')),e===null&&(t.substr(i,2)==="::"?(e="::",i+=2):(e=null,s===0&&l('"::"')),e===null&&(t.substr(i,3)==="<:>"?(e="<:>",i+=3):(e=null,s===0&&l('"<:>"')),e===null&&(e=k(),e===null&&(e=L(),e===null&&(t.substr(i,4).toLowerCase()==="note"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"note"')),e===null&&(t.substr(i,4).toLowerCase()==="abox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"abox"')),e===null&&(t.substr(i,4).toLowerCase()==="rbox"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"rbox"')),e===null&&(t.substr(i,3).toLowerCase()==="box"?(e=t.substr(i,3),i+=3):(e=null,s===0&&l('"box"')))))))))))))))),e}function k(){var e;return s++,t.substr(i,2)==="->"?(e="->",i+=2):(e=null,s===0&&l('"->"')),e===null&&(t.substr(i,3)==="=>>"?(e="=>>",i+=3):(e=null,s===0&&l('"=>>"')),e===null&&(t.substr(i,2)==="=>"?(e="=>",i+=2):(e=null,s===0&&l('"=>"')),e===null&&(t.substr(i,2)===">>"?(e=">>",i+=2):(e=null,s===0&&l('">>"')),e===null&&(t.substr(i,2)===":>"?(e=":>",i+=2):(e=null,s===0&&l('":>"')),e===null&&(t.substr(i,2).toLowerCase()==="-x"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"-x"'))))))),s--,s===0&&e===null&&l("left to right arrow"),e}function L(){var e;return s++,t.substr(i,2)==="<-"?(e="<-",i+=2):(e=null,s===0&&l('"<-"')),e===null&&(t.substr(i,3)==="<<="?(e="<<=",i+=3):(e=null,s===0&&l('"<<="')),e===null&&(t.substr(i,2)==="<="?(e="<=",i+=2):(e=null,s===0&&l('"<="')),e===null&&(t.substr(i,2)==="<<"?(e="<<",i+=2):(e=null,s===0&&l('"<<"')),e===null&&(t.substr(i,2)==="<:"?(e="<:",i+=2):(e=null,s===0&&l('"<:"')),e===null&&(t.substr(i,2).toLowerCase()==="x-"?(e=t.substr(i,2),i+=2):(e=null,s===0&&l('"x-"'))))))),s--,s===0&&e===null&&l("right to left arrow"),e}function A(){var e;return e=O(),e===null&&(e=_()),e}function O(){var e,n,r,o,u;return o=i,u=i,t.charCodeAt(i)===34?(e='"',i++):(e=null,s===0&&l('"\\""')),e!==null?(n=M(),n!==null?(t.charCodeAt(i)===34?(r='"',i++):(r=null,s===0&&l('"\\""')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)):(e=null,i=u),e!==null&&(e=function(e,t){return t.join("")}(o,e[1])),e===null&&(i=o),e}function M(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===34?(n='"',i++):(n=null,s===0&&l('"\\""')),s--,n===null?n="":(n=null,i=a),n!==null?(t.substr(i,2)==='\\"'?(r='\\"',i+=2):(r=null,s===0&&l('"\\\\\\""')),r===null&&(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character"))),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function _(){var e,t;return t=i,e=D(),e!==null&&(e=function(e,t){return t.join("")}(t,e)),e===null&&(i=t),e}function D(){var e,n,r,o,u,a;e=[],o=i,u=i,a=i,s++,t.charCodeAt(i)===44?(n=",",i++):(n=null,s===0&&l('","')),n===null&&(t.charCodeAt(i)===59?(n=";",i++):(n=null,s===0&&l('";"'))),s--,n===null?n="":(n=null,i=a),n!==null?(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character")),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);while(n!==null)e.push(n),o=i,u=i,a=i,s++,t.charCodeAt(i)===44?(n=",",i++):(n=null,s===0&&l('","')),n===null&&(t.charCodeAt(i)===59?(n=";",i++):(n=null,s===0&&l('";"'))),s--,n===null?n="":(n=null,i=a),n!==null?(t.length>i?(r=t.charAt(i),i++):(r=null,s===0&&l("any character")),r!==null?n=[n,r]:(n=null,i=u)):(n=null,i=u),n!==null&&(n=function(e,t){return t}(o,n[1])),n===null&&(i=o);return e}function P(){var e,n,r;s++,r=i,/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[A-Za-z_0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[A-Za-z_0-9]"))}else e=null;return e!==null&&(e=function(e,t){return t.join("")}(r,e)),e===null&&(i=r),e===null&&(e=O()),s--,s===0&&e===null&&l("identifier"),e}function H(){var e;return s++,/^[ \t]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[ \\t]")),s--,s===0&&e===null&&l("whitespace"),e}function B(){var e;return s++,/^[\r\n]/.test(t.charAt(i))?(e=t.charAt(i),i++):(e=null,s===0&&l("[\\r\\n]")),s--,s===0&&e===null&&l("lineend"),e}function j(){var e,n,r,o,u,a,f;s++,u=i,t.substr(i,2)==="//"?(e="//",i+=2):(e=null,s===0&&l('"//"')),e===null&&(t.charCodeAt(i)===35?(e="#",i++):(e=null,s===0&&l('"#"')));if(e!==null){n=[],/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));while(r!==null)n.push(r),/^[^\r\n]/.test(t.charAt(i))?(r=t.charAt(i),i++):(r=null,s===0&&l("[^\\r\\n]"));n!==null?e=[e,n]:(e=null,i=u)}else e=null,i=u;if(e===null){u=i,t.substr(i,2)==="/*"?(e="/*",i+=2):(e=null,s===0&&l('"/*"'));if(e!==null){n=[],a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);while(r!==null)n.push(r),a=i,f=i,s++,t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),s--,r===null?r="":(r=null,i=f),r!==null?(t.length>i?(o=t.charAt(i),i++):(o=null,s===0&&l("any character")),o!==null?r=[r,o]:(r=null,i=a)):(r=null,i=a);n!==null?(t.substr(i,2)==="*/"?(r="*/",i+=2):(r=null,s===0&&l('"*/"')),r!==null?e=[e,n,r]:(e=null,i=u)):(e=null,i=u)}else e=null,i=u}return s--,s===0&&e===null&&l("comment"),e}function F(){var e,t,n;e=[],n=H();if(n!==null){t=[];while(n!==null)t.push(n),n=H()}else t=null;if(t===null){n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null}}while(t!==null){e.push(t),n=H();if(n!==null){t=[];while(n!==null)t.push(n),n=H()}else t=null;if(t===null){n=B();if(n!==null){t=[];while(n!==null)t.push(n),n=B()}else t=null;if(t===null){n=j();if(n!==null){t=[];while(n!==null)t.push(n),n=j()}else t=null}}}return e}function I(){var e;return e=R(),e===null&&(e=q()),e}function q(){var e,n,r;s++,r=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;return e!==null&&(e=function(e,t){return parseInt(t.join(""),10)}(r,e)),e===null&&(i=r),s--,s===0&&e===null&&l("integer"),e}function R(){var e,n,r,o,u,a;s++,u=i,a=i,/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"));if(n!==null){e=[];while(n!==null)e.push(n),/^[0-9]/.test(t.charAt(i))?(n=t.charAt(i),i++):(n=null,s===0&&l("[0-9]"))}else e=null;if(e!==null){t.charCodeAt(i)===46?(n=".",i++):(n=null,s===0&&l('"."'));if(n!==null){/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"));if(o!==null){r=[];while(o!==null)r.push(o),/^[0-9]/.test(t.charAt(i))?(o=t.charAt(i),i++):(o=null,s===0&&l("[0-9]"))}else r=null;r!==null?e=[e,n,r]:(e=null,i=a)}else e=null,i=a}else e=null,i=a;return e!==null&&(e=function(e,t){return parseFloat(t.join(""))}(u,e)),e===null&&(i=u),s--,s===0&&e===null&&l("real"),e}function U(){var e;return s++,t.substr(i,4).toLowerCase()==="true"?(e=t.substr(i,4),i+=4):(e=null,s===0&&l('"true"')),e===null&&(t.substr(i,5).toLowerCase()==="false"?(e=t.substr(i,5),i+=5):(e=null,s===0&&l('"false"'))),s--,s===0&&e===null&&l("boolean"),e}function z(e){e.sort();var t=null,n=[];for(var r=0;re?l=1:l=-1,c=l*(r-t)/(n-e);return u+="l"+l.toString()+","+c.toString(),u+="M"+e.toString()+","+(t-o).toString(),u+=" l"+a.toString()+","+f.toString(),u+="M"+e.toString()+","+(t+o).toString(),u+=" l"+a.toString()+","+f.toString(),u+="M"+(n-l).toString()+","+r.toString(),u+="l"+l.toString()+","+c.toString(),i(u,s)}function p(e,t,n,r,i,s){return s?h(e,t,n,r,i):c(e,t,n,r,i)}function d(e,t,n,r,s){var o="M"+e.toString()+", -"+t.toString();return o+=" l"+r.toString()+",0",o+=" l0,"+n.toString(),o+=" l-"+r.toString()+",0",i(o,s)}function v(t){var n=document.createElementNS(e,"g");return n.setAttribute("id",t),n}function m(n,r,i){var s=document.createElementNS(e,"use");return s.setAttribute("x",n.toString()),s.setAttribute("y",r.toString()),s.setAttributeNS(t,"xlink:href","#"+i),s}function g(t,n,r){var i=document.createElementNS(e,"marker");return i.setAttribute("orient",r),i.setAttribute("id",t),i.setAttribute("class",n),i.setAttribute("viewBox","0 0 10 10"),i.setAttribute("refX","9"),i.setAttribute("refY","3"),i.setAttribute("markerUnits","strokeWidth"),i.setAttribute("markerWidth","10"),i.setAttribute("markerHeight","10"),i.setAttribute("refX","9"),i.setAttribute("refX","9"),i}function y(e,t,n,r,s){var o=g(e,t,n),u=i(r,s);return o.appendChild(u),o}function b(e,t,n,r,i){var o=g(e,t,n),u=s(r,i);return o.appendChild(u),o}var e=new String("http://www.w3.org/2000/svg"),t=new String("http://www.w3.org/1999/xlink"),n="vertical-align : text-top;";return n+="font-size: 0.7em; text-anchor: start;",{createPath:function(e,t){return i(e,t)},createRect:function(e,t,n,r,i,s,u){return o(e,t,n,r,i,s,u)},createABox:function(e,t,n,r,i){return u(e,t,n,r,i)},createNote:function(e,t,n,r,i){return a(e,t,n,r,i)},createText:function(e,t,n,r,i,s,o){return l(e,t,n,r,i,s,o)},createLine:function(e,t,n,r,i,s){return p(e,t,n,r,i,s)},createUTurn:function(e,t,n,r,i){return d(e,t,n,r,i)},createGroup:function(e){return v(e)},createUse:function(e,t,n){return m(e,t,n)},createMarkerPath:function(e,t,n,r,i){return y(e,t,n,r,i)},createMarkerPolygon:function(e,t,n,r,i){return b(e,t,n,r,i)},getTextWidth:function(e,t){return r(e,t)}}}),define("mscrender",["mscrenderutensils"],function(e){function x(e){lChildElement=document.getElementById("svg_output"),lChildElement&&lChildElement!==null&&lChildElement!==undefined&&(lParentElement=document.getElementById(e),lParentElement.removeChild(lChildElement))}function T(t,n){var r=new String("http://www.w3.org/2000/svg"),i=new String("http://www.w3.org/1999/xlink"),s=document.getElementById(t),o=document.createElementNS(r,"svg");o.setAttribute("version","1.1"),o.setAttribute("id",n),o.setAttribute("xmlns",r),o.setAttribute("xmlns:xlink",i);var u=document.createElementNS(r,"desc");u.setAttribute("id","msc_source");var a=document.createElementNS(r,"defs"),f=document.createElement("style");f.setAttribute("type","text/css"),f.appendChild(document.createTextNode(gSvgStyleElementString)),a.appendChild(f),a.appendChild(e.createMarkerPath("signal","arrow-marker","auto","M 9 3 l -8 2","arrow-style")),a.appendChild(e.createMarkerPath("signal-l","arrow-marker","auto","M 9 3 l 8 2","arrow-style")),a.appendChild(e.createMarkerPolygon("method","arrow-marker","auto","1,1 9,3 1,5","filled arrow-style")),a.appendChild(e.createMarkerPolygon("method-l","arrow-marker","auto","17,1 9,3 17,5","filled arrow-style")),a.appendChild(e.createMarkerPath("callback","arrow-marker","auto","M 1 1 l 8 2 l -8 2","arrow-style")),a.appendChild(e.createMarkerPath("callback-l","arrow-marker","auto","M 17 1 l -8 2 l 8 2","arrow-style")),a.appendChild(e.createMarkerPath("lost","arrow-marker","auto","M6.5,-0.5 L11.5,5.5 M6.5,5.5 L11.5,-0.5","arrow-style")),a.appendChild(e.createGroup("defs")),o.appendChild(u),o.appendChild(a);var l=e.createGroup("body");l.appendChild(e.createGroup("__background")),l.appendChild(e.createGroup("sequence")),l.appendChild(e.createGroup("notelayer")),o.appendChild(l),s.appendChild(o)}function N(u,f,p){T(p,"svg_output"),i=r,o=s,l=a,h=c,u.options&&(u.options.hscale&&(i=u.options.hscale*r,o=u.options.hscale*s),u.options.arcgradient&&(l=parseInt(u.options.arcgradient)+a,h=parseInt(u.options.arcgradient)+c)),C(u.entities),k(u.arcs,u.entities);var d=document.getElementById("body"),v=g-2*n+i/4,m=y-l/2+2*t,b=n+i/4,w=t,E=document.getElementById("svg_output"),S=document.getElementById("__background"),x=e.createRect(v,m,"bglayer",0-b,0-w);S.appendChild(x);if(f){var N=document.getElementById("msc_source"),L=document.createTextNode(f);N.appendChild(L)}d.setAttribute("transform","translate("+b+","+w+")"),E.setAttribute("width",v.toString()),E.setAttribute("height",m.toString());if(u.options&&u.options.width){var A=d.getAttribute("transform");A+=" scale("+u.options.width/v+",1)",d.setAttribute("transform",A)}}function C(t){var n=document.getElementById("defs"),r=document.getElementById("sequence"),s=0,u;b=new Object,E=new Object;var a=new Object;if(t)for(u=0;u":o="signal",n.direction=p;break;case"<-":o="signal",n.direction=d;var c=i;i=r,r=c;break;case"<->":o="signal-both",n.direction=v;break;case"--":n.direction=m;break;case"=>":o="method",n.direction=p;break;case"<=":o="method",n.direction=d;var c=i;i=r,r=c;break;case"<=>":o="method-both",n.direction=v;break;case"==":n.direction=m;break;case">>":o="returnvalue",n.direction=p;break;case"<<":o="returnvalue",n.direction=d;var c=i;i=r,r=c;break;case"<<>>":o="returnvalue-both",n.direction=v;break;case"..":o="dotted",n.direction=m;break;case"=>>":o="callback",n.direction=p;break;case"<<=":o="callback",n.direction=d;var c=i;i=r,r=c;break;case"<<=>>":o="callback-both",n.direction=v;break;case":>":o="emphasised",n.direction=p,f=!0;break;case"<:":o="emphasised",n.direction=d,f=!0;var c=i;i=r,r=c;break;case"<:>":f=!0,n.direction=v,o="emphasised-both";break;case"::":o="double",n.direction=m,f=!0;break;case"-x":case"-X":o="lost",n.direction=p,i=r+(i-r)*.75;break;case"x-":case"X-":o="lost",n.direction=d;var c=i;i=r,r=c,i=r+(i-r)*.75;break;default:n.direction=m}n=M(n);var g=0;return n.arcskip&&(g=n.arcskip*l,a=g),r===i?(lLine=O(o,r,g,f),s.appendChild(P(t+"_txt",n,r+2,0-l/5-S/2,i-r,"anchor-start",!1))):(lLine=e.createLine(r,0,i,a,o,f),s.appendChild(P(t+"_txt",n,r,0-S/2,i-r))),n.linecolor&&lLine.setAttribute("style","stroke: "+n.linecolor+";"),s.appendChild(lLine),s}function D(e){var t=e.replace(/\\\"/g,'"');return t.replace(/\\n/g," ")}function P(t,n,r,i,s,o,u){var a=e.createGroup(t);if(n.label){var c=r+s/2,h=e.getTextWidth(n.label),p=l-2*f;n.label=D(n.label),n.id=n.id?D(n.id):undefined;var d=e.createText(n.label,c,i+S/4,o,n.url,n.id,n.idurl);if(u===undefined||u===!0)var v=e.createRect(h,S,"textbg",c-h/2,i-S/2);else var v=e.createRect(h,S,"textbg",r,i-S/2);j(d,n),n.textbgcolor&&v.setAttribute("style","fill: "+n.textbgcolor+"; stroke:"+n.textbgcolor+";"),n.url&&!n.textcolor&&(n.textcolor="blue",j(d,n)),a.appendChild(v),a.appendChild(d)}return a}function H(t,n){var r=g-i+o,s=r/2,u=e.createGroup(t);return u.appendChild(P(t,n,0,0,r)),u}function B(t,n){var r=g-i+o,s=e.createGroup(t),u=e.createLine(0,0,r,0,"dotted");return s.appendChild(u),s.appendChild(H(t+"_txt",n)),n.linecolor&&u.setAttribute("style","stroke: "+n.linecolor+";"),s}function j(e,t){if(t.textcolor){var n=new String;n+="fill:"+t.textcolor+";",n+="stroke:"+t.textcolor+";",e.setAttribute("style",n)}}function F(e,t){var n=new String;t.textbgcolor&&(n+="fill:"+t.textbgcolor+";"),t.linecolor&&(n+="stroke:"+t.linecolor+";"),e.setAttribute("style",n)}function I(t,n,r,s){if(n>r){var o=n;n=r,r=o}var u=r-n+i-2*f,a=l-2*f,c=n-(i-2*f)/2,h=e.createGroup(t),p;switch(s.kind){case"rbox":p=e.createRect(u,a,"box",c,0-a/2,6,6);break;case"abox":p=e.createABox(u,a,"box",c,0);break;case"note":p=e.createNote(u,a,"box",c,0-a/2);break;default:p=e.createRect(u,a,"box",c,0-a/2)}return F(p,s),h.appendChild(p),h.appendChild(P(t+"_txt",s,c,0,u)),h}var t=3,n=3,r=160,i=r,s=100,o=s,u=30,a=25,f=2,l=a,c=0,h=c,p=2,d=3,v=5,m=8,g=0,y=0,b=new Object,w=new Object,E=new Object,S=12;return gSvgStyleElementString="svg { font-family: Helvetica, sans-serif; font-size: 9pt; background-color: white; stroke : black; color : black; } rect { fill: none; stroke: black; stroke-width: 2; } .bglayer { fill:white; stroke: white; stroke-width: 0; } rect.textbg { fill:white; stroke:white; stroke-width:0; } line { stroke: black; stroke-width: 2; } .arcrowomit { stroke-dasharray: 2,2; } text { color: inherit; stroke: inherit; text-anchor: middle; stroke-width:0.1; /* makes font seem more crisp */ } text.entity { text-decoration : underline; } text.anchor-start { text-anchor: start; } path { stroke : black; stroke-width : 2; fill : none; } .dotted { stroke-dasharray: 5,2; } .arrow-marker { overflow:visible; } .arrow-style { stroke : black; stroke-dasharray : 100,1; /* 'none' should work, but doesn't in webkit */ stroke-width : 1; } .filled { stroke:inherit; fill:black; /* no-inherit */ } .signal { marker-end : url(#signal); } .signal-both { marker-end : url(#signal); marker-start : url(#signal-l); } .method { marker-end : url(#method); } .method-both { marker-end : url(#method); marker-start : url(#method-l); } .returnvalue { stroke-dasharray: 5,2; marker-end : url(#callback); } .returnvalue-both { stroke-dasharray: 5,2; marker-end : url(#callback); marker-start : url(#callback-l); } .callback { marker-end : url(#callback); } .callback-both { marker-end : url(#callback); marker-start : url(#callback-l); } .emphasised { marker-end : url(#method); } .emphasised-both { marker-end : url(#method); marker-start : url(#method-l); } .lost { marker-end : url(#lost); } .arcrowomit { stroke-dasharray: 2,2; } .box { /* fill: #ffc; no-inherit */ fill : white; opacity: 0.9; } .boxtext, .arctext { font-size: 0.8em; text-anchor: middle; } .comment { stroke-dasharray: 5,2; }",{clean:function(e){x(e)},renderAST:function(e,t,n){N(e,t,n)}}});var tomsgenny=function(){function e(e){var t=new String("");return e&&(e.options&&(t+=i(e.options)+"\n"),e.entities&&(t+=o(e.entities)+"\n"),e.arcs&&(t+=a(e.arcs))),t}function t(e){function t(e){var t=e.match(/[a-z0-9]+/gi);return t?t.length!=1:!0}return t(e)?'"'+e+'"':e}function n(e){function t(e){var t=e.match(/[;,]/);return t?t.length===1:!1}return t(e)?'"'+e+'"':e}function r(e,t,n){t&&e.push(n+'="'+t+'"')}function i(e){var t=[],n=new String("# options\n"),i=0;r(t,e.hscale,"hscale"),r(t,e.width,"width"),r(t,e.arcgradient,"arcgradient");for(i=0;i0)for(n=0;n0){for(r=0;r0){var r=0;n=" [";for(r=0;r0)for(r=0;r0){for(i=0;it.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function P(e){var t=!1;for(var n=0;nt.scroller.clientWidth+1,o=i>t.scroller.clientHeight+1;o?(t.scrollbarV.style.display="block",t.scrollbarV.style.bottom=s?vs(t.measure)+"px":"0",t.scrollbarV.firstChild.style.height=i-t.scroller.clientHeight+t.scrollbarV.clientHeight+"px"):t.scrollbarV.style.display="",s?(t.scrollbarH.style.display="block",t.scrollbarH.style.right=o?vs(t.measure)+"px":"0",t.scrollbarH.firstChild.style.width=t.scroller.scrollWidth-t.scroller.clientWidth+t.scrollbarH.clientWidth+"px"):t.scrollbarH.style.display="",s&&o?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=t.scrollbarFiller.style.width=vs(t.measure)+"px"):t.scrollbarFiller.style.display="",s&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=vs(t.measure)+"px",t.gutterFiller.style.width=t.gutters.offsetWidth+"px"):t.gutterFiller.style.display="",l&&vs(t.measure)===0&&(t.scrollbarV.style.minWidth=t.scrollbarH.style.minHeight=c?"18px":"12px")}function B(e,t,n){var r=e.scroller.scrollTop,i=e.wrapper.clientHeight;typeof n=="number"?r=n:n&&(r=n.top,i=n.bottom-n.top),r=Math.floor(r-it(e));var s=Math.ceil(r+i);return{from:pi(t,r),to:pi(t,s)}}function j(e){var t=e.display;if(!t.alignWidgets&&(!t.gutters.firstChild||!e.options.fixedGutter))return;var n=q(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,i=n+"px";for(var s=t.lineDiv.firstChild;s;s=s.nextSibling)if(s.alignable)for(var o=0,u=s.alignable;o=e.display.showingFrom&&u.to<=e.display.showingTo)break;t=[]}return o&&(Ii(e,"update",e),(e.display.showingFrom!=i||e.display.showingTo!=s)&&Ii(e,"viewportChange",e,e.display.showingFrom,e.display.showingTo)),o}function U(e,t,n,r){var i=e.display,s=e.doc;if(!i.wrapper.clientWidth){i.showingFrom=i.showingTo=s.first,i.viewOffset=0;return}if(!r&&t.length==0&&n.from>i.showingFrom&&n.toc&&i.showingTo-c<20&&(c=Math.min(f,i.showingTo));if(E){l=hi(Lr(s,ai(s,l)));while(c=h[0].to?h=[]:h=X(h,t);if(E)for(var a=0;ap.from)){h.splice(a--,1);break}p.to=v}}var m=0;for(var a=0;ac&&(p.to=c),p.from>=p.to?h.splice(a--,1):m+=p.to-p.from}if(!r&&m==c-l&&l==i.showingFrom&&c==i.showingTo){W(e);return}h.sort(function(e,t){return e.from-t.from});try{var g=document.activeElement}catch(y){}m<(c-l)*.7&&(i.lineDiv.style.display="none"),$(e,l,c,h,u),i.lineDiv.style.display="",g&&document.activeElement!=g&&g.offsetHeight&&g.focus();var b=l!=i.showingFrom||c!=i.showingTo||i.lastSizeC!=i.wrapper.clientHeight;return b&&(i.lastSizeC=i.wrapper.clientHeight,et(e,400)),i.showingFrom=l,i.showingTo=c,z(e),W(e),!0}function z(e){var t=e.display,r=t.lineDiv.offsetTop;for(var i=t.lineDiv.firstChild,s;i;i=i.nextSibling)if(i.lineObj){if(n){var o=i.offsetTop+i.offsetHeight;s=o-r,r=o}else{var u=cs(i);s=u.bottom-u.top}var a=i.lineObj.height-s;s<2&&(s=Tt(t));if(a>.001||a<-0.001){ci(i.lineObj,s);var f=i.lineObj.widgets;if(f)for(var l=0;l=f.to?s.push(f):(i.from>f.from&&s.push({from:f.from,to:i.from}),i.top){while(l.lineObj!=t)l=c(l);a&&s<=p&&l.lineNumber&&ls(l.lineNumber,I(e.options,p)),l=l.nextSibling}else{if(t.widgets)for(var m=0,g=l,y;g&&m<20;++m,g=g.nextSibling)if(g.lineObj==t&&/div/i.test(g.nodeName)){y=g;break}var b=J(e,t,p,o,y);if(b!=y)f.insertBefore(b,l);else{while(l!=y)l=c(l);l=l.nextSibling}b.lineObj=t}++p});while(l)l=c(l)}function J(e,t,r,i,s){var o=Vr(e,t),u=t.gutterMarkers,a=e.display,f;if(!e.options.lineNumbers&&!u&&!t.bgClass&&!t.wrapClass&&!t.widgets)return o;if(s){s.alignable=null;var l=!0,c=0,h=null;for(var p=s.firstChild,d;p;p=d){d=p.nextSibling;if(!/\bCodeMirror-linewidget\b/.test(p.className))s.removeChild(p);else{for(var v=0;v3&&(u(d,a.top,null,a.bottom),d=o,a.bottomc.bottom||p.bottom==c.bottom&&p.right>c.right)c=p;d=e.display.showingTo)return;var n=+(new Date)+e.options.workTime,r=ir(t.mode,rt(e,t.frontier)),i=[],s;t.iter(t.frontier,Math.min(t.first+t.size,e.display.showingTo+500),function(o){if(t.frontier>=e.display.showingFrom){var u=o.styles;o.styles=Rr(e,o,r);var a=!u||u.length!=o.styles.length;for(var f=0;!a&&fn)return et(e,e.options.workDelay),!0}),i.length&&At(e,function(){for(var e=0;eu;--o){if(o<=s.first)return s.first;var a=ai(s,o-1);if(a.stateAfter&&(!n||o<=s.frontier))return o;var f=$i(a.text,null,e.options.tabSize);if(i==null||r>f)i=o-1,r=f}return i}function rt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return!0;var s=nt(e,t,n),o=s>r.first&&ai(r,s-1).stateAfter;return o?o=ir(r.mode,o):o=sr(r.mode),r.iter(s,t,function(n){zr(e,n,o);var u=s==t-1||s%5==0||s>=i.showingFrom&&sn?"left":on?u.left:u.right,top:u.top,bottom:u.bottom}}function at(e,t){var n=e.display.measureLineCache;for(var r=0;ry&&(n=y),t<0&&(t=0);for(var r=m.length-2;r>=0;r-=2){var i=m[r],s=m[r+1];if(i>n||s=n||t<=i&&n>=s||Math.min(n,s)-Math.max(t,i)>=n-t>>1){m[r]=Math.min(t,i),m[r+1]=Math.max(n,s);break}}return r<0&&(r=m.length,m.push(t,n)),{left:e.left-v.left,right:e.right-v.left,top:r,bottom:null}}function w(e){e.bottom=m[e.top+1],e.top=m[e.top]}var s=e.display,o=ts(i.text.length),u=Vr(e,i,o,!0);if(t&&!n&&!e.options.lineWrapping&&u.childNodes.length>100){var a=document.createDocumentFragment(),f=10,l=u.childNodes.length;for(var c=0,h=Math.ceil(l/f);c1&&(x=g[c]=b(T[0]),x.rightSide=b(T[T.length-1]))}x||(x=g[c]=b(cs(S))),E.measureRight&&(x.right=cs(E.measureRight).left),E.leftSide&&(x.leftSide=b(cs(E.leftSide)))}for(var c=0,E;cn.from?s(e-1):s(e,r)}r=r||ai(e.doc,t.line),i||(i=lt(e,r));var u=vi(r),a=t.ch;if(!u)return s(a);var f=Ms(u,a),l=o(a,f);return Os!=null&&(l.other=o(a,Os)),l}function wt(e,t,n,r){var i=new Tn(e,t);return i.xRel=r,n&&(i.outside=!0),i}function Et(e,t,n){var r=e.doc;n+=e.display.viewOffset;if(n<0)return wt(r.first,0,!0,-1);var i=pi(r,n),s=r.first+r.size-1;if(i>s)return wt(r.first+r.size-1,ai(r,s).text.length,!0,1);t<0&&(t=0);for(;;){var o=ai(r,i),u=St(e,o,i,t,n),a=kr(o),f=a&&a.find();if(!a||!(u.ch>f.from.ch||u.ch==f.from.ch&&u.xRel>0))return u;i=f.to.line}}function St(e,t,n,r,i){function f(r){var i=bt(e,Tn(n,r),"line",t,a);return o=!0,s>i.bottom?i.left-u:sm)return wt(n,p,g,1);for(;;){if(l?p==h||p==Ds(t,h,1):p-h<=1){var y=rr){p=S,m=T;if(g=o)m+=1e3;c=E}else h=S,d=T,v=o,c-=E}}function Tt(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(xt==null){xt=us("pre");for(var t=0;t<49;++t)xt.appendChild(document.createTextNode("x")),xt.appendChild(us("br"));xt.appendChild(document.createTextNode("x"))}fs(e.measure,xt);var n=xt.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),as(e.measure),n||1}function Nt(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var t=us("span","x"),n=us("pre",[t]);fs(e.measure,n);var r=t.offsetWidth;return r>2&&(e.cachedCharWidth=r),r||10}function kt(e){e.curOp={changes:[],forceUpdate:!1,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++Ct},Fi++||(ji=[])}function Lt(e){var t=e.curOp,n=e.doc,r=e.display;e.curOp=null,t.updateMaxLine&&D(e);if(r.maxLineChanged&&!e.options.lineWrapping&&r.maxLine){var i=ht(e,r.maxLine);r.sizer.style.minWidth=Math.max(0,i+3+Wi)+"px",r.maxLineChanged=!1;var s=Math.max(0,r.sizer.offsetLeft+r.sizer.offsetWidth-r.scroller.clientWidth);s1e3||u.indexOf("\n")>-1?n.value=e.display.prevInput="":e.display.prevInput=u,a&&Lt(e),e.state.pasteIncoming=!1,!0}function Bt(e,n){var i,s,o=e.doc;if(!Nn(o.sel.from,o.sel.to)){e.display.prevInput="",i=ws&&(o.sel.to.line-o.sel.from.line>100||(s=e.getSelection()).length>1e3);var u=i?"-":s||e.getSelection();e.display.input.value=u,e.state.focused&&Gi(e.display.input),t&&!r&&(e.display.inputHasSelection=u)}else n&&(e.display.prevInput=e.display.input.value="",t&&!r&&(e.display.inputHasSelection=null));e.display.inaccurateSelection=i}function jt(e){e.options.readOnly!="nocursor"&&(!d||document.activeElement!=e.display.input)&&e.display.input.focus()}function Ft(e){return e.options.readOnly||e.doc.cantEdit}function It(e){function r(){e.state.focused&&setTimeout(ns(jt,e),0)}function s(){i==null&&(i=setTimeout(function(){i=null,n.cachedCharWidth=n.cachedTextHeight=ds=null,pt(e),Mt(e,ns(_t,e))},100))}function o(){for(var e=n.wrapper.parentNode;e&&e!=document.body;e=e.parentNode);e?setTimeout(o,5e3):Hi(window,"resize",s)}function u(t){if(qi(e,t)||e.options.onDragEvent&&e.options.onDragEvent(e,ki(t)))return;Mi(t)}function a(){n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,n.input.value=e.getSelection(),Gi(n.input))}var n=e.display;Pi(n.scroller,"mousedown",At(e,Wt)),t?Pi(n.scroller,"dblclick",At(e,function(t){if(qi(e,t))return;var n=Rt(e,t);if(!n||Xt(e,t)||qt(e.display,t))return;Li(t);var r=$n(ai(e.doc,n.line).text,n);_n(e.doc,r.from,r.to)})):Pi(n.scroller,"dblclick",function(t){qi(e,t)||Li(t)}),Pi(n.lineSpace,"selectstart",function(e){qt(n,e)||Li(e)}),b||Pi(n.scroller,"contextmenu",function(t){hn(e,t)}),Pi(n.scroller,"scroll",function(){n.scroller.clientHeight&&(Kt(e,n.scroller.scrollTop),Qt(e,n.scroller.scrollLeft,!0),Bi(e,"scroll",e))}),Pi(n.scrollbarV,"scroll",function(){n.scroller.clientHeight&&Kt(e,n.scrollbarV.scrollTop)}),Pi(n.scrollbarH,"scroll",function(){n.scroller.clientHeight&&Qt(e,n.scrollbarH.scrollLeft)}),Pi(n.scroller,"mousewheel",function(t){Zt(e,t)}),Pi(n.scroller,"DOMMouseScroll",function(t){Zt(e,t)}),Pi(n.scrollbarH,"mousedown",r),Pi(n.scrollbarV,"mousedown",r),Pi(n.wrapper,"scroll",function(){n.wrapper.scrollTop=n.wrapper.scrollLeft=0});var i;Pi(window,"resize",s),setTimeout(o,5e3),Pi(n.input,"keyup",At(e,function(t){if(qi(e,t)||e.options.onKeyEvent&&e.options.onKeyEvent(e,ki(t)))return;t.keyCode==16&&(e.doc.sel.shift=!1)})),Pi(n.input,"input",ns(Pt,e)),Pi(n.input,"keydown",At(e,un)),Pi(n.input,"keypress",At(e,an)),Pi(n.input,"focus",ns(fn,e)),Pi(n.input,"blur",ns(ln,e)),e.options.dragDrop&&(Pi(n.scroller,"dragstart",function(t){Jt(e,t)}),Pi(n.scroller,"dragenter",u),Pi(n.scroller,"dragover",u),Pi(n.scroller,"drop",At(e,$t))),Pi(n.scroller,"paste",function(t){if(qt(n,t))return;jt(e),Pt(e)}),Pi(n.input,"paste",function(){e.state.pasteIncoming=!0,Pt(e)}),Pi(n.input,"cut",a),Pi(n.input,"copy",a),f&&Pi(n.sizer,"mouseup",function(){document.activeElement==n.input&&n.input.blur(),jt(e)})}function qt(e,t){for(var n=_i(t);n!=e.wrapper;n=n.parentNode)if(!n||n.ignoreEvents||n.parentNode==e.sizer&&n!=e.mover)return!0}function Rt(e,t,n){var r=e.display;if(!n){var i=_i(t);if(i==r.scrollbarH||i==r.scrollbarH.firstChild||i==r.scrollbarV||i==r.scrollbarV.firstChild||i==r.scrollbarFiller||i==r.gutterFiller)return null}var s,o,u=cs(r.lineSpace);try{s=t.clientX,o=t.clientY}catch(t){return null}return Et(e,s-u.left,o-u.top)}function Wt(e){function m(e){if(Nn(v,e))return;v=e;if(f=="single"){_n(n.doc,An(s,u),e);return}p=An(s,p),d=An(s,d);if(f=="double"){var t=$n(ai(s,e.line).text,e);Cn(e,p)?_n(n.doc,t.from,d):_n(n.doc,p,t.to)}else f=="triple"&&(Cn(e,p)?_n(n.doc,d,An(s,Tn(e.line,0))):_n(n.doc,p,An(s,Tn(e.line+1,0))))}function w(e){var t=++y,i=Rt(n,e,!0);if(!i)return;if(!Nn(i,c)){n.state.focused||fn(n),c=i,m(i);var o=B(r,s);(i.line>=o.to||i.lineg.bottom?20:0;u&&setTimeout(At(n,function(){if(y!=t)return;r.scroller.scrollTop+=u,w(e)}),50)}}function E(e){y=Infinity,Li(e),jt(n),Hi(document,"mousemove",S),Hi(document,"mouseup",x)}if(qi(this,e))return;var n=this,r=n.display,s=n.doc,o=s.sel;o.shift=e.shiftKey;if(qt(r,e)){i||(r.scroller.draggable=!1,setTimeout(function(){r.scroller.draggable=!0},100));return}if(Xt(n,e))return;var u=Rt(n,e);switch(Di(e)){case 3:b&&hn.call(n,n,e);return;case 2:u&&_n(n.doc,u),setTimeout(ns(jt,n),20),Li(e);return}if(!u){_i(e)==r.scroller&&Li(e);return}n.state.focused||fn(n);var a=+(new Date),f="single";if(zt&&zt.time>a-400&&Nn(zt.pos,u))f="triple",Li(e),setTimeout(ns(jt,n),20),Jn(n,u.line);else if(Ut&&Ut.time>a-400&&Nn(Ut.pos,u)){f="double",zt={time:a,pos:u},Li(e);var l=$n(ai(s,u.line).text,u);_n(n.doc,l.from,l.to)}else Ut={time:a,pos:u};var c=u;if(n.options.dragDrop&&hs&&!Ft(n)&&!Nn(o.from,o.to)&&!Cn(u,o.from)&&!Cn(o.to,u)&&f=="single"){var h=At(n,function(t){i&&(r.scroller.draggable=!1),n.state.draggingText=!1,Hi(document,"mouseup",h),Hi(r.scroller,"drop",h),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(Li(t),_n(n.doc,u),jt(n))});i&&(r.scroller.draggable=!0),n.state.draggingText=h,r.scroller.dragDrop&&r.scroller.dragDrop(),Pi(document,"mouseup",h),Pi(r.scroller,"drop",h);return}Li(e),f=="single"&&_n(n.doc,An(s,u));var p=o.from,d=o.to,v=u,g=cs(r.wrapper),y=0,S=At(n,function(e){!t&&!Di(e)?E(e):w(e)}),x=At(n,E);Pi(document,"mousemove",S),Pi(document,"mouseup",x)}function Xt(e,t){var n=e.display;try{var r=t.clientX,i=t.clientY}catch(t){return!1}if(r>=Math.floor(cs(n.gutters).right))return!1;Li(t);if(!Ui(e,"gutterClick"))return!0;var s=cs(n.lineDiv);if(i>s.bottom)return!0;i-=s.top-n.viewOffset;for(var o=0;o=r){var a=pi(e.doc,i),f=e.options.gutters[o];Ii(e,"gutterClick",e,a,f,t);break}}return!0}function $t(e){var n=this;if(qi(n,e)||qt(n.display,e)||n.options.onDragEvent&&n.options.onDragEvent(n,ki(e)))return;Li(e),t&&(Vt=+(new Date));var r=Rt(n,e,!0),i=e.dataTransfer.files;if(!r||Ft(n))return;if(i&&i.length&&window.FileReader&&window.File){var s=i.length,o=Array(s),u=0,a=function(e,t){var i=new FileReader;i.onload=function(){o[t]=i.result,++u==s&&(r=An(n.doc,r),gn(n.doc,{from:r,to:r,text:ys(o.join("\n")),origin:"paste"},"around"))},i.readAsText(e)};for(var f=0;fa.clientWidth||s&&a.scrollHeight>a.clientHeight))return;if(s&&v&&i)for(var f=n.target;f!=a;f=f.parentNode)if(f.lineObj){t.display.currentWheelTarget=f;break}if(r&&!e&&!u&&Yt!=null){s&&Kt(t,Math.max(0,Math.min(a.scrollTop+s*Yt,a.scrollHeight-a.clientHeight))),Qt(t,Math.max(0,Math.min(a.scrollLeft+r*Yt,a.scrollWidth-a.clientWidth))),Li(n),o.wheelStartX=null;return}if(s&&Yt!=null){var l=s*Yt,c=t.doc.scrollTop,h=c+o.wrapper.clientHeight;l<0?c=Math.max(0,c+l-50):h=Math.min(t.doc.height,h+l+50),R(t,[],{top:c,bottom:h})}Gt<20&&(o.wheelStartX==null?(o.wheelStartX=a.scrollLeft,o.wheelStartY=a.scrollTop,o.wheelDX=r,o.wheelDY=s,setTimeout(function(){if(o.wheelStartX==null)return;var e=a.scrollLeft-o.wheelStartX,t=a.scrollTop-o.wheelStartY,n=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null;if(!n)return;Yt=(Yt*Gt+n)/(Gt+1),++Gt},200)):(o.wheelDX+=r,o.wheelDY+=s))}function en(e,t,n){if(typeof t=="string"){t=or[t];if(!t)return!1}e.display.pollingFast&&Ht(e)&&(e.display.pollingFast=!1);var r=e.doc,i=r.sel.shift,s=!1;try{Ft(e)&&(e.state.suppressEdits=!0),n&&(r.sel.shift=!1),s=t(e)!=Xi}finally{r.sel.shift=i,e.state.suppressEdits=!1}return s}function tn(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function rn(e,t){var n=ar(e.options.keyMap),i=n.auto;clearTimeout(nn),i&&!lr(t)&&(nn=setTimeout(function(){ar(e.options.keyMap)==n&&(e.options.keyMap=i.call?i.call(null,e):i,L(e))},50));var s=cr(t,!0),o=!1;if(!s)return!1;var u=tn(e);return t.shiftKey?o=fr("Shift-"+s,u,function(t){return en(e,t,!0)})||fr(s,u,function(t){if(typeof t=="string"?/^go[A-Z]/.test(t):t.motion)return en(e,t)}):o=fr(s,u,function(t){return en(e,t)}),o&&(Li(t),Z(e),r&&(t.oldKeyCode=t.keyCode,t.keyCode=0),Ii(e,"keyHandled",e,s,t)),o}function sn(e,t,n){var r=fr("'"+n+"'",tn(e),function(t){return en(e,t,!0)});return r&&(Li(t),Z(e),Ii(e,"keyHandled",e,"'"+n+"'",t)),r}function un(e){var n=this;n.state.focused||fn(n),t&&e.keyCode==27&&(e.returnValue=!1);if(qi(n,e)||n.options.onKeyEvent&&n.options.onKeyEvent(n,ki(e)))return;var r=e.keyCode;n.doc.sel.shift=r==16||e.shiftKey;var i=rn(n,e);u&&(on=i?r:null,!i&&r==88&&!ws&&(v?e.metaKey:e.ctrlKey)&&n.replaceSelection(""))}function an(e){var n=this;if(qi(n,e)||n.options.onKeyEvent&&n.options.onKeyEvent(n,ki(e)))return;var i=e.keyCode,s=e.charCode;if(u&&i==on){on=null,Li(e);return}if((u&&(!e.which||e.which<10)||f)&&rn(n,e))return;var o=String.fromCharCode(s==null?i:s);this.options.electricChars&&this.doc.mode.electricChars&&this.options.smartIndent&&!Ft(this)&&this.doc.mode.electricChars.indexOf(o)>-1&&setTimeout(At(n,function(){zn(n,n.doc.sel.to.line,"smart")}),75);if(sn(n,e,o))return;t&&!r&&(n.display.inputHasSelection=null),Pt(n)}function fn(e){if(e.options.readOnly=="nocursor")return;e.state.focused||(Bi(e,"focus",e),e.state.focused=!0,e.display.wrapper.className.search(/\bCodeMirror-focused\b/)==-1&&(e.display.wrapper.className+=" CodeMirror-focused"),Bt(e,!0)),Dt(e),Z(e)}function ln(e){e.state.focused&&(Bi(e,"blur",e),e.state.focused=!1,e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.doc.sel.shift=!1)},150)}function hn(e,n){function l(){if(i.input.selectionStart!=null){var e=i.input.value=" "+(Nn(s.from,s.to)?"":i.input.value);i.prevInput=" ",i.input.selectionStart=1,i.input.selectionEnd=e.length}}function c(){i.inputDiv.style.position="relative",i.input.style.cssText=f,r&&(i.scrollbarV.scrollTop=i.scroller.scrollTop=a),Dt(e);if(i.input.selectionStart!=null){(!t||r)&&l(),clearTimeout(cn);var n=0,s=function(){i.prevInput==" "&&i.input.selectionStart==0?At(e,or.selectAll)(e):n++<10?cn=setTimeout(s,500):Bt(e)};cn=setTimeout(s,200)}}if(qi(e,n,"contextmenu"))return;var i=e.display,s=e.doc.sel;if(qt(i,n))return;var o=Rt(e,n),a=i.scroller.scrollTop;if(!o||u)return;(Nn(s.from,s.to)||Cn(o,s.from)||!Cn(o,s.to))&&At(e,Pn)(e.doc,o,o);var f=i.input.style.cssText;i.inputDiv.style.position="absolute",i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(n.clientY-5)+"px; left: "+(n.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",jt(e),Bt(e,!0),Nn(s.from,s.to)&&(i.input.value=i.prevInput=" "),t&&!r&&l();if(b){Mi(n);var h=function(){Hi(window,"mouseup",h),setTimeout(c,20)};Pi(window,"mouseup",h)}else setTimeout(c,50)}function dn(e,t,n){if(!Cn(t.from,n))return An(e,n);var r=t.text.length-1-(t.to.line-t.from.line);if(n.line>t.to.line+r){var i=n.line-r,s=e.first+e.size-1;return i>s?Tn(s,ai(e,s).text.length):On(n,ai(e,i).text.length)}if(n.line==t.to.line+r)return On(n,Qi(t.text).length+(t.text.length==1?t.from.ch:0)+ai(e,t.to.line).text.length-t.to.ch);var o=n.line-t.from.line;return On(n,t.text[o].length+(o?0:t.from.ch))}function vn(e,t,n){if(n&&typeof n=="object")return{anchor:dn(e,t,n.anchor),head:dn(e,t,n.head)};if(n=="start")return{anchor:t.from,head:t.from};var r=pn(t);if(n=="around")return{anchor:t.from,head:r};if(n=="end")return{anchor:r,head:r};var i=function(e){if(Cn(e,t.from))return e;if(!Cn(t.to,e))return r;var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=r.ch-t.to.ch),Tn(n,i)};return{anchor:i(e.sel.anchor),head:i(e.sel.head)}}function mn(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return n&&(r.update=function(t,n,r,i){t&&(this.from=An(e,t)),n&&(this.to=An(e,n)),r&&(this.text=r),i!==undefined&&(this.origin=i)}),Bi(e,"beforeChange",e,r),e.cm&&Bi(e.cm,"beforeChange",e.cm,r),r.canceled?null:{from:r.from,to:r.to,text:r.text,origin:r.origin}}function gn(e,t,n,r){if(e.cm){if(!e.cm.curOp)return At(e.cm,gn)(e,t,n,r);if(e.cm.state.suppressEdits)return}if(Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange")){t=mn(e,t,!0);if(!t)return}var i=w&&!r&&Tr(e,t.from,t.to);if(i){for(var s=i.length-1;s>=1;--s)yn(e,{from:i[s].from,to:i[s].to,text:[""]});i.length&&yn(e,{from:i[0].from,to:i[0].to,text:t.text},n)}else yn(e,t,n)}function yn(e,t,n){var r=vn(e,t,n);bi(e,t,r,e.cm?e.cm.curOp.id:NaN),En(e,t,r,Sr(e,t));var i=[];oi(e,function(e,n){!n&&Yi(i,e.history)==-1&&(Ni(e.history,t),i.push(e.history)),En(e,t,null,Sr(e,t))})}function bn(e,t){if(e.cm&&e.cm.state.suppressEdits)return;var n=e.history,r=(t=="undo"?n.done:n.undone).pop();if(!r)return;var i={changes:[],anchorBefore:r.anchorAfter,headBefore:r.headAfter,anchorAfter:r.anchorBefore,headAfter:r.headBefore,generation:n.generation};(t=="undo"?n.undone:n.done).push(i),n.generation=r.generation||++n.maxGeneration;var s=Ui(e,"beforeChange")||e.cm&&Ui(e.cm,"beforeChange");for(var o=r.changes.length-1;o>=0;--o){var u=r.changes[o];u.origin=t;if(s&&!mn(e,u,!1)){(t=="undo"?n.done:n.undone).length=0;return}i.changes.push(yi(e,u));var a=o?vn(e,u,null):{anchor:r.anchorBefore,head:r.headBefore};En(e,u,a,xr(e,u));var f=[];oi(e,function(e,t){!t&&Yi(f,e.history)==-1&&(Ni(e.history,u),f.push(e.history)),En(e,u,null,xr(e,u))})}}function wn(e,t){function n(e){return Tn(e.line+t,e.ch)}e.first+=t,e.cm&&_t(e.cm,e.first,e.first,t),e.sel.head=n(e.sel.head),e.sel.anchor=n(e.sel.anchor),e.sel.from=n(e.sel.from),e.sel.to=n(e.sel.to)}function En(e,t,n,r){if(e.cm&&!e.cm.curOp)return At(e.cm,En)(e,t,n,r);if(t.to.linee.lastLine())return;if(t.from.lines&&(t={from:t.from,to:Tn(s,ai(e,s).text.length),text:[t.text[0]],origin:t.origin}),t.removed=fi(e,t.from,t.to),n||(n=vn(e,t,null)),e.cm?Sn(e.cm,t,r,n):Zr(e,t,r,n)}function Sn(e,t,n,r){var i=e.doc,s=e.display,o=t.from,u=t.to,a=!1,f=o.line;e.options.lineWrapping||(f=hi(Lr(i,ai(i,o.line))),i.iter(f,u.line+1,function(e){if(e==s.maxLine)return a=!0,!0})),!Cn(i.sel.head,t.from)&&!Cn(t.to,i.sel.head)&&(e.curOp.cursorActivity=!0),Zr(i,t,n,r,C(e)),e.options.lineWrapping||(i.iter(f,o.line+t.text.length,function(e){var t=_(i,e);t>s.maxLineLength&&(s.maxLine=e,s.maxLineLength=t,s.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,o.line),et(e,400);var l=t.text.length-(u.line-o.line)-1;_t(e,o.line,u.line+1,l);if(Ui(e,"change")){var c={from:o,to:u,text:t.text,removed:t.removed,origin:t.origin};if(e.curOp.textChanged){for(var h=e.curOp.textChanged;h.next;h=h.next);h.next=c}else e.curOp.textChanged=c}}function xn(e,t,n,r,i){r||(r=n);if(Cn(r,n)){var s=r;r=n,n=s}typeof t=="string"&&(t=ys(t)),gn(e,{from:n,to:r,text:t,origin:i},null)}function Tn(e,t){if(!(this instanceof Tn))return new Tn(e,t);this.line=e,this.ch=t}function Nn(e,t){return e.line==t.line&&e.ch==t.ch}function Cn(e,t){return e.linen?Tn(n,ai(e,n).text.length):On(t,ai(e,t.line).text.length)}function On(e,t){var n=e.ch;return n==null||n>t?Tn(e.line,t):n<0?Tn(e.line,0):e}function Mn(e,t){return t>=e.first&&t=s.ch:f.to>s.ch))){if(r){Bi(l,"beforeCursorEnter");if(l.explicitlyCleared){if(!u.markedSpans)break;--a;continue}}if(!l.atomic)continue;var c=l.find()[o<0?"from":"to"];if(Nn(c,s)){c.ch+=o,c.ch<0?c.line>e.first?c=An(e,Tn(c.line-1)):c=null:c.ch>u.text.length&&(c.line(window.innerHeight||document.documentElement.clientHeight)&&(i=!1);if(i!=null&&!h){var s=n.cursor.style.display=="none";s&&(n.cursor.style.display="",n.cursor.style.left=t.left+"px",n.cursor.style.top=t.top-n.viewOffset+"px"),n.cursor.scrollIntoView(i),s&&(n.cursor.style.display="none")}}function Fn(e,t,n){n==null&&(n=0);for(;;){var r=!1,i=bt(e,t),s=qn(e,i.left,i.top-n,i.left,i.bottom+n),o=e.doc.scrollTop,u=e.doc.scrollLeft;s.scrollTop!=null&&(Kt(e,s.scrollTop),Math.abs(e.doc.scrollTop-o)>1&&(r=!0)),s.scrollLeft!=null&&(Qt(e,s.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(r=!0));if(!r)return i}}function In(e,t,n,r,i){var s=qn(e,t,n,r,i);s.scrollTop!=null&&Kt(e,s.scrollTop),s.scrollLeft!=null&&Qt(e,s.scrollLeft)}function qn(e,t,n,r,i){var s=e.display,o=Tt(e.display);n<0&&(n=0);var u=s.scroller.clientHeight-Wi,a=s.scroller.scrollTop,f={},l=e.doc.height+st(s),c=nl-o;if(na+u){var p=Math.min(n,(h?l:i)-u);p!=a&&(f.scrollTop=p)}var d=s.scroller.clientWidth-Wi,v=s.scroller.scrollLeft;t+=s.gutters.offsetWidth,r+=s.gutters.offsetWidth;var m=s.gutters.offsetWidth,g=td+v-3&&(f.scrollLeft=r+10-d),f}function Rn(e,t,n){e.curOp.updateScrollPos={scrollLeft:t==null?e.doc.scrollLeft:t,scrollTop:n==null?e.doc.scrollTop:n}}function Un(e,t,n){var r=e.curOp.updateScrollPos||(e.curOp.updateScrollPos={scrollLeft:e.doc.scrollLeft,scrollTop:e.doc.scrollTop}),i=e.display.scroller;r.scrollTop=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,r.scrollTop+n)),r.scrollLeft=Math.max(0,Math.min(i.scrollWidth-i.clientWidth,r.scrollLeft+t))}function zn(e,t,n,r){var i=e.doc;n==null&&(n="add");if(n=="smart")if(!e.doc.mode.indent)n="prev";else var s=rt(e,t);var o=e.options.tabSize,u=ai(i,t),a=$i(u.text,null,o),f=u.text.match(/^\s*/)[0],l;if(n=="smart"){l=e.doc.mode.indent(s,u.text.slice(f.length),u.text);if(l==Xi){if(!r)return;n="prev"}}n=="prev"?t>i.first?l=$i(ai(i,t-1).text,null,o):l=0:n=="add"?l=a+e.options.indentUnit:n=="subtract"?l=a-e.options.indentUnit:typeof n=="number"&&(l=a+n),l=Math.max(0,l);var c="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(l/o);p;--p)h+=o,c+=" ";h=e.first+e.size?f=!1:(s=t,a=ai(e,t))}function c(e){var t=(i?Ds:Ps)(a,o,n,!0);if(t==null){if(!!e||!l())return f=!1;i?o=(n<0?Cs:Ns)(a):o=n<0?a.text.length:0}else o=t;return!0}var s=t.line,o=t.ch,u=n,a=ai(e,s),f=!0;if(r=="char")c();else if(r=="column")c(!0);else if(r=="word"||r=="group"){var h=null,p=r=="group";for(var d=!0;;d=!1){if(n<0&&!c(!d))break;var v=a.text.charAt(o)||"\n",m=is(v)?"w":p?/\s/.test(v)?null:"p":null;if(h&&h!=m){n<0&&(n=1,c());break}m&&(h=m);if(n>0&&!c(!d))break}}var g=Bn(e,Tn(s,o),u,!0);return f||(g.hitSide=!0),g}function Vn(e,t,n,r){var i=e.doc,s=t.left,o;if(r=="page"){var u=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);o=t.top+n*(u-(n<0?1.5:.5)*Tt(e.display))}else r=="line"&&(o=n>0?t.bottom+3:t.top-3);for(;;){var a=Et(e,s,o);if(!a.outside)break;if(n<0?o<=0:o>=i.height){a.hitSide=!0;break}o+=n*5}return a}function $n(e,t){var n=t.ch,r=t.ch;if(e){(t.xRel<0||r==e.length)&&n?--n:++r;var i=e.charAt(n),s=is(i)?is:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!is(e)};while(n>0&&s(e.charAt(n-1)))--n;while(r=t:s.to>t);(i||(i=[])).push({from:s.from,to:a?null:s.to,marker:o})}}return i}function Er(e,t,n){if(e)for(var r=0,i;r=t:s.to>t);if(u||o.type=="bookmark"&&s.from==t&&(!n||s.marker.insertLeft)){var a=s.from==null||(o.inclusiveLeft?s.from<=t:s.from0&&u)for(var c=0;ct)&&(!r||r.widthe.options.maxHighlightLength?(s=!1,a.pos=Math.min(t.length,a.start+5e4),f=null):f=n.token(a,r);if(!s||u!=f)oe&&r.splice(o,1,e,r[o+1],i),o+=2,u=Math.min(e,i)}if(!t)return;if(s.opaque)r.splice(n,o-n,e,t),o=n+2;else for(;n="í €"&&a<"í¯¿"&&ua)?(b.to!=null&&c>b.to&&(c=b.to,p=""),w.className&&(h+=" "+w.className),w.startStyle&&b.from==a&&(d+=" "+w.startStyle),w.endStyle&&b.to==c&&(p+=" "+w.endStyle),w.title&&!v&&(v=w.title),w.collapsed&&(!m||m.marker.sizea&&c>b.from&&(c=b.from),w.type=="bookmark"&&b.from==a&&w.replacedWith&&(g=w)}if(m&&(m.from||0)==a){Gr(t,(m.to==null?u:m.to)-a,m.marker,m.from==null);if(m.to==null)return m.marker.find()}g&&!m&&Gr(t,0,g)}if(a>=u)break;var E=Math.min(u,c);for(;;){if(f){var S=a+f.length;if(!m){var x=S>E?f.slice(0,E-a):f;t.addToken(t,x,l?l+h:h,d,a+x.length==c?p:"",v)}if(S>=E){f=f.slice(E-a),a=E;break}a=S,d=""}f=i.slice(s,s=n[o++]),l=Xr(n[o++])}}}function Zr(e,t,n,r,i){function s(e){return n?n[e]:null}function o(e,n,r){Fr(e,n,r,i),Ii(e,"change",e,t)}var u=t.from,a=t.to,f=t.text,l=ai(e,u.line),c=ai(e,a.line),h=Qi(f),p=s(f.length-1),d=a.line-u.line;if(u.ch==0&&a.ch==0&&h==""){for(var v=0,m=f.length-1,g=[];v1&&e.remove(u.line+1,d-1),e.insert(u.line+1,g)}Ii(e,"change",e,t),Pn(e,r.anchor,r.head,null,!0)}function ei(e){this.lines=e,this.parent=null;for(var t=0,n=e.length,r=0;ts-e.cm.options.historyEventDelay||t.origin.charAt(0)=="*"))){var u=Qi(o.changes);Nn(t.from,t.to)&&Nn(t.from,u.to)?u.to=pn(t):o.changes.push(yi(e,t)),o.anchorAfter=n.anchor,o.headAfter=n.head}else{o={changes:[yi(e,t)],generation:i.generation,anchorBefore:e.sel.anchor,headBefore:e.sel.head,anchorAfter:n.anchor,headAfter:n.head},i.done.push(o),i.generation=++i.maxGeneration;while(i.done.length>i.undoDepth)i.done.shift()}i.lastTime=s,i.lastOp=r,i.lastOrigin=t.origin}function wi(e){if(!e)return null;for(var t=0,n;t-1&&(Qi(o)[l]=a[l],delete a[l])}}return r}function xi(e,t,n,r){n0}function zi(e){e.prototype.on=function(e,t){Pi(this,e,t)},e.prototype.off=function(e,t){Hi(this,e,t)}}function Vi(){this.id=null}function $i(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var s=r||0,o=i||0;s"€"&&(e.toUpperCase()!=e.toLowerCase()||rs.test(e))}function ss(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function us(e,t,n,r){var i=document.createElement(e);n&&(i.className=n),r&&(i.style.cssText=r);if(typeof t=="string")ls(i,t);else if(t)for(var s=0;s0;--t)e.removeChild(e.firstChild);return e}function fs(e,t){return as(e).appendChild(t)}function ls(e,t){r?(e.innerHTML="",e.appendChild(document.createTextNode(t))):e.textContent=t}function cs(e){return e.getBoundingClientRect()}function ps(){return!1}function vs(e){if(ds!=null)return ds;var t=us("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return fs(e,t),t.offsetWidth&&(ds=t.offsetHeight-t.clientHeight),ds||0}function gs(e){if(ms==null){var t=us("span","​");fs(e,us("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(ms=t.offsetWidth<=1&&t.offsetHeight>2&&!n)}return ms?us("span","​"):us("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Ss(e,t,n,r){if(!e)return r(t,n,"ltr");var i=!1;for(var s=0;st||t==n&&o.to==t)r(Math.max(o.from,t),Math.min(o.to,n),o.level==1?"rtl":"ltr"),i=!0}i||r(t,n,"ltr")}function xs(e){return e.level%2?e.to:e.from}function Ts(e){return e.level%2?e.from:e.to}function Ns(e){var t=vi(e);return t?xs(t[0]):0}function Cs(e){var t=vi(e);return t?Ts(Qi(t)):e.text.length}function ks(e,t){var n=ai(e.doc,t),r=Lr(e.doc,n);r!=n&&(t=hi(r));var i=vi(r),s=i?i[0].level%2?Cs(r):Ns(r):0;return Tn(t,s)}function Ls(e,t){var n,r;while(n=kr(r=ai(e.doc,t)))t=n.find().to.line;var i=vi(r),s=i?i[0].level%2?Ns(r):Cs(r):r.text.length;return Tn(t,s)}function As(e,t,n){var r=e[0].level;return t==r?!0:n==r?!1:tt)return Os=null,n;if(i.from==t||i.to==t){if(r!=null)return As(e,i.level,e[r].level)?(Os=r,n):(Os=n,r);r=n}}return Os=null,r}function _s(e,t,n,r){if(!r)return t+n;do t+=n;while(t>0&&os.test(e.text.charAt(t)));return t}function Ds(e,t,n,r){var i=vi(e);if(!i)return Ps(e,t,n,r);var s=Ms(i,t),o=i[s],u=_s(e,t,o.level%2?-n:n,r);for(;;){if(u>o.from&&u0==o.level%2?o.to:o.from);o=i[s+=n];if(!o)return null;n>0==o.level%2?u=_s(e,o.to,-1,r):u=_s(e,o.from,1,r)}}function Ps(e,t,n,r){var i=t+n;if(r)while(i>0&&os.test(e.text.charAt(i)))i+=n;return i<0||i>e.text.length?null:i}var e=/gecko\/\d/i.test(navigator.userAgent),t=/MSIE \d/.test(navigator.userAgent),n=t&&(document.documentMode==null||document.documentMode<8),r=t&&(document.documentMode==null||document.documentMode<9),i=/WebKit\//.test(navigator.userAgent),s=i&&/Qt\/\d+\.\d+/.test(navigator.userAgent),o=/Chrome\//.test(navigator.userAgent),u=/Opera\//.test(navigator.userAgent),a=/Apple Computer/.test(navigator.vendor),f=/KHTML\//.test(navigator.userAgent),l=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),c=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),h=/PhantomJS/.test(navigator.userAgent),p=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),d=p||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),v=p||/Mac/.test(navigator.platform),m=/windows/i.test(navigator.platform),g=u&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);g&&(g=Number(g[1])),g&&g>=15&&(u=!1,i=!0);var y=v&&(s||u&&(g==null||g<12.11)),b=e||t&&!r,w=!1,E=!1,xt,Ct=0,Ut,zt,Vt=0,Gt=0,Yt=null;t?Yt=-0.53:e?Yt=15:o?Yt=-0.7:a&&(Yt=-1/3);var nn,on=null,cn,pn=S.changeEnd=function(e){return e.text?Tn(e.from.line+e.text.length-1,Qi(e.text).length+(e.text.length==1?e.from.ch:0)):e.to};S.Pos=Tn,S.prototype={constructor:S,focus:function(){window.focus(),jt(this),fn(this),Pt(this)},setOption:function(e,t){var n=this.options,r=n[e];if(n[e]==t&&e!="mode")return;n[e]=t,Kn.hasOwnProperty(e)&&At(this,Kn[e])(this,t,r)},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){var t=this.state.keyMaps;for(var n=0;n>1;if((s?t[s*2-1]:0)>=i)r=s;else{if(!(t[s*2+1]r&&(e=r,n=!0);var i=ai(this.doc,e);return mt(this,ai(this.doc,e),{top:0,left:0},t||"page").top+(n?i.height:0)},defaultTextHeight:function(){return Tt(this.display)},defaultCharWidth:function(){return Nt(this.display)},setGutterMarker:At(null,function(e,t,n){return Wn(this,e,function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ss(r)&&(e.gutterMarkers=null),!0})}),clearGutter:At(null,function(e){var t=this,n=t.doc,r=n.first;n.iter(function(n){n.gutterMarkers&&n.gutterMarkers[e]&&(n.gutterMarkers[e]=null,_t(t,r,r+1),ss(n.gutterMarkers)&&(n.gutterMarkers=null)),++r})}),addLineClass:At(null,function(e,t,n){return Wn(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass";if(!e[r])e[r]=n;else{if((new RegExp("(?:^|\\s)"+n+"(?:$|\\s)")).test(e[r]))return!1;e[r]+=" "+n}return!0})}),removeLineClass:At(null,function(e,t,n){return Wn(this,e,function(e){var r=t=="text"?"textClass":t=="background"?"bgClass":"wrapClass",i=e[r];if(!i)return!1;if(n==null)e[r]=null;else{var s=i.match(new RegExp("(?:^|\\s+)"+n+"(?:$|\\s+)"));if(!s)return!1;var o=s.index+s[0].length;e[r]=i.slice(0,s.index)+(!s.index||o==i.length?"":" ")+i.slice(o)||null}return!0})}),addLineWidget:At(null,function(e,t,n){return Br(this,e,t,n)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if(typeof e=="number"){if(!Mn(this.doc,e))return null;var t=e;e=ai(this.doc,e);if(!e)return null}else{var t=hi(e);if(t==null)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(e,t,n,r,i){var s=this.display;e=bt(this,An(this.doc,e));var o=e.bottom,u=e.left;t.style.position="absolute",s.sizer.appendChild(t);if(r=="over")o=e.top;else if(r=="above"||r=="near"){var a=Math.max(s.wrapper.clientHeight,this.doc.height),f=Math.max(s.sizer.clientWidth,s.lineSpace.clientWidth);(r=="above"||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?o=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(o=e.bottom),u+t.offsetWidth>f&&(u=f-t.offsetWidth)}t.style.top=o+"px",t.style.left=t.style.right="",i=="right"?(u=s.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):(i=="left"?u=0:i=="middle"&&(u=(s.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&In(this,u,o,u+t.offsetWidth,o+t.offsetHeight)},triggerOnKeyDown:At(null,un),execCommand:function(e){return or[e](this)},findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var s=0,o=An(this.doc,e);s2){t.dependencies=[];for(var n=2;n0&&t.ch=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},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 this.lastColumnPos0?null:(s&&t!==!1&&(this.pos+=s[0].length),s)}var r=function(e){return n?e.toLowerCase():e},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)}},S.StringStream=hr,S.TextMarker=pr,zi(pr),pr.prototype.clear=function(){if(this.explicitlyCleared)return;var e=this.doc.cm,t=e&&!e.curOp;t&&kt(e);if(Ui(this,"clear")){var n=this.find();n&&Ii(this,"clear",n.from,n.to)}var r=null,i=null;for(var s=0;se.display.maxLineLength&&(e.display.maxLine=a,e.display.maxLineLength=f,e.display.maxLineChanged=!0)}r!=null&&e&&_t(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Hn(e)),t&&Lt(e)},pr.prototype.find=function(){var e,t;for(var n=0;n=t.display.showingFrom&&e.from.line50){while(s.lines.length>50){var u=s.lines.splice(s.lines.length-25,25),a=new ei(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 ti(t);if(!e.parent){var r=new ti(e.children);r.parent=e,e.children=[r,n],e=r}else{e.size-=n.size,e.height-=n.height;var i=Yi(e.parent.children,e);e.parent.children.splice(i+1,0,n)}n.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()},iterN:function(e,t,n){for(var r=0,i=this.children.length;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n}),An(this,Tn(n,t))},indexFromPos:function(e){e=An(this,e);var t=e.ch;return e.linet&&(t=e.from),e.to!=null&&e.to1&&e.charCodeAt(t-1)==45){if(/\w/.test(e.charAt(t-2))&&/[^\-?\.]/.test(e.charAt(t)))return!0;if(t>2&&/[\d\.,]/.test(e.charAt(t-2))&&/[\d\.,]/.test(e.charAt(t)))return!1}return/[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(e.slice(t-1,t+1))});var ds,ms,ys="\n\nb".split(/\n/).length!=3?function(e){var t=0,n=[],r=e.length;while(t<=r){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var s=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),o=s.indexOf("\r");o!=-1?(n.push(s.slice(0,o)),t+=o+1):(n.push(s),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)};S.splitLines=ys;var bs=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},ws=function(){var e=us("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),Es={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",109:"-",107:"=",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"};S.keyNames=Es,function(){for(var e=0;e<10;e++)Es[e+48]=String(e);for(var e=65;e<=90;e++)Es[e]=String.fromCharCode(e);for(var e=1;e<=12;e++)Es[e+111]=Es[e+63235]="F"+e}();var Os,Hs=function(){function n(n){return n<=255?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1791?t.charAt(n-1536):1792<=n&&n<=2220?"r":"L"}var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",t="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,s=/[LRr]/,o=/[Lb1n]/,u=/[1n]/,a="L";return function(e){if(!r.test(e))return!1;var t=e.length,f=[];for(var l=0,c;l0?f.charAt(u.ch-1):"";if(e==r&&CodeMirror.isWordChar(c))return CodeMirror.Pass;if(!(f.length==u.ch||i.indexOf(l)>=0||n.test(l)))return CodeMirror.Pass;t.replaceSelection(e+r,{head:a,anchor:a})},e!=r&&(t["'"+r+"'"]=o)})(e.charAt(s),e.charAt(s+1));return t}function s(e){return function(t){var n=t.getCursor(),i=r(t,n);if(!i||e.indexOf(i)%2!=0)return CodeMirror.Pass;t.operation(function(){var e=CodeMirror.Pos(n.line+1,0);t.replaceSelection("\n\n",{anchor:e,head:e},"+input"),t.indentLine(n.line+1,null,!0),t.indentLine(n.line+2,null,!0)})}}var e="()[]{}''\"\"",t="[]{}",n=/\s/;CodeMirror.defineOption("autoCloseBrackets",!1,function(n,r,o){o!=CodeMirror.Init&&o&&n.removeKeyMap("autoCloseBrackets");if(!r)return;var u=e,a=t;typeof r=="string"?u=r:typeof r=="object"&&(r.pairs!=null&&(u=r.pairs),r.explode!=null&&(a=r.explode));var f=i(u);a&&(f.Enter=s(a)),n.addKeyMap(f)})}(),define("../lib/codemirror/addon/edit/closebrackets",function(){}),function(){function r(e,r,i){function m(r,i,s){if(!r.text)return;var u=c?0:r.text.length-1,a=c?r.text.length:-1;if(r.text.length>o)return null;s!=null&&(u=s+h);for(;u!=a;u+=h){var f=r.text.charAt(u);if(v.test(f)&&e.getTokenTypeAt(t(i,u+1))==p){var l=n[f];if(l.charAt(1)==">"==c)d.push(f);else{if(d.pop()!=l.charAt(0))return{pos:u,match:!1};if(!d.length)return{pos:u,match:!0}}}}}var s=e.state.matchBrackets,o=s&&s.maxScanLineLength||1e4,u=r||e.getCursor(),a=e.getLineHandle(u.line),f=u.ch-1,l=f>=0&&n[a.text.charAt(f)]||n[a.text.charAt(++f)];if(!l)return null;var c=l.charAt(1)==">",h=c?1:-1;if(i&&c!=(f==u.ch))return null;var p=e.getTokenTypeAt(t(u.line,f+1)),d=[a.text.charAt(f)],v=/[(){}[\]]/;for(var g=u.line,y,b=c?Math.min(g+100,e.lineCount()):Math.max(-1,g-100);g!=b;g+=h){g==u.line?y=m(a,g,f):y=m(e.getLineHandle(g),g);if(y)break}return{from:t(u.line,f),to:y&&t(g,y.pos),match:y&&y.match,forward:c}}function i(n,i){var s=n.state.matchBrackets.maxHighlightLineLength||1e3,o=r(n);if(!o||n.getLine(o.from.line).length>s||o.to&&n.getLine(o.to.line).length>s)return;var u=o.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",a=n.markText(o.from,t(o.from.line,o.from.ch+1),{className:u}),f=o.to&&n.markText(o.to,t(o.to.line,o.to.ch+1),{className:u});e&&n.state.focused&&n.display.input.focus();var l=function(){n.operation(function(){a.clear(),f&&f.clear()})};if(!i)return l;setTimeout(l,800)}function o(e){e.operation(function(){s&&(s(),s=null),e.somethingSelected()||(s=i(e,!1))})}var e=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),t=CodeMirror.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},s=null;CodeMirror.defineOption("matchBrackets",!1,function(e,t,n){n&&n!=CodeMirror.Init&&e.off("cursorActivity",o),t&&(e.state.matchBrackets=typeof t=="object"?t:{},e.on("cursorActivity",o))}),CodeMirror.defineExtension("matchBrackets",function(){i(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(e,t){return r(this,e,t)})}(),define("../lib/codemirror/addon/edit/matchbrackets",function(){}),function(){function e(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function t(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.className="CodeMirror-placeholder",n.appendChild(document.createTextNode(t.getOption("placeholder"))),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function n(t){e(t)}function r(e){s(e)&&t(e)}function i(n){var r=n.getWrapperElement(),i=s(n);r.className=r.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":"");if(n.hasFocus())return;i?t(n):e(n)}function s(e){return e.lineCount()===1&&e.getLine(0)===""}CodeMirror.defineOption("placeholder","",function(t,s,o){var u=o&&o!=CodeMirror.Init;if(s&&!u)t.on("focus",n),t.on("blur",r),t.on("change",i),i(t);else if(!s&&u){t.off("focus",n),t.off("blur",r),t.off("change",i),e(t);var a=t.getWrapperElement();a.className=a.className.replace(" CodeMirror-empty","")}s&&!t.hasFocus()&&r(t)})}(),define("../lib/codemirror/addon/display/placeholder",function(){}),function(){function e(){var e={};return e.FRAMERATE=30,e.MAX_VIRTUAL_PIXELS=3e4,e.init=function(t){var n=0;e.UniqueId=function(){return n++,"canvg"+n},e.Definitions={},e.Styles={},e.Animations=[],e.Images=[],e.ctx=t,e.ViewPort=new function(){this.viewPorts=[],this.Clear=function(){this.viewPorts=[]},this.SetCurrent=function(e,t){this.viewPorts.push({width:e,height:t})},this.RemoveCurrent=function(){this.viewPorts.pop()},this.Current=function(){return this.viewPorts[this.viewPorts.length-1]},this.width=function(){return this.Current().width},this.height=function(){return this.Current().height},this.ComputeSize=function(e){return e!=null&&typeof e=="number"?e:e=="x"?this.width():e=="y"?this.height():Math.sqrt(Math.pow(this.width(),2)+Math.pow(this.height(),2))/Math.sqrt(2)}}},e.init(),e.ImagesLoaded=function(){for(var t=0;t]*>/,"");var n=new ActiveXObject("Microsoft.XMLDOM");return n.async="false",n.loadXML(e),n},e.Property=function(e,t){this.name=e,this.value=t},e.Property.prototype.getValue=function(){return this.value},e.Property.prototype.hasValue=function(){return this.value!=null&&this.value!==""},e.Property.prototype.numValue=function(){if(!this.hasValue())return 0;var e=parseFloat(this.value);return(this.value+"").match(/%$/)&&(e/=100),e},e.Property.prototype.valueOrDefault=function(e){return this.hasValue()?this.value:e},e.Property.prototype.numValueOrDefault=function(e){return this.hasValue()?this.numValue():e},e.Property.prototype.addOpacity=function(t){var n=this.value;if(t!=null&&t!=""&&typeof this.value=="string"){var r=new RGBColor(this.value);r.ok&&(n="rgba("+r.r+", "+r.g+", "+r.b+", "+t+")")}return new e.Property(this.name,n)},e.Property.prototype.getDefinition=function(){var t=this.value.match(/#([^\)'"]+)/);return t&&(t=t[1]),t||(t=this.value),e.Definitions[t]},e.Property.prototype.isUrlDefinition=function(){return this.value.indexOf("url(")==0},e.Property.prototype.getFillStyleDefinition=function(t,n){var r=this.getDefinition();if(r!=null&&r.createGradient)return r.createGradient(e.ctx,t,n);if(r!=null&&r.createPattern){if(r.getHrefAttribute().hasValue()){var i=r.attribute("patternTransform");r=r.getHrefAttribute().getDefinition(),i.hasValue()&&(r.attribute("patternTransform",!0).value=i.value)}return r.createPattern(e.ctx,t)}return null},e.Property.prototype.getDPI=function(e){return 96},e.Property.prototype.getEM=function(t){var n=12,r=new e.Property("fontSize",e.Font.Parse(e.ctx.font).fontSize);return r.hasValue()&&(n=r.toPixels(t)),n},e.Property.prototype.getUnits=function(){var e=this.value+"";return e.replace(/[0-9\.\-]/g,"")},e.Property.prototype.toPixels=function(t,n){if(!this.hasValue())return 0;var r=this.value+"";if(r.match(/em$/))return this.numValue()*this.getEM(t);if(r.match(/ex$/))return this.numValue()*this.getEM(t)/2;if(r.match(/px$/))return this.numValue();if(r.match(/pt$/))return this.numValue()*this.getDPI(t)*(1/72);if(r.match(/pc$/))return this.numValue()*15;if(r.match(/cm$/))return this.numValue()*this.getDPI(t)/2.54;if(r.match(/mm$/))return this.numValue()*this.getDPI(t)/25.4;if(r.match(/in$/))return this.numValue()*this.getDPI(t);if(r.match(/%$/))return this.numValue()*e.ViewPort.ComputeSize(t);var i=this.numValue();return n&&i<1?i*e.ViewPort.ComputeSize(t):i},e.Property.prototype.toMilliseconds=function(){if(!this.hasValue())return 0;var e=this.value+"";return e.match(/s$/)?this.numValue()*1e3:e.match(/ms$/)?this.numValue():this.numValue()},e.Property.prototype.toRadians=function(){if(!this.hasValue())return 0;var e=this.value+"";return e.match(/deg$/)?this.numValue()*(Math.PI/180):e.match(/grad$/)?this.numValue()*(Math.PI/200):e.match(/rad$/)?this.numValue():this.numValue()*(Math.PI/180)},e.Font=new function(){this.Styles="normal|italic|oblique|inherit",this.Variants="normal|small-caps|inherit",this.Weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit",this.CreateFont=function(t,n,r,i,s,o){var u=o!=null?this.Parse(o):this.CreateFont("","","","","",e.ctx.font);return{fontFamily:s||u.fontFamily,fontSize:i||u.fontSize,fontStyle:t||u.fontStyle,fontWeight:r||u.fontWeight,fontVariant:n||u.fontVariant,toString:function(){return[this.fontStyle,this.fontVariant,this.fontWeight,this.fontSize,this.fontFamily].join(" ")}}};var t=this;this.Parse=function(n){var r={},i=e.trim(e.compressSpaces(n||"")).split(" "),s={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1},o="";for(var u=0;uthis.x2&&(this.x2=e)}if(t!=null){if(isNaN(this.y1)||isNaN(this.y2))this.y1=t,this.y2=t;tthis.y2&&(this.y2=t)}},this.addX=function(e){this.addPoint(e,null)},this.addY=function(e){this.addPoint(null,e)},this.addBoundingBox=function(e){this.addPoint(e.x1,e.y1),this.addPoint(e.x2,e.y2)},this.addQuadraticCurve=function(e,t,n,r,i,s){var o=e+2/3*(n-e),u=t+2/3*(r-t),a=o+1/3*(i-e),f=u+1/3*(s-t);this.addBezierCurve(e,t,o,a,u,f,i,s)},this.addBezierCurve=function(e,t,n,r,s,o,u,a){var f=[e,t],l=[n,r],c=[s,o],h=[u,a];this.addPoint(f[0],f[1]),this.addPoint(h[0],h[1]);for(i=0;i<=1;i++){var p=function(e){return Math.pow(1-e,3)*f[i]+3*Math.pow(1-e,2)*e*l[i]+3*(1-e)*Math.pow(e,2)*c[i]+Math.pow(e,3)*h[i]},d=6*f[i]-12*l[i]+6*c[i],v=-3*f[i]+9*l[i]-9*c[i]+3*h[i],m=3*l[i]-3*f[i];if(v==0){if(d==0)continue;var g=-m/d;0=0;t--)this.transforms[t].unapply(e)},this.applyToPoint=function(e){for(var t=0;t=this.tokens.length-1},this.isCommandOrEnd=function(){return this.isEnd()?!0:this.tokens[this.i+1].match(/^[A-Za-z]$/)!=null},this.isRelativeCommand=function(){switch(this.command){case"m":case"l":case"h":case"v":case"c":case"s":case"q":case"t":case"a":case"z":return!0}return!1},this.getToken=function(){return this.i++,this.tokens[this.i]},this.getScalar=function(){return parseFloat(this.getToken())},this.nextCommand=function(){this.previousCommand=this.command,this.command=this.getToken()},this.getPoint=function(){var t=new e.Point(this.getScalar(),this.getScalar());return this.makeAbsolute(t)},this.getAsControlPoint=function(){var e=this.getPoint();return this.control=e,e},this.getAsCurrentPoint=function(){var e=this.getPoint();return this.current=e,e},this.getReflectedControlPoint=function(){if(this.previousCommand.toLowerCase()!="c"&&this.previousCommand.toLowerCase()!="s"&&this.previousCommand.toLowerCase()!="q"&&this.previousCommand.toLowerCase()!="t")return this.current;var t=new e.Point(2*this.current.x-this.control.x,2*this.current.y-this.control.y);return t},this.makeAbsolute=function(e){return this.isRelativeCommand()&&(e.x+=this.current.x,e.y+=this.current.y),e},this.addMarker=function(e,t,n){n!=null&&this.angles.length>0&&this.angles[this.angles.length-1]==null&&(this.angles[this.angles.length-1]=this.points[this.points.length-1].angleTo(n)),this.addMarkerAngle(e,t==null?null:t.angleTo(e))},this.addMarkerAngle=function(e,t){this.points.push(e),this.angles.push(t)},this.getMarkerPoints=function(){return this.points},this.getMarkerAngles=function(){for(var e=0;e1&&(c*=Math.sqrt(g),h*=Math.sqrt(g));var y=(d==v?-1:1)*Math.sqrt((Math.pow(c,2)*Math.pow(h,2)-Math.pow(c,2)*Math.pow(m.y,2)-Math.pow(h,2)*Math.pow(m.x,2))/(Math.pow(c,2)*Math.pow(m.y,2)+Math.pow(h,2)*Math.pow(m.x,2)));isNaN(y)&&(y=0);var b=new e.Point(y*c*m.y/h,y*-h*m.x/c),w=new e.Point((u.x+l.x)/2+Math.cos(p)*b.x-Math.sin(p)*b.y,(u.y+l.y)/2+Math.sin(p)*b.x+Math.cos(p)*b.y),E=function(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2))},S=function(e,t){return(e[0]*t[0]+e[1]*t[1])/(E(e)*E(t))},x=function(e,t){return(e[0]*t[1]=1&&(k=0);var L=1-v?1:-1,A=T+L*(k/2),O=new e.Point(w.x+c*Math.cos(A),w.y+h*Math.sin(A));n.addMarkerAngle(O,A-L*Math.PI/2),n.addMarkerAngle(l,A-L*Math.PI),r.addPoint(l.x,l.y);if(t!=null){var S=c>h?c:h,M=c>h?1:c/h,_=c>h?h/c:1;t.translate(w.x,w.y),t.rotate(p),t.scale(M,_),t.arc(0,0,S,T,T+k,1-v),t.scale(1/M,1/_),t.rotate(-p),t.translate(-w.x,-w.y)}}break;case"Z":case"z":t!=null&&t.closePath(),n.current=n.start}}return r},this.getMarkers=function(){var e=this.PathParser.getMarkerPoints(),t=this.PathParser.getMarkerAngles(),n=[];for(var r=0;r1&&(this.offset=1);var n=this.style("stop-color");this.style("stop-opacity").hasValue()&&(n=n.addOpacity(this.style("stop-opacity").value)),this.color=n.value},e.Element.stop.prototype=new e.Element.ElementBase,e.Element.AnimateBase=function(t){this.base=e.Element.ElementBase,this.base(t),e.Animations.push(this),this.duration=0,this.begin=this.attribute("begin").toMilliseconds(),this.maxDuration=this.begin+this.attribute("dur").toMilliseconds(),this.getProperty=function(){var e=this.attribute("attributeType").value,t=this.attribute("attributeName").value;return e=="CSS"?this.parent.style(t,!0):this.parent.attribute(t,!0)},this.initialValue=null,this.initialUnits="",this.removed=!1,this.calcValue=function(){return""},this.update=function(e){this.initialValue==null&&(this.initialValue=this.getProperty().value,this.initialUnits=this.getProperty().getUnits());if(this.duration>this.maxDuration){if(this.attribute("repeatCount").value!="indefinite"&&this.attribute("repeatDur").value!="indefinite")return this.attribute("fill").valueOrDefault("remove")=="remove"&&!this.removed?(this.removed=!0,this.getProperty().value=this.initialValue,!0):!1;this.duration=0}this.duration=this.duration+e;var t=!1;if(this.beginn&&o.attribute("x").hasValue())break;i+=o.measureTextRecursive(e)}return-1*(r=="end"?i:i/2)}return 0},this.renderChild=function(e,t,n){var r=t.children[n];r.attribute("x").hasValue()?r.x=r.attribute("x").toPixels("x")+this.getAnchorDelta(e,t,n):(this.attribute("dx").hasValue()&&(this.x+=this.attribute("dx").toPixels("x")),r.attribute("dx").hasValue()&&(this.x+=r.attribute("dx").toPixels("x")),r.x=this.x),this.x=r.x+r.measureText(e),r.attribute("y").hasValue()?r.y=r.attribute("y").toPixels("y"):(this.attribute("dy").hasValue()&&(this.y+=this.attribute("dy").toPixels("y")),r.attribute("dy").hasValue()&&(this.y+=r.attribute("dy").toPixels("y")),r.y=this.y),this.y=r.y,r.render(e);for(var n=0;n0&&t[n-1]!=" "&&n0&&t[n-1]!=" "&&(n==t.length-1||t[n+1]==" ")&&(s="initial"),typeof e.glyphs[r]!="undefined"&&(i=e.glyphs[r][s],i==null&&e.glyphs[r].type=="glyph"&&(i=e.glyphs[r]))}else i=e.glyphs[r];return i==null&&(i=e.missingGlyph),i},this.renderChildren=function(t){var n=this.parent.style("font-family").getDefinition();if(n!=null){var r=this.parent.style("font-size").numValueOrDefault(e.Font.Parse(e.ctx.font).fontSize),i=this.parent.style("font-style").valueOrDefault(e.Font.Parse(e.ctx.font).fontStyle),s=this.getText();n.isRTL&&(s=s.split("").reverse().join(""));var o=e.ToNumberArray(this.parent.attribute("dx").value);for(var u=0;u0){var y=m[g].indexOf("url"),b=m[g].indexOf(")",y),w=m[g].substr(y+5,b-y-6),E=e.parseXml(e.ajax(w)),S=E.getElementsByTagName("font");for(var x=0;x17?(v=0,ga("send","event","17 characters typed","textarea")):v++}),e("#textcopybox").bind({cut:function(e){ga("send","event","cut","svgsource")},copy:function(e){ga("send","event","copy","svgsource")}}),e("#langlink").bind({click:function(t){ga("send","event","link",e("#langlink").attr("href"))}}),e("#__tweetme").bind({click:function(t){ga("send","event","link",e("#__tweetme").attr("href"))}}),e("#__gplusme").bind({click:function(t){ga("send","event","link",e("#__gplusme").attr("href"))}}),e("#__forkme").bind({click:function(t){ga("send","event","link",e("#__forkme").attr("href"))}}),e("body").bind({keydown:function(t){var n=t.keyCode,r=e(t.currentTarget);switch(n){case m:H();break;default:}}})})}),require(["mscgenui"],function(e){}),define("mscgen-main",function(){}); \ No newline at end of file diff --git a/style/mscgen.css b/style/mscgen.css index 756c75e7..eb01276b 100644 --- a/style/mscgen.css +++ b/style/mscgen.css @@ -246,154 +246,183 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} color: white !important; } body { - color : black; - font-family : sans-serif; - font-size : 12pt; + color: black; + font-family: sans-serif; + font-size: 12pt; } .code { - font-family : Monaco, Consolas, 'Andale Mono', monospace; - font-size : 0.7em; - background-color : #555; - color : #fff; + font-family: Monaco, Consolas, 'Andale Mono', monospace; + font-size: 0.7em; + background-color: #555; + color: #fff; } textarea { - border : solid 0px; + border: solid 0px; } h1 { - font-size : 1.9em; - margin-bottom : 0; + font-size: 1.9em; + margin-bottom: 0; } #header { - padding-bottom : 0.9em; - border-bottom : solid lightgrey 1px; - margin-bottom : 0.4em; + padding-bottom: 0.9em; + border-bottom: solid lightgrey 1px; + margin-bottom: 0.4em; } h2 { - font-style : italic; - font-weight : 500; + font-style: italic; + font-weight: 500; } h3 { - margin : 0; - margin-bottom : 1em; - font-weight : 500; + margin: 0; + margin-bottom: 1em; + font-weight: 500; } .intronumber { - padding : 0.2em 0.5em 0.1em 0.5em; - color : white; - background-color : lightgrey; - border-radius : 0.2em; + padding: 0.2em 0.5em 0.1em 0.5em; + color: white; + background-color: lightgrey; + border-radius: 0.2em; } .fadable { - animation-duration : 60s; - animation-name : fadeout; - -webkit-animation-duration : 60s; - -webkit-animation-name : fadeout; - color : lightgrey; + animation-duration: 60s; + animation-name: fadeout; + -webkit-animation-duration: 60s; + -webkit-animation-name: fadeout; + color: lightgrey; } a.fadable { - text-decoration : underline; - -moz-text-decoration-style : dotted; - -webkit-text-decoration-style : dotted; - text-decoration-style : dotted; + text-decoration: underline; + -moz-text-decoration-style: dotted; + -webkit-text-decoration-style: dotted; + text-decoration-style: dotted; } @keyframes fadeout { - from { - color : black; - } - to { - color : lightgrey; - } -} -@-webkit-keyframes fadeout { - from { - color : black; - } - to { - color : lightgrey; - } +from { + color: black; +} +to { + color: lightgrey; +} +} +@-webkit-keyframes +fadeout {from { + color: black; +} +to { + color: lightgrey; +} } #input_and_controls { - z-index : 0; - position : relative; - vertical-align : top; - float : left; - max-width : 100%; - max-height : 100%; - width : 32em; + z-index: 0; + position: relative; + vertical-align: top; + float: left; + max-width: 100%; + max-height: 100%; + width: 32em; } #input_and_controls > #btn_render { - display : none; + display: none; } #input_and_controls > #msc_input { - width : 98%; - height : 40em; + width: 98%; + height: 40em; } #input_and_controls > #error_output { - z-index : 0; - color : orange; - padding : 1em 0em 1em 0em; - border : solid 1px orange; - display : none; - width : 100%; + z-index: 0; + color: orange; + padding: 1em 0em 1em 0em; + border: solid 1px orange; + display: none; + width: 100%; } #svg_output { - z-index : 0; - vertical-align : top; - position : absolute; - float : left; + z-index: 0; + vertical-align: top; + position: absolute; + float: left; } #textcopylightbox { - z-index : 1; + z-index: 1; position: fixed; - top : 0px; - left : 0px; - width : 100%; - height : 100%; - background-color : white; - opacity : 0.96; - display : none; + top: 0px; + left: 0px; + width: 100%; + height: 100%; + background-color: white; + opacity: 0.96; + display: none; } #textcopybox { - width : 100%; - height : 100%; + width: 100%; + height: 100%; } #textcopyform { position: absolute; - width : 80%; - height : 80%; - top : 10%; + width: 80%; + height: 80%; + top: 10%; left: 10%; - opacity : 1; - text-align : right; + opacity: 1; + text-align: right; } button { - cursor : default; - padding : 0.3em 0.5em 0.3em 0.5em; - background-color : #ddd; - color : #000; - border : none; - font-size : 1em; + cursor: default; + padding: 0.3em 0.5em 0.3em 0.5em; + background-color: #ddd; + color: #000; + border: none; + font-size: 1em; } button:hover, .button:hover { - text-align : center; - background-color : #555; - color : #fff; + text-align: center; + background-color: #555; + color: #fff; } -img.icon { - display: inline; - width: 4em; +div.buttonblock { + float: right; + left: 10em; +} +.buttonblock > button { + display: inline-block; +} +a.icon { + display: inline-block; + width: 3em; height: 3em; + + background-repeat: no-repeat; + background-position: center; + background-size: contain; + padding-left: 0.5em; + padding-right: 0.5em; +} +a.twitter { + + background-image: url('../images/twitter.svg'); +} +a.gplus { + + background-image: url('../images/gplus.svg'); +} +a.github { + + background-image: url('../images/github.svg'); +} +a.question { + + background-image: url('../images/question.svg'); } /* - This file is part of mscgen_js. - mscgen_js is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - mscgen_js is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with mscgen_js. If not, see . -*/ + This file is part of mscgen_js. + mscgen_js is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + mscgen_js is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + You should have received a copy of the GNU General Public License + along with mscgen_js. If not, see . + */