From b8ce8fd85222ad8ce266b2d0cf13b4fadf38d9f7 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 31 Aug 2019 14:16:14 +0100 Subject: [PATCH] Updated assets for release v0.27 --- public/dist/app.js | 76 +--- public/dist/export-styles.css | 333 +++++++------- public/dist/print-styles.css | 42 +- public/dist/styles.css | 797 ++++++++++++++++------------------ 4 files changed, 586 insertions(+), 662 deletions(-) diff --git a/public/dist/app.js b/public/dist/app.js index d64178465..a44c9435a 100644 --- a/public/dist/app.js +++ b/public/dist/app.js @@ -1,67 +1,27 @@ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=250)}([function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&15<=w&&(l=!(d=!1));var k=y&&(c||d&&(null==w||w<12.11)),_=n||a&&9<=s;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,T=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function E(e){for(var t=e.childNodes.length;0=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&to?ge(o,le(e,o).text.length):(r=le(e,(n=t).line).text.length,null==(i=n.ch)||r=t:o.to>t);(r||(r=[])).push(new Ee(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.fromt)&&(!n||Ne(n,o.marker)<0)&&(n=o.marker)}return n}function $e(e,t,n,r,i){var o=le(e,t),a=Te&&o.markedSpans;if(a)for(var s=0;se.lastLine())return t;var n,r=le(e,t);if(!We(e,r))return t;for(;n=je(r);)r=n.find(1,!0).line;return fe(r)+1}function We(e,t){var n=Te&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Ze=null;function Ye(e,t,n){var r;Ze=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:Ze=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:Ze=i)}return null!=r?r:Ze}var Qe=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,i=/[1n]/;function o(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l,c="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var u=a.length,d=[],f=0;f=this.string.length},Ot.prototype.sol=function(){return this.pos==this.lineStart},Ot.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ot.prototype.next=function(){if(this.post},Ot.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ot.prototype.skipToEnd=function(){this.pos=this.string.length},Ot.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(-1e.options.maxHighlightLength&&Dt(e.doc.mode,r.state),o=Nt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),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 Pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new qt(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;ar.first&&le(r,o-1).stateAfter,s=a?qt.fromSaved(r,a,o):new qt(r,Ft(r.mode),o);return r.iter(o,t,function(n){jt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}qt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},qt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},qt.prototype.nextLine=function(){this.line++,0e.options.maxHighlightLength?(s=!1,a&&jt(e,t,r,d.pos),d.pos=t.length,null):Ut($t(n,d,r.state,f),o),f){var p=f[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;cc&&d.from<=c);f++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function en(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function tn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,f,p=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=s="",d=f=null,v=1/0;for(var y=[],b=void 0,x=0;xh||k.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&v>w.to&&(v=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==h&&(u+=" "+k.startStyle),k.endStyle&&w.to==v&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((f||(f={})).title=k.title),k.attributes)for(var _ in k.attributes)(f||(f={}))[_]=k.attributes[_];k.collapsed&&(!d||Ne(d.marker,k)<0)&&(d=w)}else w.from>h&&v>w.from&&(v=w.from)}if(b)for(var C=0;Cn)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function En(e,t,n,r){return Dn(e,Ln(e,t),n,r)}function An(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&tt)&&(i=(o=l-s)-1,l<=t&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var d=Ye(s,l,c),f=Ze,p=u(l,d,"before"==c);return null!=f&&(p.other=u(l,f,"before"!=c)),p}function Wn(e,t){var n=0;t=_e(e.doc,t),e.options.lineWrapping||(n=Jn(e.display)*t.ch);var r=le(e.doc,t.line),i=Ge(r)+xn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Vn(e,t,n,r,i){var o=ge(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Gn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Vn(r.first,0,null,!0,-1);var i=pe(r,n),o=r.first+r.size-1;if(or},o,i)}}function Xn(e,t,n,r){return n||(n=Ln(e,t)),Kn(e,t,n,$n(e,t,Dn(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function Yn(e,t,n,r,i){i-=Ge(t);var o=Ln(e,t),a=Rn(t),s=0,l=t.text.length,c=!0,u=Je(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var s=Kn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,f=0;f=c||p.to<=l)){var h=Dn(e,r,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=hc&&(u={from:u.from,to:c,level:u.level}),u}:function(e,t,n,r,i,o,a){var s=ae(function(s){var l=i[s],c=1!=l.level;return Zn(Un(e,ge(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),l=i[s];if(0a&&(l=i[s-1])}return l})(e,t,n,o,u,r,i);s=(c=1!=d.level)?d.from:d.to-1,l=c?d.to:d.from-1}var f,p,h=null,m=null,g=ae(function(t){var n=Dn(e,o,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},s,l),v=!1;if(m){var y=r-m.left=x.bottom}return Vn(n,g=oe(t.text,g,1),p,v,r-f)}function Qn(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Mn){Mn=L("pre");for(var t=0;t<49;++t)Mn.appendChild(document.createTextNode("x")),Mn.appendChild(L("br"));Mn.appendChild(document.createTextNode("x"))}A(e.measure,Mn);var n=Mn.offsetHeight/50;return 3=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?f:r,function(e,t,i,d){var g="ltr"==i,v=p(e,g?"left":"right"),y=p(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==f,w=0==d,k=!m||d==m.length-1;if(y.top-v.top<=3){var _=(c?x:b)&&k,C=(c?b:x)&&w?s:(g?v:y).left,S=_?l:(g?y:v).right;u(C,v.top,S-C,v.bottom)}else{var T,E,A,L;L=g?(T=c&&b&&w?s:v.left,E=c?l:h(e,i,"before"),A=c?s:h(t,i,"after"),c&&x&&k?l:y.right):(T=c?h(e,i,"before"):s,E=!c&&b&&w?l:v.right,A=!c&&x&&k?s:y.left,c?h(t,i,"after"):l),u(T,v.top,E-T,v.bottom),v.bottome.display.sizerWidth){var h=Math.ceil(c/Jn(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function vr(e){if(e.widgets)for(var t=0;t=a&&(o=pe(t,Ge(le(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function br(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=tr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;ao&&(t.bottom=t.top+o);var s=e.doc.height+wn(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,f=Cn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>f;return p&&(t.right=t.left+f),t.left<10?a.scrollLeft=0:t.leftf+d-3&&(a.scrollLeft=t.right+(p?0:10)-f),a}function kr(e,t){null!=t&&(Sr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function _r(e){Sr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Cr(e,t,n){null==t&&null==n||Sr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Sr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Tr(e,Wn(e,t.from),Wn(e,t.to),t.margin))}function Tr(e,t,n,r){var i=wr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Cr(e,i.scrollLeft,i.scrollTop)}function Er(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ri(e,{top:t}),Ar(e,t,!0),n&&ri(e),Qr(e,100))}function Ar(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 Lr(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,br(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Dr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+wn(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:r,scrollHeight:r+_n(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Mr=function(e,t,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),tt(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),tt(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Mr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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&&0=i.viewTo)||i.maxLineChanged&&r.options.lineWrapping,e.update=e.mustUpdate&&new ei(r,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function $r(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=L("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-xn(e.display))+"px;\n height: "+(t.bottom-t.top+_n(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;st)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&He(e.doc,t)i.viewFrom?Xr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)Xr(e);else if(t<=i.viewFrom){var o=Zr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):Xr(e)}else if(n>=i.viewTo){var a=Zr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):Xr(e)}else{var s=Zr(e,t,t,-1),l=Zr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(rn(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):Xr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[or(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==R(a,n)&&a.push(n)}}}function Xr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Zr(e,t,n,r){var i,o=or(e,t),a=e.display.view;if(!Te||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l=e.display.viewTo)){var n=+new Date+e.options.workTime,r=Pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Dt(t.mode,r.state):null,l=Nt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!d&&fn)return Qr(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Hr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Yr(e))return!1;xr(e)&&(Xr(e),t.dims=er(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),Te&&(o=He(e.doc,o),a=Ue(e.doc,a));var s,c,u,d,f=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;c=o,u=a,0==(d=(s=e).display).view.length||c>=d.viewTo||u<=d.viewFrom?(d.view=rn(s,c,u),d.viewFrom=c):(d.viewFrom>c?d.view=rn(s,c,d.viewFrom).concat(d.view):d.viewFromu&&(d.view=d.view.slice(0,or(s,u)))),d.viewTo=u,n.viewOffset=Ge(le(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var p=Yr(e);if(!f&&0==p&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var h=function(e){if(e.hasFocus())return null;var t=F();if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return 4=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ti(e,t);r=!1){gr(e);var i=Dr(e);ar(e),Or(e,i),oi(e,i),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 ri(e,t){var n=new ei(e,t);if(ti(e,n)){gr(e),ni(e,n);var r=Dr(e);ar(e),Or(e,r),oi(e,r),n.finish()}}function ii(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function oi(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+_n(e)+"px"}function ai(e){var t=e.display.gutters,n=e.options.gutters;E(t);for(var r=0;rs.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var f=t.target,p=a.view;f!=s;f=f.parentNode)for(var h=0;hl-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=(s=i).lastOp==r?(Li(s.done),X(s.done)):s.done.length&&!X(s.done).ranges?X(s.done):1i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=l,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||it(e,"historyAdded")}function Mi(e,t){var n=X(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Fi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Oi(e){if(!e)return null;for(var t,n=0;n=t.ch:s.to>t.ch))){if(i&&(it(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=Xi(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=ve(c,n))&&(r<0?u<0:0e.first?_e(e,ge(t.line-1)):null:0e.lastLine())){if(t.from.lineo&&(t={from:t.from,to:ge(o,le(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ce(e,t.from,t.to),n||(n=yi(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=fe(Be(le(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0})),-1i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiert.display.maxLineLength&&(t.display.maxLine=u,t.display.maxLineLength=d,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Gr(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Wi(t.doc)),t&&sn(t,"markerCleared",t,this,i,o),n&&jr(t),this.parent&&this.parent.clear()}},ho.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=_e(this,e),t=_e(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;rt&&(t=e.from),null!=e.to&&e.toe.text.length?null:r}function Ro(e,t,n){var r=jo(e,t.ch,n);return null==r?null:new ge(t.line,r,n<0?"after":"before")}function $o(e,t,n,r,i){if(e){var o=Je(n,t.doc.direction);if(o){var a,s=i<0?X(o):o[0],l=i<0==(1==s.level)?"after":"before";if(0e.doc.first){var a=le(e.doc,i.line-1).text;a&&(i=new ge(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ge(i.line-1,a.length-1),i,"+transpose"))}n.push(new pi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Hr(e,function(){for(var t=e.listSelections(),n=t.length-1;0<=n;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;ry&&i.push(new pi(ge(m,y),ge(m,V(v,h,c))))}i.length||i.push(new pi(n,n)),Bi(o,hi(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,w=ia(e,t,r.unit),k=x.anchor;k=0=m.to||h.linef.bottom?20:0;g&&setTimeout(Ur(e,function(){p==u&&(i.scroller.scrollTop+=g,t(c))}),50)}}(t):h(t)}),g=Ur(e,h);e.state.selectingText=g,tt(i.wrapper.ownerDocument,"mousemove",m),tt(i.wrapper.ownerDocument,"mouseup",g)}(e,r,t,v)}(u,m,v,e):pt(e)==d.scroller&&ct(e):2==g?(m&&zi(u.doc,m),setTimeout(function(){return d.input.focus()},20)):3==g&&(_?u.display.input.onContextMenu(e):pr(u)))}}function ia(e,t,n){if("char"==n)return new pi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new pi(ge(t.line,0),_e(e.doc,ge(t.line+1,0)));var r=n(e,t);return new pi(r.from,r.to)}function oa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&ct(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!st(e,n))return dt(t);o-=s.top-a.viewOffset;for(var l=0;l=i)return it(e,n,e,pe(e.doc,o),e.options.gutters[l],t),dt(t)}}function aa(e,t){return oa(e,t,"gutterClick",!0)}function sa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),zn(e)}na.prototype.compare=function(e,t,n){return this.time+400>e&&0==ve(t,this.pos)&&n==this.button};var la={toString:function(){return"CodeMirror.Init"}},ca={},ua={};function da(e){ai(e),Gr(e),br(e)}function fa(e,t,n){if(!t!=!(n&&n!=la)){var r=e.display.dragFunctions,i=t?tt:rt;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function pa(e){e.options.lineWrapping?(O(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Xe(e)),rr(e),Gr(e),zn(e),setTimeout(function(){return Or(e)},100)}function ha(e,t){var n=this;if(!(this instanceof ha))return new ha(e,t);this.options=t=t?z(t):{},z(ca,t,!1),si(t);var r=t.value;"string"==typeof r?r=new xo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new ha.inputStyles[t.inputStyle](this),o=this.display=new se(e,r,i);for(var c in ai(o.wrapper.CodeMirror=this),sa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Nr(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 j,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;tt(t.scroller,"mousedown",Ur(e,ra)),tt(t.scroller,"dblclick",a&&s<11?Ur(e,function(t){if(!ot(e,t)){var n=ir(e,t);if(n&&!aa(e,t)&&!bn(e.display,t)){ct(t);var r=e.findWordAt(n);zi(e.doc,r.anchor,r.head)}}}):function(t){return ot(e,t)||ct(t)}),tt(t.scroller,"contextmenu",function(t){return function(e,t){var n,r;bn(e.display,t)||(r=t,st(n=e,"gutterContextMenu")&&oa(n,r,"gutterContextMenu",!1))||ot(e,t,"contextmenu")||_||e.display.input.onContextMenu(t)}(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return 400o.first?P(le(o,t-1).text,null,a):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 d="",f=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)f+=a,d+="\t";if(f=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=Ye(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(0n.ch:a.from=a.from&&f>=u.begin)){var p=d?"before":"after";return new ge(n.line,f,p)}}var h=function(e,t,r){for(var o=function(e,t){return t?new ge(n.line,l(e,1),"before"):new ge(n.line,e,"after")};0<=e&&e=e.first+e.size||(t=new ge(a,t.ch,t.sticky),!(s=le(e,a))))return!1;t=$o(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||l(!f);f=!1){var p=s.text.charAt(t.ch)||"\n",h=te(p,d)?"w":u&&"\n"==p?"n":!u||/\s/.test(p)?null:"p";if(!u||f||h||(h="s"),c&&c!=h){n<0&&(n=1,l(),t.sticky="after");break}if(h&&(c=h),0=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ea=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Aa(e,t){var n=An(e,t.line);if(!n||n.hidden)return null;var r=le(e.doc,t.line),i=Tn(n,r,t.line),o=Je(r,e.doc.direction),a="left";o&&(a=Ye(o,t.ch)%2?"right":"left");var s=On(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function La(e,t){return t&&(e.bad=!0),e}function Da(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return La(e.clipPos(ge(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Aa(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=ge(a.line-1,le(r.doc,a.line-1).length)),s.ch==le(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;n=a.line==i.viewFrom||0==(e=or(r,a.line))?(t=fe(i.view[0].line),i.view[0].node):(t=fe(i.view[e].line),i.view[e-1].node.nextSibling);var l,c,u=or(r,s.line);if(c=u==i.view.length-1?(l=i.viewTo-1,i.lineDiv.lastChild):(l=fe(i.view[u+1].line)-1,i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,f=t.getAttribute("cm-marker");if(f){var p=e.findMarks(ge(r,0),ge(i+1,0),(g=+f,function(e){return e.id==g}));return void(p.length&&(o=p[0].find(0))&&u(ce(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;ma.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=ge(t,p),k=ge(l,f.length?X(f).length-h:0);return 1r&&(ga(t,o.head.line,e,!0),r=o.head.line,i==t.doc.sel.primIndex&&_r(t));else{var a=o.from(),s=o.to(),l=Math.max(r,a.line);r=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var c=l;c>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]l)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=l&&(a=e.bottom),s+t.offsetWidth>c&&(s=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(s=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&function(e,t){var n=wr(e,t);null!=n.scrollTop&&Er(e,n.scrollTop),null!=n.scrollLeft&&Lr(e,n.scrollLeft)}(this,{left:s,top:a,right:s+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Wr(Yo),triggerOnKeyPress:Wr(Jo),triggerOnKeyUp:Qo,triggerOnMouseDown:Wr(ra),execCommand:function(e){if(Bo.hasOwnProperty(e))return Bo[e].call(null,this)},triggerElectric:Wr(function(e){wa(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=_e(this.doc,e),a=0;a>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(102),d=/[&<>"]/,f=/[&<>"]/g,p={"&":"&","<":"<",">":">",'"':"""};function h(e){return p[e]}var m=/[.?*+^$[\]\\(){}|-]/g,g=n(68);t.lib={},t.lib.mdurl=n(103),t.lib.ucmicro=n(194),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===(t=e,Object.prototype.toString.call(t));var t},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,function(e,t,n){return t||(r=e,l=0,i(u,s=n)?u[s]:35===s.charCodeAt(0)&&c.test(s)&&o(l="x"===s[1].toLowerCase()?parseInt(s.slice(2),16):parseInt(s.slice(1),10))?a(l):r);var r,s,l})},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(f,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(8192<=e&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){var r=n(51)("wks"),i=n(27),o=n(3).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){for(var r=n(30),i=n(24),o=n(15),a=n(3),s=n(16),l=n(29),c=n(2),u=c("iterator"),d=c("toStringTag"),f=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=i(p),m=0;mk;k++)i(m,x=w[k])&&!i(h,x)&&d(h,x,u(m,x));(h.prototype=g).constructor=h,n(15)(r,p,h)}},function(e,t,n){n(100)("asyncIterator")},function(e,t,n){"use strict";var r=n(3),i=n(17),o=n(7),a=n(5),s=n(15),l=n(185).KEY,c=n(8),u=n(51),d=n(39),f=n(27),p=n(2),h=n(101),m=n(100),g=n(186),v=n(98),y=n(10),b=n(11),x=n(23),w=n(37),k=n(28),_=n(56),C=n(187),S=n(59),T=n(6),E=n(24),A=S.f,L=T.f,D=C.f,M=r.Symbol,F=r.JSON,O=F&&F.stringify,I="prototype",q=p("_hidden"),N=p("toPrimitive"),z={}.propertyIsEnumerable,P=u("symbol-registry"),j=u("symbols"),R=u("op-symbols"),$=Object[I],B="function"==typeof M,H=r.QObject,U=!H||!H[I]||!H[I].findChild,W=o&&c(function(){return 7!=_(L({},"a",{get:function(){return L(this,"a",{value:7}).a}})).a})?function(e,t,n){var r=A($,t);r&&delete $[t],L(e,t,n),r&&e!==$&&L($,t,r)}:L,V=function(e){var t=j[e]=_(M[I]);return t._k=e,t},G=B&&"symbol"==typeof M.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof M},K=function(e,t,n){return e===$&&K(R,t,n),y(e),t=w(t,!0),y(n),i(j,t)?(n.enumerable?(i(e,q)&&e[q][t]&&(e[q][t]=!1),n=_(n,{enumerable:k(0,!1)})):(i(e,q)||L(e,q,k(1,{})),e[q][t]=!0),W(e,t,n)):L(e,t,n)},X=function(e,t){y(e);for(var n,r=g(t=x(t)),i=0,o=r.length;io;)i(j,t=n[o++])||t==q||t==l||r.push(t);return r},J=function(e){for(var t,n=e===$,r=D(n?R:x(e)),o=[],a=0;r.length>a;)!i(j,t=r[a++])||n&&!i($,t)||o.push(j[t]);return o};B||(s((M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var e=f(0te;)p(ee[te++]);for(var ne=E(p.store),re=0;ne.length>re;)m(ne[re++]);a(a.S+a.F*!B,"Symbol",{for:function(e){return i(P,e+="")?P[e]:P[e]=M(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in P)if(P[t]===e)return t},useSetter:function(){U=!0},useSimple:function(){U=!1}}),a(a.S+a.F*!B,"Object",{create:function(e,t){return void 0===t?_(e):X(_(e),t)},defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:Y,getOwnPropertyNames:Q,getOwnPropertySymbols:J}),F&&a(a.S+a.F*(!B||c(function(){var e=M();return"[null]"!=O([e])||"{}"!=O({a:e})||"{}"!=O(Object(e))})),"JSON",{stringify:function(e){for(var t,n,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=t=r[1],(b(t)||void 0!==e)&&!G(e))return v(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),r[1]=t,O.apply(F,r)}}),M[I][N]||n(16)(M[I],N,M[I].valueOf),d(M,"Symbol"),d(Math,"Math",!0),d(r.JSON,"JSON",!0)},function(e,t,n){var r=n(3),i=n(16),o=n(17),a=n(27)("src"),s="toString",l=Function[s],c=(""+l).split(s);n(20).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(l&&(o(n,a)||i(n,a,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[a]||l.call(this)})},function(e,t,n){var r=n(6),i=n(28);e.exports=n(7)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(36);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";var r,i,o,a,s=n(26),l=n(3),c=n(18),u=n(73),d=n(5),f=n(11),p=n(36),h=n(117),m=n(118),g=n(119),v=n(78).set,y=n(121)(),b=n(80),x=n(122),w=n(123),k=n(124),_="Promise",C=l.TypeError,S=l.process,T=S&&S.versions,E=T&&T.v8||"",A=l[_],L="process"==u(S),D=function(){},M=i=b.f,F=!!function(){try{var e=A.resolve(1),t=(e.constructor={})[n(2)("species")]=function(e){e(D,D)};return(L||"function"==typeof PromiseRejectionEvent)&&e.then(D)instanceof t&&0!==E.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),O=function(e){var t;return!(!f(e)||"function"!=typeof(t=e.then))&&t},I=function(e,t){if(!e._n){e._n=!0;var n=e._c;y(function(){for(var r=e._v,i=1==e._s,o=0,a=function(t){var n,o,a,s=i?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(i||(2==e._h&&z(e),e._h=1),!0===s?n=r:(u&&u.enter(),n=s(r),u&&(u.exit(),a=!0)),n===t.promise?c(C("Promise-chain cycle")):(o=O(n))?o.call(n,l,c):l(n)):c(r)}catch(t){u&&!a&&u.exit(),c(t)}};n.length>o;)a(n[o++]);e._c=[],e._n=!1,t&&!e._h&&q(e)})}},q=function(e){v.call(l,function(){var t,n,r,i=e._v,o=N(e);if(o&&(t=x(function(){L?S.emit("unhandledRejection",i,e):(n=l.onunhandledrejection)?n({promise:e,reason:i}):(r=l.console)&&r.error&&r.error("Unhandled promise rejection",i)}),e._h=L||N(e)?2:1),e._a=void 0,o&&t.e)throw t.v})},N=function(e){return 1!==e._h&&0===(e._a||e._c).length},z=function(e){v.call(l,function(){var t;L?S.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})})},P=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},j=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw C("Promise can't be resolved itself");(t=O(e))?y(function(){var r={_w:n,_d:!1};try{t.call(e,c(j,r,1),c(P,r,1))}catch(e){P.call(r,e)}}):(n._v=e,n._s=1,I(n,!1))}catch(e){P.call({_w:n,_d:!1},e)}}};F||(A=function(e){h(this,A,_,"_h"),p(e),r.call(this);try{e(c(j,this,1),c(P,this,1))}catch(e){P.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(125)(A.prototype,{then:function(e,t){var n=M(g(this,A));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=L?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=c(j,e,1),this.reject=c(P,e,1)},b.f=M=function(e){return e===A||e===a?new o(e):i(e)}),d(d.G+d.W+d.F*!F,{Promise:A}),n(39)(A,_),n(81)(_),a=n(20)[_],d(d.S+d.F*!F,_,{reject:function(e){var t=M(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(s||!F),_,{resolve:function(e){return k(s&&this===a?A:this,e)}}),d(d.S+d.F*!(F&&n(82)(function(e){A.all(e).catch(D)})),_,{all:function(e){var t=this,n=M(t),r=n.resolve,i=n.reject,o=x(function(){var n=[],o=0,a=1;m(e,!1,function(e){var s=o++,l=!1;n.push(void 0),a++,t.resolve(e).then(function(e){l||(l=!0,n[s]=e,--a||r(n))},i)}),--a||r(n)});return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=M(t),r=n.reject,i=x(function(){m(e,!1,function(e){t.resolve(e).then(n.resolve,r)})});return i.e&&r(i.v),n.promise}})},function(e,t,n){var r=n(55),i=n(21);e.exports=function(e){return r(i(e))}},function(e,t,n){var r=n(90),i=n(58);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){n(41)("replace",2,function(e,t,n){return[function(r,i){"use strict";var o=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},n]})},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports={}},function(e,t,n){"use strict";var r=n(40),i=n(144),o=n(29),a=n(23);e.exports=n(89)(Array,"Array",function(e,t){this._t=a(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])},"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t,n){var r=n(21);e.exports=function(e){return Object(r(e))}},function(e,t,n){n(41)("split",2,function(e,t,r){"use strict";var i=n(60),o=r,a=[].push,s="split",l="length";if("c"=="abbc"[s](/(b)*/)[1]||4!="test"[s](/(?:)/,-1)[l]||2!="ab"[s](/(?:ab)*/)[l]||4!="."[s](/(.?)(.?)/)[l]||1<"."[s](/()()/)[l]||""[s](/.?/)[l]){var c=void 0===/()??/.exec("")[1];r=function(e,t){var n=String(this);if(void 0===e&&0===t)return[];if(!i(e))return o.call(n,e,t);var r,s,u,d,f,p=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),m=0,g=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,h+"g");for(c||(r=new RegExp("^"+v.source+"$(?!\\s)",h));(s=v.exec(n))&&!(m<(u=s.index+s[0][l])&&(p.push(n.slice(m,s.index)),!c&&1=g));)v.lastIndex===s.index&&v.lastIndex++;return m===n[l]?!d&&v.test("")||p.push(""):p.push(n.slice(m)),p[l]>g?p.slice(0,g):p}}else"0"[s](void 0,0)[l]&&(r=function(e,t){return void 0===e&&0===t?[]:o.call(this,e,t)});return[function(n,i){var o=e(this),a=null==n?void 0:n[t];return void 0!==a?a.call(n,o,i):r.call(String(o),n,i)},r]})},function(e,t,n){var r=n(6).f,i=Function.prototype,o=/^\s*function ([^ (]*)/;"name"in i||n(7)&&r(i,"name",{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(e){return""}}})},function(e,t,n){"use strict";n(179);var r=n(10),i=n(61),o=n(7),a="toString",s=/./[a],l=function(e){n(15)(RegExp.prototype,a,e,!0)};n(8)(function(){return"/a/b"!=s.call({source:"a",flags:"b"})})?l(function(){var e=r(this);return"/".concat(e.source,"/","flags"in e?e.flags:!o&&e instanceof RegExp?i.call(e):void 0)}):s.name!=a&&l(function(){return s.call(this)})},function(e,t,n){"use strict";(function(t,n){ -/*! - * Vue.js v2.5.17 - * (c) 2014-2018 Evan You - * Released under the MIT License. +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=109)}([function(e,t,n){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),f=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),g=/Android/.test(e),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),_=d&&e.match(/Version\/(\d*\.\d*)/);_&&(_=Number(_[1])),_&&_>=15&&(d=!1,l=!0);var k=y&&(c||d&&(null==_||_<12.11)),w=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,T=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function A(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return A(e).appendChild(t)}function L(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}m?O=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(O=function(e){try{e.select()}catch(e){}});var $=function(){this.id=null};function j(e,t){for(var n=0;n=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var G=[""];function K(e){for(;G.length<=e;)G.push(Z(G)+" ");return G[e]}function Z(e){return e[e.length-1]}function X(e,t){for(var n=[],r=0;r"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\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]/;function ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var se=null;function le(e,t,n){var r;se=null;for(var i=0;it)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:se=i)}return null!=r?r:se}var ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,c){var u,d="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var p=l.length,f=[],h=0;h-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function me(e,t){var n=fe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i0}function be(e){e.prototype.on=function(e,t){pe(this,e,t)},e.prototype.off=function(e,t){he(this,e,t)}}function xe(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function _e(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ke(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function we(e){xe(e),_e(e)}function Ce(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Te,Ae,Ee=function(){if(a&&s<9)return!1;var e=L("div");return"draggable"in e||"dragDrop"in e}();function Le(e){if(null==Te){var t=L("span","​");E(e,L("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Te=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Te?L("span","​"):L("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function De(e){if(null!=Ae)return Ae;var t=E(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return A(e),!(!n||n.left==n.right)&&(Ae=r.right-n.right<3)}var Me,Fe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ze=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ie="oncopy"in(Me=L("div"))||(Me.setAttribute("oncopy","return;"),"function"==typeof Me.oncopy),Oe=null,qe={},Ne={};function Pe(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Pe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Pe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function $e(e,t){t=Pe(t);var n=qe[t.name];if(!n)return $e(e,"text/plain");var r=n(e,t);if(je.hasOwnProperty(t.name)){var i=je[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var je={};function Re(e,t){var n=je.hasOwnProperty(e)?je[e]:je[e]={};N(t,n)}function Be(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function He(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 Ue(e,t,n){return!e.startState||e.startState(t,n)}var We=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ve(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 r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t=e.first&&tn?et(n,Ve(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,Ve(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},We.prototype.sol=function(){return this.pos==this.lineStart},We.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},We.prototype.next=function(){if(this.post},We.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},We.prototype.skipToEnd=function(){this.pos=this.string.length},We.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},We.prototype.backUp=function(e){this.pos-=e},We.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);if(i(o)==i(e))return!1!==t&&(this.pos+=e.length),!0},We.prototype.current=function(){return this.string.slice(this.start,this.pos)},We.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},We.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},We.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],o={};xt(e,t.text,e.doc.mode,n,function(e,t){return i.push(e,t)},o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,function(e,t){for(var n=l;ce&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Be(e.doc.mode,r.state),o=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),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 ft(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ut(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ve(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=o.modeFrontier))return s;var u=P(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&Ve(r,o-1).stateAfter,s=a?ut.fromSaved(r,a,o):new ut(r,Ue(r.mode),o);return r.iter(o,t,function(n){ht(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&rt.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,Be(e.mode,t.state),n,t.lookAhead):new ut(e,Be(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?Be(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var vt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var i,o=e.doc,a=o.mode;t=st(o,t);var s,l=Ve(o,t.line),c=ft(e,t.line,n),u=new We(l.text,e.options.tabSize,c);for(r&&(s=[]);(r||u.pose.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,d.pos),d.pos=t.length,l=null):l=bt(gt(n,d,r.state,p),o),p){var f=p[0].name;f&&(l="m-"+(l?f+" "+l:f))}if(!s||u!=l){for(;c=t:o.to>t);(r||(r=[])).push(new wt(a,o.from,l?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i=t:o.to>t);if(s||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from0&&s)for(var x=0;xt)&&(!n||Ft(n,o.marker)<0)&&(n=o.marker)}return n}function Nt(e,t,n,r,i){var o=Ve(e,t),a=kt&&o.markedSpans;if(a)for(var s=0;s=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Pt(e){for(var t;t=It(e);)e=t.find(-1,!0).line;return e}function $t(e,t){var n=Ve(e,t),r=Pt(n);return n==r?t:Xe(r)}function jt(e,t){if(t>e.lastLine())return t;var n,r=Ve(e,t);if(!Rt(e,r))return t;for(;n=Ot(r);)r=n.find(1,!0).line;return Xe(r)+1}function Rt(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,i=0;it.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}var Vt=function(e,t,n){this.text=e,Lt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,Et(e)}Vt.prototype.lineNo=function(){return Xe(this)},be(Vt);var Kt={},Zt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Zt:Kt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Yt(e,t){var n=D("span",null,null,l?"padding-right: .1px":null),r={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=Jt,De(e.display.measure)&&(a=ue(o,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[];var s=t!=e.display.externalMeasured&&Xe(o);nn(o,r,pt(e,o,s)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=I(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=I(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Le(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return me(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=I(r.pre.className,r.textClass||"")),r}function Qt(e){var t=L("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;ic&&d.from<=c);p++);if(d.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,d.to-c),i,o,null,s,l),o=null,r=r.slice(d.to-c),c=d.to}}}function tn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,d,p,f=i.length,h=0,m=1,g="",v=0;;){if(v==h){l=c=u=s="",p=null,d=null,v=1/0;for(var y=[],b=void 0,x=0;xh||k.collapsed&&_.to==h&&_.from==h)){if(null!=_.to&&_.to!=h&&v>_.to&&(v=_.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&_.from==h&&(u+=" "+k.startStyle),k.endStyle&&_.to==v&&(b||(b=[])).push(k.endStyle,_.to),k.title&&((p||(p={})).title=k.title),k.attributes)for(var w in k.attributes)(p||(p={}))[w]=k.attributes[w];k.collapsed&&(!d||Ft(d.marker,k)<0)&&(d=_)}else _.from>h&&v>_.from&&(v=_.from)}if(b)for(var C=0;C=f)break;for(var T=Math.min(f,v);;){if(g){var A=h+g.length;if(!d){var E=A>T?g.slice(0,T-h):g;t.addToken(t,E,a?a+l:l,u,h+E.length==v?c:"",s,p)}if(A>=T){g=g.slice(T-h),h=T;break}h=A,u=""}g=i.slice(o,o=n[m++]),a=Xt(n[m++],t.cm.options)}}else for(var L=1;Ln)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Dn(e,t,n,r){return zn(e,Fn(e,t),n,r)}function Mn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=qn(t.map,n,r),l=o.node,c=o.start,u=o.end,d=o.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&ie(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var f;c>0&&(d=r="right"),i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==r?f.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+nr(e.display),top:h.top,bottom:h.bottom}:On}for(var m=i.top-t.rect.top,g=i.bottom-t.rect.top,v=(m+g)/2,y=t.view.measure.heights,b=0;bt)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&i==l-s)for(;c=0&&(n=e[i]).left==n.right;i--);return n}function Pn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){var r=s[t],i=1==r.level;return a(n?e-1:e,i!=n)}var d=le(s,l,c),p=se,f=u(l,d,"before"==c);return null!=p&&(f.other=u(l,p,"before"!=c)),f}function Kn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=nr(e.display)*t.ch);var r=Ve(e.doc,t.line),i=Ht(r)+wn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Zn(e,t,n,r,i){var o=et(e,t,n);return o.xRel=i,r&&(o.outside=!0),o}function Xn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Zn(r.first,0,null,!0,-1);var i=Ye(r,n),o=r.first+r.size-1;if(i>o)return Zn(r.first+r.size-1,Ve(r,o).text.length,null,!0,1);t<0&&(t=0);for(var a=Ve(r,i);;){var s=er(e,a,i,t,n),l=qt(a,s.ch+(s.xRel>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Ve(r,i=c.line)}}function Yn(e,t,n,r){r-=Hn(t);var i=t.text.length,o=ae(function(t){return zn(e,n,t-1).bottom<=r},i,0);return i=ae(function(t){return zn(e,n,t).top>r},o,i),{begin:o,end:i}}function Qn(e,t,n,r){n||(n=Fn(e,t));var i=Un(e,t,zn(e,n,r),"line").top;return Yn(e,t,n,i)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,i){i-=Ht(t);var o=Fn(e,t),a=Hn(t),s=0,l=t.text.length,c=!0,u=ue(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?function(e,t,n,r,i,o,a){var s=Yn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,p=0;p=c||f.to<=l)){var h=1!=f.level,m=zn(e,r,h?Math.min(c,f.to)-1:Math.max(l,f.from)).right,g=mg)&&(u=f,d=g)}}return u||(u=i[i.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}:function(e,t,n,r,i,o,a){var s=ae(function(s){var l=i[s],c=1!=l.level;return Jn(Gn(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)},0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Gn(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Jn(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l})(e,t,n,o,u,r,i);c=1!=d.level,s=c?d.from:d.to-1,l=c?d.to:d.from-1}var p,f,h=null,m=null,g=ae(function(t){var n=zn(e,o,t);return n.top+=a,n.bottom+=a,!!Jn(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(h=t,m=n),!0)},s,l),v=!1;if(m){var y=r-m.left=x.bottom}return g=oe(t.text,g,1),Zn(n,g,f,v,r-p)}function tr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==In){In=L("pre");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(L("br"));In.appendChild(document.createTextNode("x"))}E(e.measure,In);var n=In.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),A(e.measure),n||1}function nr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=L("span","xxxxxxxxxx"),n=L("pre",[t]);E(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rr(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:ir(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ir(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function or(e){var t=tr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/nr(e.display)-3);return function(i){if(Rt(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kt&&$t(e.doc,t)i.viewFrom?dr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)dr(e);else if(t<=i.viewFrom){var o=pr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):dr(e)}else if(n>=i.viewTo){var a=pr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):dr(e)}else{var s=pr(e,t,t,-1),l=pr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):dr(e)}var c=i.externalMeasured;c&&(n=i.lineN&&t=r.viewTo)){var o=r.view[lr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==j(a,n)&&a.push(n)}}}function dr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function pr(e,t,n,r){var i,o=lr(e,t),a=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;$t(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function fr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||s.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(m,n||0,null==r?p:r,function(e,t,i,d){var g="ltr"==i,v=f(e,g?"left":"right"),y=f(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==p,_=0==d,k=!m||d==m.length-1;if(y.top-v.top<=3){var w=(c?b:x)&&_,C=(c?x:b)&&k,S=w?s:(g?v:y).left,T=C?l:(g?y:v).right;u(S,v.top,T-S,v.bottom)}else{var A,E,L,D;g?(A=c&&b&&_?s:v.left,E=c?l:h(e,i,"before"),L=c?s:h(t,i,"after"),D=c&&x&&k?l:y.right):(A=c?h(e,i,"before"):s,E=!c&&b&&_?l:v.right,L=!c&&x&&k?s:y.left,D=c?h(t,i,"after"):l),u(A,v.top,E-A,v.bottom),v.bottom0?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 xr(e){e.state.focused||(e.display.input.focus(),kr(e))}function _r(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,wr(e))},100)}function kr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(me(e,"focus",e,t),e.state.focused=!0,z(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),br(e))}function wr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(me(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Cr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||p<-.005)&&(Ze(i.line,l),Sr(i.line),i.rest))for(var f=0;fe.display.sizerWidth){var h=Math.ceil(c/nr(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=i.line,e.display.maxLineChanged=!0)}}}}function Sr(e){if(e.widgets)for(var t=0;t=a&&(o=Ye(t,Ht(Ve(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Ar(e,t){var n=e.display,r=tr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=En(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Cn(n),l=t.tops-r;if(t.topi+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,p=An(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.leftp+d-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function Er(e,t){null!=t&&(Mr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Lr(e){Mr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Dr(e,t,n){null==t&&null==n||Mr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Mr(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Kn(e,t.from),r=Kn(e,t.to);Fr(e,n,r,t.margin)}}function Fr(e,t,n,r){var i=Ar(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Dr(e,i.scrollLeft,i.scrollTop)}function zr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||oi(e,{top:t}),Ir(e,t,!0),n&&oi(e),ei(e,100))}function Ir(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 Or(e,t,n,r){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,li(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function qr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Cn(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:r,scrollHeight:r+Tn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Nr=function(e,t,n){this.cm=n;var r=this.vert=L("div",[L("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=L("div",[L("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),pe(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),pe(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Nr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r: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==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Nr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Nr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Nr.prototype.zeroWidthHack=function(){var e=y&&!f?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new $,this.disableVert=new $},Nr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,function r(){var i=e.getBoundingClientRect(),o="vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1);o!=e?e.style.pointerEvents="none":t.set(1e3,r)})},Nr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pr=function(){};function $r(e,t){t||(t=qr(e));var n=e.display.barWidth,r=e.display.barHeight;jr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Cr(e),jr(e,qr(e)),n=e.display.barWidth,r=e.display.barHeight}function jr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Pr.prototype.update=function(){return{bottom:0,right:0}},Pr.prototype.setScrollLeft=function(){},Pr.prototype.setScrollTop=function(){},Pr.prototype.clear=function(){};var Rr={native:Nr,null:Pr};function Br(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Rr[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),pe(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?Or(e,t):zr(e,t)},e),e.display.scrollbars.addClass&&z(e.display.wrapper,e.display.scrollbars.addClass)}var Hr=0;function Ur(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Hr},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Wr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ni(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Gr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Cr(t),e.barMeasure=qr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Dn(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+Tn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-An(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Kr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft1&&(a=!0)),null!=c.scrollLeft&&(Or(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return i}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin);!function(e,t){if(!ge(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!h){var o=L("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-wn(e.display))+"px;\n height: "+(t.bottom-t.top+Tn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,i)}var o=e.maybeHiddenMarkers,a=e.maybeUnhiddenMarkers;if(o)for(var s=0;s=e.display.viewTo)){var n=+new Date+e.options.workTime,r=ft(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?Be(t.mode,r.state):null,l=dt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!d&&pn)return ei(e,e.options.workDelay),!0}),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&Xr(e,function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==fr(e))return!1;ci(e)&&(dr(e),t.dims=rr(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),kt&&(o=$t(e.doc,o),a=jt(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,lr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Ht(Ve(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=fr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=F();if(!t||!M(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&M(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,d=0;d-1&&(f=!1),un(e,p,u,n)),f&&(A(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Je(e.options,u)))),a=p.node.nextSibling}else{var h=vn(e,p,u,n);o.insertBefore(h,a)}u+=p.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=F()&&(e.activeElt.focus(),e.anchorNode&&M(document.body,e.anchorNode)&&M(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),A(n.cursorDiv),A(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ei(e,400)),n.updateLineNumbers=null,!0}function ii(e,t){for(var n=t.viewport,r=!0;(r&&e.options.lineWrapping&&t.oldDisplayWidth!=An(e)||(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Cn(e.display)-En(e),n.top)}),t.visible=Tr(e.display,e.doc,n),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&ri(e,t);r=!1){Cr(e);var i=qr(e);hr(e),$r(e,i),si(e,i),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 oi(e,t){var n=new ni(e,t);if(ri(e,n)){Cr(e),ii(e,n);var r=qr(e);hr(e),$r(e,r),si(e,r),n.finish()}}function ai(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function si(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+Tn(e)+"px"}function li(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ir(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var p=t.target,f=a.view;p!=s;p=p.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var xi=function(e,t){this.anchor=e,this.head=t};function _i(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort(function(e,t){return tt(e.from(),t.from())}),n=j(t,i);for(var o=1;o0:l>=0){var c=ot(s.from(),a.from()),u=it(s.to(),a.to()),d=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new xi(d?u:c,d?c:u))}}return new bi(t,n)}function ki(e,t){return new bi([new xi(e,t||e)],0)}function wi(e){return e.text?et(e.from.line+e.text.length-1,Z(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return wi(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=wi(t).ch-t.to.ch),et(n,r)}function Si(e,t){for(var n=[],r=0;r1&&e.remove(s.line+1,h-1),e.insert(s.line+1,v)}ln(e,"change",e,t)}function Mi(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;as-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(qi(e.done),Z(e.done)):e.done.length&&!Z(e.done).ranges?Z(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Z(e.done)):void 0}(i,i.lastOp==r)))a=Z(o.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=wi(t):o.changes.push(Oi(e,t));else{var l=Z(i.done);for(l&&l.ranges||$i(e.sel,i.done),o={changes:[Oi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||me(e,"historyAdded")}function Pi(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Z(i.done),t))?i.done[i.done.length-1]=t:$i(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&qi(i.undone)}function $i(e,t){var n=Z(t);n&&n.ranges&&n.equals(e)||t.push(e)}function ji(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,n=0;n-1&&(Z(s)[d]=c[d],delete c[d])}}}return r}function Ui(e,t,n,r){if(r){var i=e.anchor;if(n){var o=tt(t,i)<0;o!=tt(n,i)<0?(i=t,t=n):o!=tt(t,n)<0&&(t=n)}return new xi(i,t)}return new xi(n||t,t)}function Wi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),Xi(e,new bi([Ui(e.sel.primary(),t,n,i)],0),r)}function Vi(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o=t.ch:s.to>t.ch))){if(i&&(me(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var c=l.find(r<0?1:-1),u=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(c=ro(e,c,-r,c&&c.line==t.line?o:null)),c&&c.line==t.line&&(u=tt(c,n))&&(r<0?u<0:u>0))return to(e,c,t,r,i)}var d=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(d=ro(e,d,r,d.line==t.line?o:null)),d?to(e,d,t,r,i):null}}return t}function no(e,t,n,r,i){var o=r||1,a=to(e,t,n,o,i)||!i&&to(e,t,n,o,!0)||to(e,t,n,-o,i)||!i&&to(e,t,n,-o,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ro(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?st(e,et(t.line-1)):null:n>0&&t.ch==(r||Ve(e,t.line)).text.length?t.line0)){var u=[l,1],d=tt(c.from,s.from),p=tt(c.to,s.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)so(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else so(e,t)}}function so(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=Si(e,t);Ni(e,t,n,e.cm?e.cm.curOp.id:NaN),uo(e,t,n,Tt(e,t));var r=[];Mi(e,function(e,n){n||-1!=j(r,e.history)||(mo(e.history,t),r.push(e.history)),uo(e,t,null,Tt(e,t))})}}function lo(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c=0;--f){var h=p(f);if(h)return h.v}}}}function co(e,t){if(0!=t&&(e.first+=t,e.sel=new bi(X(e.sel.ranges,function(e){return new xi(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){cr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.lineo&&(t={from:t.from,to:et(o,Ve(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=Si(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Xe(Pt(Ve(r,o.line))),r.iter(l,a.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),r.sel.contains(t.from,t.to)>-1&&ve(e),Di(r,t,n,or(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,function(e){var t=Ut(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var i=Ve(e,r).stateAfter;if(i&&(!(i instanceof ct)||r+i.lookAhead1||!(this.children[0]instanceof vo))){var s=[];this.collapse(s),this.children=[new vo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=i.lines.length%25+25,s=a;s10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Nt(e,t.line,t,n,o)||t.line!=n.line&&Nt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!0}o.addToHistory&&Ni(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,function(e){c&&o.collapsed&&!c.options.lineWrapping&&Pt(e)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Ze(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new wt(o,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l}),o.collapsed&&e.iter(t.line,n.line+1,function(t){Rt(e,t)&&Ze(t,0)}),o.clearOnEnter&&pe(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(_t=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++_o,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)cr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)ur(c,u,"text");o.atomic&&Ji(c.doc),ln(c,"markerAdded",c,o)}return o}ko.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Ur(e),ye(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&cr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ji(e.doc)),e&&ln(e,"markerCleared",e,this,r,i),t&&Wr(e),this.parent&&this.parent.clear()}},ko.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i=0;l--)ao(this,r[l]);s?Zi(this,s):this.cm&&Lr(this.cm)}),undo:Jr(function(){lo(this,"undo")}),redo:Jr(function(){lo(this,"redo")}),undoSelection:Jr(function(){lo(this,"undo",!0)}),redoSelection:Jr(function(){lo(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,r=0;r=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i}),r},getAllMarks:function(){var e=[];return this.iter(function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=o,++n}),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var u=e.dataTransfer.getData("Text");if(u){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),Yi(t.doc,ki(n,n)),d)for(var p=0;p=0;t--)po(e.doc,"",r[t].from,r[t].to,"+delete");Lr(e)})}function Zo(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Xo(e,t,n){var r=Zo(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function Yo(e,t,n,r,i){if(e){var o=ue(n,t.doc.direction);if(o){var a,s=i<0?Z(o):o[0],l=i<0==(1==s.level),c=l?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Fn(t,n);a=i<0?n.text.length-1:0;var d=zn(t,u,a).top;a=ae(function(e){return zn(t,u,e).top==d},i<0==(1==s.level)?s.from:s.to-1,a),"before"==c&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new et(r,a,c)}}return new et(r,i<0?n.text.length:0,i<0?"before":"after")}jo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},jo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},jo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},jo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},jo.default=y?jo.macDefault:jo.pcDefault;var Qo={selectAll:io,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Ko(e,function(t){if(t.empty()){var n=Ve(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)i=new et(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),et(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ve(e.doc,i.line-1).text;a&&(i=new et(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(i.line-1,a.length-1),i,"+transpose"))}n.push(new xi(i,i))}e.setSelections(n)})},newlineAndIndent:function(e){return Xr(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 r=0;r-1&&(tt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(tt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=Yr(e,function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,he(i.wrapper.ownerDocument,"mouseup",c),he(i.wrapper.ownerDocument,"mousemove",u),he(i.scroller,"dragstart",d),he(i.scroller,"drop",c),o||(xe(t),r.addNew||Wi(e.doc,n,null,null,r.extend),l||a&&9==s?setTimeout(function(){i.wrapper.ownerDocument.body.focus(),i.input.focus()},20):i.input.focus())}),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop(),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",d),pe(i.scroller,"drop",c),_r(e),setTimeout(function(){return i.input.focus()},20)}(e,r,t,o):function(e,t,n,r){var i=e.display,o=e.doc;xe(t);var a,s,l=o.sel,c=l.ranges;if(r.addNew&&!r.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new xi(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new xi(n,n)),n=sr(e,t,!0,!0),s=-1;else{var u=ha(e,n,r.unit);a=r.extend?Ui(a,u.anchor,u.head,r.extend):u}r.addNew?-1==s?(s=c.length,Xi(o,_i(e,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==r.unit&&!r.extend?(Xi(o,_i(e,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Gi(o,s,a,U):(s=0,Xi(o,new bi([a],0),U),l=o.sel);var d=n;function p(t){if(0!=tt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],c=e.options.tabSize,u=P(Ve(o,n.line).text,n.ch,c),p=P(Ve(o,t.line).text,t.ch,c),f=Math.min(u,p),h=Math.max(u,p),m=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=g;m++){var v=Ve(o,m).text,y=V(v,f,c);f==h?i.push(new xi(et(m,y),et(m,y))):v.length>y&&i.push(new xi(et(m,y),et(m,V(v,h,c))))}i.length||i.push(new xi(n,n)),Xi(o,_i(e,l.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=a,_=ha(e,t,r.unit),k=x.anchor;tt(_.anchor,k)>0?(b=_.head,k=ot(x.from(),_.anchor)):(b=_.anchor,k=it(x.to(),_.head));var w=l.ranges.slice(0);w[s]=function(e,t){var n=t.anchor,r=t.head,i=Ve(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var a=le(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(o,r.ch,r.sticky),d=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?d<0:d>0}var p=o[c+(l?-1:0)],f=l==(1==p.level),h=f?p.from:p.to,m=f?"after":"before";return n.ch==h&&n.sticky==m?t:new xi(new et(n.line,h,m),r)}(e,new xi(st(o,k),b)),Xi(o,_i(e,w,s),U)}}var f=i.wrapper.getBoundingClientRect(),h=0;function m(t){e.state.selectingText=!1,h=1/0,t&&(xe(t),i.input.focus()),he(i.wrapper.ownerDocument,"mousemove",g),he(i.wrapper.ownerDocument,"mouseup",v),o.history.lastSelOrigin=null}var g=Yr(e,function(t){0!==t.buttons&&Se(t)?function t(n){var a=++h,s=sr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,d)){e.curOp.focus=F(),p(s);var l=Tr(i,o);(s.line>=l.to||s.linef.bottom?20:0;c&&setTimeout(Yr(e,function(){h==a&&(i.scroller.scrollTop+=c,t(n))}),50)}}(t):m(t)}),v=Yr(e,m);e.state.selectingText=v,pe(i.wrapper.ownerDocument,"mousemove",g),pe(i.wrapper.ownerDocument,"mouseup",v)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&xe(e):2==i?(r&&Wi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):3==i&&(w?t.display.input.onContextMenu(e):_r(t)))}}function ha(e,t,n){if("char"==n)return new xi(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new xi(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new xi(r.from,r.to)}function ma(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&xe(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return ke(t);o-=s.top-a.viewOffset;for(var l=0;l=i){var u=Ye(e.doc,o),d=e.display.gutterSpecs[l];return me(e,n,e,u,d.className,t),ke(t)}}}function ga(e,t){return ma(e,t,"gutterClick",!0)}function va(e,t){kn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&ma(e,t,"gutterContextMenu",!1)}(e,t)||ge(e,t,"contextmenu")||w||e.display.input.onContextMenu(t)}function ya(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),jn(e)}pa.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var ba={toString:function(){return"CodeMirror.Init"}},xa={},_a={};function ka(e,t,n){var r=n&&n!=ba;if(!t!=!r){var i=e.display.dragFunctions,o=t?pe:he;o(e.display.scroller,"dragstart",i.start),o(e.display.scroller,"dragenter",i.enter),o(e.display.scroller,"dragover",i.over),o(e.display.scroller,"dragleave",i.leave),o(e.display.scroller,"drop",i.drop)}}function wa(e){e.options.lineWrapping?(z(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),Wt(e)),ar(e),cr(e),jn(e),setTimeout(function(){return $r(e)},100)}function Ca(e,t){var n=this;if(!(this instanceof Ca))return new Ca(e,t);this.options=t=t?N(t):{},N(xa,t,!1);var r=t.value;"string"==typeof r?r=new Eo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new Ca.inputStyles[t.inputStyle](this),o=this.display=new fi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,ya(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Br(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 $,keySeq:null,specialChars:null},t.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout(function(){return n.display.input.reset(!0)},20),function(e){var t=e.display;pe(t.scroller,"mousedown",Yr(e,fa)),pe(t.scroller,"dblclick",a&&s<11?Yr(e,function(t){if(!ge(e,t)){var n=sr(e,t);if(n&&!ga(e,t)&&!kn(e.display,t)){xe(t);var r=e.findWordAt(n);Wi(e.doc,r.anchor,r.head)}}}):function(t){return ge(e,t)||xe(t)}),pe(t.scroller,"contextmenu",function(t){return va(e,t)});var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout(function(){return t.activeTouch=null},1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}pe(t.scroller,"touchstart",function(i){if(!ge(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!ga(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),pe(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),pe(t.scroller,"touchend",function(n){var r=t.activeTouch;if(r&&!kn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new xi(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new xi(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),xe(n)}i()}),pe(t.scroller,"touchcancel",i),pe(t.scroller,"scroll",function(){t.scroller.clientHeight&&(zr(e,t.scroller.scrollTop),Or(e,t.scroller.scrollLeft,!0),me(e,"scroll",e))}),pe(t.scroller,"mousewheel",function(t){return yi(e,t)}),pe(t.scroller,"DOMMouseScroll",function(t){return yi(e,t)}),pe(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){ge(e,t)||we(t)},over:function(t){ge(e,t)||(function(e,t){var n=sr(e,t);if(n){var r=document.createDocumentFragment();gr(e,n,r),e.display.dragCursor||(e.display.dragCursor=L("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,r)}}(e,t),we(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Lo<100))we(t);else if(!ge(e,t)&&!kn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=L("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}(e,t)},drop:Yr(e,Do),leave:function(t){ge(e,t)||Mo(e)}};var l=t.input.getField();pe(l,"keyup",function(t){return la.call(e,t)}),pe(l,"keydown",Yr(e,sa)),pe(l,"keypress",Yr(e,ca)),pe(l,"focus",function(t){return kr(e,t)}),pe(l,"blur",function(t){return wr(e,t)})}(this),Io(),Ur(this),this.curOp.forceUpdate=!0,Fi(this,r),t.autofocus&&!v||this.hasFocus()?setTimeout(q(kr,this),20):wr(this),_a)_a.hasOwnProperty(c)&&_a[c](n,t[c],ba);ci(this),t.finishInit&&t.finishInit(this);for(var u=0;u150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?P(Ve(o,t-1).text,null,a):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 d="",p=0;if(e.options.indentWithTabs)for(var f=Math.floor(c/a);f;--f)p+=a,d+="\t";if(pa,l=Fe(t),c=null;if(s&&r.ranges.length>1)if(Aa&&Aa.text.join("\n")==t){if(r.ranges.length%Aa.text.length==0){c=[];for(var u=0;u=0;p--){var f=r.ranges[p],h=f.from(),m=f.to();f.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?m=et(m.line,Math.min(Ve(o,m.line).text.length,m.ch+Z(l).length)):s&&Aa&&Aa.lineWise&&Aa.text.join("\n")==t&&(h=m=et(h.line,0)));var g={from:h,to:m,text:c?c[p%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ao(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&Ma(e,t),Lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Da(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Xr(t,function(){return La(t,n,0,null,"paste")}),!0}function Ma(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Ta(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ve(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Ta(e,i.head.line,"smart"));a&&ln(e,"electricInput",e,i.head.line)}}}function Fa(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=le(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&p>=u.begin)){var f=d?"before":"after";return new et(n.line,p,f)}}var h=function(e,t,r){for(var o=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(m=h(r>0?0:i.length-1,r,c(g)))?null:m}(e.cm,s,t,n):Xo(s,t,n))){if(r||((a=t.line+n)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(s=Ve(e,a)))))return!1;t=Yo(i,e.cm,s,t.line,n)}else t=o;return!0}if("char"==r)l();else if("column"==r)l(!0);else if("word"==r||"group"==r)for(var c=null,u="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||l(!p);p=!1){var f=s.text.charAt(t.ch)||"\n",h=te(f,d)?"w":u&&"\n"==f?"n":!u||/\s/.test(f)?null:"p";if(!u||p||h||(h="s"),c&&c!=h){n<0&&(n=1,l(),t.sticky="after");break}if(h&&(c=h),n>0&&!l(!p))break}var m=no(e,t,o,a,!0);return nt(o,m)&&(m.hitSide=!0),m}function qa(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*tr(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Xn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Na=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new $,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Pa(e,t){var n=Mn(e,t.line);if(!n||n.hidden)return null;var r=Ve(e.doc,t.line),i=Ln(n,r,t.line),o=ue(r,e.doc.direction),a="left";if(o){var s=le(o,t.ch);a=s%2?"right":"left"}var l=qn(i.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function $a(e,t){return t&&(e.bad=!0),e}function ja(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return $a(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i=t.display.viewTo||o.line=t.display.viewFrom&&Pa(t,i)||{node:l[0].measure.map[2],offset:0},u=o.liner.firstLine()&&(a=et(a.line-1,Ve(r.doc,a.line-1).length)),s.ch==Ve(r.doc,s.line).text.length&&s.linei.viewTo-1)return!1;a.line==i.viewFrom||0==(e=lr(r,a.line))?(t=Xe(i.view[0].line),n=i.view[0].node):(t=Xe(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=lr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Xe(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var d=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function d(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(et(r,0),et(i+1,0),(g=+p,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(Ge(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&c();for(var m=0;m1&&p.length>1;)if(Z(d)==Z(p))d.pop(),p.pop(),l--;else{if(d[0]!=p[0])break;d.shift(),p.shift(),t++}for(var f=0,h=0,m=d[0],g=p[0],v=Math.min(m.length,g.length);fa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)f--,h++;d[d.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),d[0]=d[0].slice(f).replace(/\u200b+$/,"");var _=et(t,f),k=et(l,p.length?Z(p).length-h:0);return d.length>1||d[0]||tt(_,k)?(po(r.doc,d,_,k,"+input"),!0):void 0},Na.prototype.ensurePolled=function(){this.forceCompositionEnd()},Na.prototype.reset=function(){this.forceCompositionEnd()},Na.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Na.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))},Na.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Xr(this.cm,function(){return cr(e.cm)})},Na.prototype.setUneditable=function(e){e.contentEditable="false"},Na.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Yr(this.cm,La)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Na.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Na.prototype.onContextMenu=function(){},Na.prototype.resetPosition=function(){},Na.prototype.needsContentAttribute=!0;var Ba=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new $,this.hasSelection=!1,this.composing=null};Ba.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ge(r,e)){if(r.somethingSelected())Ea({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Fa(r);Ea({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),O(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(i.style.width="0px"),pe(i,"input",function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()}),pe(i,"paste",function(e){ge(r,e)||Da(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())}),pe(i,"cut",o),pe(i,"copy",o),pe(e.scroller,"paste",function(t){if(!kn(e,t)&&!ge(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}}),pe(e.lineSpace,"selectstart",function(t){kn(e,t)||xe(t)}),pe(i,"compositionstart",function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}}),pe(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ba.prototype.createField=function(e){this.wrapper=Ia(),this.textarea=this.wrapper.firstChild},Ba.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=mr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ba.prototype.showSelection=function(e){var t=this.cm,n=t.display;E(n.cursorDiv,e.cursors),E(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ba.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&&O(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ba.prototype.getField=function(){return this.textarea},Ba.prototype.supportsTouch=function(){return!1},Ba.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||F()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ba.prototype.blur=function(){this.textarea.blur()},Ba.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ba.prototype.receivedFocus=function(){this.slowPoll()},Ba.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ba.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function n(){var r=t.poll();r||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))})},Ba.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||ze(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ba.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ba.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ba.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=sr(n,e),c=r.scroller.scrollTop;if(o&&!d){var u=n.options.resetSelectionOnContextMenu;u&&-1==n.doc.sel.contains(o)&&Yr(n,Xi)(n.doc,ki(o),H);var p,f=i.style.cssText,h=t.wrapper.style.cssText,m=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-m.top-5)+"px; left: "+(e.clientX-m.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(p=window.scrollY),r.input.focus(),l&&window.scrollTo(null,p),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=y,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),w){we(e);var g=function(){he(window,"mouseup",g),setTimeout(y,20)};pe(window,"mouseup",g)}else setTimeout(y,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function y(){if(t.contextMenuPending==y&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=f,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?Yr(n,io)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ba.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ba.prototype.setUneditable=function(){},Ba.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=ba&&i(e,t,n)}:i)}e.defineOption=n,e.Init=ba,n("value","",function(e,t){return e.setValue(t)},!0),n("mode",null,function(e,t){e.doc.modeOption=t,Ai(e)},!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,function(e){Ei(e),jn(e),cr(e)},!0),n("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(et(r,o))}r++});for(var i=n.length-1;i>=0;i--)po(e.doc,t,n[i],et(n[i].line,n[i].ch+t.length))}}),n("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!=ba&&e.refresh()}),n("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),n("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),n("autocorrect",!1,function(e,t){return e.getInputField().autocorrect=t},!0),n("autocapitalize",!1,function(e,t){return e.getInputField().autocapitalize=t},!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",function(e){ya(e),pi(e)},!0),n("keyMap","default",function(e,t,n){var r=Go(t),i=n!=ba&&Go(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)}),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,wa,!0),n("gutters",[],function(e,t){e.display.gutterSpecs=ui(t,e.options.lineNumbers),pi(e)},!0),n("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?ir(e.display)+"px":"0",e.refresh()},!0),n("coverGutterNextToScrollbar",!1,function(e){return $r(e)},!0),n("scrollbarStyle","native",function(e){Br(e),$r(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),n("lineNumbers",!1,function(e,t){e.display.gutterSpecs=ui(e.options.gutters,t),pi(e)},!0),n("firstLineNumber",1,pi,!0),n("lineNumberFormatter",function(e){return e},pi,!0),n("showCursorWhenSelecting",!1,hr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,function(e,t){"nocursor"==t&&(wr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),n("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),n("dragDrop",!0,ka),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,hr,!0),n("singleCursorHeightPerLine",!0,hr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Ei,!0),n("addModeClass",!1,Ei,!0),n("pollInterval",100),n("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),n("historyEventDelay",1250),n("viewportMargin",10,function(e){return e.refresh()},!0),n("maxHighlightLength",1e4,Ei,!0),n("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),n("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),n("autofocus",null),n("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0),n("phrases",null)}(Ca),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 r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&Yr(this,t[e])(this,n,i),me(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"](Go(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ta(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Lr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Gi(this.doc,r,new xi(o,c[r].to()),H)}}}),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=st(this.doc,e);var t,n=pt(this,Ve(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]o&&(e=o,i=!0),r=Ve(this.doc,e)}else r=e;return Un(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Ht(r):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return nr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=Gn(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var d=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>d)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=d&&(c=e.bottom),u+t.offsetWidth>p&&(u=p-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Ar(o,a)).scrollTop&&zr(o,s.scrollTop),null!=s.scrollLeft&&Or(o,s.scrollLeft))},triggerOnKeyDown:Qr(sa),triggerOnKeyPress:Qr(ca),triggerOnKeyUp:la,triggerOnMouseDown:Qr(fa),execCommand:function(e){if(Qo.hasOwnProperty(e))return Qo[e].call(null,this)},triggerElectric:Qr(function(e){Ma(this,e)}),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=st(this.doc,e),a=0;a0&&s(n.charAt(r-1));)--r;for(;i.5)&&ar(this),me(this,"refresh",this)}),swapDoc:Qr(function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Fi(this,e),jn(this),this.display.input.reset(),Dr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t}),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(Ca);var Ha="iter insert remove copy getEditor constructor".split(" ");for(var Ua in Eo.prototype)Eo.prototype.hasOwnProperty(Ua)&&j(Ha,Ua)<0&&(Ca.prototype[Ua]=function(e){return function(){return e.apply(this.doc,arguments)}}(Eo.prototype[Ua]));return be(Eo),Ca.inputStyles={textarea:Ba,contenteditable:Na},Ca.defineMode=function(e){Ca.defaults.mode||"null"==e||(Ca.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),qe[e]=t}.apply(this,arguments)},Ca.defineMIME=function(e,t){Ne[e]=t},Ca.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ca.defineMIME("text/plain","null"),Ca.defineExtension=function(e,t){Ca.prototype[e]=t},Ca.defineDocExtension=function(e,t){Eo.prototype[e]=t},Ca.fromTextArea=function(e,t){if((t=t?N(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=F();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(pe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(t){t.save=r,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,r(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(he(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Ca(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=he,e.on=pe,e.wheelEventPixels=vi,e.Doc=Eo,e.splitLines=Fe,e.countColumn=P,e.findColumn=V,e.isWordChar=ee,e.Pass=B,e.signal=me,e.Line=Vt,e.changeEnd=wi,e.scrollbarModel=Rr,e.Pos=et,e.cmpPos=tt,e.modes=qe,e.mimeModes=Ne,e.resolveMode=Pe,e.getMode=$e,e.modeExtensions=je,e.extendMode=Re,e.copyState=Be,e.startState=Ue,e.innerMode=He,e.commands=Qo,e.keyMap=jo,e.keyName=Vo,e.isModifierKey=Uo,e.lookupKey=Ho,e.normalizeKeyMap=Bo,e.StringStream=We,e.SharedTextMarker=Co,e.TextMarker=ko,e.LineWidget=bo,e.e_preventDefault=xe,e.e_stopPropagation=_e,e.e_stop=we,e.addClass=z,e.contains=M,e.rmClass=T,e.keyNames=qo}(Ca),Ca.version="5.47.0",Ca}()},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty;function i(e,t){return r.call(e,t)}function o(e){return!(e>=55296&&e<=57343)&&(!(e>=64976&&e<=65007)&&(65535!=(65535&e)&&65534!=(65535&e)&&(!(e>=0&&e<=8)&&(11!==e&&(!(e>=14&&e<=31)&&(!(e>=127&&e<=159)&&!(e>1114111)))))))}function a(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}var s=/\\([!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~])/g,l=new RegExp(s.source+"|"+/&([a-z#][a-z0-9]{1,31});/gi.source,"gi"),c=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i,u=n(17);var d=/[&<>"]/,p=/[&<>"]/g,f={"&":"&","<":"<",">":">",'"':"""};function h(e){return f[e]}var m=/[.?*+^$[\]\\(){}|-]/g;var g=n(9);t.lib={},t.lib.mdurl=n(18),t.lib.ucmicro=n(58),t.assign=function(e){return Array.prototype.slice.call(arguments,1).forEach(function(t){if(t){if("object"!=typeof t)throw new TypeError(t+"must be object");Object.keys(t).forEach(function(n){e[n]=t[n]})}}),e},t.isString=function(e){return"[object String]"===function(e){return Object.prototype.toString.call(e)}(e)},t.has=i,t.unescapeMd=function(e){return e.indexOf("\\")<0?e:e.replace(s,"$1")},t.unescapeAll=function(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(l,function(e,t,n){return t||function(e,t){var n=0;return i(u,t)?u[t]:35===t.charCodeAt(0)&&c.test(t)&&o(n="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?a(n):e}(e,n)})},t.isValidEntityCode=o,t.fromCodePoint=a,t.escapeHtml=function(e){return d.test(e)?e.replace(p,h):e},t.arrayReplaceAt=function(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))},t.isSpace=function(e){switch(e){case 9:case 32:return!0}return!1},t.isWhiteSpace=function(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1},t.isMdAsciiPunct=function(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}},t.isPunctChar=function(e){return g.test(e)},t.escapeRE=function(e){return e.replace(m,"\\$&")},t.normalizeReference=function(e){return e.trim().replace(/\s+/g," ").toUpperCase()}},function(e,t,n){var r,i; +/**! + * Sortable + * @author RubaXa + * @author owenm + * @license MIT */ -var r=Object.freeze({});function i(e){return null==e}function o(e){return null!=e}function a(e){return!0===e}function s(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function l(e){return null!==e&&"object"==typeof e}var c=Object.prototype.toString;function u(e){return"[object Object]"===c.call(e)}function d(e){var t=parseFloat(String(e));return 0<=t&&Math.floor(t)===t&&isFinite(e)}function f(e){return null==e?"":"object"==typeof e?JSON.stringify(e,null,2):String(e)}function p(e){var t=parseFloat(e);return isNaN(t)?e:t}function h(e,t){for(var n=Object.create(null),r=e.split(","),i=0;ie.id;)n--;wt.splice(n+1,0,e)}else wt.push(e);Ct||(Ct=!0,Ye(Et))}}(this)},Lt.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||l(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){je(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Lt.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Lt.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Lt.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||v(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Dt={enumerable:!0,configurable:!0,get:D,set:D};function Mt(e,t,n){Dt.get=function(){return this[t][n]},Dt.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Dt)}var Ft={lazy:!0};function Ot(e,t,n){var r=!te();Dt.set="function"==typeof n?(Dt.get=r?It(t):n,D):(Dt.get=n.get?r&&!1!==n.cache?It(t):n.get:D,n.set?n.set:D),Object.defineProperty(e,t,Dt)}function It(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),le.target&&t.depend(),t.value}}function qt(e,t,n,r){return u(n)&&(n=(r=n).handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}function Nt(e,t){if(e){for(var n=Object.create(null),r=oe?Reflect.ownKeys(e).filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}):Object.keys(e),i=0;iparseInt(this.max)&&bn(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};xn=mn,kn={get:function(){return j}},Object.defineProperty(xn,"config",kn),xn.util={warn:ae,extend:A,mergeOptions:Oe,defineReactive:Ce},xn.set=Se,xn.delete=Te,xn.nextTick=Ye,xn.options=Object.create(null),z.forEach(function(e){xn.options[e+"s"]=Object.create(null)}),A((xn.options._base=xn).options.components,Cn),xn.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(-1=a&&c()};setTimeout(function(){l\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/,no="[a-zA-Z_][\\w\\-\\.]*",ro="((?:"+no+"\\:)?"+no+")",io=new RegExp("^<"+ro),oo=/^\s*(\/?)>/,ao=new RegExp("^<\\/"+ro+"[^>]*>"),so=/^]+>/i,lo=/^",""":'"',"&":"&"," ":"\n"," ":"\t"},_o=/&(?:lt|gt|quot|amp);/g,Co=/&(?:lt|gt|quot|amp|#10|#9);/g,So=h("pre,textarea",!0),To=function(e,t){return e&&So(e)&&"\n"===t[0]},Eo=/^@|^v-on:/,Ao=/^v-|^@|^:/,Lo=/([^]*?)\s+(?:in|of)\s+([^]*)/,Do=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,Mo=/^\(|\)$/g,Fo=/:(.*)$/,Oo=/^:|^v-bind:/,Io=/\.[^.]+/g,qo=x(function(e){return(Vi=Vi||document.createElement("div")).innerHTML=e,Vi.textContent});function No(e,t,n){return{type:1,tag:e,attrsList:t,attrsMap:function(e){for(var t={},n=0,r=e.length;n-1"+("true"===p?":("+c+")":":_q("+c+","+p+")")),Cr(l,"change","var $$a="+c+",$$el=$event.target,$$c=$$el.checked?("+p+"):("+h+");if(Array.isArray($$a)){var $$v="+(d?"_n("+f+")":f)+",$$i=_i($$a,$$v);if($$el.checked){$$i<0&&("+Ar(c,"$$a.concat([$$v])")+")}else{$$i>-1&&("+Ar(c,"$$a.slice(0,$$i).concat($$a.slice($$i+1))")+")}}else{"+Ar(c,"$$c")+"}",null,!0);else if("input"===b&&"radio"===x)r=e,i=v,a=(o=y)&&o.number,s=Sr(r,"value")||"null",wr(r,"checked","_q("+i+","+(s=a?"_n("+s+")":s)+")"),Cr(r,"change",Ar(i,s),null,!0);else if("input"===b||"textarea"===b)!function(e,t,n){var r=e.attrsMap.type,i=n||{},o=i.lazy,a=i.number,s=i.trim,l=!o&&"range"!==r,c=o?"change":"range"===r?qr:"input",u="$event.target.value";s&&(u="$event.target.value.trim()"),a&&(u="_n("+u+")");var d=Ar(t,u);l&&(d="if($event.target.composing)return;"+d),wr(e,"value","("+t+")"),Cr(e,c,d,null,!0),(s||a)&&Cr(e,"blur","$forceUpdate()")}(e,v,y);else if(!j.isReservedTag(b))return Er(e,v,y),!1;return!0},text:function(e,t){t.value&&wr(e,"textContent","_s("+t.value+")")},html:function(e,t){t.value&&wr(e,"innerHTML","_s("+t.value+")")}},isPreTag:function(e){return"pre"===e},isUnaryTag:Qi,mustUseProp:En,canBeLeftOpenTag:Ji,isReservedTag:Rn,getTagNamespace:$n,staticKeys:(Uo=Go,Uo.reduce(function(e,t){return e.concat(t.staticKeys||[])},[]).join(","))},Xo=x(function(e){return h("type,tag,attrsList,attrsMap,plain,parent,children,attrs"+(e?","+e:""))});function Zo(e){return 2!==e.type&&(3===e.type||!(!e.pre&&(e.hasBindings||e.if||e.for||m(e.tag)||!Vo(e.tag)||function(e){for(;e.parent;){if("template"!==(e=e.parent).tag)return!1;if(e.for)return!0}return!1}(e)||!Object.keys(e).every(Wo))))}var Yo=/^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/,Qo=/^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/,Jo={esc:27,tab:9,enter:13,space:32,up:38,left:37,right:39,down:40,delete:[8,46]},ea={esc:"Escape",tab:"Tab",enter:"Enter",space:" ",up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete"]},ta=function(e){return"if("+e+")return null;"},na={stop:"$event.stopPropagation();",prevent:"$event.preventDefault();",self:ta("$event.target !== $event.currentTarget"),ctrl:ta("!$event.ctrlKey"),shift:ta("!$event.shiftKey"),alt:ta("!$event.altKey"),meta:ta("!$event.metaKey"),left:ta("'button' in $event && $event.button !== 0"),middle:ta("'button' in $event && $event.button !== 1"),right:ta("'button' in $event && $event.button !== 2")};function ra(e,t,n){var r=t?"nativeOn:{":"on:{";for(var i in e)r+='"'+i+'":'+ia(i,e[i])+",";return r.slice(0,-1)+"}"}function ia(e,t){if(!t)return"function(){}";if(Array.isArray(t))return"["+t.map(function(t){return ia(e,t)}).join(",")+"]";var n=Qo.test(t.value),r=Yo.test(t.value);if(t.modifiers){var i="",o="",a=[];for(var s in t.modifiers)if(na[s])o+=na[s],Jo[s]&&a.push(s);else if("exact"===s){var l=t.modifiers;o+=ta(["ctrl","shift","alt","meta"].filter(function(e){return!l[e]}).map(function(e){return"$event."+e+"Key"}).join("||"))}else a.push(s);return a.length&&(i+="if(!('button' in $event)&&"+a.map(oa).join("&&")+")return null;"),o&&(i+=o),"function($event){"+i+(n?"return "+t.value+"($event)":r?"return ("+t.value+")($event)":t.value)+"}"}return n||r?t.value:"function($event){"+t.value+"}"}function oa(e){var t=parseInt(e,10);if(t)return"$event.keyCode!=="+t;var n=Jo[e],r=ea[e];return"_k($event.keyCode,"+JSON.stringify(e)+","+JSON.stringify(n)+",$event.key,"+JSON.stringify(r)+")"}var aa={on:function(e,t){e.wrapListeners=function(e){return"_g("+e+","+t.value+")"}},bind:function(e,t){e.wrapData=function(n){return"_b("+n+",'"+e.tag+"',"+t.value+","+(t.modifiers&&t.modifiers.prop?"true":"false")+(t.modifiers&&t.modifiers.sync?",true":"")+")"}},cloak:D},sa=function(e){this.options=e,this.warn=e.warn||br,this.transforms=xr(e.modules,"transformCode"),this.dataGenFns=xr(e.modules,"genData"),this.directives=A(A({},aa),e.directives);var t=e.isReservedTag||M;this.maybeComponent=function(e){return!t(e.tag)},this.onceId=0,this.staticRenderFns=[]};function la(e,t){var n=new sa(t);return{render:"with(this){return "+(e?ca(e,n):'_c("div")')+"}",staticRenderFns:n.staticRenderFns}}function ca(e,t){if(e.staticRoot&&!e.staticProcessed)return ua(e,t);if(e.once&&!e.onceProcessed)return da(e,t);if(e.for&&!e.forProcessed)return function(e,t,n,r){var i=e.for,o=e.alias,a=e.iterator1?","+e.iterator1:"",s=e.iterator2?","+e.iterator2:"";return e.forProcessed=!0,"_l(("+i+"),function("+o+a+s+"){return "+ca(e,t)+"})"}(e,t);if(e.if&&!e.ifProcessed)return fa(e,t);if("template"!==e.tag||e.slotTarget){if("slot"===e.tag)return function(e,t){var n=e.slotName||'"default"',r=ha(e,t),i="_t("+n+(r?","+r:""),o=e.attrs&&"{"+e.attrs.map(function(e){return k(e.name)+":"+e.value}).join(",")+"}",a=e.attrsMap["v-bind"];return!o&&!a||r||(i+=",null"),o&&(i+=","+o),a&&(i+=(o?"":",null")+","+a),i+")"}(e,t);var n;if(e.component)a=e.component,l=t,c=(s=e).inlineTemplate?null:ha(s,l,!0),n="_c("+a+","+pa(s,l)+(c?","+c:"")+")";else{var r=e.plain?void 0:pa(e,t),i=e.inlineTemplate?null:ha(e,t,!0);n="_c('"+e.tag+"'"+(r?","+r:"")+(i?","+i:"")+")"}for(var o=0;o]*>)","i")),f=e.replace(d,function(e,n,r){return c=r.length,xo(u)||"noscript"===u||(n=n.replace(//g,"$1").replace(//g,"$1")),To(u,n)&&(n=n.slice(1)),t.chars&&t.chars(n),""});l+=e.length-f.length,e=f,T(u,l-c,l)}else{var p=e.indexOf("<");if(0===p){if(lo.test(e)){var h=e.indexOf("--\x3e");if(0<=h){t.shouldKeepComment&&t.comment(e.substring(4,h)),_(h+3);continue}}if(co.test(e)){var m=e.indexOf("]>");if(0<=m){_(m+2);continue}}var g=e.match(so);if(g){_(g[0].length);continue}var v=e.match(ao);if(v){var y=l;_(v[0].length),T(v[1],y,l);continue}var b=C();if(b){S(b),To(r,e)&&_(1);continue}}var x=void 0,w=void 0,k=void 0;if(0<=p){for(w=e.slice(p);!(ao.test(w)||io.test(w)||lo.test(w)||co.test(w)||(k=w.indexOf("<",1))<0);)p+=k,w=e.slice(p);x=e.substring(0,p),_(p)}p<0&&(x=e,e=""),t.chars&&x&&t.chars(x)}if(e===n){t.chars&&t.chars(e);break}}function _(t){l+=t,e=e.substring(t)}function C(){var t=e.match(io);if(t){var n,r,i={tagName:t[1],attrs:[],start:l};for(_(t[0].length);!(n=e.match(oo))&&(r=e.match(to));)_(r[0].length),i.attrs.push(r);if(n)return i.unarySlash=n[1],_(n[0].length),i.end=l,i}}function S(e){var n=e.tagName,l=e.unarySlash;o&&("p"===r&&eo(n)&&T(r),s(n)&&r===n&&T(n));for(var c,u,d,f=a(n)||!!l,p=e.attrs.length,h=new Array(p),m=0;m':'
',0 + * @author owenm + * @license MIT + */ +!function(o){"use strict";void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}(function(){"use strict";if("undefined"==typeof window||!window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var e,t,n,r,i,o,a,s,l,c,u,d,p,f,h,m,g,v,y,b,x,_,k,w,C,S,T,A,E=[],L=!1,D=!1,M=!1,F=[],z=!1,I=!1,O=[],q=/\s+/g,N="Sortable"+(new Date).getTime(),P=window,$=P.document,j=P.parseInt,R=P.setTimeout,B=P.jQuery||P.Zepto,H=P.Polymer,U={capture:!1,passive:!1},W=!!navigator.userAgent.match(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i),V=!!navigator.userAgent.match(/Edge/i),G=!!navigator.userAgent.match(/firefox/i),K=!(!navigator.userAgent.match(/safari/i)||navigator.userAgent.match(/chrome/i)||navigator.userAgent.match(/android/i)),Z=!!navigator.userAgent.match(/iP(ad|od|hone)/i),X=V||W?"cssFloat":"float",Y="draggable"in $.createElement("div"),Q=function(){if(W)return!1;var e=$.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}(),J=!1,ee=!1,te=Math.abs,ne=Math.min,re=Math.max,ie=[],oe=function(e,t){var n=we(e),r=j(n.width)-j(n.paddingLeft)-j(n.paddingRight)-j(n.borderLeftWidth)-j(n.borderRightWidth),i=De(e,0,t),o=De(e,1,t),a=i&&we(i),s=o&&we(o),l=a&&j(a.marginLeft)+j(a.marginRight)+Re(i).width,c=s&&j(s.marginLeft)+j(s.marginRight)+Re(o).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&"none"!==a.float){var u="left"===a.float?"left":"right";return!o||"both"!==s.clear&&s.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||l>=r&&"none"===n[X]||o&&"none"===n[X]&&l+c>r)?"vertical":"horizontal"},ae=function(e,t){if(!e||!e.getBoundingClientRect)return se();var n=e,r=!1;do{if(n.clientWidth-1}}var n={},r=e.group;r&&"object"==typeof r||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n},pe=function(t){e&&e.parentNode&&e.parentNode[N]&&e.parentNode[N]._computeIsAligned(t)},fe=function(){!Q&&n&&we(n,"display","none")},he=function(){!Q&&n&&we(n,"display","")};$.addEventListener("click",function(e){if(M)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),M=!1,!1},!0);var me,ge=function(t){if(e){var n=function(e,t){for(var n=0;n=r.left-i&&e<=r.right+i,a=t>=r.top-i&&t<=r.bottom+i;if(i&&o&&a)return F[n]}}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(n){var r={};for(var i in t)r[i]=t[i];r.target=r.rootEl=n,r.preventDefault=void 0,r.stopPropagation=void 0,n[N]._onDragOver(r)}}};function ve(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, not "+{}.toString.call(e);this.el=e,this.options=t=Ne({},t),e[N]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0,draggable:/[uo]l/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return oe(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:j(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==ve.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var i in de(t),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&Y,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?xe(e,"pointerdown",this._onTapStart):(xe(e,"mousedown",this._onTapStart),xe(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(xe(e,"dragover",this),xe(e,"dragenter",this)),F.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[])}function ye(e,t,n,r){if(e){n=n||$;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&Oe(e,t):Oe(e,t))||r&&e===n)return e;if(e===n)break}while(e=be(e))}return null}function be(e){return e.host&&e!==$&&e.host.nodeType?e.host:e.parentNode}function xe(e,t,n){e.addEventListener(t,n,!W&&U)}function _e(e,t,n){e.removeEventListener(t,n,!W&&U)}function ke(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(q," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(q," ")}}function we(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return $.defaultView&&$.defaultView.getComputedStyle?n=$.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||-1!==t.indexOf("webkit")||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function Ce(e){var t="";do{var n=we(e,"transform");n&&"none"!==n&&(t=n+" "+t)}while(e=e.parentNode);return window.DOMMatrix?new DOMMatrix(t):window.WebKitCSSMatrix?new WebKitCSSMatrix(t):window.CSSMatrix?new CSSMatrix(t):void 0}function Se(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function qe(e,t){return function(){if(!me){var n=arguments,r=this;me=R(function(){1===n.length?e.call(r,n[0]):e.apply(r,n),me=void 0},t)}}}function Ne(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Pe(e){return H&&H.dom?H.dom(e).cloneNode(!0):B?B(e).clone(!0)[0]:e.cloneNode(!0)}function $e(e){return R(e,0)}function je(e){return clearTimeout(e)}function Re(e,t,n,r){if(e.getBoundingClientRect||e===P){var i,o,a,s,l,c,u;if(e!==P&&e!==se()?(o=(i=e.getBoundingClientRect()).top,a=i.left,s=i.bottom,l=i.right,c=i.height,u=i.width):(o=0,a=0,s=window.innerHeight,l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),r&&e!==P&&(n=n||e.parentNode,!W))do{if(n&&n.getBoundingClientRect&&"none"!==we(n,"transform")){var d=n.getBoundingClientRect();o-=d.top+j(we(n,"border-top-width")),a-=d.left+j(we(n,"border-left-width")),s=o+i.height,l=a+i.width;break}}while(n=n.parentNode);if(t&&e!==P){var p=Ce(n||e),f=p&&p.a,h=p&&p.d;p&&(s=(o/=h)+(c/=h),l=(a/=f)+(u/=f))}return{top:o,left:a,bottom:s,right:l,width:u,height:c}}}function Be(e,t){for(var n=ae(e,!0),r=Re(e)[t];n;){var i=Re(n)[t];if(!("top"===t||"left"===t?r>=i:r<=i))return n;if(n===se())break;n=ae(n,!1)}return!1}function He(e){var t=0,n=0,r=se();if(e)do{var i=Ce(e),o=i.a,a=i.d;t+=e.scrollLeft*o,n+=e.scrollTop*a}while(e!==r&&(e=e.parentNode));return[t,n]}return ve.prototype={constructor:ve,_computeIsAligned:function(t){var r;if(n&&!Q?(fe(),r=$.elementFromPoint(t.clientX,t.clientY),he()):r=t.target,r=ye(r,this.options.draggable,this.el,!1),!ee&&e&&e.parentNode===this.el){for(var i,o,a,s,l,c,u,d,p=this.el.children,f=0;f=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){e&&Ee(e),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;_e(e,"mouseup",this._disableDelayedDrag),_e(e,"touchend",this._disableDelayedDrag),_e(e,"touchcancel",this._disableDelayedDrag),_e(e,"mousemove",this._delayedDragTouchMoveHandler),_e(e,"touchmove",this._delayedDragTouchMoveHandler),_e(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||("touch"==t.pointerType?t:null),!this.nativeDraggable||n?this.options.supportPointer?xe($,"pointermove",this._onTouchMove):xe($,n?"touchmove":"mousemove",this._onTouchMove):(xe(e,"dragend",this),xe(i,"dragstart",this._onDragStart));try{$.selection?$e(function(){$.selection.empty()}):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(t,n){if(D=!1,i&&e){this.nativeDraggable&&(xe($,"dragover",this._handleAutoScroll),xe($,"dragover",pe));var r=this.options;!t&&ke(e,r.dragClass,!1),ke(e,r.ghostClass,!0),we(e,"transform",""),ve.active=this,t&&this._appendGhost(),Te(this,i,"start",e,i,i,u,void 0,p,void 0,n)}else this._nulling()},_emulateDragOver:function(t){if(x){if(this._lastX===x.clientX&&this._lastY===x.clientY&&!t)return;this._lastX=x.clientX,this._lastY=x.clientY,fe();for(var n=$.elementFromPoint(x.clientX,x.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(x.clientX,x.clientY))!==r;)r=n;if(r)do{if(r[N])if(r[N]._onDragOver({clientX:x.clientX,clientY:x.clientY,target:n,rootEl:r})&&!this.options.dragoverBubble)break;n=r}while(r=r.parentNode);e.parentNode[N]._computeIsAligned(x),he()}},_onTouchMove:function(e,t){if(b){var r=this.options,i=r.fallbackTolerance,o=r.fallbackOffset,a=e.touches?e.touches[0]:e,s=n&&Ce(n),l=n&&s&&s.a,c=n&&s&&s.d,u=Z&&T&&He(T),d=(a.clientX-b.clientX+o.x)/(l||1)+(u?u[0]-O[0]:0)/(l||1),p=(a.clientY-b.clientY+o.y)/(c||1)+(u?u[1]-O[1]:0)/(c||1),f=e.touches?"translate3d("+d+"px,"+p+"px,0)":"translate("+d+"px,"+p+"px)";if(!ve.active&&!D){if(i&&ne(te(a.clientX-this._lastX),te(a.clientY-this._lastY))l+10||o<=l&&i>a&&o>=s:i>a&&o>s||i<=a&&o>l+10}(n,x,l)&&!T.animated){if(T&&l===n.target&&(c=T),c&&(a=Re(c)),v?g._hideClone():g._showClone(this),!1!==Ae(i,l,e,r,c,a,n,!!c))return l.appendChild(e),t=l,A=null,W(),U(!0)}else if(c&&c!==e&&c.parentNode===l){var E,L=0,D=c.sortableMouseAligned,F=e.parentNode!==l,O="vertical"===x?"top":"left",q=Be(c,"top")||Be(e,"top"),P=q?q.scrollTop:void 0;if(k!==c&&(C=null,E=Re(c)[O],z=!1),function(t,n,r){var i=t===e&&A||Re(t),o=n===e&&A||Re(n),a="vertical"===r?i.left:i.top,s="vertical"===r?i.right:i.bottom,l="vertical"===r?i.width:i.height,c="vertical"===r?o.left:o.top,u="vertical"===r?o.right:o.bottom,d="vertical"===r?o.width:o.height;return a===c||s===u||a+l/2===c+d/2}(e,c,x)&&D||F||q||d.invertSwap||"insert"===C||"swap"===C?("swap"!==C&&(I=d.invertSwap||F),L=function(t,n,r,i,o,a,s){var l=Re(n),c="vertical"===r?t.clientY:t.clientX,u="vertical"===r?l.height:l.width,d="vertical"===r?l.top:l.left,p="vertical"===r?l.bottom:l.right,f=Re(e),h=!1;if(!a)if(s&&Sd+u*o/2:cp-S)return-1*w}else if(c>d+u*(1-i)/2&&cp-u*o/2))return c>d+u/2?1:-1;return 0}(n,c,x,d.swapThreshold,null==d.invertedSwapThreshold?d.swapThreshold:d.invertedSwapThreshold,I,k===c),C="swap"):(L=Fe(c),C="insert"),0===L)return U(!1);A=null,k=c,w=L,a=Re(c);var j=c.nextElementSibling,B=!1,H=Ae(i,l,e,r,c,a,n,B=1===L);if(!1!==H)return 1!==H&&-1!==H||(B=1===H),J=!0,R(Le,30),v?g._hideClone():g._showClone(this),B&&!j?l.appendChild(e):c.parentNode.insertBefore(e,B?j:c),q&&le(q,0,P-q.scrollTop),t=e.parentNode,void 0===E||I||(S=te(E-Re(c)[O])),W(),U(!0)}if(l.contains(e))return U(!1)}return!1}function U(t){return t&&(v?g._hideClone():g._showClone(b),g&&(ke(e,m?m.options.ghostClass:g.options.ghostClass,!1),ke(e,d.ghostClass,!0)),m!==b&&b!==ve.active?m=b:b===ve.active&&(m=null),r&&b._animate(r,e),c&&a&&b._animate(a,c)),(c===e&&!e.animated||c===l&&!c.animated)&&(k=null),d.dragoverBubble||n.rootEl||c===$||(b._handleAutoScroll(n),e.parentNode[N]._computeIsAligned(n),!t&&ge(n)),!d.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),!0}function W(){Te(b,i,"change",c,l,i,u,Ie(e),p,Ie(e,d.draggable),n)}},_animate:function(t,n){var r=this.options.animation;if(r){var i=Re(n);if(n===e&&(A=i),1===t.nodeType&&(t=Re(t)),t.left+t.width/2!==i.left+i.width/2||t.top+t.height/2!==i.top+i.height/2){var o=Ce(this.el),a=o&&o.a,s=o&&o.d;we(n,"transition","none"),we(n,"transform","translate3d("+(t.left-i.left)/(a||1)+"px,"+(t.top-i.top)/(s||1)+"px,0)"),this._repaint(n),we(n,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),we(n,"transform","translate3d(0,0,0)")}"number"==typeof n.animated&&clearTimeout(n.animated),n.animated=R(function(){we(n,"transition",""),we(n,"transform",""),n.animated=!1},r)}},_repaint:function(e){return e.offsetWidth},_offMoveEvents:function(){_e($,"touchmove",this._onTouchMove),_e($,"pointermove",this._onTouchMove),_e($,"dragover",ge),_e($,"mousemove",ge),_e($,"touchmove",ge)},_offUpEvents:function(){var e=this.el.ownerDocument;_e(e,"mouseup",this._onDrop),_e(e,"touchend",this._onDrop),_e(e,"pointerup",this._onDrop),_e(e,"touchcancel",this._onDrop),_e($,"selectstart",this)},_onDrop:function(a){var s=this.el,l=this.options;D=!1,L=!1,I=!1,z=!1,clearInterval(this._loopId),clearInterval(g),ue(),clearTimeout(me),me=void 0,clearTimeout(this._dragStartTimer),je(this._cloneId),je(this._dragStartId),_e($,"mousemove",this._onTouchMove),this.nativeDraggable&&(_e($,"drop",this),_e(s,"dragstart",this._onDragStart),_e($,"dragover",this._handleAutoScroll),_e($,"dragover",pe)),K&&we($.body,"user-select",""),this._offMoveEvents(),this._offUpEvents(),a&&(_&&(a.cancelable&&a.preventDefault(),!l.dropBubble&&a.stopPropagation()),n&&n.parentNode&&n.parentNode.removeChild(n),(i===t||m&&"clone"!==m.lastPutMode)&&r&&r.parentNode&&r.parentNode.removeChild(r),e&&(this.nativeDraggable&&_e(e,"dragend",this),Ee(e),e.style["will-change"]="",ke(e,m?m.options.ghostClass:this.options.ghostClass,!1),ke(e,this.options.chosenClass,!1),Te(this,i,"unchoose",e,t,i,u,null,p,null,a),i!==t?(d=Ie(e),f=Ie(e,l.draggable),d>=0&&(Te(null,t,"add",e,t,i,u,d,p,f,a),Te(this,i,"remove",e,t,i,u,d,p,f,a),Te(null,t,"sort",e,t,i,u,d,p,f,a),Te(this,i,"sort",e,t,i,u,d,p,f,a)),m&&m.save()):e.nextSibling!==o&&(d=Ie(e),f=Ie(e,l.draggable),d>=0&&(Te(this,i,"update",e,t,i,u,d,p,f,a),Te(this,i,"sort",e,t,i,u,d,p,f,a))),ve.active&&(null!=d&&-1!==d||(d=u,f=p),Te(this,i,"end",e,t,i,u,d,p,f,a),this.save()))),this._nulling()},_nulling:function(){i=e=t=n=o=r=a=s=l=E.length=g=v=y=b=x=_=d=u=k=w=A=m=h=ve.active=null,ie.forEach(function(e){e.checked=!0}),ie.length=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":e&&(this._onDragOver(t),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.cancelable&&e.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},"0390":function(e,t,n){"use strict";var r=n("02f4")(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},"07e3":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"0bfb":function(e,t,n){"use strict";var r=n("cb7c");e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},"0fc9":function(e,t,n){var r=n("3a38"),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},1654:function(e,t,n){"use strict";var r=n("71c1")(!0);n("30f1")(String,"String",function(e){this._t=String(e),this._i=0},function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})})},1691:function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},"1af6":function(e,t,n){var r=n("63b6");r(r.S,"Array",{isArray:n("9003")})},"1bc3":function(e,t,n){var r=n("f772");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"1ec9":function(e,t,n){var r=n("f772"),i=n("e53d").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"20fd":function(e,t,n){"use strict";var r=n("d9f6"),i=n("aebd");e.exports=function(e,t,n){t in e?r.f(e,t,i(0,n)):e[t]=n}},"214f":function(e,t,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),a=n("be13"),s=n("2b4c"),l=n("520a"),c=s("species"),u=!o(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}),d=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=s(e),f=!o(function(){var t={};return t[p]=function(){return 7},7!=""[e](t)}),h=f?!o(function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[p](""),!t}):void 0;if(!f||!h||"replace"===e&&!u||"split"===e&&!d){var m=/./[p],g=n(a,p,""[e],function(e,t,n,r,i){return t.exec===l?f&&!i?{done:!0,value:m.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),v=g[0],y=g[1];r(String.prototype,e,v),i(RegExp.prototype,p,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},"230e":function(e,t,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},"23c6":function(e,t,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},"241e":function(e,t,n){var r=n("25eb");e.exports=function(e){return Object(r(e))}},"25eb":function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},"294c":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"2aba":function(e,t,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),a=n("ca5a")("src"),s=n("fa5b"),l=(""+s).split("toString");n("8378").inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(o(n,"name")||i(n,"name",t)),e[t]!==n&&(c&&(o(n,a)||i(n,a,e[t]?""+e[t]:l.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[a]||s.call(this)})},"2b4c":function(e,t,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},"2d00":function(e,t){e.exports=!1},"2d95":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"2fdb":function(e,t,n){"use strict";var r=n("5ca1"),i=n("d2c8");r(r.P+r.F*n("5147")("includes"),"String",{includes:function(e){return!!~i(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},"30f1":function(e,t,n){"use strict";var r=n("b8e3"),i=n("63b6"),o=n("9138"),a=n("35e8"),s=n("481b"),l=n("8f60"),c=n("45f2"),u=n("53e2"),d=n("5168")("iterator"),p=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,h,m,g,v){l(n,t,h);var y,b,x,_=function(e){if(!p&&e in S)return S[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",w="values"==m,C=!1,S=e.prototype,T=S[d]||S["@@iterator"]||m&&S[m],A=T||_(m),E=m?w?_("entries"):A:void 0,L="Array"==t&&S.entries||T;if(L&&(x=u(L.call(new e)))!==Object.prototype&&x.next&&(c(x,k,!0),r||"function"==typeof x[d]||a(x,d,f)),w&&T&&"values"!==T.name&&(C=!0,A=function(){return T.call(this)}),r&&!v||!p&&!C&&S[d]||a(S,d,A),s[t]=A,s[k]=f,m)if(y={values:w?A:_("values"),keys:g?A:_("keys"),entries:E},v)for(b in y)b in S||o(S,b,y[b]);else i(i.P+i.F*(p||C),t,y);return y}},"32a6":function(e,t,n){var r=n("241e"),i=n("c3a1");n("ce7e")("keys",function(){return function(e){return i(r(e))}})},"32e9":function(e,t,n){var r=n("86cc"),i=n("4630");e.exports=n("9e1e")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"32fc":function(e,t,n){var r=n("e53d").document;e.exports=r&&r.documentElement},"335c":function(e,t,n){var r=n("6b4c");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"355d":function(e,t){t.f={}.propertyIsEnumerable},"35e8":function(e,t,n){var r=n("d9f6"),i=n("aebd");e.exports=n("8e60")?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},"36c3":function(e,t,n){var r=n("335c"),i=n("25eb");e.exports=function(e){return r(i(e))}},3702:function(e,t,n){var r=n("481b"),i=n("5168")("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},"3a38":function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"40c3":function(e,t,n){var r=n("6b4c"),i=n("5168")("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},4588:function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},"45f2":function(e,t,n){var r=n("d9f6").f,i=n("07e3"),o=n("5168")("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},4630:function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"469f":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("7d7b")},"481b":function(e,t){e.exports={}},"4aa6":function(e,t,n){e.exports=n("dc62")},"4bf8":function(e,t,n){var r=n("be13");e.exports=function(e){return Object(r(e))}},"4ee1":function(e,t,n){var r=n("5168")("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],a=o[r]();a.next=function(){return{done:n=!0}},o[r]=function(){return a},e(o)}catch(e){}return n}},"50ed":function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},5147:function(e,t,n){var r=n("2b4c")("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,!"/./"[e](t)}catch(e){}}return!0}},5168:function(e,t,n){var r=n("dbdb")("wks"),i=n("62a0"),o=n("e53d").Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},5176:function(e,t,n){e.exports=n("51b6")},"51b6":function(e,t,n){n("a3c3"),e.exports=n("584a").Object.assign},"520a":function(e,t,n){"use strict";var r,i,o=n("0bfb"),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(r=/a/,i=/b*/g,a.call(r,"a"),a.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(e){var t,n,r,i,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",o.call(l))),c&&(t=l.lastIndex),r=a.call(l,e),c&&r&&(l.lastIndex=l.global?r.index+r[0].length:t),u&&r&&r.length>1&&s.call(r[0],n,function(){for(i=1;i1?arguments[1]:void 0,g=void 0!==m,v=0,y=u(p);if(g&&(m=r(m,h>2?arguments[2]:void 0,2)),null==y||f==Array&&s(y))for(n=new f(t=l(p.length));t>v;v++)c(n,v,g?m(p[v],v):p[v]);else for(d=y.call(p),n=new f;!(i=d.next()).done;v++)c(n,v,g?a(d,m,[i.value,v],!0):i.value);return n.length=v,n}})},"54a1":function(e,t,n){n("6c1c"),n("1654"),e.exports=n("95d5")},5537:function(e,t,n){var r=n("8378"),i=n("7726"),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},5559:function(e,t,n){var r=n("dbdb")("keys"),i=n("62a0");e.exports=function(e){return r[e]||(r[e]=i(e))}},"584a":function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},"5b4e":function(e,t,n){var r=n("36c3"),i=n("b447"),o=n("0fc9");e.exports=function(e){return function(t,n,a){var s,l=r(t),c=i(l.length),u=o(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},"5ca1":function(e,t,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),s=n("9b43"),l=function(e,t,n){var c,u,d,p,f=e&l.F,h=e&l.G,m=e&l.S,g=e&l.P,v=e&l.B,y=h?r:m?r[t]||(r[t]={}):(r[t]||{}).prototype,b=h?i:i[t]||(i[t]={}),x=b.prototype||(b.prototype={});for(c in h&&(n=t),n)d=((u=!f&&y&&void 0!==y[c])?y:n)[c],p=v&&u?s(d,r):g&&"function"==typeof d?s(Function.call,d):d,y&&a(y,c,d,e&l.U),b[c]!=d&&o(b,c,p),g&&x[c]!=d&&(x[c]=d)};r.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},"5d73":function(e,t,n){e.exports=n("469f")},"5f1b":function(e,t,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var o=n.call(e,t);if("object"!=typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(e,t)}},"626a":function(e,t,n){var r=n("2d95");e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},"62a0":function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},"63b6":function(e,t,n){var r=n("e53d"),i=n("584a"),o=n("d864"),a=n("35e8"),s=n("07e3"),l=function(e,t,n){var c,u,d,p=e&l.F,f=e&l.G,h=e&l.S,m=e&l.P,g=e&l.B,v=e&l.W,y=f?i:i[t]||(i[t]={}),b=y.prototype,x=f?r:h?r[t]:(r[t]||{}).prototype;for(c in f&&(n=t),n)(u=!p&&x&&void 0!==x[c])&&s(y,c)||(d=u?x[c]:n[c],y[c]=f&&"function"!=typeof x[c]?n[c]:g&&u?o(d,r):v&&x[c]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):m&&"function"==typeof d?o(Function.call,d):d,m&&((y.virtual||(y.virtual={}))[c]=d,e&l.R&&b&&!b[c]&&a(b,c,d)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},6762:function(e,t,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(e,t,n){var r=n("626a"),i=n("be13");e.exports=function(e){return r(i(e))}},"69a8":function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},"6a99":function(e,t,n){var r=n("d3f4");e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},"6b4c":function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},"6c1c":function(e,t,n){n("c367");for(var r=n("e53d"),i=n("35e8"),o=n("481b"),a=n("5168")("toStringTag"),s="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),l=0;l=c?e?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):o:e?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}}},7726:function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},"774e":function(e,t,n){e.exports=n("d2d5")},"77f1":function(e,t,n){var r=n("4588"),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},"794b":function(e,t,n){e.exports=!n("8e60")&&!n("294c")(function(){return 7!=Object.defineProperty(n("1ec9")("div"),"a",{get:function(){return 7}}).a})},"79aa":function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},"79e5":function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},"7cd6":function(e,t,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");e.exports=n("584a").getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},"7d7b":function(e,t,n){var r=n("e4ae"),i=n("7cd6");e.exports=n("584a").getIterator=function(e){var t=i(e);if("function"!=typeof t)throw TypeError(e+" is not iterable!");return r(t.call(e))}},"7e90":function(e,t,n){var r=n("d9f6"),i=n("e4ae"),o=n("c3a1");e.exports=n("8e60")?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},8378:function(e,t){var n=e.exports={version:"2.6.5"};"number"==typeof __e&&(__e=n)},8436:function(e,t){e.exports=function(){}},"86cc":function(e,t,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),a=Object.defineProperty;t.f=n("9e1e")?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},"8aae":function(e,t,n){n("32a6"),e.exports=n("584a").Object.keys},"8e60":function(e,t,n){e.exports=!n("294c")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"8f60":function(e,t,n){"use strict";var r=n("a159"),i=n("aebd"),o=n("45f2"),a={};n("35e8")(a,n("5168")("iterator"),function(){return this}),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},9003:function(e,t,n){var r=n("6b4c");e.exports=Array.isArray||function(e){return"Array"==r(e)}},9138:function(e,t,n){e.exports=n("35e8")},9306:function(e,t,n){"use strict";var r=n("c3a1"),i=n("9aa9"),o=n("355d"),a=n("241e"),s=n("335c"),l=Object.assign;e.exports=!l||n("294c")(function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=l({},e)[n]||Object.keys(l({},t)).join("")!=r})?function(e,t){for(var n=a(e),l=arguments.length,c=1,u=i.f,d=o.f;l>c;)for(var p,f=s(arguments[c++]),h=u?r(f).concat(u(f)):r(f),m=h.length,g=0;m>g;)d.call(f,p=h[g++])&&(n[p]=f[p]);return n}:l},9427:function(e,t,n){var r=n("63b6");r(r.S,"Object",{create:n("a159")})},"95d5":function(e,t,n){var r=n("40c3"),i=n("5168")("iterator"),o=n("481b");e.exports=n("584a").isIterable=function(e){var t=Object(e);return void 0!==t[i]||"@@iterator"in t||o.hasOwnProperty(r(t))}},"9aa9":function(e,t){t.f=Object.getOwnPropertySymbols},"9b43":function(e,t,n){var r=n("d8e8");e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},"9c6c":function(e,t,n){var r=n("2b4c")("unscopables"),i=Array.prototype;null==i[r]&&n("32e9")(i,r,{}),e.exports=function(e){i[r][e]=!0}},"9def":function(e,t,n){var r=n("4588"),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},"9e1e":function(e,t,n){e.exports=!n("79e5")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},a159:function(e,t,n){var r=n("e4ae"),i=n("7e90"),o=n("1691"),a=n("5559")("IE_PROTO"),s=function(){},l=function(){var e,t=n("1ec9")("iframe"),r=o.length;for(t.style.display="none",n("32fc").appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("