!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=93)}([function(e,t,n){"use strict";function i(e){function t(){l.add(e,"ps--focus")}function n(){l.remove(e,"ps--focus")}var i=this;i.settings=a.clone(c),i.containerWidth=null,i.containerHeight=null,i.contentWidth=null,i.contentHeight=null,i.isRtl="rtl"===u.css(e,"direction"),i.isNegativeScroll=function(){var t=e.scrollLeft,n=null;return e.scrollLeft=-1,n=e.scrollLeft<0,e.scrollLeft=t,n}(),i.negativeScrollAdjustment=i.isNegativeScroll?e.scrollWidth-e.clientWidth:0,i.event=new d,i.ownerDocument=e.ownerDocument||document,i.scrollbarXRail=u.appendTo(u.e("div","ps__scrollbar-x-rail"),e),i.scrollbarX=u.appendTo(u.e("div","ps__scrollbar-x"),i.scrollbarXRail),i.scrollbarX.setAttribute("tabindex",0),i.event.bind(i.scrollbarX,"focus",t),i.event.bind(i.scrollbarX,"blur",n),i.scrollbarXActive=null,i.scrollbarXWidth=null,i.scrollbarXLeft=null,i.scrollbarXBottom=a.toInt(u.css(i.scrollbarXRail,"bottom")),i.isScrollbarXUsingBottom=i.scrollbarXBottom===i.scrollbarXBottom,i.scrollbarXTop=i.isScrollbarXUsingBottom?null:a.toInt(u.css(i.scrollbarXRail,"top")),i.railBorderXWidth=a.toInt(u.css(i.scrollbarXRail,"borderLeftWidth"))+a.toInt(u.css(i.scrollbarXRail,"borderRightWidth")),u.css(i.scrollbarXRail,"display","block"),i.railXMarginWidth=a.toInt(u.css(i.scrollbarXRail,"marginLeft"))+a.toInt(u.css(i.scrollbarXRail,"marginRight")),u.css(i.scrollbarXRail,"display",""),i.railXWidth=null,i.railXRatio=null,i.scrollbarYRail=u.appendTo(u.e("div","ps__scrollbar-y-rail"),e),i.scrollbarY=u.appendTo(u.e("div","ps__scrollbar-y"),i.scrollbarYRail),i.scrollbarY.setAttribute("tabindex",0),i.event.bind(i.scrollbarY,"focus",t),i.event.bind(i.scrollbarY,"blur",n),i.scrollbarYActive=null,i.scrollbarYHeight=null,i.scrollbarYTop=null,i.scrollbarYRight=a.toInt(u.css(i.scrollbarYRail,"right")),i.isScrollbarYUsingRight=i.scrollbarYRight===i.scrollbarYRight,i.scrollbarYLeft=i.isScrollbarYUsingRight?null:a.toInt(u.css(i.scrollbarYRail,"left")),i.scrollbarYOuterWidth=i.isRtl?a.outerWidth(i.scrollbarY):null,i.railBorderYWidth=a.toInt(u.css(i.scrollbarYRail,"borderTopWidth"))+a.toInt(u.css(i.scrollbarYRail,"borderBottomWidth")),u.css(i.scrollbarYRail,"display","block"),i.railYMarginHeight=a.toInt(u.css(i.scrollbarYRail,"marginTop"))+a.toInt(u.css(i.scrollbarYRail,"marginBottom")),u.css(i.scrollbarYRail,"display",""),i.railYHeight=null,i.railYRatio=null}function r(e){return e.getAttribute("data-ps-id")}function o(e,t){e.setAttribute("data-ps-id",t)}function s(e){e.removeAttribute("data-ps-id")}var a=n(3),l=n(8),c=n(71),u=n(6),d=n(68),h=n(69),f={};t.add=function(e){var t=h();return o(e,t),f[t]=new i(e),f[t]},t.remove=function(e){delete f[r(e)],s(e)},t.get=function(e){return f[r(e)]}},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function n(e,n){return t(e).appendChild(n)}function i(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return s+(t-o);s+=a-o,s+=n-s%n,o=a+1}}function h(e,t){for(var n=0;n=t)return i+Math.min(s,t-r);if(r+=o-i,r+=n-r%n,i=o+1,r>=t)return i}}function p(e){for(;Ys.length<=e;)Ys.push(g(Ys)+" ");return Ys[e]}function g(e){return e[e.length-1]}function m(e,t){for(var n=[],i=0;i"€"&&(e.toUpperCase()!=e.toLowerCase()||Ks.test(e))}function C(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function x(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function A(e){return e.charCodeAt(0)>=768&&Xs.test(e)}function S(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var r=(t+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+i}}function k(e,t,n){var o=this;this.input=n,o.scrollbarFiller=i("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=i("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=i("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=i("div",null,"CodeMirror-cursors"),o.measure=i("div",null,"CodeMirror-measure"),o.lineMeasure=i("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var s=r("div",[o.lineSpace],"CodeMirror-lines");o.mover=i("div",[s],null,"position: relative"),o.sizer=i("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=i("div",null,null,"position: absolute; height: "+js+"px; width: 1px;"),o.gutters=i("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=i("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=i("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),ys&&bs<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),ws||ps&&Ds||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function T(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(t=e.first&&tn?M(n,T(e,n).text.length):z(t,T(e,t.line).text.length)}function z(e,t){var n=e.ch;return null==n||n>t?M(e.line,t):n<0?M(e.line,0):e}function U(e,t){for(var n=[],i=0;i=t:o.to>t);(i||(i=[])).push(new Y(s,o.from,l?null:o.to))}}return i}function Q(e,t,n){var i;if(e)for(var r=0;r=t:o.to>t);if(a||o.from==t&&"bookmark"==s.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(s.inclusiveLeft?o.from<=t:o.from0&&a)for(var C=0;C0)){var u=[l,1],d=N(c.from,a.from),f=N(c.to,a.to);(d<0||!s.inclusiveLeft&&!d)&&u.push({from:c.from,to:a.from}),(f>0||!s.inclusiveRight&&!f)&&u.push({from:a.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function ne(e){var t=e.markedSpans;if(t){for(var n=0;n=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?N(c.to,n)>=0:N(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?N(c.from,i)<=0:N(c.from,i)<0)))return!0}}}function de(e){for(var t;t=le(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ce(e);)e=t.find(1,!0).line;return e}function fe(e){for(var t,n;t=ce(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function pe(e,t){var n=T(e,t),i=de(n);return n==i?t:$(i)}function ge(e,t){if(t>e.lastLine())return t;var n,i=T(e,t);if(!me(e,i))return t;for(;n=ce(i);)i=n.find(1,!0).line;return $(i)+1}function me(e,t){var n=Js&&t.markedSpans;if(n)for(var i=void 0,r=0;rt.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function Ce(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var r=!1,o=0;ot||t==n&&s.to==t)&&(i(Math.max(s.from,t),Math.min(s.to,n),1==s.level?"rtl":"ltr",o),r=!0)}r||i(t,n,"ltr")}function xe(e,t,n){var i;Qs=null;for(var r=0;rt)return r;o.to==t&&(o.from!=o.to&&"before"==n?i=r:Qs=r),o.from==t&&(o.from!=o.to&&"before"!=n?i=r:Qs=r)}return null!=i?i:Qs}function Ae(e,t){var n=e.order;return null==n&&(n=e.order=Zs(e.text,t)),n}function Se(e,t){return e._handlers&&e._handlers[t]||ea}function Ee(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,r=i&&i[t];if(r){var o=h(r,n);o>-1&&(i[t]=r.slice(0,o).concat(r.slice(o+1)))}}}function ke(e,t){var n=Se(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function Fe(e){e.prototype.on=function(e,t){ta(this,e,t)},e.prototype.off=function(e,t){Ee(this,e,t)}}function $e(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Le(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Re(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Be(e){$e(e),Le(e)}function Me(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Fs&&e.ctrlKey&&1==t&&(t=3),t}function Oe(e){if(null==Hs){var t=i("span","​");n(e,i("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Hs=t.offsetWidth<=1&&t.offsetHeight>2&&!(ys&&bs<8))}var r=Hs?i("span","​"):i("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ie(e){if(null!=Ws)return Ws;var i=n(e,document.createTextNode("AخA")),r=Bs(i,0,1).getBoundingClientRect(),o=Bs(i,1,2).getBoundingClientRect();return t(e),!(!r||r.left==r.right)&&(Ws=o.right-r.right<3)}function Pe(e){if(null!=sa)return sa;var t=n(e,i("span","x")),r=t.getBoundingClientRect(),o=Bs(t,0,1).getBoundingClientRect();return sa=Math.abs(r.left-o.left)>1}function He(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),aa[e]=t}function We(e,t){la[e]=t}function je(e){if("string"==typeof e&&la.hasOwnProperty(e))e=la[e];else if(e&&"string"==typeof e.name&&la.hasOwnProperty(e.name)){var t=la[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return je("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return je("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function ze(e,t){t=je(t);var n=aa[t.name];if(!n)return ze(e,"text/plain");var i=n(e,t);if(ca.hasOwnProperty(t.name)){var r=ca[t.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var s in t.modeProps)i[s]=t.modeProps[s];return i}function Ue(e,t){u(t,ca.hasOwnProperty(e)?ca[e]:ca[e]={})}function qe(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Ve(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}function Ke(e,t,n,i){var r=[e.state.modeGen],o={};nt(e,t.text,e.doc.mode,n,function(e,t){return r.push(e,t)},o,i);for(var s=n.state,a=0;ae&&r.splice(l,1,e,r[l+1],i),l+=2,c=Math.min(e,i)}if(t)if(a.opaque)r.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&qe(e.doc.mode,i.state),o=Ke(e,t,i);r&&(i.state=r),t.stateAfter=i.save(!r),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function Ge(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return new ha(i,!0,t);var o=it(e,t,n),s=o>i.first&&T(i,o-1).stateAfter,a=s?ha.fromSaved(i,s,o):new ha(i,Ye(i.mode),o);return i.iter(o,t,function(n){Je(e,n.text,a);var i=a.line;n.stateAfter=i==t-1||i%5==0||i>=r.viewFrom&&it.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function et(e,t,n,i){var r,o=e.doc,s=o.mode;t=j(o,t);var a,l=T(o,t.line),c=Ge(e,t.line,n),u=new ua(l.text,e.options.tabSize,c);for(i&&(a=[]);(i||u.pose.options.maxHighlightLength?(a=!1,s&&Je(e,t,i,d.pos),d.pos=t.length,l=null):l=tt(Ze(n,d,i.state,h),o),h){var f=h[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!a||u!=l){for(;cs;--a){if(a<=o.first)return o.first;var l=T(o,a-1),c=l.stateAfter;if(c&&(!n||a+(c instanceof da?c.lookAhead:0)<=o.modeFrontier))return a;var u=d(l.text,null,e.options.tabSize);(null==r||i>u)&&(r=a-1,i=u)}return r}function rt(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;i--){var r=T(e,i).stateAfter;if(r&&(!(r instanceof da)||i+r.lookAhead1&&!/ /.test(e))return e;for(var n=t,i="",r=0;rc&&d.from<=c));h++);if(d.to>=u)return e(n,i,r,o,s,a,l);e(n,i.slice(0,d.to-c),r,o,null,a,l),o=null,i=i.slice(d.to-c),c=d.to}}}function ft(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function pt(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var s,a,l,c,u,d,h,f=r.length,p=0,g=1,m="",v=0;;){if(v==p){l=c=u=d=a="",h=null,v=1/0;for(var y=[],b=void 0,w=0;wp||x.collapsed&&C.to==p&&C.from==p)?(null!=C.to&&C.to!=p&&v>C.to&&(v=C.to,c=""),x.className&&(l+=" "+x.className),x.css&&(a=(a?a+";":"")+x.css),x.startStyle&&C.from==p&&(u+=" "+x.startStyle),x.endStyle&&C.to==v&&(b||(b=[])).push(x.endStyle,C.to),x.title&&!d&&(d=x.title),x.collapsed&&(!h||se(h.marker,x)<0)&&(h=C)):C.from>p&&v>C.from&&(v=C.from)}if(b)for(var A=0;A=f)break;for(var E=Math.min(f,v);;){if(m){var k=p+m.length;if(!h){var T=k>E?m.slice(0,E-p):m;t.addToken(t,T,s?s+l:l,u,p+T.length==v?c:"",d,a)}if(k>=E){m=m.slice(E-p),p=E;break}p=k,u=""}m=r.slice(o,o=n[g++]),s=at(n[g++],t.cm.options)}}else for(var _=1;_2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function zt(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;in)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function Ut(e,t){t=de(t);var i=$(t),r=e.display.externalMeasured=new gt(e.doc,t,i);r.lineN=i;var o=r.built=lt(e,r);return r.text=o.pre,n(e.display.lineMeasure,o.pre),r}function qt(e,t,n,i){return Kt(e,Yt(e,t),n,i)}function Vt(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(o=l-a,r=o-1,t>=l&&(s="right")),null!=r){if(i=e[c+2],a==l&&n==(i.insertLeft?"left":"right")&&(s=n),"left"==n&&0==r)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],s="left";if("right"==n&&r==l-a)for(;c=0&&(n=e[r]).left==n.right;r--);return n}function Jt(e,t,n,i){var r,o=Xt(t.map,n,i),s=o.node,a=o.start,l=o.end,c=o.collapse;if(3==s.nodeType){for(var u=0;u<4;u++){for(;a&&A(t.line.text.charAt(o.coverStart+a));)--a;for(;o.coverStart+l0&&(c=i="right");var d;r=e.options.lineWrapping&&(d=s.getClientRects()).length>1?d["right"==i?d.length-1:0]:s.getBoundingClientRect()}if(ys&&bs<9&&!a&&(!r||!r.left&&!r.right)){var h=s.parentNode.getClientRects()[0];r=h?{left:h.left,right:h.left+wn(e.display),top:h.top,bottom:h.bottom}:wa}for(var f=r.top-t.rect.top,p=r.bottom-t.rect.top,g=(f+p)/2,m=t.view.measure.heights,v=0;v=i.text.length?(c=i.text.length,u="before"):c<=0&&(c=0,u="after"),!l)return s("before"==u?c-1:c,"before"==u);var d=xe(l,c,u),h=Qs,f=a(c,d,"before"==u);return null!=h&&(f.other=a(c,h,"before"!=u)),f}function un(e,t){var n=0;t=j(e.doc,t),e.options.lineWrapping||(n=wn(e.display)*t.ch);var i=T(e.doc,t.line),r=ye(i)+Nt(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function dn(e,t,n,i,r){var o=M(e,t,n);return o.xRel=r,i&&(o.outside=!0),o}function hn(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return dn(i.first,0,null,!0,-1);var r=L(i,n),o=i.first+i.size-1;if(r>o)return dn(i.first+i.size-1,T(i,o).text.length,null,!0,1);t<0&&(t=0);for(var s=T(i,r);;){var a=mn(e,s,r,t,n),l=ce(s),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=$(s=c.to.line)}}function fn(e,t,n,i){i-=on(t);var r=t.text.length,o=E(function(t){return Kt(e,n,t-1).bottom<=i},r,0);return r=E(function(t){return Kt(e,n,t).top>i},o,r),{begin:o,end:r}}function pn(e,t,n,i){return n||(n=Yt(e,t)),fn(e,t,n,sn(e,t,Kt(e,n,i),"line").top)}function gn(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function mn(e,t,n,i,r){r-=ye(t);var o=Yt(e,t),s=on(t),a=0,l=t.text.length,c=!0,u=Ae(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?yn:vn)(e,t,n,o,u,i,r);c=1!=d.level,a=c?d.from:d.to-1,l=c?d.to:d.from-1}var h,f,p=null,g=null,m=E(function(t){var n=Kt(e,o,t);return n.top+=s,n.bottom+=s,!!gn(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(p=t,g=n),!0)},a,l),v=!1;if(g){var y=i-g.left=w.bottom}return m=S(t.text,m,1),dn(n,m,f,v,i-h)}function vn(e,t,n,i,r,o,s){var a=E(function(a){var l=r[a],c=1!=l.level;return gn(cn(e,M(n,c?l.to:l.from,c?"before":"after"),"line",t,i),o,s,!0)},0,r.length-1),l=r[a];if(a>0){var c=1!=l.level,u=cn(e,M(n,c?l.from:l.to,c?"after":"before"),"line",t,i);gn(u,o,s,!0)&&u.top>s&&(l=r[a-1])}return l}function yn(e,t,n,i,r,o,s){var a=fn(e,t,i,s),l=a.begin,c=a.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h=c||f.to<=l)){var p=1!=f.level,g=Kt(e,i,p?Math.min(c,f.to)-1:Math.max(l,f.from)).right,m=gm)&&(u=f,d=m)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function bn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ga){ga=i("pre");for(var r=0;r<49;++r)ga.appendChild(document.createTextNode("x")),ga.appendChild(i("br"));ga.appendChild(document.createTextNode("x"))}n(e.measure,ga);var o=ga.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function wn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=i("span","xxxxxxxxxx"),r=i("pre",[t]);n(e.measure,r);var o=t.getBoundingClientRect(),s=(o.right-o.left)/10;return s>2&&(e.cachedCharWidth=s),s||10}function Cn(e){for(var t=e.display,n={},i={},r=t.gutters.clientLeft,o=t.gutters.firstChild,s=0;o;o=o.nextSibling,++s)n[e.options.gutters[s]]=o.offsetLeft+o.clientLeft+r,i[e.options.gutters[s]]=o.clientWidth;return{fixedPos:xn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function xn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function An(e){var t=bn(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/wn(e.display)-3);return function(r){if(me(e.doc,r))return 0;var o=0;if(r.widgets)for(var s=0;s=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i=e.display.viewTo||a.to().line0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Rn(e){e.state.focused||(e.display.input.focus(),Mn(e))}function Bn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Nn(e))},100)}function Mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ke(e,"focus",e,t),e.state.focused=!0,a(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),ws&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Ln(e))}function Nn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ke(e,"blur",e,t),e.state.focused=!1,Os(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function On(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;i.005||l<-.005)&&(F(r.line,o),In(r.line),r.rest))for(var c=0;c=s&&(o=L(t,ye(T(t,l))-e.wrapper.clientHeight),s=l)}return{from:o,to:Math.max(s,o+1)}}function Hn(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=xn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",s=0;s(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ks){var s=i("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Nt(e.display))+"px;\n height: "+(t.bottom-t.top+Pt(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(s),s.scrollIntoView(o),e.display.lineSpace.removeChild(s)}}}function zn(e,t,n,i){null==i&&(i=0);var r;e.options.lineWrapping||t!=n||(t=t.ch?M(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t,n="before"==t.sticky?M(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var s=!1,a=cn(e,t),l=n&&n!=t?cn(e,n):a;r={left:Math.min(a.left,l.left),top:Math.min(a.top,l.top)-i,right:Math.max(a.left,l.left),bottom:Math.max(a.bottom,l.bottom)+i};var c=qn(e,r),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(Qn(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(s=!0)),null!=c.scrollLeft&&(ei(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(s=!0)),!s)break}return r}function Un(e,t){var n=qn(e,t);null!=n.scrollTop&&Qn(e,n.scrollTop),null!=n.scrollLeft&&ei(e,n.scrollLeft)}function qn(e,t){var n=e.display,i=bn(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Wt(e),s={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Ot(n),l=t.topa-i;if(t.topr+o){var u=Math.min(t.top,(c?a:t.bottom)-o);u!=r&&(s.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,h=Ht(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>h;return f&&(t.right=t.left+h),t.left<10?s.scrollLeft=0:t.lefth+d-3&&(s.scrollLeft=t.right+(f?0:10)-h),s}function Vn(e,t){null!=t&&(Gn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Yn(e){Gn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Kn(e,t,n){null==t&&null==n||Gn(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Xn(e,t){Gn(e),e.curOp.scrollToPos=t}function Gn(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;Jn(e,un(e,t.from),un(e,t.to),t.margin)}}function Jn(e,t,n,i){var r=qn(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});Kn(e,r.scrollLeft,r.scrollTop)}function Qn(e,t){Math.abs(e.doc.scrollTop-t)<2||(ps||Fi(e,{top:t}),Zn(e,t,!0),ps&&Fi(e),Ai(e,100))}function Zn(e,t,n){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function ei(e,t,n,i){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i||(e.doc.scrollLeft=t,Hn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function ti(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Ot(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Pt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}function ni(e,t){t||(t=ti(e));var n=e.display.barWidth,i=e.display.barHeight;ii(e,t);for(var r=0;r<4&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&On(e),ii(e,ti(e)),n=e.display.barWidth,i=e.display.barHeight}function ii(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}function ri(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&Os(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Aa[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),ta(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,n){"horizontal"==n?ei(e,t):Qn(e,t)},e),e.display.scrollbars.addClass&&a(e.display.wrapper,e.display.scrollbars.addClass)}function oi(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Sa},vt(e.curOp)}function si(e){bt(e.curOp,function(e){for(var t=0;t=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Ea(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ci(e){e.updatedDisplay=e.mustUpdate&&_i(e.cm,e.update)}function ui(e){var t=e.cm,n=t.display;e.updatedDisplay&&On(t),e.barMeasure=ti(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=qt(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Pt(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Ht(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function di(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeftt)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Js&&pe(e.doc,t)r.viewFrom?bi(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)bi(e);else if(t<=r.viewFrom){var o=wi(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):bi(e)}else if(n>=r.viewTo){var s=wi(e,t,t,-1);s?(r.view=r.view.slice(0,s.index),r.viewTo=s.lineN):bi(e)}else{var a=wi(e,t,t,-1),l=wi(e,n,n+i,1);a&&l?(r.view=r.view.slice(0,a.index).concat(mt(e,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):bi(e)}var c=r.externalMeasured;c&&(n=r.lineN&&t=i.viewTo)){var o=i.view[kn(e,t)];if(null!=o.node){var s=o.changes||(o.changes=[]);-1==h(s,n)&&s.push(n)}}}function bi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function wi(e,t,n,i){var r,o=kn(e,t),s=e.display.view;if(!Js||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var a=e.display.viewFrom,l=0;l0){if(o==s.length-1)return null;r=a+s[o].size-t,o++}else r=a-t;t+=r,n+=r}for(;pe(e.doc,n)!=n;){if(o==(i<0?0:s.length-1))return null;n+=i*s[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function Ci(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=mt(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=mt(e,t,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,kn(e,n)))),i.viewTo=n}function xi(e){for(var t=e.display.view,n=0,i=0;i=e.display.viewTo)){var n=+new Date+e.options.workTime,i=Ge(e,t.highlightFrontier),r=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(i.line>=e.display.viewFrom){var s=o.styles,a=o.text.length>e.options.maxHighlightLength?qe(t.mode,i.state):null,l=Ke(e,o,i,!0);a&&(i.state=a),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!s||s.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&hn)return Ai(e,e.options.workDelay),!0}),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),r.length&&fi(e,function(){for(var t=0;t=i.viewFrom&&n.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==xi(e))return!1;Wn(e)&&(bi(e),n.dims=Cn(e));var o=r.first+r.size,s=Math.max(n.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,n.visible.to+e.options.viewportMargin);i.viewFroma&&i.viewTo-a<20&&(a=Math.min(o,i.viewTo)),Js&&(s=pe(e.doc,s),a=ge(e.doc,a));var l=s!=i.viewFrom||a!=i.viewTo||i.lastWrapHeight!=n.wrapperHeight||i.lastWrapWidth!=n.wrapperWidth;Ci(e,s,a),i.viewOffset=ye(T(e.doc,i.viewFrom)),e.display.mover.style.top=i.viewOffset+"px";var c=xi(e);if(!l&&0==c&&!n.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var u=ki(e);return c>4&&(i.lineDiv.style.display="none"),$i(e,i.updateLineNumbers,n.dims),c>4&&(i.lineDiv.style.display=""),i.renderedView=i.view,Ti(u),t(i.cursorDiv),t(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,l&&(i.lastWrapHeight=n.wrapperHeight,i.lastWrapWidth=n.wrapperWidth,Ai(e,400)),i.updateLineNumbers=null,!0}function Di(e,t){for(var n=t.viewport,i=!0;(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Ht(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Ot(e.display)-Wt(e),n.top)}),t.visible=Pn(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&_i(e,t);i=!1){On(e);var r=ti(e);Tn(e),ni(e,r),Ri(e,r),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Fi(e,t){var n=new Ea(e,t);if(_i(e,n)){On(e),Di(e,n);var i=ti(e);Tn(e),ni(e,i),Ri(e,i),n.finish()}}function $i(e,n,i){function r(t){var n=t.nextSibling;return ws&&Fs&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var o=e.display,s=e.options.lineNumbers,a=o.lineDiv,l=a.firstChild,c=o.view,u=o.viewFrom,d=0;d-1&&(p=!1),xt(e,f,u,i)),p&&(t(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(B(e.options,u)))),l=f.node.nextSibling}else{var g=Ft(e,f,u,i);a.insertBefore(g,l)}u+=f.size}for(;l;)l=r(l)}function Li(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Ri(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Pt(e)+"px"}function Bi(e){var n=e.display.gutters,r=e.options.gutters;t(n);for(var o=0;o-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function Ni(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Oi(e){var t=Ni(e);return t.x*=Ta,t.y*=Ta,t}function Ii(e,t){var n=Ni(t),i=n.x,r=n.y,o=e.display,s=o.scroller,a=s.scrollWidth>s.clientWidth,l=s.scrollHeight>s.clientHeight;if(i&&a||r&&l){if(r&&Fs&&ws)e:for(var c=t.target,u=o.view;c!=s;c=c.parentNode)for(var d=0;d=0){var s=H(o.from(),r.from()),a=P(o.to(),r.to()),l=o.empty()?r.from()==r.head:o.from()==o.head;i<=t&&--t,e.splice(--i,2,new Da(l?a:s,l?s:a))}}return new _a(e,t)}function Hi(e,t){return new _a([new Da(e,t||e)],0)}function Wi(e){return e.text?M(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function ji(e,t){if(N(e,t.from)<0)return e;if(N(e,t.to)<=0)return Wi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=Wi(t).ch-t.to.ch),M(n,i)}function zi(e,t){for(var n=[],i=0;i1&&e.remove(a.line+1,p-1),e.insert(a.line+1,y)}wt(e,"change",e,t)}function Gi(e,t,n){function i(e,r,o){if(e.linked)for(var s=0;s1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function rr(e,t,n,i){var r=e.history;r.undone.length=0;var o,s,a=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&r.lastModTime>a-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=ir(r,r.lastOp==i)))s=g(o.changes),0==N(t.from,t.to)&&0==N(t.from,s.to)?s.to=Wi(t):o.changes.push(tr(e,t));else{var l=g(r.done);for(l&&l.ranges||ar(e.sel,r.done),o={changes:[tr(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,s||ke(e,"historyAdded")}function or(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function sr(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||or(e,o,g(r.done),t))?r.done[r.done.length-1]=t:ar(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&nr(r.undone)}function ar(e,t){var n=g(t);n&&n.ranges&&n.equals(e)||t.push(e)}function lr(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function cr(e){if(!e)return null;for(var t,n=0;n-1&&(g(a)[d]=c[d],delete c[d])}}}return i}function fr(e,t,n,i){if(i){var r=e.anchor;if(n){var o=N(t,r)<0;o!=N(n,r)<0?(r=t,t=n):o!=N(t,n)<0&&(t=n)}return new Da(r,t)}return new Da(n||t,t)}function pr(e,t,n,i,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),wr(e,new _a([fr(e.sel.primary(),t,n,r)],0),i)}function gr(e,t,n){for(var i=[],r=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:a.to>t.ch))){if(r&&(ke(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--s;continue}break}if(!l.atomic)continue;if(n){var c=l.find(i<0?1:-1),u=void 0;if((i<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Tr(e,c,-i,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=N(c,n))&&(i<0?u<0:u>0))return Er(e,c,t,i,r)}var d=l.find(i<0?-1:1);return(i<0?l.inclusiveLeft:l.inclusiveRight)&&(d=Tr(e,d,i,d.line==t.line?o:null)),d?Er(e,d,t,i,r):null}}return t}function kr(e,t,n,i,r){var o=i||1,s=Er(e,t,n,o,r)||!r&&Er(e,t,n,o,!0)||Er(e,t,n,-o,r)||!r&&Er(e,t,n,-o,!0);return s||(e.cantEdit=!0,M(e.first,0))}function Tr(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?j(e,M(t.line-1)):null:n>0&&t.ch==(i||T(e,t.line)).text.length?t.line=0;--r)$r(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text,origin:t.origin});else $r(e,t)}}function $r(e,t){if(1!=t.text.length||""!=t.text[0]||0!=N(t.from,t.to)){var n=zi(e,t);rr(e,t,n,e.cm?e.cm.curOp.id:NaN),Br(e,t,n,Z(e,t));var i=[];Gi(e,function(e,n){n||-1!=h(i,e.history)||(Pr(e.history,t),i.push(e.history)),Br(e,t,null,Z(e,t))})}}function Lr(e,t,n){if(!e.cm||!e.cm.state.suppressEdits||n){for(var i,r=e.history,o=e.sel,s="undo"==t?r.done:r.undone,a="undo"==t?r.undone:r.done,l=0;l=0;--d){var f=function(n){var r=i.changes[n];if(r.origin=t,u&&!Dr(e,r,!1))return s.length=0,{};c.push(tr(e,r));var o=n?zi(e,r):g(s);Br(e,r,o,dr(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Wi(r)});var a=[];Gi(e,function(e,t){t||-1!=h(a,e.history)||(Pr(e.history,r),a.push(e.history)),Br(e,r,null,dr(e,r))})}(d);if(f)return f.v}}}}function Rr(e,t){if(0!=t&&(e.first+=t,e.sel=new _a(m(e.sel.ranges,function(e){return new Da(M(e.anchor.line+t,e.anchor.ch),M(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){vi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;ie.lastLine())){if(t.from.lineo&&(t={from:t.from,to:M(o,T(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=_(e,t.from,t.to),n||(n=zi(e,t)),e.cm?Mr(e.cm,t,i):Xi(e,t,i),Cr(e,n,Us)}}function Mr(e,t,n){var i=e.doc,r=e.display,o=t.from,s=t.to,a=!1,l=o.line;e.options.lineWrapping||(l=$(de(T(i,o.line))),i.iter(l,s.line+1,function(e){if(e==r.maxLine)return a=!0,!0})),i.sel.contains(t.from,t.to)>-1&&_e(e),Xi(i,t,n,An(e)),e.options.lineWrapping||(i.iter(l,o.line+t.text.length,function(e){var t=be(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,a=!1)}),a&&(e.curOp.updateMaxLine=!0)),rt(i,o.line),Ai(e,400);var c=t.text.length-(s.line-o.line)-1;t.full?vi(e):o.line!=s.line||1!=t.text.length||Ki(e.doc,t)?vi(e,o.line,s.line+1,c):yi(e,o.line,"text");var u=De(e,"changes"),d=De(e,"change");if(d||u){var h={from:o,to:s,text:t.text,removed:t.removed,origin:t.origin};d&&wt(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Nr(e,t,n,i,r){if(i||(i=n),N(i,n)<0){var o;o=[i,n],n=o[0],i=o[1]}"string"==typeof t&&(t=e.splitLines(t)),Fr(e,{from:n,to:i,text:t,origin:r})}function Or(e,t,n,i){n0||0==a&&!1!==s.clearWhenEmpty)return s;if(s.replacedWith&&(s.collapsed=!0,s.widgetNode=r("span",[s.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||s.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(s.widgetNode.insertLeft=!0)),s.collapsed){if(ue(e,t.line,t,n,s)||t.line!=n.line&&ue(e,n.line,t,n,s))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}s.addToHistory&&rr(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,c=t.line,d=e.cm;if(e.iter(c,n.line+1,function(e){d&&s.collapsed&&!d.options.lineWrapping&&de(e)==d.display.maxLine&&(l=!0),s.collapsed&&c!=t.line&&F(e,0),G(e,new Y(s,c==t.line?t.ch:null,c==n.line?n.ch:null)),++c}),s.collapsed&&e.iter(t.line,n.line+1,function(t){me(e,t)&&F(t,0)}),s.clearOnEnter&&ta(s,"beforeCursorEnter",function(){return s.clear()}),s.readOnly&&(q(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),s.collapsed&&(s.id=++$a,s.atomic=!0),d){if(l&&(d.curOp.updateMaxLine=!0),s.collapsed)vi(d,t.line,n.line+1);else if(s.className||s.title||s.startStyle||s.endStyle||s.css)for(var h=t.line;h<=n.line;h++)yi(d,h,"text");s.atomic&&Ar(d.doc),wt(d,"markerAdded",d,s)}return s}function Vr(e,t,n,i,r){i=u(i),i.shared=!1;var o=[qr(e,t,n,i,r)],s=o[0],a=i.widgetNode;return Gi(e,function(e){a&&(i.widgetNode=a.cloneNode(!0)),o.push(qr(e,j(e,t),j(e,n),i,r));for(var l=0;l-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var l=e.dataTransfer.getData("Text");if(l){var c;if(t.state.draggingText&&!t.state.draggingText.copy&&(c=t.listSelections()),Cr(t.doc,Hi(n,n)),c)for(var u=0;u=0;t--)Nr(e.doc,"",i[t].from,i[t].to,"+delete");Yn(e)})}function fo(e,t,n){var i=S(e.text,t+n,n);return i<0||i>e.text.length?null:i}function po(e,t,n){var i=fo(e,t.ch,n);return null==i?null:new M(t.line,i,n<0?"after":"before")}function go(e,t,n,i,r){if(e){var o=Ae(n,t.doc.direction);if(o){var s,a=r<0?g(o):o[0],l=r<0==(1==a.level),c=l?"after":"before";if(a.level>0||"rtl"==t.doc.direction){var u=Yt(t,n);s=r<0?n.text.length-1:0;var d=Kt(t,u,s).top;s=E(function(e){return Kt(t,u,e).top==d},r<0==(1==a.level)?a.from:a.to-1,s),"before"==c&&(s=fo(n,s,1))}else s=r<0?a.to:a.from;return new M(i,s,c)}}return new M(i,r<0?n.text.length:0,r<0?"before":"after")}function mo(e,t,n,i){var r=Ae(t,e.doc.direction);if(!r)return po(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=xe(r,n.ch,n.sticky),s=r[o];if("ltr"==e.doc.direction&&s.level%2==0&&(i>0?s.to>n.ch:s.from=s.from&&h>=u.begin)){var f=d?"before":"after";return new M(n.line,h,f)}}var p=function(e,t,i){for(var o=function(e,t){return t?new M(n.line,l(e,1),"before"):new M(n.line,e,"after")};e>=0&&e0==(1!=s.level),c=a?i.begin:l(i.end,-1);if(s.from<=c&&c0?u.end:l(u.begin,-1);return null==m||i>0&&m==t.text.length||!(g=p(i>0?0:r.length-1,i,c(m)))?null:g}function vo(e,t){var n=T(e.doc,t),i=de(n);return i!=n&&(t=$(i)),go(!0,e,i,t,1)}function yo(e,t){var n=T(e.doc,t),i=he(n);return i!=n&&(t=$(i)),go(!0,e,n,t,-1)}function bo(e,t){var n=vo(e,t.line),i=T(e.doc,n.line),r=Ae(i,e.doc.direction);if(!r||0==r[0].level){var o=Math.max(0,i.text.search(/\S/)),s=t.line==n.line&&t.ch<=o&&t.ch;return M(n.line,s?0:o,n.sticky)}return n}function wo(e,t,n){if("string"==typeof t&&!(t=za[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=zs}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function Co(e,t,n){for(var i=0;i-1&&(N((r=a.ranges[r]).from(),t)<0||t.xRel>0)&&(N(r.to(),t)>0||t.xRel<0)?Mo(e,i,t,o):Oo(e,i,t,o)}function Mo(e,t,n,i){var r=e.display,o=!1,s=pi(e,function(t){ws&&(r.scroller.draggable=!1),e.state.draggingText=!1,Ee(document,"mouseup",s),Ee(document,"mousemove",a),Ee(r.scroller,"dragstart",l),Ee(r.scroller,"drop",s),o||($e(t),i.addNew||pr(e.doc,n,null,null,i.extend),ws||ys&&9==bs?setTimeout(function(){document.body.focus(),r.input.focus()},20):r.input.focus())}),a=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},l=function(){return o=!0};ws&&(r.scroller.draggable=!0),e.state.draggingText=s,s.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),ta(document,"mouseup",s),ta(document,"mousemove",a),ta(r.scroller,"dragstart",l),ta(r.scroller,"drop",s),Bn(e),setTimeout(function(){return r.input.focus()},20)}function No(e,t,n){if("char"==n)return new Da(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Da(M(t.line,0),j(e.doc,M(t.line+1,0)));var i=n(e,t);return new Da(i.from,i.to)}function Oo(e,t,n,i){function r(t){if(0!=N(v,t))if(v=t,"rectangle"==i.unit){for(var r=[],o=e.options.tabSize,s=d(T(c,n.line).text,n.ch,o),a=d(T(c,t.line).text,t.ch,o),l=Math.min(s,a),g=Math.max(s,a),m=Math.min(n.line,t.line),y=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=y;m++){var b=T(c,m).text,w=f(b,l,o);l==g?r.push(new Da(M(m,w),M(m,w))):b.length>w&&r.push(new Da(M(m,w),M(m,f(b,g,o))))}r.length||r.push(new Da(n,n)),wr(c,Pi(p.ranges.slice(0,h).concat(r),h),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var C,x=u,A=No(e,t,i.unit),S=x.anchor;N(A.anchor,S)>0?(C=A.head,S=H(x.from(),A.anchor)):(C=A.anchor,S=P(x.to(),A.head));var E=p.ranges.slice(0);E[h]=Io(e,new Da(j(c,S),C)),wr(c,Pi(E,h),qs)}}function o(t){var n=++b,a=En(e,t,!0,"rectangle"==i.unit);if(a)if(0!=N(a,v)){e.curOp.focus=s(),r(a);var u=Pn(l,c);(a.line>=u.to||a.liney.bottom?20:0;d&&setTimeout(pi(e,function(){b==n&&(l.scroller.scrollTop+=d,o(t))}),50)}}function a(t){e.state.selectingText=!1,b=1/0,$e(t),l.input.focus(),Ee(document,"mousemove",w),Ee(document,"mouseup",C),c.history.lastSelOrigin=null}var l=e.display,c=e.doc;$e(t);var u,h,p=c.sel,g=p.ranges;if(i.addNew&&!i.extend?(h=c.sel.contains(n),u=h>-1?g[h]:new Da(n,n)):(u=c.sel.primary(),h=c.sel.primIndex),"rectangle"==i.unit)i.addNew||(u=new Da(n,n)),n=En(e,t,!0,!0),h=-1;else{var m=No(e,n,i.unit);u=i.extend?fr(u,m.anchor,m.head,i.extend):m}i.addNew?-1==h?(h=g.length,wr(c,Pi(g.concat([u]),h),{scroll:!1,origin:"*mouse"})):g.length>1&&g[h].empty()&&"char"==i.unit&&!i.extend?(wr(c,Pi(g.slice(0,h).concat(g.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=c.sel):mr(c,h,u,qs):(h=0,wr(c,new _a([u],0),qs),p=c.sel);var v=n,y=l.wrapper.getBoundingClientRect(),b=0,w=pi(e,function(e){Ne(e)?o(e):a(e)}),C=pi(e,a);e.state.selectingText=C,ta(document,"mousemove",w),ta(document,"mouseup",C)}function Io(e,t){var n=t.anchor,i=t.head,r=T(e.doc,n.line);if(0==N(n,i)&&n.sticky==i.sticky)return t;var o=Ae(r);if(!o)return t;var s=xe(o,n.ch,n.sticky),a=o[s];if(a.from!=n.ch&&a.to!=n.ch)return t;var l=s+(a.from==n.ch==(1!=a.level)?0:1);if(0==l||l==o.length)return t;var c;if(i.line!=n.line)c=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=xe(o,i.ch,i.sticky),d=u-s||(i.ch-n.ch)*(1==a.level?-1:1);c=u==l-1||u==l?d<0:d>0}var h=o[l+(c?-1:0)],f=c==(1==h.level),p=f?h.from:h.to,g=f?"after":"before";return n.ch==p&&n.sticky==g?t:new Da(new M(n.line,p,g),i)}function Po(e,t,n,i){var r,o;if(t.touches)r=t.touches[0].clientX,o=t.touches[0].clientY;else try{r=t.clientX,o=t.clientY}catch(t){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&$e(t);var s=e.display,a=s.lineDiv.getBoundingClientRect();if(o>a.bottom||!De(e,n))return Re(t);o-=a.top-s.viewOffset;for(var l=0;l=r){return ke(e,n,e,L(e.doc,o),e.options.gutters[l],t),Re(t)}}}function Ho(e,t){return Po(e,t,"gutterClick",!0)}function Wo(e,t){Mt(e.display,t)||jo(e,t)||Te(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function jo(e,t){return!!De(e,"gutterContextMenu")&&Po(e,t,"gutterContextMenu",!1)}function zo(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),tn(e)}function Uo(e){Bi(e),vi(e),Hn(e)}function qo(e,t,n){if(!t!=!(n&&n!=Xa)){var i=e.display.dragFunctions,r=t?ta:Ee;r(e.display.scroller,"dragstart",i.start),r(e.display.scroller,"dragenter",i.enter),r(e.display.scroller,"dragover",i.over),r(e.display.scroller,"dragleave",i.leave),r(e.display.scroller,"drop",i.drop)}}function Vo(e){e.options.lineWrapping?(a(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(Os(e.display.wrapper,"CodeMirror-wrap"),we(e)),Sn(e),vi(e),tn(e),setTimeout(function(){return ni(e)},100)}function Yo(e,t){var n=this;if(!(this instanceof Yo))return new Yo(e,t);this.options=t=t?u(t):{},u(Ga,t,!1),Mi(t);var i=t.value;"string"==typeof i&&(i=new Ma(i,t.mode,null,t.lineSeparator,t.direction)),this.doc=i;var r=new Yo.inputStyles[t.inputStyle](this),o=this.display=new k(e,i,r);o.wrapper.CodeMirror=this,Bi(this),zo(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),ri(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new Ps,keySeq:null,specialChars:null},t.autofocus&&!Ds&&o.input.focus(),ys&&bs<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ko(this),to(),oi(this),this.curOp.forceUpdate=!0,Ji(this,i),t.autofocus&&!Ds||this.hasFocus()?setTimeout(c(Mn,this),20):Nn(this);for(var s in Ja)Ja.hasOwnProperty(s)&&Ja[s](n,t[s],Xa);Wn(this),t.finishInit&&t.finishInit(this);for(var a=0;a400}var r=e.display;ta(r.scroller,"mousedown",pi(e,$o)),ys&&bs<11?ta(r.scroller,"dblclick",pi(e,function(t){if(!Te(e,t)){var n=En(e,t);if(n&&!Ho(e,t)&&!Mt(e.display,t)){$e(t);var i=e.findWordAt(n);pr(e.doc,i.anchor,i.head)}}})):ta(r.scroller,"dblclick",function(t){return Te(e,t)||$e(t)}),Ns||ta(r.scroller,"contextmenu",function(t){return Wo(e,t)});var o,s={end:0};ta(r.scroller,"touchstart",function(t){if(!Te(e,t)&&!n(t)&&!Ho(e,t)){r.input.ensurePolled(),clearTimeout(o);var i=+new Date;r.activeTouch={start:i,moved:!1,prev:i-s.end<=300?s:null},1==t.touches.length&&(r.activeTouch.left=t.touches[0].pageX,r.activeTouch.top=t.touches[0].pageY)}}),ta(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),ta(r.scroller,"touchend",function(n){var o=r.activeTouch;if(o&&!Mt(r,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var s,a=e.coordsChar(r.activeTouch,"page");s=!o.prev||i(o,o.prev)?new Da(a,a):!o.prev.prev||i(o,o.prev.prev)?e.findWordAt(a):new Da(M(a.line,0),j(e.doc,M(a.line+1,0))),e.setSelection(s.anchor,s.head),e.focus(),$e(n)}t()}),ta(r.scroller,"touchcancel",t),ta(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Qn(e,r.scroller.scrollTop),ei(e,r.scroller.scrollLeft,!0),ke(e,"scroll",e))}),ta(r.scroller,"mousewheel",function(t){return Ii(e,t)}),ta(r.scroller,"DOMMouseScroll",function(t){return Ii(e,t)}),ta(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(t){Te(e,t)||Be(t)},over:function(t){Te(e,t)||(Qr(e,t),Be(t))},start:function(t){return Jr(e,t)},drop:pi(e,Gr),leave:function(t){Te(e,t)||Zr(e)}};var a=r.input.getField();ta(a,"keyup",function(t){return _o.call(e,t)}),ta(a,"keydown",pi(e,ko)),ta(a,"keypress",pi(e,Do)),ta(a,"focus",function(t){return Mn(e,t)}),ta(a,"blur",function(t){return Nn(e,t)})}function Xo(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=Ge(e,t).state:n="prev");var s=e.options.tabSize,a=T(o,t),l=d(a.text,null,s);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(i||/\S/.test(a.text)){if("smart"==n&&((c=o.mode.indent(r,a.text.slice(u.length),a.text))==zs||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?d(T(o,t-1).text,null,s):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",f=0;if(e.options.indentWithTabs)for(var g=Math.floor(c/s);g;--g)f+=s,h+="\t";if(f1)if(Za&&Za.text.join("\n")==t){if(i.ranges.length%Za.text.length==0){l=[];for(var c=0;c=0;d--){var h=i.ranges[d],f=h.from(),p=h.to();h.empty()&&(n&&n>0?f=M(f.line,f.ch-n):e.state.overwrite&&!s?p=M(p.line,Math.min(T(o,p.line).text.length,p.ch+g(a).length)):Za&&Za.lineWise&&Za.text.join("\n")==t&&(f=p=M(f.line,0))),u=e.curOp.updateInput;var v={from:f,to:p,text:l?l[d%l.length]:a,origin:r||(s?"paste":e.state.cutIncoming?"cut":"+input")};Fr(e.doc,v),wt(e,"inputRead",e,v)}t&&!s&&Zo(e,t),Yn(e),e.curOp.updateInput=u,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Qo(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||fi(t,function(){return Jo(t,n,0,null,"paste")}),!0}function Zo(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),s=!1;if(o.electricChars){for(var a=0;a-1){s=Xo(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(T(e.doc,r.head.line).text.slice(0,r.head.ch))&&(s=Xo(e,r.head.line,"smart"));s&&wt(e,"electricInput",e,r.head.line)}}}function es(e){for(var t=[],n=[],i=0;i=e.first+e.size)&&(t=new M(i,t.ch,t.sticky),c=T(e,i))}function s(i){var s;if(null==(s=r?mo(e.cm,c,t,n):po(c,t,n))){if(i||!o())return!1;t=go(r,e.cm,c,t.line,n)}else t=s;return!0}var a=t,l=n,c=T(e,t.line);if("char"==i)s();else if("column"==i)s(!0);else if("word"==i||"group"==i)for(var u=null,d="group"==i,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||s(!f);f=!1){var p=c.text.charAt(t.ch)||"\n",g=C(p,h)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||f||g||(g="s"),u&&u!=g){n<0&&(n=1,s(),t.sticky="after");break}if(g&&(u=g),n>0&&!s(!f))break}var m=kr(e,t,a,l,!0);return O(a,m)&&(m.hitSide=!0),m}function rs(e,t,n,i){var r,o=e.doc,s=t.left;if("page"==i){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*bn(e.display),3);r=(n>0?t.bottom:t.top)+n*l}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(var c;c=hn(e,s,r),c.outside;){if(n<0?r<=0:r>=o.height){c.hitSide=!0;break}r+=5*n}return c}function os(e,t){var n=Vt(e,t.line);if(!n||n.hidden)return null;var i=T(e.doc,t.line),r=zt(n,i,t.line),o=Ae(i,e.doc.direction),s="left";if(o){s=xe(o,t.ch)%2?"right":"left"}var a=Xt(r.map,t.ch,s);return a.offset="right"==a.collapse?a.end:a.start,a}function ss(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function as(e,t){return t&&(e.bad=!0),e}function ls(e,t,n,i,r){function o(e){return function(t){return t.id==e}}function s(){u&&(c+=d,u=!1)}function a(e){e&&(s(),c+=e)}function l(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(null!=n)return void a(n||t.textContent.replace(/\u200b/g,""));var c,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(M(i,0),M(r+1,0),o(+h));return void(f.length&&(c=f[0].find(0))&&a(_(e.doc,c.from,c.to).join(d)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&s();for(var g=0;g=15&&(As=!1,ws=!0);var Bs,Ms=Fs&&(Cs||As&&(null==Rs||Rs<12.11)),Ns=ps||ys&&bs>=9,Os=function(t,n){var i=t.className,r=e(n).exec(i);if(r){var o=i.slice(r.index+r[0].length);t.className=i.slice(0,r.index)+(o?r[1]+o:"")}};Bs=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var Is=function(e){e.select()};Ts?Is=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:ys&&(Is=function(e){try{e.select()}catch(e){}});var Ps=function(){this.id=null};Ps.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var Hs,Ws,js=30,zs={toString:function(){return"CodeMirror.Pass"}},Us={scroll:!1},qs={origin:"*mouse"},Vs={origin:"+move"},Ys=[""],Ks=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Xs=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Gs=!1,Js=!1,Qs=null,Zs=function(){function e(e){return e<=247?n.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?i.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,n){this.level=e,this.from=t,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",i="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,s=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;return function(n,i){var c="ltr"==i?"L":"R";if(0==n.length||"ltr"==i&&!r.test(n))return!1;for(var u=n.length,d=[],h=0;h=this.string.length},ua.prototype.sol=function(){return this.pos==this.lineStart},ua.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ua.prototype.next=function(){if(this.post},ua.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},ua.prototype.skipToEnd=function(){this.pos=this.string.length},ua.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},ua.prototype.backUp=function(e){this.pos-=e},ua.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},ua.prototype.current=function(){return this.string.slice(this.start,this.pos)},ua.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},ua.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},ua.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var da=function(e,t){this.state=e,this.lookAhead=t},ha=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};ha.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ha.prototype.baseToken=function(e){var t=this;if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)t.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ha.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ha.fromSaved=function(e,t,n){return t instanceof da?new ha(e,qe(e.mode,t.state),n,t.lookAhead):new ha(e,qe(e.mode,t),n)},ha.prototype.save=function(e){var t=!1!==e?qe(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new da(t,this.maxLookAhead):t};var fa=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n},pa=function(e,t,n){this.text=e,ie(this,t),this.height=n?n(this):1};pa.prototype.lineNo=function(){return $(this)},Fe(pa);var ga,ma={},va={},ya=null,ba=null,wa={left:0,right:0,top:0,bottom:0},Ca=function(e,t,n){this.cm=n;var r=this.vert=i("div",[i("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=i("div",[i("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(r),e(o),ta(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ta(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ys&&bs<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ca.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},Ca.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ca.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ca.prototype.zeroWidthHack=function(){var e=Fs&&!Es?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ps,this.disableVert=new Ps},Ca.prototype.enableZeroWidthBar=function(e,t,n){function i(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,i)}e.style.pointerEvents="auto",t.set(1e3,i)},Ca.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var xa=function(){};xa.prototype.update=function(){return{bottom:0,right:0}},xa.prototype.setScrollLeft=function(){},xa.prototype.setScrollTop=function(){},xa.prototype.clear=function(){};var Aa={native:Ca,null:xa},Sa=0,Ea=function(e,t,n){var i=e.display;this.viewport=t,this.visible=Pn(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Ht(e),this.force=n,this.dims=Cn(e),this.events=[]};Ea.prototype.signal=function(e,t){De(e,t)&&this.events.push(arguments)},Ea.prototype.finish=function(){for(var e=this,t=0;t=0&&N(e,r.to())<=0)return i}return-1};var Da=function(e,t){this.anchor=e,this.head=t};Da.prototype.from=function(){return H(this.anchor,this.head)},Da.prototype.to=function(){return P(this.anchor,this.head)},Da.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Wr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=this,i=e,r=e+t;i1||!(this.children[0]instanceof Wr))){var l=[];this.collapse(l),this.children=[new Wr(l)],this.children[0].parent=this}},collapse:function(e){for(var t=this,n=0;n50){for(var a=o.lines.length%25+25,l=a;l10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=this,r=0;rt.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=r&&t&&this.collapsed&&vi(t,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Ar(t.doc)),t&&wt(t,"markerCleared",t,this,r,o),n&&si(t),this.parent&&this.parent.clear()}},La.prototype.find=function(e,t){var n=this;null==e&&"bookmark"==this.type&&(e=1);for(var i,r,o=0;o=0;c--)Fr(i,r[c]);l?br(this,l):this.cm&&Yn(this.cm)}),undo:mi(function(){Lr(this,"undo")}),redo:mi(function(){Lr(this,"redo")}),undoSelection:mi(function(){Lr(this,"undo",!0)}),redoSelection:mi(function(){Lr(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=j(this,e),t=j(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,function(o){var s=o.markedSpans;if(s)for(var a=0;a=l.to||null==l.from&&r!=e.line||null!=l.from&&r==t.line&&l.from>=t.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r}),i},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var i=0;ie)return t=e,!0;e-=o,++n}),j(this,M(n,t))},indexFromPos:function(e){e=j(this,e);var t=e.ch;if(e.linet&&(t=e.from),null!=e.to&&e.to0)r=new M(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),M(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var s=T(e.doc,r.line-1).text;s&&(r=new M(r.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+s.charAt(s.length-1),M(r.line-1,s.length-1),r,"+transpose"))}n.push(new Da(r,r))}e.setSelections(n)})},newlineAndIndent:function(e){return fi(e,function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;ie&&0==N(t,this.pos)&&n==this.button};var Ya,Ka,Xa={toString:function(){return"CodeMirror.Init"}},Ga={},Ja={};Yo.defaults=Ga,Yo.optionHandlers=Ja;var Qa=[];Yo.defineInitHook=function(e){return Qa.push(e)};var Za=null,el=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ps,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};el.prototype.init=function(e){function t(e){if(!Te(r,e)){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=es(r);Go({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation(function(){r.setSelections(t.ranges,0,Us),r.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var n=Za.text.join("\n");if(e.clipboardData.setData("Text",n),e.clipboardData.getData("Text")==n)return void e.preventDefault()}var s=ns(),a=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),a.value=Za.text.join("\n");var l=document.activeElement;Is(a),setTimeout(function(){r.display.lineSpace.removeChild(s),l.focus(),l==o&&i.showPrimarySelection()},50)}}var n=this,i=this,r=i.cm,o=i.div=e.lineDiv;ts(o,r.options.spellcheck),ta(o,"paste",function(e){Te(r,e)||Qo(e,r)||bs<=11&&setTimeout(pi(r,function(){return n.updateFromDOM()}),20)}),ta(o,"compositionstart",function(e){n.composing={data:e.data,done:!1}}),ta(o,"compositionupdate",function(e){n.composing||(n.composing={data:e.data,done:!1})}),ta(o,"compositionend",function(e){n.composing&&(e.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),ta(o,"touchstart",function(){return i.forceCompositionEnd()}),ta(o,"input",function(){n.composing||n.readFromDOMSoon()}),ta(o,"copy",t),ta(o,"cut",t)},el.prototype.prepareSelection=function(){var e=_n(this.cm,!1);return e.focus=this.cm.state.focused,e},el.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},el.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),r=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||r.line=t.display.viewFrom&&os(t,i)||{node:a[0].measure.map[2],offset:0},c=r.linee.firstLine()&&(i=M(i.line-1,T(e.doc,i.line-1).length)),r.ch==T(e.doc,r.line).text.length&&r.linet.viewTo-1)return!1;var o,s,a;i.line==t.viewFrom||0==(o=kn(e,i.line))?(s=$(t.view[0].line),a=t.view[0].node):(s=$(t.view[o].line),a=t.view[o-1].node.nextSibling);var l,c,u=kn(e,r.line);if(u==t.view.length-1?(l=t.viewTo-1,c=t.lineDiv.lastChild):(l=$(t.view[u+1].line)-1,c=t.view[u+1].node.previousSibling),!a)return!1;for(var d=e.doc.splitLines(ls(e,a,c,s,l)),h=_(e.doc,M(s,0),M(l,T(e.doc,l).text.length));d.length>1&&h.length>1;)if(g(d)==g(h))d.pop(),h.pop(),l--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),s++}for(var f=0,p=0,m=d[0],v=h[0],y=Math.min(m.length,v.length);fi.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)f--,p++;d[d.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var x=M(s,f),A=M(l,h.length?g(h).length-p:0);return d.length>1||d[0]||N(x,A)?(Nr(e.doc,d,x,A,"+input"),!0):void 0},el.prototype.ensurePolled=function(){this.forceCompositionEnd()},el.prototype.reset=function(){this.forceCompositionEnd()},el.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},el.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},el.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||fi(this.cm,function(){return vi(e.cm)})},el.prototype.setUneditable=function(e){e.contentEditable="false"},el.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||pi(this.cm,Jo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},el.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},el.prototype.onContextMenu=function(){},el.prototype.resetPosition=function(){},el.prototype.needsContentAttribute=!0;var tl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new Ps,this.hasSelection=!1,this.composing=null};tl.prototype.init=function(e){function t(e){if(!Te(r,e)){if(r.somethingSelected())Go({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=es(r);Go({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,Us):(i.prevInput="",s.value=t.text.join("\n"),Is(s))}"cut"==e.type&&(r.state.cutIncoming=!0)}}var n=this,i=this,r=this.cm,o=this.wrapper=ns(),s=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),Ts&&(s.style.width="0px"),ta(s,"input",function(){ys&&bs>=9&&n.hasSelection&&(n.hasSelection=null),i.poll()}),ta(s,"paste",function(e){Te(r,e)||Qo(e,r)||(r.state.pasteIncoming=!0,i.fastPoll())}),ta(s,"cut",t),ta(s,"copy",t),ta(e.scroller,"paste",function(t){Mt(e,t)||Te(r,t)||(r.state.pasteIncoming=!0,i.focus())}),ta(e.lineSpace,"selectstart",function(t){Mt(e,t)||$e(t)}),ta(s,"compositionstart",function(){var e=r.getCursor("from");i.composing&&i.composing.range.clear(),i.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ta(s,"compositionend",function(){i.composing&&(i.poll(),i.composing.range.clear(),i.composing=null)})},tl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=_n(e);if(e.options.moveInputWithCursor){var r=cn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),s=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+s.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+s.left-o.left))}return i},tl.prototype.showSelection=function(e){var t=this.cm,i=t.display;n(i.cursorDiv,e.cursors),n(i.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},tl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&Is(this.textarea),ys&&bs>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",ys&&bs>=9&&(this.hasSelection=null))}},tl.prototype.getField=function(){return this.textarea},tl.prototype.supportsTouch=function(){return!1},tl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!Ds||s()!=this.textarea))try{this.textarea.focus()}catch(e){}},tl.prototype.blur=function(){this.textarea.blur()},tl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},tl.prototype.receivedFocus=function(){this.slowPoll()},tl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},tl.prototype.fastPoll=function(){function e(){n.poll()||t?(n.pollingFast=!1,n.slowPoll()):(t=!0,n.polling.set(60,e))}var t=!1,n=this;n.pollingFast=!0,n.polling.set(20,e)},tl.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||ra(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=n.value;if(r==i&&!t.somethingSelected())return!1;if(ys&&bs>=9&&this.hasSelection===r||Fs&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,a=Math.min(i.length,r.length);s1e3||r.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},tl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},tl.prototype.onKeyPress=function(){ys&&bs>=9&&(this.hasSelection=null),this.fastPoll()},tl.prototype.onContextMenu=function(e){function t(){if(null!=s.selectionStart){var e=r.somethingSelected(),t="​"+(e?s.value:"");s.value="⇚",s.value=t,i.prevInput=e?"":"​",s.selectionStart=1,s.selectionEnd=t.length,o.selForContextMenu=r.doc.sel}}function n(){if(i.contextMenuPending=!1,i.wrapper.style.cssText=u,s.style.cssText=c,ys&&bs<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=l),null!=s.selectionStart){(!ys||ys&&bs<9)&&t();var e=0,n=function(){o.selForContextMenu==r.doc.sel&&0==s.selectionStart&&s.selectionEnd>0&&"​"==i.prevInput?pi(r,_r)(r):e++<10?o.detectingSelectAll=setTimeout(n,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(n,200)}}var i=this,r=i.cm,o=r.display,s=i.textarea,a=En(r,e),l=o.scroller.scrollTop;if(a&&!As){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(a)&&pi(r,wr)(r.doc,Hi(a),Us);var c=s.style.cssText,u=i.wrapper.style.cssText;i.wrapper.style.cssText="position: absolute";var d=i.wrapper.getBoundingClientRect();s.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-d.top-5)+"px; left: "+(e.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(ys?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(ws&&(h=window.scrollY),o.input.focus(),ws&&window.scrollTo(null,h),o.input.reset(),r.somethingSelected()||(s.value=i.prevInput=" "),i.contextMenuPending=!0,o.selForContextMenu=r.doc.sel,clearTimeout(o.detectingSelectAll),ys&&bs>=9&&t(),Ns){Be(e);var f=function(){Ee(window,"mouseup",f),setTimeout(n,20)};ta(window,"mouseup",f)}else setTimeout(n,50)}},tl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},tl.prototype.setUneditable=function(){},tl.prototype.needsContentAttribute=!1,function(e){function t(t,i,r,o){e.defaults[t]=i,r&&(n[t]=o?function(e,t,n){n!=Xa&&r(e,t,n)}:r)}var n=e.optionHandlers;e.defineOption=t,e.Init=Xa,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,Vi(e)},!0),t("indentUnit",2,Vi,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Yi(e),tn(e),vi(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter(function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(M(i,o))}i++});for(var r=n.length-1;r>=0;r--)Nr(e.doc,t,n[r],M(n[r].line,n[r].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Xa&&e.refresh()}),t("specialCharPlaceholder",ct,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",Ds?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!Ls),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){zo(e),Uo(e)},!0),t("keyMap","default",function(e,t,n){var i=uo(t),r=n!=Xa&&uo(n);r&&r.detach&&r.detach(e,i),i.attach&&i.attach(e,r||null)}),t("extraKeys",null),t("configureMouse",null),t("lineWrapping",!1,Vo,!0),t("gutters",[],function(e){Mi(e.options),Uo(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?xn(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return ni(e)},!0),t("scrollbarStyle","native",function(e){ri(e),ni(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Mi(e.options),Uo(e)},!0),t("firstLineNumber",1,Uo,!0),t("lineNumberFormatter",function(e){return e},Uo,!0),t("showCursorWhenSelecting",!1,Tn,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("pasteLinesPerSelection",!0),t("readOnly",!1,function(e,t){"nocursor"==t&&(Nn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,qo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tn,!0),t("singleCursorHeightPerLine",!0,Tn,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Yi,!0),t("addModeClass",!1,Yi,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Yi,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Yo),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,r=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&pi(this,t[e])(this,n,r),ke(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](uo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;ni&&(Xo(t,o.head.line,e,!0),i=o.head.line,r==t.doc.sel.primIndex&&Yn(t));else{var s=o.from(),a=o.to(),l=Math.max(i,s.line);i=Math.min(t.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&mr(t.doc,r,new Da(s,u[r].to()),Us)}}}),getTokenAt:function(e,t){return et(this,e,t)},getLineTokens:function(e,t){return et(this,M(e),t,!0)},getTokenTypeAt:function(e){e=j(this.doc,e);var t,n=Xe(this,T(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var s=i+r>>1;if((s?n[2*s-1]:0)>=o)r=s;else{if(!(n[2*s+1]o&&(e=o,r=!0),i=T(this.doc,e)}else i=e;return sn(this,i,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-ye(i):0)},defaultTextHeight:function(){return bn(this.display)},defaultCharWidth:function(){return wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display;e=cn(this,j(this.doc,e));var s=e.bottom,a=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==i)s=e.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>l)&&e.top>t.offsetHeight?s=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(s=e.bottom),a+t.offsetWidth>c&&(a=c-t.offsetWidth)}t.style.top=s+"px",t.style.left=t.style.right="","right"==r?(a=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=a+"px"),n&&Un(this,{left:a,top:s,right:a+t.offsetWidth,bottom:s+t.offsetHeight})},triggerOnKeyDown:gi(ko),triggerOnKeyPress:gi(Do),triggerOnKeyUp:_o,triggerOnMouseDown:gi($o),execCommand:function(e){if(za.hasOwnProperty(e))return za[e].call(null,this)},triggerElectric:gi(function(e){Zo(this,e)}),findPosH:function(e,t,n,i){var r=this,o=1;t<0&&(o=-1,t=-t);for(var s=j(this.doc,e),a=0;a0&&a(n.charAt(i-1));)--i;for(;r.5)&&Sn(this),ke(this,"refresh",this)}),swapDoc:gi(function(e){var t=this.doc;return t.cm=null,Ji(this,e),tn(this),this.display.input.reset(),Kn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,wt(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Fe(e),e.registerHelper=function(t,i,r){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=r},e.registerGlobalHelper=function(t,i,r,o){e.registerHelper(t,i,o),n[t]._global.push({pred:r,val:o})}}(Yo);var nl="iter insert remove copy getEditor constructor".split(" ");for(var il in Ma.prototype)Ma.prototype.hasOwnProperty(il)&&h(nl,il)<0&&(Yo.prototype[il]=function(e){return function(){return e.apply(this.doc,arguments)}}(Ma.prototype[il]));return Fe(Ma),Yo.inputStyles={textarea:tl,contenteditable:el},Yo.defineMode=function(e){Yo.defaults.mode||"null"==e||(Yo.defaults.mode=e),He.apply(this,arguments)},Yo.defineMIME=We,Yo.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Yo.defineMIME("text/plain","null"),Yo.defineExtension=function(e,t){Yo.prototype[e]=t},Yo.defineDocExtension=function(e,t){Ma.prototype[e]=t},Yo.fromTextArea=ds,function(e){e.off=Ee,e.on=ta,e.wheelEventPixels=Oi,e.Doc=Ma,e.splitLines=ia,e.countColumn=d,e.findColumn=f,e.isWordChar=w,e.Pass=zs,e.signal=ke,e.Line=pa,e.changeEnd=Wi,e.scrollbarModel=Aa,e.Pos=M,e.cmpPos=N,e.modes=aa,e.mimeModes=la,e.resolveMode=je,e.getMode=ze,e.modeExtensions=ca,e.extendMode=Ue,e.copyState=qe,e.startState=Ye,e.innerMode=Ve,e.commands=za,e.keyMap=ja,e.keyName=co,e.isModifierKey=ao,e.lookupKey=so,e.normalizeKeyMap=oo,e.StringStream=ua,e.SharedTextMarker=Ra,e.TextMarker=La,e.LineWidget=Fa,e.e_preventDefault=$e,e.e_stopPropagation=Le,e.e_stop=Be,e.addClass=a,e.contains=o,e.rmClass=Os,e.keyNames=Ia}(Yo),Yo.version="5.34.0",Yo})},function(e,t,n){var i,r;/*! * jQuery JavaScript Library v3.3.1 * https://jquery.com/ * * Includes Sizzle.js * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://jquery.org/license * * Date: 2018-01-20T17:24Z */ !function(t,n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return n(e)}:n(t)}("undefined"!=typeof window?window:this,function(n,o){"use strict";function s(e,t,n){t=t||ue;var i,r=t.createElement("script");if(r.text=e,n)for(i in Se)n[i]&&(r[i]=n[i]);t.head.appendChild(r).parentNode.removeChild(r)}function a(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?me[ve.call(e)]||"object":typeof e}function l(e){var t=!!e&&"length"in e&&e.length,n=a(e);return!xe(e)&&!Ae(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function c(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function u(e,t,n){return xe(t)?Ee.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?Ee.grep(e,function(e){return e===t!==n}):"string"!=typeof t?Ee.grep(e,function(e){return ge.call(t,e)>-1!==n}):Ee.filter(t,e,n)}function d(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function h(e){var t={};return Ee.each(e.match(Ne)||[],function(e,n){t[n]=!0}),t}function f(e){return e}function p(e){throw e}function g(e,t,n,i){var r;try{e&&xe(r=e.promise)?r.call(e).done(t).fail(n):e&&xe(r=e.then)?r.call(e,t,n):t.apply(void 0,[e].slice(i))}catch(e){n.apply(void 0,[e])}}function m(){ue.removeEventListener("DOMContentLoaded",m),n.removeEventListener("load",m),Ee.ready()}function v(e,t){return t.toUpperCase()}function y(e){return e.replace(He,"ms-").replace(We,v)}function b(){this.expando=Ee.expando+b.uid++}function w(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:qe.test(e)?JSON.parse(e):e)}function C(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Ve,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=w(n)}catch(e){}Ue.set(e,t,n)}else n=void 0;return n}function x(e,t,n,i){var r,o,s=20,a=i?function(){return i.cur()}:function(){return Ee.css(e,t,"")},l=a(),c=n&&n[3]||(Ee.cssNumber[t]?"":"px"),u=(Ee.cssNumber[t]||"px"!==c&&+l)&&Ke.exec(Ee.css(e,t));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)Ee.style(e,t,u+c),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),u/=o;u*=2,Ee.style(e,t,u+c),n=n||[]}return n&&(u=+u||+l||0,r=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=r)),r}function A(e){var t,n=e.ownerDocument,i=e.nodeName,r=Qe[i];return r||(t=n.body.appendChild(n.createElement(i)),r=Ee.css(t,"display"),t.parentNode.removeChild(t),"none"===r&&(r="block"),Qe[i]=r,r)}function S(e,t){for(var n,i,r=[],o=0,s=e.length;o-1)r&&r.push(o);else if(u=Ee.contains(o.ownerDocument,o),s=E(h.appendChild(o),"script"),u&&k(s),n)for(d=0;o=s[d++];)tt.test(o.type||"")&&n.push(o);return h}function _(){return!0}function D(){return!1}function F(){try{return ue.activeElement}catch(e){}}function $(e,t,n,i,r,o){var s,a;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(a in t)$(e,a,n,i,t[a],o);return e}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=D;else if(!r)return e;return 1===o&&(s=r,r=function(e){return Ee().off(e),s.apply(this,arguments)},r.guid=s.guid||(s.guid=Ee.guid++)),e.each(function(){Ee.event.add(this,t,r,i,n)})}function L(e,t){return c(e,"table")&&c(11!==t.nodeType?t:t.firstChild,"tr")?Ee(e).children("tbody")[0]||e:e}function R(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function B(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function M(e,t){var n,i,r,o,s,a,l,c;if(1===t.nodeType){if(ze.hasData(e)&&(o=ze.access(e),s=ze.set(t,o),c=o.events)){delete s.handle,s.events={};for(r in c)for(n=0,i=c[r].length;n1&&"string"==typeof p&&!Ce.checkClone&&ut.test(p))return e.each(function(r){var o=e.eq(r);g&&(t[0]=p.call(this,r,o.html())),O(o,t,n,i)});if(h&&(r=T(t,e[0].ownerDocument,!1,e,i),o=r.firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=Ee.map(E(r,"script"),R),l=a.length;d=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-l-a-.5))),l}function q(e,t,n){var i=ft(e),r=P(e,t,i),o="border-box"===Ee.css(e,"boxSizing",!1,i),s=o;if(ht.test(r)){if(!n)return r;r="auto"}return s=s&&(Ce.boxSizingReliable()||r===e.style[t]),("auto"===r||!parseFloat(r)&&"inline"===Ee.css(e,"display",!1,i))&&(r=e["offset"+t[0].toUpperCase()+t.slice(1)],s=!0),(r=parseFloat(r)||0)+U(e,t,n||(o?"border":"content"),s,i,r)+"px"}function V(e,t,n,i,r){return new V.prototype.init(e,t,n,i,r)}function Y(){xt&&(!1===ue.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(Y):n.setTimeout(Y,Ee.fx.interval),Ee.fx.tick())}function K(){return n.setTimeout(function(){Ct=void 0}),Ct=Date.now()}function X(e,t){var n,i=0,r={height:e};for(t=t?1:0;i<4;i+=2-t)n=Xe[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function G(e,t,n){for(var i,r=(Z.tweeners[t]||[]).concat(Z.tweeners["*"]),o=0,s=r.length;o=0&&nC.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[I]=!0,e}function r(e){var t=$.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),i=n.length;i--;)C.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return i(function(t){return t=+t,i(function(n,i){for(var r,o=e([],n.length,t),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))})})}function c(e){return e&&void 0!==e.getElementsByTagName&&e}function u(){}function d(e){for(var t=0,n=e.length,i="";t1?function(t,n,i){for(var r=e.length;r--;)if(!e[r](t,n,i))return!1;return!0}:e[0]}function p(e,n,i){for(var r=0,o=n.length;r-1&&(i[c]=!(s[c]=d))}}else b=g(b===s?b.splice(m,b.length):b),o?o(null,s,b,l):G.apply(s,b)})}function v(e){for(var t,n,i,r=e.length,o=C.relative[e[0].type],s=o||C.relative[" "],a=o?1:0,l=h(function(e){return e===t},s,!0),c=h(function(e){return Q(t,e)>-1},s,!0),u=[function(e,n,i){var r=!o&&(i||n!==T)||((t=n).nodeType?l(e,n,i):c(e,n,i));return t=null,r}];a1&&f(u),a>1&&d(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(oe,"$1"),n,a0,o=e.length>0,s=function(i,s,a,l,c){var u,d,h,f=0,p="0",m=i&&[],v=[],y=T,b=i||o&&C.find.TAG("*",c),w=H+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=s===$||s||c);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0,s||u.ownerDocument===$||(F(u),a=!R);h=e[d++];)if(h(u,s||$,a)){l.push(u);break}c&&(H=w)}r&&((u=!h&&u)&&f--,i&&m.push(u))}if(f+=p,r&&p!==f){for(d=0;h=n[d++];)h(m,v,s,a);if(i){if(f>0)for(;p--;)m[p]||v[p]||(v[p]=K.call(l));v=g(v)}G.apply(l,v),c&&!i&&v.length>0&&f+n.length>1&&t.uniqueSort(l)}return c&&(H=w,T=y),m};return r?i(s):s}var b,w,C,x,A,S,E,k,T,_,D,F,$,L,R,B,M,N,O,I="sizzle"+1*new Date,P=e.document,H=0,W=0,j=n(),z=n(),U=n(),q=function(e,t){return e===t&&(D=!0),0},V={}.hasOwnProperty,Y=[],K=Y.pop,X=Y.push,G=Y.push,J=Y.slice,Q=function(e,t){for(var n=0,i=e.length;n+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),ce=new RegExp(ie),ue=new RegExp("^"+te+"$"),de={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ne),PSEUDO:new RegExp("^"+ie),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Z+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,fe=/^h\d$/i,pe=/^[^{]+\{\s*\[native \w/,ge=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,me=/[+~]/,ve=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),ye=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},be=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,we=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},Ce=function(){F()},xe=h(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{G.apply(Y=J.call(P.childNodes),P.childNodes),Y[P.childNodes.length].nodeType}catch(e){G={apply:Y.length?function(e,t){X.apply(e,J.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}w=t.support={},A=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},F=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:P;return i!==$&&9===i.nodeType&&i.documentElement?($=i,L=$.documentElement,R=!A($),P!==$&&(n=$.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Ce,!1):n.attachEvent&&n.attachEvent("onunload",Ce)),w.attributes=r(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=r(function(e){return e.appendChild($.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=pe.test($.getElementsByClassName),w.getById=r(function(e){return L.appendChild(e).id=I,!$.getElementsByName||!$.getElementsByName(I).length}),w.getById?(C.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){return e.getAttribute("id")===t}},C.find.ID=function(e,t){if(void 0!==t.getElementById&&R){var n=t.getElementById(e);return n?[n]:[]}}):(C.filter.ID=function(e){var t=e.replace(ve,ye);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},C.find.ID=function(e,t){if(void 0!==t.getElementById&&R){var n,i,r,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(r=t.getElementsByName(e),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),C.find.TAG=w.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],r=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[r++];)1===n.nodeType&&i.push(n);return i}return o},C.find.CLASS=w.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&R)return t.getElementsByClassName(e)},M=[],B=[],(w.qsa=pe.test($.querySelectorAll))&&(r(function(e){L.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&B.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||B.push("\\["+ee+"*(?:value|"+Z+")"),e.querySelectorAll("[id~="+I+"-]").length||B.push("~="),e.querySelectorAll(":checked").length||B.push(":checked"),e.querySelectorAll("a#"+I+"+*").length||B.push(".#.+[+~]")}),r(function(e){e.innerHTML="";var t=$.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&B.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&B.push(":enabled",":disabled"),L.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&B.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),B.push(",.*:")})),(w.matchesSelector=pe.test(N=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&r(function(e){w.disconnectedMatch=N.call(e,"*"),N.call(e,"[s!='']:x"),M.push("!=",ie)}),B=B.length&&new RegExp(B.join("|")),M=M.length&&new RegExp(M.join("|")),t=pe.test(L.compareDocumentPosition),O=t||pe.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},q=t?function(e,t){if(e===t)return D=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===$||e.ownerDocument===P&&O(P,e)?-1:t===$||t.ownerDocument===P&&O(P,t)?1:_?Q(_,e)-Q(_,t):0:4&n?-1:1)}:function(e,t){if(e===t)return D=!0,0;var n,i=0,r=e.parentNode,o=t.parentNode,a=[e],l=[t];if(!r||!o)return e===$?-1:t===$?1:r?-1:o?1:_?Q(_,e)-Q(_,t):0;if(r===o)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?s(a[i],l[i]):a[i]===P?-1:l[i]===P?1:0},$):$},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==$&&F(e),n=n.replace(le,"='$1']"),w.matchesSelector&&R&&!U[n+" "]&&(!M||!M.test(n))&&(!B||!B.test(n)))try{var i=N.call(e,n);if(i||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(e){}return t(n,$,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==$&&F(e),O(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==$&&F(e);var n=C.attrHandle[t.toLowerCase()],i=n&&V.call(C.attrHandle,t.toLowerCase())?n(e,t,!R):void 0;return void 0!==i?i:w.attributes||!R?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.escape=function(e){return(e+"").replace(be,we)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,r=0;if(D=!w.detectDuplicates,_=!w.sortStable&&e.slice(0),e.sort(q),D){for(;t=e[r++];)t===e[r]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return _=null,e},x=t.getText=function(e){var t,n="",i=0,r=e.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=x(e)}else if(3===r||4===r)return e.nodeValue}else for(;t=e[i++];)n+=x(t);return n},C=t.selectors={cacheLength:50,createPseudo:i,match:de,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ve,ye),e[3]=(e[3]||e[4]||e[5]||"").replace(ve,ye),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return de.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&ce.test(n)&&(t=S(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ve,ye).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&j(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(r){var o=t.attr(r,e);return null==o?"!="===n:!n||(o+="","="===n?o===i:"!="===n?o!==i:"^="===n?i&&0===o.indexOf(i):"*="===n?i&&o.indexOf(i)>-1:"$="===n?i&&o.slice(-i.length)===i:"~="===n?(" "+o.replace(re," ")+" ").indexOf(i)>-1:"|="===n&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(e,t,n,i,r){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===r?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,h,f,p,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(o){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&y){for(h=m,d=h[I]||(h[I]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===H&&c[1],b=f&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[H,f,b];break}}else if(y&&(h=t,d=h[I]||(h[I]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),c=u[e]||[],f=c[0]===H&&c[1],b=f),!1===b)for(;(h=++f&&h&&h[g]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&(d=h[I]||(h[I]={}),u=d[h.uniqueID]||(d[h.uniqueID]={}),u[e]=[H,b]),h!==t)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(e,n){var r,o=C.pseudos[e]||C.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[I]?o(n):o.length>1?(r=[e,e,"",n],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,r=o(e,n),s=r.length;s--;)i=Q(e,r[s]),e[i]=!(t[i]=r[s])}):function(e){return o(e,0,r)}):o}},pseudos:{not:i(function(e){var t=[],n=[],r=E(e.replace(oe,"$1"));return r[I]?i(function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(ve,ye),function(t){return(t.textContent||t.innerText||x(t)).indexOf(e)>-1}}),lang:i(function(e){return ue.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ve,ye).toLowerCase(),function(t){var n;do{if(n=R?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===L},focus:function(e){return e===$.activeElement&&(!$.hasFocus||$.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:a(!1),disabled:a(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return fe.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(i);return e}),gt:l(function(e,t,n){for(var i=n<0?n+t:n;++i2&&"ID"===(s=o[0]).type&&9===t.nodeType&&R&&C.relative[o[1].type]){if(!(t=(C.find.ID(s.matches[0].replace(ve,ye),t)||[])[0]))return n;u&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(r=de.needsContext.test(e)?0:o.length;r--&&(s=o[r],!C.relative[a=s.type]);)if((l=C.find[a])&&(i=l(s.matches[0].replace(ve,ye),me.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(r,1),!(e=i.length&&d(o)))return G.apply(n,i),n;break}}return(u||E(e,h))(i,t,!R,n,!t||me.test(e)&&c(t.parentNode)||t),n},w.sortStable=I.split("").sort(q).join("")===I,w.detectDuplicates=!!D,F(),w.sortDetached=r(function(e){return 1&e.compareDocumentPosition($.createElement("fieldset"))}),r(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&r(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),r(function(e){return null==e.getAttribute("disabled")})||o(Z,function(e,t,n){var i;if(!n)return!0===e[t]?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(n);Ee.find=Te,Ee.expr=Te.selectors,Ee.expr[":"]=Ee.expr.pseudos,Ee.uniqueSort=Ee.unique=Te.uniqueSort,Ee.text=Te.getText,Ee.isXMLDoc=Te.isXML,Ee.contains=Te.contains,Ee.escapeSelector=Te.escape;var _e=function(e,t,n){for(var i=[],r=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(r&&Ee(e).is(n))break;i.push(e)}return i},De=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},Fe=Ee.expr.match.needsContext,$e=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ee.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?Ee.find.matchesSelector(i,e)?[i]:[]:Ee.find.matches(e,Ee.grep(t,function(e){return 1===e.nodeType}))},Ee.fn.extend({find:function(e){var t,n,i=this.length,r=this;if("string"!=typeof e)return this.pushStack(Ee(e).filter(function(){for(t=0;t1?Ee.uniqueSort(n):n},filter:function(e){return this.pushStack(u(this,e||[],!1))},not:function(e){return this.pushStack(u(this,e||[],!0))},is:function(e){return!!u(this,"string"==typeof e&&Fe.test(e)?Ee(e):e||[],!1).length}});var Le,Re=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Ee.fn.init=function(e,t,n){var i,r;if(!e)return this;if(n=n||Le,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Re.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof Ee?t[0]:t,Ee.merge(this,Ee.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:ue,!0)),$e.test(i[1])&&Ee.isPlainObject(t))for(i in t)xe(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return r=ue.getElementById(i[2]),r&&(this[0]=r,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):xe(e)?void 0!==n.ready?n.ready(e):e(Ee):Ee.makeArray(e,this)}).prototype=Ee.fn,Le=Ee(ue);var Be=/^(?:parents|prev(?:Until|All))/,Me={children:!0,contents:!0,next:!0,prev:!0};Ee.fn.extend({has:function(e){var t=Ee(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&Ee.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?Ee.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?ge.call(Ee(e),this[0]):ge.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Ee.uniqueSort(Ee.merge(this.get(),Ee(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ee.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _e(e,"parentNode")},parentsUntil:function(e,t,n){return _e(e,"parentNode",n)},next:function(e){return d(e,"nextSibling")},prev:function(e){return d(e,"previousSibling")},nextAll:function(e){return _e(e,"nextSibling")},prevAll:function(e){return _e(e,"previousSibling")},nextUntil:function(e,t,n){return _e(e,"nextSibling",n)},prevUntil:function(e,t,n){return _e(e,"previousSibling",n)},siblings:function(e){return De((e.parentNode||{}).firstChild,e)},children:function(e){return De(e.firstChild)},contents:function(e){return c(e,"iframe")?e.contentDocument:(c(e,"template")&&(e=e.content||e),Ee.merge([],e.childNodes))}},function(e,t){Ee.fn[e]=function(n,i){var r=Ee.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=Ee.filter(i,r)),this.length>1&&(Me[e]||Ee.uniqueSort(r),Be.test(e)&&r.reverse()),this.pushStack(r)}});var Ne=/[^\x20\t\r\n\f]+/g;Ee.Callbacks=function(e){e="string"==typeof e?h(e):Ee.extend({},e);var t,n,i,r,o=[],s=[],l=-1,c=function(){for(r=r||e.once,i=t=!0;s.length;l=-1)for(n=s.shift();++l-1;)o.splice(n,1),n<=l&&l--}),this},has:function(e){return e?Ee.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||t||(o=n=""),this},locked:function(){return!!r},fireWith:function(e,n){return r||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},Ee.extend({Deferred:function(e){var t=[["notify","progress",Ee.Callbacks("memory"),Ee.Callbacks("memory"),2],["resolve","done",Ee.Callbacks("once memory"),Ee.Callbacks("once memory"),0,"resolved"],["reject","fail",Ee.Callbacks("once memory"),Ee.Callbacks("once memory"),1,"rejected"]],i="pending",r={state:function(){return i},always:function(){return o.done(arguments).fail(arguments),this},catch:function(e){return r.then(null,e)},pipe:function(){var e=arguments;return Ee.Deferred(function(n){Ee.each(t,function(t,i){var r=xe(e[i[4]])&&e[i[4]];o[i[1]](function(){var e=r&&r.apply(this,arguments);e&&xe(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[e]:arguments)})}),e=null}).promise()},then:function(e,i,r){function o(e,t,i,r){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(e=s&&(i!==p&&(a=void 0,l=[n]),t.rejectWith(a,l))}};e?u():(Ee.Deferred.getStackHook&&(u.stackTrace=Ee.Deferred.getStackHook()),n.setTimeout(u))}}var s=0;return Ee.Deferred(function(n){t[0][3].add(o(0,n,xe(r)?r:f,n.notifyWith)),t[1][3].add(o(0,n,xe(e)?e:f)),t[2][3].add(o(0,n,xe(i)?i:p))}).promise()},promise:function(e){return null!=e?Ee.extend(e,r):r}},o={};return Ee.each(t,function(e,n){var s=n[2],a=n[5];r[n[1]]=s.add,a&&s.add(function(){i=a},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith}),r.promise(o),e&&e.call(o,o),o},when:function(e){var t=arguments.length,n=t,i=Array(n),r=he.call(arguments),o=Ee.Deferred(),s=function(e){return function(n){i[e]=this,r[e]=arguments.length>1?he.call(arguments):n,--t||o.resolveWith(i,r)}};if(t<=1&&(g(e,o.done(s(n)).resolve,o.reject,!t),"pending"===o.state()||xe(r[n]&&r[n].then)))return o.then();for(;n--;)g(r[n],s(n),o.reject);return o.promise()}});var Oe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ee.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&Oe.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Ee.readyException=function(e){n.setTimeout(function(){throw e})};var Ie=Ee.Deferred();Ee.fn.ready=function(e){return Ie.then(e).catch(function(e){Ee.readyException(e)}),this},Ee.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Ee.readyWait:Ee.isReady)||(Ee.isReady=!0,!0!==e&&--Ee.readyWait>0||Ie.resolveWith(ue,[Ee]))}}),Ee.ready.then=Ie.then,"complete"===ue.readyState||"loading"!==ue.readyState&&!ue.documentElement.doScroll?n.setTimeout(Ee.ready):(ue.addEventListener("DOMContentLoaded",m),n.addEventListener("load",m));var Pe=function(e,t,n,i,r,o,s){var l=0,c=e.length,u=null==n;if("object"===a(n)){r=!0;for(l in n)Pe(e,t,l,n[l],!0,o,s)}else if(void 0!==i&&(r=!0,xe(i)||(s=!0),u&&(s?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(Ee(e),n)})),t))for(;l1,null,!0)},removeData:function(e){return this.each(function(){Ue.remove(this,e)})}}),Ee.extend({queue:function(e,t,n){var i;if(e)return t=(t||"fx")+"queue",i=ze.get(e,t),n&&(!i||Array.isArray(n)?i=ze.access(e,t,Ee.makeArray(n)):i.push(n)),i||[]},dequeue:function(e,t){t=t||"fx";var n=Ee.queue(e,t),i=n.length,r=n.shift(),o=Ee._queueHooks(e,t),s=function(){Ee.dequeue(e,t)};"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===t&&n.unshift("inprogress"),delete o.stop,r.call(e,s,o)),!i&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ze.get(e,n)||ze.access(e,n,{empty:Ee.Callbacks("once memory").add(function(){ze.remove(e,[t+"queue",n])})})}}),Ee.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length\x20\t\r\n\f]+)/i,tt=/^$|^module$|\/(?:java|ecma)script/i,nt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};nt.optgroup=nt.option,nt.tbody=nt.tfoot=nt.colgroup=nt.caption=nt.thead,nt.th=nt.td;var it=/<|&#?\w+;/;!function(){var e=ue.createDocumentFragment(),t=e.appendChild(ue.createElement("div")),n=ue.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),Ce.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="",Ce.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var rt=ue.documentElement,ot=/^key/,st=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,at=/^([^.]*)(?:\.(.+)|)/;Ee.event={global:{},add:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,f,p,g,m=ze.get(e);if(m)for(n.handler&&(o=n,n=o.handler,r=o.selector),r&&Ee.find.matchesSelector(rt,r),n.guid||(n.guid=Ee.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(t){return void 0!==Ee&&Ee.event.triggered!==t.type?Ee.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(Ne)||[""],c=t.length;c--;)a=at.exec(t[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f&&(d=Ee.event.special[f]||{},f=(r?d.delegateType:d.bindType)||f,d=Ee.event.special[f]||{},u=Ee.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&Ee.expr.match.needsContext.test(r),namespace:p.join(".")},o),(h=l[f])||(h=l[f]=[],h.delegateCount=0,d.setup&&!1!==d.setup.call(e,i,p,s)||e.addEventListener&&e.addEventListener(f,s)),d.add&&(d.add.call(e,u),u.handler.guid||(u.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,u):h.push(u),Ee.event.global[f]=!0)},remove:function(e,t,n,i,r){var o,s,a,l,c,u,d,h,f,p,g,m=ze.hasData(e)&&ze.get(e);if(m&&(l=m.events)){for(t=(t||"").match(Ne)||[""],c=t.length;c--;)if(a=at.exec(t[c])||[],f=g=a[1],p=(a[2]||"").split(".").sort(),f){for(d=Ee.event.special[f]||{},f=(i?d.delegateType:d.bindType)||f,h=l[f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)u=h[o],!r&&g!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(h.splice(o,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(e,u));s&&!h.length&&(d.teardown&&!1!==d.teardown.call(e,p,m.handle)||Ee.removeEvent(e,f,m.handle),delete l[f])}else for(f in l)Ee.event.remove(e,f+t[c],n,i,!0);Ee.isEmptyObject(l)&&ze.remove(e,"handle events")}},dispatch:function(e){var t,n,i,r,o,s,a=Ee.event.fix(e),l=new Array(arguments.length),c=(ze.get(this,"events")||{})[a.type]||[],u=Ee.event.special[a.type]||{};for(l[0]=a,t=1;t=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],s={},n=0;n-1:Ee.find(r,this,null,[c]).length),s[r]&&o.push(i);o.length&&a.push({elem:c,handlers:o})}return c=this,l\x20\t\r\n\f]*)[^>]*)\/>/gi,ct=/\s*$/g;Ee.extend({htmlPrefilter:function(e){return e.replace(lt,"<$1>")},clone:function(e,t,n){var i,r,o,s,a=e.cloneNode(!0),l=Ee.contains(e.ownerDocument,e);if(!(Ce.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ee.isXMLDoc(e)))for(s=E(a),o=E(e),i=0,r=o.length;i0&&k(s,!l&&E(e,"script")),a},cleanData:function(e){for(var t,n,i,r=Ee.event.special,o=0;void 0!==(n=e[o]);o++)if(je(n)){if(t=n[ze.expando]){if(t.events)for(i in t.events)r[i]?Ee.event.remove(n,i):Ee.removeEvent(n,i,t.handle);n[ze.expando]=void 0}n[Ue.expando]&&(n[Ue.expando]=void 0)}}}),Ee.fn.extend({detach:function(e){return I(this,e,!0)},remove:function(e){return I(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?Ee.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){L(this,e).appendChild(e)}})},prepend:function(){return O(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=L(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return O(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Ee.cleanData(E(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Ee.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ct.test(e)&&!nt[(et.exec(e)||["",""])[1].toLowerCase()]){e=Ee.htmlPrefilter(e);try{for(;n1)}}),Ee.Tween=V,V.prototype={constructor:V,init:function(e,t,n,i,r,o){this.elem=e,this.prop=n,this.easing=r||Ee.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=o||(Ee.cssNumber[n]?"":"px")},cur:function(){var e=V.propHooks[this.prop];return e&&e.get?e.get(this):V.propHooks._default.get(this)},run:function(e){var t,n=V.propHooks[this.prop];return this.options.duration?this.pos=t=Ee.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):V.propHooks._default.set(this),this}},V.prototype.init.prototype=V.prototype,V.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Ee.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Ee.fx.step[e.prop]?Ee.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Ee.cssProps[e.prop]]&&!Ee.cssHooks[e.prop]?e.elem[e.prop]=e.now:Ee.style(e.elem,e.prop,e.now+e.unit)}}},V.propHooks.scrollTop=V.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ee.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Ee.fx=V.prototype.init,Ee.fx.step={};var Ct,xt,At=/^(?:toggle|show|hide)$/,St=/queueHooks$/;Ee.Animation=Ee.extend(Z,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return x(n.elem,e,Ke.exec(t),n),n}]},tweener:function(e,t){xe(e)?(t=e,e=["*"]):e=e.match(Ne);for(var n,i=0,r=e.length;i1)},removeAttr:function(e){return this.each(function(){Ee.removeAttr(this,e)})}}),Ee.extend({attr:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?Ee.prop(e,t,n):(1===o&&Ee.isXMLDoc(e)||(r=Ee.attrHooks[t.toLowerCase()]||(Ee.expr.match.bool.test(t)?Et:void 0)),void 0!==n?null===n?void Ee.removeAttr(e,t):r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:(e.setAttribute(t,n+""),n):r&&"get"in r&&null!==(i=r.get(e,t))?i:(i=Ee.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!Ce.radioValue&&"radio"===t&&c(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i=0,r=t&&t.match(Ne);if(r&&1===e.nodeType)for(;n=r[i++];)e.removeAttribute(n)}}),Et={set:function(e,t,n){return!1===t?Ee.removeAttr(e,n):e.setAttribute(n,n),n}},Ee.each(Ee.expr.match.bool.source.match(/\w+/g),function(e,t){var n=kt[t]||Ee.find.attr;kt[t]=function(e,t,i){var r,o,s=t.toLowerCase();return i||(o=kt[s],kt[s]=r,r=null!=n(e,t,i)?s:null,kt[s]=o),r}});var Tt=/^(?:input|select|textarea|button)$/i,_t=/^(?:a|area)$/i;Ee.fn.extend({prop:function(e,t){return Pe(this,Ee.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Ee.propFix[e]||e]})}}),Ee.extend({prop:function(e,t,n){var i,r,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&Ee.isXMLDoc(e)||(t=Ee.propFix[t]||t,r=Ee.propHooks[t]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(e,n,t))?i:e[t]=n:r&&"get"in r&&null!==(i=r.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=Ee.find.attr(e,"tabindex");return t?parseInt(t,10):Tt.test(e.nodeName)||_t.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),Ce.optSelected||(Ee.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Ee.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ee.propFix[this.toLowerCase()]=this}),Ee.fn.extend({addClass:function(e){var t,n,i,r,o,s,a,l=0;if(xe(e))return this.each(function(t){Ee(this).addClass(e.call(this,t,te(this)))});if(t=ne(e),t.length)for(;n=this[l++];)if(r=te(n),i=1===n.nodeType&&" "+ee(r)+" "){for(s=0;o=t[s++];)i.indexOf(" "+o+" ")<0&&(i+=o+" ");a=ee(i),r!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,r,o,s,a,l=0;if(xe(e))return this.each(function(t){Ee(this).removeClass(e.call(this,t,te(this)))});if(!arguments.length)return this.attr("class","");if(t=ne(e),t.length)for(;n=this[l++];)if(r=te(n),i=1===n.nodeType&&" "+ee(r)+" "){for(s=0;o=t[s++];)for(;i.indexOf(" "+o+" ")>-1;)i=i.replace(" "+o+" "," ");a=ee(i),r!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e,i="string"===n||Array.isArray(e);return"boolean"==typeof t&&i?t?this.addClass(e):this.removeClass(e):xe(e)?this.each(function(n){Ee(this).toggleClass(e.call(this,n,te(this),t),t)}):this.each(function(){var t,r,o,s;if(i)for(r=0,o=Ee(this),s=ne(e);t=s[r++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else void 0!==e&&"boolean"!==n||(t=te(this),t&&ze.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":ze.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+ee(te(n))+" ").indexOf(t)>-1)return!0;return!1}});var Dt=/\r/g;Ee.fn.extend({val:function(e){var t,n,i,r=this[0];{if(arguments.length)return i=xe(e),this.each(function(n){var r;1===this.nodeType&&(r=i?e.call(this,n,Ee(this).val()):e,null==r?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=Ee.map(r,function(e){return null==e?"":e+""})),(t=Ee.valHooks[this.type]||Ee.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,r,"value")||(this.value=r))});if(r)return(t=Ee.valHooks[r.type]||Ee.valHooks[r.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(r,"value"))?n:(n=r.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),Ee.extend({valHooks:{option:{get:function(e){var t=Ee.find.attr(e,"value");return null!=t?t:ee(Ee.text(e))}},select:{get:function(e){var t,n,i,r=e.options,o=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),Ee.each(["radio","checkbox"],function(){Ee.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Ee.inArray(Ee(e).val(),t)>-1}},Ce.checkOn||(Ee.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),Ce.focusin="onfocusin"in n;var Ft=/^(?:focusinfocus|focusoutblur)$/,$t=function(e){e.stopPropagation()};Ee.extend(Ee.event,{trigger:function(e,t,i,r){var o,s,a,l,c,u,d,h,f=[i||ue],p=ye.call(e,"type")?e.type:e,g=ye.call(e,"namespace")?e.namespace.split("."):[];if(s=h=a=i=i||ue,3!==i.nodeType&&8!==i.nodeType&&!Ft.test(p+Ee.event.triggered)&&(p.indexOf(".")>-1&&(g=p.split("."),p=g.shift(),g.sort()),c=p.indexOf(":")<0&&"on"+p,e=e[Ee.expando]?e:new Ee.Event(p,"object"==typeof e&&e),e.isTrigger=r?2:3,e.namespace=g.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),t=null==t?[e]:Ee.makeArray(t,[e]),d=Ee.event.special[p]||{},r||!d.trigger||!1!==d.trigger.apply(i,t))){if(!r&&!d.noBubble&&!Ae(i)){for(l=d.delegateType||p,Ft.test(l+p)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||ue)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!e.isPropagationStopped();)h=s,e.type=o>1?l:d.bindType||p,u=(ze.get(s,"events")||{})[e.type]&&ze.get(s,"handle"),u&&u.apply(s,t),(u=c&&s[c])&&u.apply&&je(s)&&(e.result=u.apply(s,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||d._default&&!1!==d._default.apply(f.pop(),t)||!je(i)||c&&xe(i[p])&&!Ae(i)&&(a=i[c],a&&(i[c]=null),Ee.event.triggered=p,e.isPropagationStopped()&&h.addEventListener(p,$t),i[p](),e.isPropagationStopped()&&h.removeEventListener(p,$t),Ee.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(e,t,n){var i=Ee.extend(new Ee.Event,n,{type:e,isSimulated:!0});Ee.event.trigger(i,null,t)}}),Ee.fn.extend({trigger:function(e,t){return this.each(function(){Ee.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return Ee.event.trigger(e,t,n,!0)}}),Ce.focusin||Ee.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){Ee.event.simulate(t,e.target,Ee.event.fix(e))};Ee.event.special[t]={setup:function(){var i=this.ownerDocument||this,r=ze.access(i,t);r||i.addEventListener(e,n,!0),ze.access(i,t,(r||0)+1)},teardown:function(){var i=this.ownerDocument||this,r=ze.access(i,t)-1;r?ze.access(i,t,r):(i.removeEventListener(e,n,!0),ze.remove(i,t))}}});var Lt=n.location,Rt=Date.now(),Bt=/\?/;Ee.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Ee.error("Invalid XML: "+e),t};var Mt=/\[\]$/,Nt=/\r?\n/g,Ot=/^(?:submit|button|image|reset|file)$/i,It=/^(?:input|select|textarea|keygen)/i;Ee.param=function(e,t){var n,i=[],r=function(e,t){var n=xe(t)?t():t;i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!Ee.isPlainObject(e))Ee.each(e,function(){r(this.name,this.value)});else for(n in e)ie(n,e[n],t,r);return i.join("&")},Ee.fn.extend({serialize:function(){return Ee.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ee.prop(this,"elements");return e?Ee.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ee(this).is(":disabled")&&It.test(this.nodeName)&&!Ot.test(e)&&(this.checked||!Ze.test(e))}).map(function(e,t){var n=Ee(this).val();return null==n?null:Array.isArray(n)?Ee.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}});var Pt=/%20/g,Ht=/#.*$/,Wt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ut=/^(?:GET|HEAD)$/,qt=/^\/\//,Vt={},Yt={},Kt="*/".concat("*"),Xt=ue.createElement("a");Xt.href=Lt.href,Ee.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt.href,type:"GET",isLocal:zt.test(Lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Kt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ee.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?se(se(e,Ee.ajaxSettings),t):se(Ee.ajaxSettings,e)},ajaxPrefilter:re(Vt),ajaxTransport:re(Yt),ajax:function(e,t){function i(e,t,i,a){var c,h,f,w,C,x=t;u||(u=!0,l&&n.clearTimeout(l),r=void 0,s=a||"",A.readyState=e>0?4:0,c=e>=200&&e<300||304===e,i&&(w=ae(p,A,i)),w=le(p,w,A,c),c?(p.ifModified&&(C=A.getResponseHeader("Last-Modified"),C&&(Ee.lastModified[o]=C),(C=A.getResponseHeader("etag"))&&(Ee.etag[o]=C)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=w.state,h=w.data,f=w.error,c=!f)):(f=x,!e&&x||(x="error",e<0&&(e=0))),A.status=e,A.statusText=(t||x)+"",c?v.resolveWith(g,[h,x,A]):v.rejectWith(g,[A,x,f]),A.statusCode(b),b=void 0,d&&m.trigger(c?"ajaxSuccess":"ajaxError",[A,p,c?h:f]),y.fireWith(g,[A,x]),d&&(m.trigger("ajaxComplete",[A,p]),--Ee.active||Ee.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var r,o,s,a,l,c,u,d,h,f,p=Ee.ajaxSetup({},t),g=p.context||p,m=p.context&&(g.nodeType||g.jquery)?Ee(g):Ee.event,v=Ee.Deferred(),y=Ee.Callbacks("once memory"),b=p.statusCode||{},w={},C={},x="canceled",A={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=jt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(e,t){return null==u&&(e=C[e.toLowerCase()]=C[e.toLowerCase()]||e,w[e]=t),this},overrideMimeType:function(e){return null==u&&(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(u)A.always(e[A.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||x;return r&&r.abort(t),i(0,t),this}};if(v.promise(A),p.url=((e||p.url||Lt.href)+"").replace(qt,Lt.protocol+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(Ne)||[""],null==p.crossDomain){c=ue.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=Xt.protocol+"//"+Xt.host!=c.protocol+"//"+c.host}catch(e){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=Ee.param(p.data,p.traditional)),oe(Vt,p,t,A),u)return A;d=Ee.event&&p.global,d&&0==Ee.active++&&Ee.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Ut.test(p.type),o=p.url.replace(Ht,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Pt,"+")):(f=p.url.slice(o.length),p.data&&(p.processData||"string"==typeof p.data)&&(o+=(Bt.test(o)?"&":"?")+p.data,delete p.data),!1===p.cache&&(o=o.replace(Wt,"$1"),f=(Bt.test(o)?"&":"?")+"_="+Rt+++f),p.url=o+f),p.ifModified&&(Ee.lastModified[o]&&A.setRequestHeader("If-Modified-Since",Ee.lastModified[o]),Ee.etag[o]&&A.setRequestHeader("If-None-Match",Ee.etag[o])),(p.data&&p.hasContent&&!1!==p.contentType||t.contentType)&&A.setRequestHeader("Content-Type",p.contentType),A.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Kt+"; q=0.01":""):p.accepts["*"]);for(h in p.headers)A.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(g,A,p)||u))return A.abort();if(x="abort",y.add(p.complete),A.done(p.success),A.fail(p.error),r=oe(Yt,p,t,A)){if(A.readyState=1,d&&m.trigger("ajaxSend",[A,p]),u)return A;p.async&&p.timeout>0&&(l=n.setTimeout(function(){A.abort("timeout")},p.timeout));try{u=!1,r.send(w,i)}catch(e){if(u)throw e;i(-1,e)}}else i(-1,"No Transport");return A},getJSON:function(e,t,n){return Ee.get(e,t,n,"json")},getScript:function(e,t){return Ee.get(e,void 0,t,"script")}}),Ee.each(["get","post"],function(e,t){Ee[t]=function(e,n,i,r){return xe(n)&&(r=r||i,i=n,n=void 0),Ee.ajax(Ee.extend({url:e,type:t,dataType:r,data:n,success:i},Ee.isPlainObject(e)&&e))}}),Ee._evalUrl=function(e){return Ee.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Ee.fn.extend({wrapAll:function(e){var t;return this[0]&&(xe(e)&&(e=e.call(this[0])),t=Ee(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return xe(e)?this.each(function(t){Ee(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Ee(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=xe(e);return this.each(function(n){Ee(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Ee(this).replaceWith(this.childNodes)}),this}}),Ee.expr.pseudos.hidden=function(e){return!Ee.expr.pseudos.visible(e)},Ee.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Ee.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Gt={0:200,1223:204},Jt=Ee.ajaxSettings.xhr();Ce.cors=!!Jt&&"withCredentials"in Jt,Ce.ajax=Jt=!!Jt,Ee.ajaxTransport(function(e){var t,i;if(Ce.cors||Jt&&!e.crossDomain)return{send:function(r,o){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(s in r)a.setRequestHeader(s,r[s]);t=function(e){return function(){t&&(t=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Gt[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=t(),i=a.onerror=a.ontimeout=t("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout(function(){t&&i()})},t=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),Ee.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Ee.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Ee.globalEval(e),e}}}),Ee.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Ee.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,r){t=Ee("