ratchet_design 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,134 @@
1
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ratchet = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
2
+ "use strict";var esvg={embed:function(){document.querySelector("#esvg-symbols")||document.querySelector("body").insertAdjacentHTML("afterbegin",'<svg id="esvg-symbols" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="display:none"><symbol id="icon-facebook" viewBox="0 0 38 38" width="38" height="38"><path d="M21.4 12.8h2.1V9.4h-2.7c-2.9 0-4.2 1.3-4.2 3.7v2.6h-2V19h2v9.6h3.9v-9.7h2.7l.3-3.2h-3v-1.8c0-.8.2-1.1.9-1.1z"/></symbol><symbol id="icon-github" viewBox="0 0 38 38" width="38" height="38"><path d="M23 35.9v-4.5c0-1.6-.5-2.5-1.1-3 3.6-.4 7.5-1.8 7.5-8.1 0-1.8-.6-3.3-1.7-4.4.2-.4.7-2.1-.2-4.3 0 0-1.4-.4-4.5 1.6-1.3-.3-2.7-.5-4.2-.5-1.4 0-2.8.2-4.2.5-3.1-2.1-4.5-1.6-4.5-1.6-.9 2.3-.3 3.9-.2 4.3-1 1.1-1.7 2.6-1.7 4.4 0 6.3 3.8 7.7 7.4 8.1-.4.4-.9 1.1-1 2.2-1 .4-3.3 1.1-4.8-1.4 0 0-.9-1.6-2.5-1.7 0 0-1.6 0-.1 1 0 0 1 .5 1.8 2.4 0 0 1 2.9 5.5 1.9v3c0 .4-.3 1-1 .8 1.6.5 3.4.9 5.2.9 1.8 0 3.5-.3 5.2-.9-.6.3-.9-.2-.9-.7z"/></symbol><symbol id="icon-google-plus" viewBox="0 0 38 38" width="38" height="38"><path d="M10.6 24c0 2 2.3 3.2 5.1 3.2 3.9 0 5.4-2.1 5.4-3.7 0-1.4-.5-2.3-2-3.4-1.6-1.1-1.9-1.8-.5-2.9.8-.6 1.4-1.5 1.4-2.6 0-1.2-.5-2.2-1.4-2.7h1.3l1.1-1.1h-4.8c-3 0-4.5 1.8-4.5 3.8s1.4 3.6 4.1 3.6c-.4.9-.3 1.6.4 2.2-4.6 0-5.6 2-5.6 3.6zm3-9.5c-.3-1.7.6-3 1.9-3s2.4 1.4 2.6 3.1c.2 1.7-.5 2.8-1.7 2.8-1.3 0-2.6-1.2-2.8-2.9zm2.4 6.3c2.2.1 3.4 1.4 3.4 2.8 0 1.5-1.2 2.6-3.7 2.6-1.9 0-3.3-1.2-3.3-2.7 0-1.4 1.6-2.7 3.6-2.7zM25.2 10.9h-1.1v2.2h-2.2v1.1h2.2v2.2h1.1v-2.2h2.2v-1.1h-2.2"/></symbol><symbol id="icon-ibm" viewBox="0 0 75 30" width="75" height="30"><path d="M0 0v2h14.6V0H0zm16.7 0v2h20.8s-2.1-2-4.9-2H16.7zm24.8 0v2h12.6l-.8-2H41.5zm21.7 0l-.8 2h12.5V0H63.2zM0 4v2h14.6V4H0zm16.7 0v2h23.2s-.3-1.6-.8-2H16.7zm24.8 0v2h14l-.7-2H41.5zm20.2 0L61 6h13.9V4H61.7zM4.2 8v2.1h6.3V8H4.2zm16.7 0v2.1h6.3V8h-6.3zm12.4 0v2.1h6.3S40 9 40 8h-6.7zm12.5 0v2.1H57L56.2 8H45.8zm14.5 0l-.8 2.1h11.3V8H60.3zM4.2 12v2h6.3v-2H4.2zm16.7 0v2H37s1.4-1.1 1.8-2H20.9zm24.9 0v2h6.3v-1.1l.4 1.1H64l.4-1.1V14h6.3v-2H58.9l-.6 1.7-.6-1.7H45.8zM4.2 16v2h6.3v-2H4.2zm16.7 0v2h17.9c-.4-1-1.8-2-1.8-2H20.9zm24.9 0v2h6.3v-2h-6.3zm7.4 0l.8 2h8.7l.7-2H53.2zm11.3 0v2h6.3v-2h-6.3zM4.2 20v2h6.3v-2H4.2zm16.7 0v2h6.3v-2h-6.3zm12.4 0v2H40c0-1-.4-2-.4-2h-6.3zm12.5 0v2h6.3v-2h-6.3zm8.9 0l.8 2h5.8l.8-2h-7.4zm9.8 0v2h6.3v-2h-6.3zM.1 23.9V26h14.6v-2.1H.1zm16.6 0V26h22.5c.5-.5.8-2.1.8-2.1H16.7zm25 0V26h10.4v-2.1H41.7zm14.4 0l.8 2.1h2.9l.7-2.1h-4.4zm8.4 0V26H75v-2.1H64.5zM.1 28v2h14.6v-2H.1zm16.6 0v2h15.9c2.8 0 4.9-2 4.9-2H16.7zm25 0v2h10.4v-2H41.7zm15.8 0l.7 2h.1l.8-2h-1.6zm7 0v2H75v-2H64.5z"/></symbol><symbol id="icon-inbox" viewBox="0 0 76 54" width="76" height="54"><path d="M74 7S38.66 31 38 31C37.34 31 2 7 2 7V2.63h72V7zm0 6.24v38.33H2V13.24s34.59 22.9 36 22.9c1.41 0 36-22.9 36-22.9z"/></symbol><symbol id="icon-linkedin" viewBox="0 0 38 38" width="38" height="38"><path d="M11.6 15.5H15v10.8h-3.4z"/><ellipse cx="13.3" cy="12.1" rx="2" ry="2"/><path d="M27.5 26.4v-6.9c0-2.9-1.6-4.3-3.9-4.3S20.3 17 20.3 17v-1.5h-3.2v10.8h3.2v-5.7c0-1.5.7-2.4 2-2.4 1.2 0 1.8.9 1.8 2.4v5.7h3.4z"/></symbol><symbol id="icon-ratchet" viewBox="0 0 600 120" width="600" height="120"><path d="M502.1 2.5H397v39h-20v-39h-37v101.8l-16.8-30.2c-4.5 7.4-12.6 12.4-21.9 12.4-14.2 0-25.7-11.5-25.7-25.7s11.5-25.7 25.7-25.7c8.2 0 15.5 3.8 20.2 9.8l.6-1 18-31.7c-3.1-2.2-6.7-4.2-11-6-3.7-1.6-8-3-13.1-4.3C311 .6 305.2 0 298.7 0c-8.2 0-16 1.4-23.3 4.2C268 7 261.6 11 256.2 16.3c-4.3 4.2-8 9-10.9 14.5 2.2-5.5 5.8-12.5 11.5-18.1 3.8-3.8 8.2-7.2 12.9-9.2H113.5L82.8 83.6l13.7 32.9h9.6l2.9-8h36.4l2.9 8H222v-77h19.5c-2.1 6.3-3.2 13.1-3.2 20.5 0 8.9 1.5 17.1 4.6 24.4 3.1 7.4 7.4 13.7 12.9 18.9 5.5 5.3 12 9.3 19.5 12.3 7.5 2.9 15.8 4.4 24.7 4.4 6.6 0 12.5-.7 17.7-2.1 5.1-1.4 9.3-2.9 13-4.5 3.6-1.7 7.3-3.5 9.3-5.6v9.6h37v-43h20v43h32l5.8-107.9.6 107.9H503v-37h-32v-7h19v-28h-19v-6h31V3.2l6.3 36.3H532v78h38v-78h23.7l6.3-37h-97.9zm-379 71l4.2-10.9 4.2 10.9h-8.4zm19.3-66.4l18.4 32.4H184v76.1L142.4 7.1zM92 43.5c0-22.9-18.5-41-41.4-41H0v114h37V87.6l16.7 28.9h42.9L74.2 77.1C84.9 69.7 92 57.6 92 43.5zm-50.1 13H37v-21h4.9c5.4 0 9.7 4.7 9.8 10.5-.1 5.1-4.5 10.5-9.8 10.5zm251.9 17.2l-7.6-13.2 7.6-13.1h15l7.5 13.1-7.5 13.2h-15z"/></symbol><symbol id="icon-search" viewBox="0 0 38 38" width="38" height="38"><path d="M26.7 25.1L23 21.3c.7-1.1 1.2-2.4 1.2-3.8-.1-3.6-3-6.5-6.7-6.5-3.6 0-6.6 2.9-6.6 6.6s3 6.6 6.6 6.6c1.4 0 2.7-.5 3.8-1.2l3.7 3.7c.2.2.5.3.9.3.3 0 .6-.1.9-.3.3-.4.3-1.2-.1-1.6m-9.1-2.6c-2.7 0-4.9-2.2-4.9-4.9s2.2-4.9 4.9-4.9 4.9 2.2 4.9 4.9-2.2 4.9-4.9 4.9"/></symbol><symbol id="icon-subscribe" viewBox="0 0 38 38" width="38" height="38"><path d="M21.6 26.9c0-5.8-4.7-10.5-10.5-10.5v3.2c4 0 7.3 3.3 7.3 7.3h3.2zm-6.2-2.2c0-1.2-1-2.2-2.2-2.2-1.2 0-2.2 1-2.2 2.2s1 2.2 2.2 2.2c1.2 0 2.2-.9 2.2-2.2zM27 27c0-8.8-7.1-16-15.9-16v3.2c3.4 0 6.6 1.3 9 3.7s3.7 5.6 3.7 9l3.2.1z"/></symbol><symbol id="icon-twitter" viewBox="0 0 38 38" width="38" height="38"><path d="M27 12.4c-.7.4-1.4.6-2.2.8-.6-.7-1.5-1.1-2.5-1.1-2.3 0-3.9 2.1-3.4 4.3-2.9-.1-5.5-1.5-7.2-3.6-.9 1.5-.4 3.6 1.1 4.6-.6 0-1.1-.1-1.6-.4 0 1.7 1.1 3.2 2.8 3.5-.5.2-1.1.2-1.6.1.4 1.4 1.7 2.4 3.2 2.4-1.5 1.1-3.4 1.6-5.2 1.4 1.5 1 3.3 1.6 5.3 1.6 6.5 0 10.1-5.4 9.9-10.3.7-.5 1.3-1.1 1.9-1.9-.6.2-1.3.4-2 .5.7-.4 1.3-1.2 1.5-1.9z"/></symbol><symbol id="icon-y-combinator" viewBox="0 0 38 38" width="38" height="38"><path d="M22.4 10.9h3.8l-5.3 10v6h-3.3v-6l-5.5-10H16l3.3 7 3.1-7z"/></symbol></svg>')},icon:function(h,i){var e=this.iconName(h),t=document.querySelector("#"+e);if(t)return'<svg class="svg-icon '+e+" "+(i||"")+'" '+this.dimensions(t)+'><use xlink:href="#'+e+'"/></svg>';console.error('File not found: "'+h+'.svg" at app/assets/svgs/ratchet/')},iconName:function(h){return"icon-"+this.dasherize(h)},dimensions:function(h){return'viewBox="'+h.getAttribute("viewBox")+'" width="'+h.getAttribute("width")+'" height="'+h.getAttribute("height")+'"'},dasherize:function(h){return h.replace(/[W,_]/g,"-").replace(/-{2,}/g,"-")},load:function(){"interactive"==document.readyState&&this.embed(),document.addEventListener("page:change",function(h){this.embed()}.bind(this)),document.addEventListener("DOMContentLoaded",function(h){this.embed()}.bind(this))},aliases:{},alias:function(h){var i=this.aliases[h];return void 0!==i?i:h}};esvg.load(),"undefined"!=typeof module&&(module.exports=esvg);
3
+ },{}],2:[function(require,module,exports){
4
+ "use strict";var toolbox=require("compose-toolbox"),form=function(e,t){function r(e){(e.which<48||e.which>57)&&e.preventDefault()}function n(e){var t=a.value,r=a.max,n=(a.min,t/r*100),o=e.target?e.target:e;if("range"!==o.type)return!1;var n=o.max?o.value/o.max*100:o.value/100*100;o.style.backgroundImage="linear-gradient(90deg, #c3d4e4 "+n+"%, #ffffff "+n+"%)"}var o={};if(!document.querySelector(e)&&!document.querySelector("form"))return!1;var a=(toolbox.merge(o,t),document.querySelectorAll("input[type=range]")),l=document.querySelectorAll("input[type=checkbox], input[type=radio]"),i=document.body;toolbox.event.on(i,"keypress","input[type=number]",r),toolbox.event.on(i,"input","[type=range]",n);for(var c=0;c<a.length;c++)n(a[c]);for(var u=0;u<l.length;u++)!function(e){var t=e.parentNode;"LABEL"===t.tagName?t.classList.add("tick-label"):(e.insertAdjacentHTML("beforebegin",'<label class="tick-label"></label>'),e.previousSibling.insertAdjacentElement("afterbegin",e)),e.insertAdjacentHTML("afterend",'<span class="tick-label"></span>')}(l[u])};module.exports=form;
5
+ },{"compose-toolbox":51}],3:[function(require,module,exports){
6
+ "use strict";var toolbox=require("compose-toolbox"),mobileMenu=function(o){var e={initWidth:"700px",openClass:"menu-open",nav:".main-nav",button:".mobile-menu-button"},n=toolbox.merge(e,o),t=n.button+", "+n.openClass+" "+n.nav+" a",l=document.body;toolbox.event.on(document,"click",t,function(){l.classList.toggle(n.openClass)})};module.exports=mobileMenu;
7
+ },{"compose-toolbox":51}],4:[function(require,module,exports){
8
+ "use strict";function syncValue(e){e=e.target||e,e.classList.toggle("empty",!e.value.trim().length)}var toolbox=require("compose-toolbox"),Event=toolbox.event,textSelectors="textarea, input:not([type=radio]):not([type=checkbox]):not([type=range]):not([type=hidden]):not([type=submit]):not([type=image]):not([type=reset])";Event.change(function(){toolbox.each(document.querySelectorAll(textSelectors),syncValue)}),Event.on(document,"keyup",textSelectors,Event.debounce(syncValue,100));
9
+ },{"compose-toolbox":51}],5:[function(require,module,exports){
10
+ "use strict";var loadFont=require("./utility/load_font"),loadScript=require("./utility/load_script"),toggler=require("compose-toggler"),mobileMenu=require("./base/mobilemenu"),form=require("./base/form"),formUp=require("compose-form-up");form.validate=formUp.validate,form.next=formUp.next,require("./base/sync-input-value");var waypoints=require("./enhancement/waypoints"),notice=require("./enhancement/notice"),sticky=require("./enhancement/sticky"),lightbox=require("./enhancement/lightbox"),esvg=require("./_svg"),toolbox=require("compose-toolbox"),event=toolbox.event,ajax=require("superagent"),rangeTouch=require("rangetouch"),highlighter=require("compose-code-highlighter"),loader=require("compose-loader");require("codemirror/mode/htmlmixed/htmlmixed"),require("codemirror/mode/slim/slim"),require("codemirror/mode/javascript/javascript"),require("codemirror/mode/css/css"),require("codemirror/mode/sql/sql"),require("codemirror/mode/php/php"),require("codemirror/mode/ruby/ruby"),require("codemirror/mode/shell/shell"),require("codemirror/mode/go/go"),require("codemirror/mode/python/python"),require("codemirror/mode/yaml/yaml"),require("codemirror/mode/clike/clike"),require("codemirror/addon/runmode/runmode"),require("codemirror/addon/edit/matchbrackets"),rangeTouch.set("thumbWidth",20),event.scroll.disablePointer(),event.change(function(){form(),highlighter.highlight()});var ratchet=toolbox.merge({loadFont:loadFont,loadScript:loadScript,ajax:ajax,loader:loader,mobileMenu:mobileMenu,form:form,toggler:toggler,validation:formUp.validate,waypoints:waypoints,notice:notice,sticky:sticky,lightbox:lightbox,esvg:esvg},toolbox);window.ratchet=module.exports=ratchet;
11
+ },{"./_svg":1,"./base/form":2,"./base/mobilemenu":3,"./base/sync-input-value":4,"./enhancement/lightbox":6,"./enhancement/notice":7,"./enhancement/sticky":8,"./enhancement/waypoints":9,"./utility/load_font":10,"./utility/load_script":11,"codemirror/addon/edit/matchbrackets":13,"codemirror/addon/runmode/runmode":14,"codemirror/mode/clike/clike":16,"codemirror/mode/css/css":17,"codemirror/mode/go/go":18,"codemirror/mode/htmlmixed/htmlmixed":19,"codemirror/mode/javascript/javascript":20,"codemirror/mode/php/php":21,"codemirror/mode/python/python":22,"codemirror/mode/ruby/ruby":23,"codemirror/mode/shell/shell":24,"codemirror/mode/slim/slim":25,"codemirror/mode/sql/sql":26,"codemirror/mode/yaml/yaml":28,"compose-code-highlighter":30,"compose-form-up":46,"compose-loader":49,"compose-toggler":50,"compose-toolbox":51,"rangetouch":58,"superagent":59}],6:[function(require,module,exports){
12
+ "use strict";var toolbox=require("compose-toolbox"),Event=toolbox.event,delay=toolbox.delay,loader=require("compose-loader"),lightbox=function(e,o){function t(){s.insertAdjacentHTML("afterbegin",'<aside class="lightbox"><figure><img src="" alt=""><button></button></figure></aside>'),c=document.querySelector(".lightbox img")}function n(e){if(e&&"IMG"===e.target.tagName)return!1;m.remove(),s.classList.remove("lightbox-active"),c.classList.remove("loaded"),c.src=""}function i(e){m.loading(),c.src=e.parentNode.href,s.classList.add("lightbox-active")}function r(){m.remove(),c.classList.add("loaded")}function a(e){delay(function(){m.failure()},1e3),delay(function(){n()},2500),Event.off(c,"load",r),Event.off(c,"error",a)}function l(e){if(e.preventDefault(),g.matches)return!1;document.querySelector(".lightbox")||t(),Event.keyOne("esc",n),i(e.target),c.complete?r():(Event.on(c,"load",r),Event.on(c,"error",a))}e=e||"a[href$=jpg] ,a[href$=png], a[href$=gif], a[href$=svg]";var c,d={initWidth:"700px"},f=toolbox.merge(d,o),u=document.querySelector(e),g=window.matchMedia("(max-width: "+f.initWidth+")"),s=document.body,m=loader.new({loading:"Loading image",failure:"No image found"});if(!u)return!1;Event.on(document,"click","a[href$=jpg], a[href$=png], a[href$=gif], a[href$=svg]",l),Event.on(document,"click",".lightbox",n)};module.exports=lightbox;
13
+ },{"compose-loader":49,"compose-toolbox":51}],7:[function(require,module,exports){
14
+ "use strict";var toolbox=require("compose-toolbox"),notice=function(e,o){function t(e){e.preventDefault();var o=n.querySelector("."+i.noticeClass);n.removeChild(o),document.cookie=s+"=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/",toolbox.event.off(r)}var c={noticeName:"notice",noticeClass:"notice",noticeMessage:"[your notice message here]"},i=toolbox.merge(c,o),n=document.querySelector(e),s="dismiss-"+i.noticeName,r=n.querySelector("."+i.noticeClass+" .close-btn");if(!n||function(e){var o="; "+document.cookie,t=o.split("; "+e+"=");if(2==t.length)return t.pop().split(";").shift()}(s))return!1;var a='<aside class="'+i.noticeClass+'">'+i.noticeMessage+'<a href="#?" class="close-btn"></a></aside>';document.querySelector("main").insertAdjacentHTML("afterbegin",a),toolbox.event.on(r,"click",t)};module.exports=notice;
15
+ },{"compose-toolbox":51}],8:[function(require,module,exports){
16
+ "use strict";var toolbox=require("compose-toolbox"),fromTop=toolbox.fromTop,sticky=function(o,t){function e(o){i(),s(),o.matches||p.classList.remove("sticky"),y.toggle(o.matches),f.toggle(o.matches)}function i(){a=document.body.scrollHeight,d=window.innerHeight}function s(){var o=window.pageYOffset,t=o>u,e=h?o>=a-g-h+l:null;t&&!e?(p.classList.remove("anchored"),p.classList.add("sticky")):t&&e?(p.classList.remove("sticky"),p.classList.add("anchored")):p.classList.remove("sticky")}var n={topPadding:!1,initWidth:"700px",stickyClass:"sticky",anchorPoint:null},c=toolbox.merge(n,t),r=document.querySelector(o);if(!r)return!1;var a,d,l=c.topPadding===!0?parseInt(window.getComputedStyle(r,null).getPropertyValue("padding-top")):0,m=window.matchMedia("(min-width: "+c.initWidth+")"),u=fromTop(r)+l,g=r.offsetHeight,h=c.anchorPoint,p=document.body,y=toolbox.event.resize(i),f=toolbox.event.scroll(s);e(m),m.addListener(e)};module.exports=sticky;
17
+ },{"compose-toolbox":51}],9:[function(require,module,exports){
18
+ "use strict";var toolbox=require("compose-toolbox"),Event=toolbox.event,matches=toolbox.matches,fromTop=toolbox.fromTop,scrollTo=toolbox.scrollTo,getClosest=toolbox.getClosest,callback=Event.callback,waypoints=function(e){function o(e,o){var t=f.querySelector("."+o);t!=e&&(t&&t.classList.remove(o),e.classList.add(o))}function t(e){o(e,r),n(getClosest(e,a))}function n(e){e&&o(e,i)}var l={initWidth:"0px",elemOffset:0},c=toolbox.merge(l,e),r="active",a="dl",i="pinned",f=document.querySelector(".waypoint-nav"),s=[];if(f&&function(e,o){return Array.prototype.slice.call(e,o)}(f.querySelectorAll("a[href^='#']")).forEach(function(e){var o=document.querySelector(e.getAttribute("href"));o&&s.push(o)}),!f||s.length<1)return!1;var u,h,m,d,w=document.body,v=[];window.location.hash&&(h=window.location.hash.replace("#",""),window.location.hash="",history.replaceState(null,"","#"+h)),Event.on(window,"load",function(){Event.media.minWidth(c.initWidth,function(e){p.toggle(e.matches),p(),b.toggle(e.matches),b(),E.toggle(e.matches),E()})});var p=callback.new(function(){m=w.scrollHeight,d=window.innerHeight,g()}),g=function(){s.forEach(function(e,o){v[o]={elem:s[o],offset:fromTop(s[o])}})},b=callback.new(function(){var e,o,n=window.pageYOffset,l=n<0||n+d>=m;if(v.forEach(function(o,t){var r=v[0],a=v[t+1],i=v[v.length-1];n<r.offset?e=r.elem.id:l||n>i.offset-c.elemOffset?e=i.elem.id:n>o.offset-c.elemOffset&&n<a.offset-c.elemOffset&&(e=o.elem.id)}),e){if(e===u)return!1;if(!(o=f.querySelector('a[href="#'+e+'"]')))return!1;t(o),u=e}}),y=callback.new(function(e){matches(e.target,'a[href^="#"]')&&(e.preventDefault(),x(e.target,!0))}),E=callback.new(function(){if(!window.location.hash)return!1;x(document.querySelector('a[href="'+window.location.hash+'"]'))}),x=function(e,o){var n,l=e.getAttribute("href"),c=document.querySelector(l);c&&(t(e),v.forEach(function(e,o){v[o].elem===c&&(n=v[o].offset)}),o?(b.stop(),history.pushState(null,"",l),scrollTo(c,b.start)):window.scrollTo(0,fromTop(c)))};Event.resize.stop(p),Event.scroll(b),Event.on(document,"click",y),Event.on(window,"hashchange",E)};module.exports=waypoints;
19
+ },{"compose-toolbox":51}],10:[function(require,module,exports){
20
+ "use strict";var supportsWoff2=function(A){if(!("FontFace"in A))return!1;var t=new FontFace("t",'url( "data:application/font-woff2;base64,d09GMgABAAAAAAIkAAoAAAAABVwAAAHcAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABlYAgloKLEoBNgIkAxgLDgAEIAWDcgc1G7IEyB6SJAFID5YA3nAHC6h4+H7s27nP1kTyOoQkGuJWtNGIJKYznRI3VEL7IaHq985ZUuKryZKcAtJsi5eULwUybm9KzajBBhywZ5ZwoJNuwDX5C/xBjvz5DbsoNsvG1NGQiqp0NMLZ7JlnW+5MaM3HwcHheUQeiVokekHkn/FRdefvJaTp2PczN+I1Sc3k9VuX51Tb0Tqqf1deVXGdJsDOhz0/EffMOPOzHNH06pYkDDjs+P8fb/z/8n9Iq8ITzWywkP6PBMMN9L/O7vY2FNoTAkp5PpD6g1nV9WmyQnM5uPpAMHR2fe06jbfvzPriekVTQxC6lpKr43oDtRZfCATl5OVAUKykqwm9o8R/kg37cxa6eZikS7cjK4aIwoyh6jOFplhFrz2b833G3Jii9AjDUiAZ9AxZtxdEYV6imvRF0+0Nej3wu6nPZrTLh81AVcV3kmMVdQj6Qbe9qetzbuDZ7vXOlRrqooFSxCv6SfrDICA6rnHZXQPVcUHJYGcoqa3jVH7ATrjWBNYYkEqF3RFpVIl0q2JvMOJd7/TyjXHw2NyAuJpNaEbz8RTEVtCbSH7JrwQQOqwGl7sTUOtdBZIY2DKqKlvOmPvUxJaURAZZcviTT0SKHCXqzwc=" ) format( "woff2" )',{});return t.load().catch(function(){}),"loading"==t.status||"loaded"==t.status}(window),loadFont=function(A,t,e,o){var n=navigator.userAgent;if(window.addEventListener&&(!n.match(/(Android (2|3|4.0|4.1|4.2|4.3))|(Opera (Mini|Mobi))/)||n.match(/Chrome/))){var a={};try{a=localStorage||{}}catch(A){}var r="x-font-"+A,s=r+"url",c=r+"css",i=a[s],d=a[c],l=document.createElement("style");if(l.rel="stylesheet",document.head.appendChild(l),!d||i!==t&&i!==e){var u=e&&supportsWoff2?e:t,f=new XMLHttpRequest;f.open("GET",u),f.onload=function(){f.status>=200&&f.status<400&&(a[s]=u,a[c]=f.responseText,o||(l.textContent=f.responseText))},f.send()}else l.textContent=d}};module.exports=loadFont;
21
+ },{}],11:[function(require,module,exports){
22
+ "use strict";var loadScript=function(e,t){var c=document.createElement("script");c.async=!0,c.src=e,document.head.appendChild(c),c.addEventListener("load",function(){t&&t()},!1)};module.exports=loadScript;
23
+ },{}],12:[function(require,module,exports){
24
+ !function(e,t,n){"undefined"!=typeof module&&module.exports?module.exports=n():"function"==typeof define&&define.amd?define(n):t.bean=n()}(0,this,function(e,t){e=e||"bean",t=t||this;var n,r=window,o=t[e],i="addEventListener",a=document||{},l=a.documentElement||{},u=l[i],c=u?i:"attachEvent",s={},p=Array.prototype.slice,f=function(e,t){return e.split(t||" ")},h=function(e){return"string"==typeof e},g=function(e){return"function"==typeof e},d=function(e){return"object"==typeof e},m=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);if(!d(t))return n;for(r in n)n.hasOwnProperty(r)&&t.hasOwnProperty(r)&&(n[r]=t[r]);return n},v=function(e,t,n){for(n=0;n<t.length;n++)t[n]&&(e[t[n]]=1);return e}({},f("click dblclick mouseup mousedown contextmenu mousewheel mousemultiwheel DOMMouseScroll mouseover mouseout mousemove selectstart selectend keydown keypress keyup orientationchange focus blur change reset select submit load unload beforeunload resize move DOMContentLoaded readystatechange message error abort scroll "+(u?"show input invalid touchstart touchmove touchend touchcancel gesturestart gesturechange gestureend textinput readystatechange pageshow pagehide popstate hashchange offline online afterprint beforeprint dragstart dragenter dragover dragleave drag drop dragend loadstart progress suspend emptied stalled loadmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate play pause ratechange volumechange cuechange checking noupdate downloading cached updateready obsolete ":""))),y=function(){var e="compareDocumentPosition"in l?function(e,t){return t.compareDocumentPosition&&16==(16&t.compareDocumentPosition(e))}:"contains"in l?function(e,t){return(t=9===t.nodeType||t===window?l:t)!==e&&t.contains(e)}:function(e,t){for(;e=e.parentNode;)if(e===t)return 1;return 0},t=function(t){var n=t.relatedTarget;return n?n!==this&&"xul"!==n.prefix&&!/document/.test(this.toString())&&!e(n,this):null==n};return{mouseenter:{base:"mouseover",condition:t},mouseleave:{base:"mouseout",condition:t},mousewheel:{base:/Firefox/.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel"}}}(),b=function(){var e=f("altKey attrChange attrName bubbles cancelable ctrlKey currentTarget detail eventPhase getModifierState isTrusted metaKey relatedNode relatedTarget shiftKey srcElement target timeStamp type view which propertyName path"),t=e.concat(f("button buttons clientX clientY dataTransfer fromElement offsetX offsetY pageX pageY screenX screenY toElement movementX movementY region")),n=t.concat(f("wheelDelta wheelDeltaX wheelDeltaY wheelDeltaZ axis")),o=e.concat(f("char charCode key keyCode keyIdentifier keyLocation location isComposing code")),i=e.concat(f("data")),u=e.concat(f("touches targetTouches changedTouches scale rotation")),c=e.concat(f("data origin source")),s=e.concat(f("state")),p=/over|out/,h=[{reg:/key/i,fix:function(e,t){return t.keyCode=e.keyCode||e.which,o}},{reg:/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,fix:function(e,n,r){return n.rightClick=3===e.which||2===e.button,n.pos={x:0,y:0},e.pageX||e.pageY?(n.clientX=e.pageX,n.clientY=e.pageY):(e.clientX||e.clientY)&&(n.clientX=e.clientX+a.body.scrollLeft+l.scrollLeft,n.clientY=e.clientY+a.body.scrollTop+l.scrollTop),p.test(r)&&(n.relatedTarget=e.relatedTarget||e[("mouseover"==r?"from":"to")+"Element"]),t}},{reg:/mouse.*(wheel|scroll)/i,fix:function(){return n}},{reg:/^text/i,fix:function(){return i}},{reg:/^touch|^gesture/i,fix:function(){return u}},{reg:/^message$/i,fix:function(){return c}},{reg:/^popstate$/i,fix:function(){return s}},{reg:/.*/,fix:function(){return e}}],g={},d=function(e,t,n){if(arguments.length&&(e=e||((t.ownerDocument||t.document||t).parentWindow||r).event,this.originalEvent=e,this.isNative=n,this.isBean=!0,e)){var o,i,a,l,u,c=e.type,s=e.target||e.srcElement;if(this.target=s&&3===s.nodeType?s.parentNode:s,n){if(!(u=g[c]))for(o=0,i=h.length;o<i;o++)if(h[o].reg.test(c)){g[c]=u=h[o].fix;break}for(l=u(e,this,c),o=l.length;o--;)!((a=l[o])in this)&&a in e&&(this[a]=e[a])}}};return d.prototype.preventDefault=function(){this.originalEvent.preventDefault?this.originalEvent.preventDefault():this.originalEvent.returnValue=!1},d.prototype.stopPropagation=function(){this.originalEvent.stopPropagation?this.originalEvent.stopPropagation():this.originalEvent.cancelBubble=!0},d.prototype.stop=function(){this.preventDefault(),this.stopPropagation(),this.stopped=!0},d.prototype.stopImmediatePropagation=function(){this.originalEvent.stopImmediatePropagation&&this.originalEvent.stopImmediatePropagation(),this.isImmediatePropagationStopped=function(){return!0}},d.prototype.isImmediatePropagationStopped=function(){return this.originalEvent.isImmediatePropagationStopped&&this.originalEvent.isImmediatePropagationStopped()},d.prototype.clone=function(e){var t=new d(this,this.element,this.isNative);return t.currentTarget=e,t},d}(),w=function(e,t){return u||t||e!==a&&e!==r?e:l},E=function(){var e=function(e,t,n,r){var o=function(n,o){return t.apply(e,r?p.call(o,n?0:1).concat(r):o)},i=function(n,r){return t.__beanDel?t.__beanDel.ft(n.target,e):r},a=n?function(e){var t=i(e,this);if(n.apply(t,arguments))return e&&(e.currentTarget=t),o(e,arguments)}:function(e){return t.__beanDel&&(e=e.clone(i(e))),o(e,arguments)};return a.__beanDel=t.__beanDel,a},t=function(t,n,r,o,i,a,l){var s,p=y[n];"unload"==n&&(r=k(_,t,n,r,o)),p&&(p.condition&&(r=e(t,r,p.condition,a)),n=p.base||n),this.isNative=s=v[n]&&!!t[c],this.customType=!u&&!s&&n,this.element=t,this.type=n,this.original=o,this.namespaces=i,this.eventType=u||s?n:"propertychange",this.target=w(t,s),this[c]=!!this.target[c],this.root=l,this.handler=e(t,r,null,a)};return t.prototype.inNamespaces=function(e){var t,n,r=0;if(!e)return!0;if(!this.namespaces)return!1;for(t=e.length;t--;)for(n=this.namespaces.length;n--;)e[t]==this.namespaces[n]&&r++;return e.length===r},t.prototype.matches=function(e,t,n){return!(this.element!==e||t&&this.original!==t||n&&this.handler!==n)},t}(),T=function(){var e={},t=function(n,r,o,i,a,l){var u=a?"r":"$";if(r&&"*"!=r){var c,s=0,p=e[u+r],f="*"==n;if(!p)return;for(c=p.length;s<c;s++)if((f||p[s].matches(n,o,i))&&!l(p[s],p,s,r))return}else for(var h in e)h.charAt(0)==u&&t(n,h.substr(1),o,i,a,l)};return{has:function(t,n,r,o){var i,a=e[(o?"r":"$")+n];if(a)for(i=a.length;i--;)if(!a[i].root&&a[i].matches(t,r,null))return!0;return!1},get:function(e,n,r,o){var i=[];return t(e,n,r,null,o,function(e){return i.push(e)}),i},put:function(t){var n=!t.root&&!this.has(t.element,t.type,null,!1),r=(t.root?"r":"$")+t.type;return(e[r]||(e[r]=[])).push(t),n},del:function(n){t(n.element,n.type,null,n.handler,n.root,function(t,n,r){return n.splice(r,1),t.removed=!0,0===n.length&&delete e[(t.root?"r":"$")+t.type],!1})},entries:function(){var t,n=[];for(t in e)"$"==t.charAt(0)&&(n=n.concat(e[t]));return n}}}(),D=function(e){n=arguments.length?e:a.querySelectorAll?function(e,t){return t.querySelectorAll(e)}:function(){throw new Error("Bean: No selector engine installed")}},P=function(e,t){if(u||!t||!e||e.propertyName=="_on"+t){var n=T.get(this,t||e.type,null,!1),r=n.length,o=0;for(e=new b(e,this,!0),t&&(e.type=t);o<r&&!e.isImmediatePropagationStopped();o++)n[o].removed||n[o].handler.call(this,e)}},x=u?function(e,t,n,r,o){e[n?i:"removeEventListener"](t,P,o)}:function(e,t,n,r){var o;n?(T.put(o=new E(e,r||t,function(t){P.call(e,t,r)},P,null,null,!0)),r&&null==e["_on"+r]&&(e["_on"+r]=0),o.target.attachEvent("on"+o.eventType,o.handler)):(o=T.get(e,r||t,P,!0)[0])&&(o.target.detachEvent("on"+o.eventType,o.handler),T.del(o))},k=function(e,t,n,r,o){return function(){r.apply(this,arguments),e(t,n,o)}},_=function(e,t,n,r,o){var i,a,l=t&&t.replace(/\..*/,""),u=T.get(e,l,null,!1),s={};for(i=0,a=u.length;i<a;i++)n&&u[i].original!==n||!u[i].inNamespaces(r)||(T.del(u[i]),!s[u[i].eventType]&&u[i][c]&&(s[u[i].eventType]={t:u[i].eventType,c:u[i].type}));for(i in s)T.has(e,s[i].t,null,!1)||x(e,s[i].t,!1,s[i].c,o)},C=function(e,t){var r=function(t,r){for(var o,i=h(e)?n(e,r):e;t&&t!==r;t=t.parentNode)for(o=i.length;o--;)if(i[o]===t)return t},o=function(e){var n=r(e.target,this);n&&t.apply(n,arguments)};return o.__beanDel={ft:r,selector:e},o},N=u?function(e,t,n){var o=a.createEvent(e?"HTMLEvents":"UIEvents");o[e?"initEvent":"initUIEvent"](t,!0,!0,r,1),n.dispatchEvent(o)}:function(e,t,n){n=w(n,e),e?n.fireEvent("on"+t,a.createEventObject()):n["_on"+t]++},S=function(e,t,n){var r,o,i,a,l=h(t),u={useCapture:!1},c=m(u,arguments[arguments.length-1]);if(l&&t.indexOf(" ")>0){for(t=f(t),a=t.length;a--;)S(e,t[a],n);return e}if(o=l&&t.replace(/\..*/,""),o&&y[o]&&(o=y[o].base),!t||l)(i=l&&t.replace(/[^\.]*(?=\..*)\.|.*/,""))&&(i=f(i,".")),_(e,o,n,i,c.useCapture);else if(g(t))_(e,null,t,null,c.useCapture);else for(r in t)t.hasOwnProperty(r)&&S(e,r,t[r]);return e},X=function(e,t,n,r){var o,i,a,l,u,h,d,v,y={useCapture:!1};{if(void 0!==n||"object"!=typeof t){for(g(n)?(u=p.call(arguments,3),r=o=n):(o=r,u=p.call(arguments,4),r=C(n,o)),v=m(y,u[u.length-1]),a=f(t),this===s&&(r=k(S,e,t,r,o)),l=a.length;l--;)d=T.put(h=new E(e,a[l].replace(/\..*/,""),r,o,f(a[l].replace(/[^\.]*(?=\..*)\.|.*/,""),"."),u,!1)),h[c]&&d&&x(e,h.eventType,!0,h.customType,v.useCapture);return e}for(i in t)t.hasOwnProperty(i)&&X.call(this,e,i,t[i])}},Y=function(e,t,n,r,o){return X.apply(null,h(n)?[e,n,t,r].concat(arguments.length>3?p.call(arguments,4):[]):p.call(arguments))},I=function(){return X.apply(s,arguments)},O=function(e,t,n){var r,o,i,a,l,u=f(t);for(r=u.length;r--;)if(t=u[r].replace(/\..*/,""),(a=u[r].replace(/[^\.]*(?=\..*)\.|.*/,""))&&(a=f(a,".")),a||n||!e[c])for(l=T.get(e,t,null,!1),n=[!1].concat(n),o=0,i=l.length;o<i;o++)l[o].inNamespaces(a)&&l[o].handler.apply(e,n);else N(v[t],t,e);return e},L=function(e,t,n){for(var r,o,i=T.get(t,n,null,!1),a=i.length,l=0;l<a;l++)i[l].original&&(r=[e,i[l].type],(o=i[l].handler.__beanDel)&&r.push(o.selector),r.push(i[l].original),X.apply(null,r));return e},M={on:X,add:Y,one:I,off:S,remove:S,clone:L,fire:O,Event:b,setSelectorEngine:D,noConflict:function(){return t[e]=o,this}};if(r.attachEvent){var $=function(){var e,t=T.entries();for(e in t)t[e].type&&"unload"!==t[e].type&&S(t[e].element,t[e].type);r.detachEvent("onunload",$),r.CollectGarbage&&r.CollectGarbage()};r.attachEvent("onunload",$)}return D(),M});
25
+ },{}],13:[function(require,module,exports){
26
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){function t(e,t,i,r){var o=e.getLineHandle(t.line),l=t.ch-1,f=l>=0&&c[o.text.charAt(l)]||c[o.text.charAt(++l)];if(!f)return null;var u=">"==f.charAt(1)?1:-1;if(i&&u>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(a(t.line,l+1)),s=n(e,a(t.line,l+(u>0?1:0)),u,h||null,r);return null==s?null:{from:a(t.line,l),to:s&&s.pos,match:s&&s.ch==f.charAt(0),forward:u>0}}function n(e,t,n,i,r){for(var o=r&&r.maxScanLineLength||1e4,l=r&&r.maxScanLines||1e3,f=[],u=r&&r.bracketRegex?r.bracketRegex:/[(){}[\]]/,h=n>0?Math.min(t.line+l,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-l),s=t.line;s!=h;s+=n){var m=e.getLine(s);if(m){var d=n>0?0:m.length-1,g=n>0?m.length:-1;if(!(m.length>o))for(s==t.line&&(d=t.ch-(n<0?1:0));d!=g;d+=n){var p=m.charAt(d);if(u.test(p)&&(void 0===i||e.getTokenTypeAt(a(s,d+1))==i)){var v=c[p];if(">"==v.charAt(1)==n>0)f.push(p);else{if(!f.length)return{pos:a(s,d),ch:p};f.pop()}}}}}return s-n!=(n>0?e.lastLine():e.firstLine())&&null}function i(e,n,i){for(var r=e.state.matchBrackets.maxHighlightLineLength||1e3,c=[],l=e.listSelections(),f=0;f<l.length;f++){var u=l[f].empty()&&t(e,l[f].head,!1,i);if(u&&e.getLine(u.from.line).length<=r){var h=u.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";c.push(e.markText(u.from,a(u.from.line,u.from.ch+1),{className:h})),u.to&&e.getLine(u.to.line).length<=r&&c.push(e.markText(u.to,a(u.to.line,u.to.ch+1),{className:h}))}}if(c.length){o&&e.state.focused&&e.focus();var s=function(){e.operation(function(){for(var e=0;e<c.length;e++)c[e].clear()})};if(!n)return s;setTimeout(s,800)}}function r(e){e.operation(function(){l&&(l(),l=null),l=i(e,!1,e.state.matchBrackets)})}var o=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),a=e.Pos,c={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},l=null;e.defineOption("matchBrackets",!1,function(t,n,i){i&&i!=e.Init&&(t.off("cursorActivity",r),l&&(l(),l=null)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",r))}),e.defineExtension("matchBrackets",function(){i(this,!0)}),e.defineExtension("findMatchingBracket",function(e,n,i){return t(this,e,n,i)}),e.defineExtension("scanForBracket",function(e,t,i,r){return n(this,e,t,i,r)})});
27
+ },{"../../lib/codemirror":15}],14:[function(require,module,exports){
28
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.runMode=function(t,n,r,o){var a=e.getMode(e.defaults,n),d=/MSIE \d/.test(navigator.userAgent),i=d&&(null==document.documentMode||document.documentMode<9);if(r.appendChild){var c=o&&o.tabSize||e.defaults.tabSize,l=r,u=0;l.innerHTML="",r=function(e,t){if("\n"==e)return l.appendChild(document.createTextNode(i?"\r":e)),void(u=0);for(var n="",r=0;;){var o=e.indexOf("\t",r);if(o==-1){n+=e.slice(r),u+=e.length-r;break}u+=o-r,n+=e.slice(r,o);var a=c-u%c;u+=a;for(var d=0;d<a;++d)n+=" ";r=o+1}if(t){var f=l.appendChild(document.createElement("span"));f.className="cm-"+t.replace(/ +/g," cm-"),f.appendChild(document.createTextNode(n))}else l.appendChild(document.createTextNode(n))}}for(var f=e.splitLines(t),s=o&&o.state||e.startState(a),p=0,m=f.length;p<m;++p){p&&r("\n");var v=new e.StringStream(f[p]);for(!v.string&&a.blankLine&&a.blankLine(s);!v.eol();){var b=a.token(v,s);r(v.current(),b,p,v.start,s),v.start=v.pos}}}});
29
+ },{"../../lib/codemirror":15}],15:[function(require,module,exports){
30
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";function e(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}function t(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function r(e,r){return t(e).appendChild(r)}function n(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function i(e,t,r,i){var o=n(e,t,r,i);return o.setAttribute("role","presentation"),o}function o(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function l(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function s(t,r){var n=t.className;e(r).test(n)||(t.className+=(n?" ":"")+r)}function a(t,r){for(var n=t.split(" "),i=0;i<n.length;i++)n[i]&&!e(n[i]).test(r)&&(r+=" "+n[i]);return r}function u(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function c(e,t,r){t||(t={});for(var n in e)!e.hasOwnProperty(n)||r===!1&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function f(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/))==-1&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}function h(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}function d(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);o==-1&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,i+=r-i%r,n=o+1,i>=t)return n}}function p(e){for(;kl.length<=e;)kl.push(g(kl)+" ");return kl[e]}function g(e){return e[e.length-1]}function v(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function m(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}function y(){}function b(e,t){var r;return Object.create?r=Object.create(e):(y.prototype=e,r=new y),t&&c(t,r),r}function w(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ml.test(e))}function x(e,t){return t?!!(t.source.indexOf("\\w")>-1&&w(e))||t.test(e):w(e)}function C(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function S(e){return e.charCodeAt(0)>=768&&Nl.test(e)}function L(e,t,r){for(;(r<0?t>0:t<e.length)&&S(e.charAt(t));)t+=r;return t}function T(e,t,r){for(;;){if(Math.abs(t-r)<=1)return e(t)?t:r;var n=Math.floor((t+r)/2);e(n)?r=n:t=n}}function k(e,t,r){var o=this;this.input=r,o.scrollbarFiller=n("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=n("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=i("div",null,"CodeMirror-code"),o.selectionDiv=n("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=n("div",null,"CodeMirror-cursors"),o.measure=n("div",null,"CodeMirror-measure"),o.lineMeasure=n("div",null,"CodeMirror-measure"),o.lineSpace=i("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var l=i("div",[o.lineSpace],"CodeMirror-lines");o.mover=n("div",[l],null,"position: relative"),o.sizer=n("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=n("div",null,null,"position: absolute; height: "+xl+"px; width: 1px;"),o.gutters=n("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=n("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=n("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),Zo&&Qo<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),Jo||Yo&&al||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,r.init(o)}function M(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 r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function N(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function O(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function W(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function A(e){if(null==e.parent)return null;for(var t=e.parent,r=h(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function D(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l],a=s.height;if(t<a)break;t-=a}return r+l}function H(e,t){return t>=e.first&&t<e.first+e.size}function P(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function E(e,t,r){if(void 0===r&&(r=null),!(this instanceof E))return new E(e,t,r);this.line=e,this.ch=t,this.sticky=r}function F(e,t){return e.line-t.line||e.ch-t.ch}function I(e,t){return e.sticky==t.sticky&&0==F(e,t)}function z(e){return E(e.line,e.ch)}function R(e,t){return F(e,t)<0?t:e}function B(e,t){return F(e,t)<0?e:t}function G(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function U(e,t){if(t.line<e.first)return E(e.first,0);var r=e.first+e.size-1;return t.line>r?E(r,M(e,r).text.length):V(t,M(e,t.line).text.length)}function V(e,t){var r=e.ch;return null==r||r>t?E(e.line,t):r<0?E(e.line,0):e}function K(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=U(e,t[n]);return r}function j(){Ol=!0}function X(){Wl=!0}function Y(e,t,r){this.marker=e,this.from=t,this.to=r}function _(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function $(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function q(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Z(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);if(s||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var a=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Y(l,o.from,a?null:o.to))}}return n}function Q(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);if(s||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var a=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Y(l,a?null:o.from-t,null==o.to?null:o.to-t))}}return n}function J(e,t){if(t.full)return null;var r=H(e,t.from.line)&&M(e,t.from.line).markedSpans,n=H(e,t.to.line)&&M(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==F(t.from,t.to),s=Z(r,i,l),a=Q(n,o,l),u=1==t.text.length,c=g(t.text).length+(u?i:0);if(s)for(var f=0;f<s.length;++f){var h=s[f];if(null==h.to){var d=_(a,h.marker);d?u&&(h.to=null==d.to?null:d.to+c):h.to=i}}if(a)for(var p=0;p<a.length;++p){var v=a[p];if(null!=v.to&&(v.to+=c),null==v.from){var m=_(s,v.marker);m||(v.from=c,u&&(s||(s=[])).push(v))}else v.from+=c,u&&(s||(s=[])).push(v)}s&&(s=ee(s)),a&&a!=s&&(a=ee(a));var y=[s];if(!u){var b,w=t.text.length-2;if(w>0&&s)for(var x=0;x<s.length;++x)null==s[x].to&&(b||(b=[])).push(new Y(s[x].marker,null,null));for(var C=0;C<w;++C)y.push(b);y.push(a)}return y}function ee(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function te(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&h(n,r)!=-1||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(F(u.to,s.from)<0||F(u.from,s.to)>0)){var c=[a,1],f=F(u.from,s.from),d=F(u.to,s.to);(f<0||!l.inclusiveLeft&&!f)&&c.push({from:u.from,to:s.from}),(d>0||!l.inclusiveRight&&!d)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}function re(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function ne(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function ie(e){return e.inclusiveLeft?-1:0}function oe(e){return e.inclusiveRight?1:0}function le(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=F(n.from,i.from)||ie(e)-ie(t);if(o)return-o;var l=F(n.to,i.to)||oe(e)-oe(t);return l?l:t.id-e.id}function se(e,t){var r,n=Wl&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!r||le(r,i.marker)<0)&&(r=i.marker);return r}function ae(e){return se(e,!0)}function ue(e){return se(e,!1)}function ce(e,t,r,n,i){var o=M(e,t),l=Wl&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=F(u.from,r)||ie(a.marker)-ie(i),f=F(u.to,n)||oe(a.marker)-oe(i);if(!(c>=0&&f<=0||c<=0&&f>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?F(u.to,r)>=0:F(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?F(u.from,n)<=0:F(u.from,n)<0)))return!0}}}function fe(e){for(var t;t=ae(e);)e=t.find(-1,!0).line;return e}function he(e){for(var t;t=ue(e);)e=t.find(1,!0).line;return e}function de(e){for(var t,r;t=ue(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}function pe(e,t){var r=M(e,t),n=fe(r);return r==n?t:A(n)}function ge(e,t){if(t>e.lastLine())return t;var r,n=M(e,t);if(!ve(e,n))return t;for(;r=ue(n);)n=r.find(1,!0).line;return A(n)+1}function ve(e,t){var r=Wl&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&me(e,t,n))return!0}}function me(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return me(e,n.line,_(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&me(e,t,i))return!0}function ye(e){e=fe(e);for(var t=0,r=e.parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;r=o,o=r.parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function be(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=ae(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=ue(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,n=o.to.line,r+=n.text.length-o.to.ch}return r}function we(e){var t=e.display,r=e.doc;t.maxLine=M(r,r.first),t.maxLineLength=be(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=be(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}function xe(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function Ce(e,t,r){var n;Al=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:Al=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:Al=i)}return null!=n?n:Al}function Se(e,t){var r=e.order;return null==r&&(r=e.order=Dl(e.text,t)),r}function Le(e,t,r){var n=L(e.text,t+r,r);return n<0||n>e.text.length?null:n}function Te(e,t,r){var n=Le(e,t.ch,r);return null==n?null:new E(t.line,n,r<0?"after":"before")}function ke(e,t,r,n,i){if(e){var o=Se(r,t.doc.direction);if(o){var l,s=i<0?g(o):o[0],a=i<0==(1==s.level),u=a?"after":"before";if(s.level>0){var c=qt(t,r);l=i<0?r.text.length-1:0;var f=Zt(t,c,l).top;l=T(function(e){return Zt(t,c,e).top==f},i<0==(1==s.level)?s.from:s.to-1,l),"before"==u&&(l=Le(r,l,1,!0))}else l=i<0?s.to:s.from;return new E(n,l,u)}}return new E(n,i<0?r.text.length:0,i<0?"before":"after")}function Me(e,t,r,n){var i=Se(t,e.doc.direction);if(!i)return Te(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=Ce(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return Te(t,r,n);var s,a=function(e,r){return Le(t,e instanceof E?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||qt(e,t),gr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var f=1==l.level==n<0,h=a(r,f?1:-1);if(null!=h&&(f?h<=l.to&&h<=c.end:h>=l.from&&h>=c.begin)){var d=f?"before":"after";return new E(r.line,h,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new E(r.line,a(e,1),"before"):new E(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}function Ne(e,t){return e._handlers&&e._handlers[t]||Hl}function Oe(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=h(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function We(e,t){var r=Ne(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Ae(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),We(e,r||t.type,e,t),Ie(t)||t.codemirrorIgnore}function De(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)h(r,t[n])==-1&&r.push(t[n])}function He(e,t){return Ne(e,t).length>0}function Pe(e){e.prototype.on=function(e,t){Pl(this,e,t)},e.prototype.off=function(e,t){Oe(this,e,t)}}function Ee(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Fe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ie(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ze(e){Ee(e),Fe(e)}function Re(e){return e.target||e.srcElement}function Be(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),ul&&e.ctrlKey&&1==t&&(t=3),t}function Ge(e){if(null==bl){var t=n("span","​");r(e,n("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(bl=t.offsetWidth<=1&&t.offsetHeight>2&&!(Zo&&Qo<8))}var i=bl?n("span","​"):n("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ue(e){if(null!=wl)return wl;var n=r(e,document.createTextNode("AخA")),i=dl(n,0,1).getBoundingClientRect(),o=dl(n,1,2).getBoundingClientRect();return t(e),!(!i||i.left==i.right)&&(wl=o.right-i.right<3)}function Ve(e){if(null!=Rl)return Rl;var t=r(e,n("span","x")),i=t.getBoundingClientRect(),o=dl(t,0,1).getBoundingClientRect();return Rl=Math.abs(i.left-o.left)>1}function Ke(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Bl[e]=t}function je(e,t){Gl[e]=t}function Xe(e){if("string"==typeof e&&Gl.hasOwnProperty(e))e=Gl[e];else if(e&&"string"==typeof e.name&&Gl.hasOwnProperty(e.name)){var t=Gl[e.name];"string"==typeof t&&(t={name:t}),e=b(t,e),e.name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Xe("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Xe("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ye(e,t){t=Xe(t);var r=Bl[t.name];if(!r)return Ye(e,"text/plain");var n=r(e,t);if(Ul.hasOwnProperty(t.name)){var i=Ul[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}function _e(e,t){c(t,Ul.hasOwnProperty(e)?Ul[e]:Ul[e]={})}function $e(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function qe(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Ze(e,t,r){return!e.startState||e.startState(t,r)}function Qe(e,t,r,n){var i=[e.state.modeGen],o={};lt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=0;l<e.state.overlays.length;++l)!function(r){var n=e.state.overlays[r],l=1,s=0;lt(e,t.text,n.mode,!0,function(e,t){for(var r=l;s<e;){var o=i[l];o>e&&i.splice(l,1,e,i[l+1],o),l+=2,s=Math.min(e,o)}if(t)if(n.opaque)i.splice(r,l-r,e,"overlay "+t),l=r+2;else for(;r<l;r+=2){var a=i[r+1];i[r+1]=(a?a+" ":"")+"overlay "+t}},o)}(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function Je(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=et(e,A(t)),i=Qe(e,t,t.text.length>e.options.maxHighlightLength?$e(e.doc.mode,n):n);t.stateAfter=n,t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.frontier&&e.doc.frontier++}return t.styles}function et(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=st(e,t,r),l=o>n.first&&M(n,o-1).stateAfter;return l=l?$e(n.mode,l):Ze(n.mode),n.iter(o,t,function(r){tt(e,r.text,l);var s=o==t-1||o%5==0||o>=i.viewFrom&&o<i.viewTo;r.stateAfter=s?$e(n.mode,l):null,++o}),r&&(n.frontier=o),l}function tt(e,t,r,n){var i=e.doc.mode,o=new Vl(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&rt(i,r);!o.eol();)nt(i,o,r),o.start=o.pos}function rt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=qe(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function nt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=qe(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}function it(e,t,r,n){var i,o=function(e){return{start:f.start,end:f.pos,string:f.current(),type:i||null,state:e?$e(l.mode,c):c}},l=e.doc,s=l.mode;t=U(l,t);var a,u=M(l,t.line),c=et(e,t.line,r),f=new Vl(u.text,e.options.tabSize);for(n&&(a=[]);(n||f.pos<t.ch)&&!f.eol();)f.start=f.pos,i=nt(s,f,c),n&&a.push(o(!0));return n?a:o()}function ot(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function lt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,f=new Vl(t,e.options.tabSize),h=e.options.addModeClass&&[null];for(""==t&&ot(rt(r,n),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,l&&tt(e,t,n,f.pos),f.pos=t.length,a=null):a=ot(nt(r,f,n,h),o),h){var d=h[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<f.start;)u=Math.min(f.start,u+5e3),i(u,c);c=a}f.start=f.pos}for(;u<f.pos;){var p=Math.min(f.pos,u+5e3);i(p,c),u=p}}function st(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=M(o,s-1);if(a.stateAfter&&(!r||s<=o.frontier))return s;var u=f(a.text,null,e.options.tabSize);(null==i||n>u)&&(i=s-1,n=u)}return i}function at(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),re(e),ne(e,r);var i=n?n(e):1;i!=e.height&&W(e,i)}function ut(e){e.parent=null,re(e)}function ct(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?Yl:Xl;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function ft(e,t){var r=i("span",null,null,Jo?"padding-right: .1px":null),n={pre:i("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(Zo||Jo)&&e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var l=o?t.rest[o-1]:t.line,s=void 0;n.pos=0,n.addToken=dt,Ue(e.display.measure)&&(s=Se(l,e.doc.direction))&&(n.addToken=gt(n.addToken,s)),n.map=[];mt(l,n,Je(e,l,t!=e.display.externalMeasured&&A(l))),l.styleClasses&&(l.styleClasses.bgClass&&(n.bgClass=a(l.styleClasses.bgClass,n.bgClass||"")),l.styleClasses.textClass&&(n.textClass=a(l.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(Ge(e.display.measure))),0==o?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(Jo){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return We(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=a(n.pre.className,n.textClass||"")),n}function ht(e){var t=n("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function dt(e,t,r,i,o,l,s){if(t){var a,u=e.splitSpaces?pt(t,e.trailingSpace):t,c=e.cm.state.specialChars,f=!1;if(c.test(t)){a=document.createDocumentFragment();for(var h=0;;){c.lastIndex=h;var d=c.exec(t),g=d?d.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));Zo&&Qo<9?a.appendChild(n("span",[v])):a.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!d)break;h+=g+1;var m=void 0;if("\t"==d[0]){var y=e.cm.options.tabSize,b=y-e.col%y;m=a.appendChild(n("span",p(b),"cm-tab")),m.setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==d[0]||"\n"==d[0]?(m=a.appendChild(n("span","\r"==d[0]?"␍":"␤","cm-invalidchar")),m.setAttribute("cm-text",d[0]),e.col+=1):(m=e.cm.options.specialCharPlaceholder(d[0]),m.setAttribute("cm-text",d[0]),Zo&&Qo<9?a.appendChild(n("span",[m])):a.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,a=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,a),Zo&&Qo<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),r||i||o||f||s){var w=r||"";i&&(w+=i),o&&(w+=o);var x=n("span",[a],w,s);return l&&(x.title=l),e.content.appendChild(x)}e.content.appendChild(a)}}function pt(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}function gt(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var f=void 0,h=0;h<t.length&&(f=t[h],!(f.to>u&&f.from<=u));h++);if(f.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,f.to-u),i,o,null,s,a),o=null,n=n.slice(f.to-u),u=f.to}}}function vt(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function mt(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,f,h,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=f=s="",h=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!f&&(f=C.title),C.collapsed&&(!h||le(h.marker,C)<0)&&(h=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!h||h.from==p)for(var L=0;L<y.length;++L)vt(t,0,y[L]);if(h&&(h.from||0)==p){if(vt(t,(null==h.to?d+1:h.to)-p,h.marker,null==h.from),null==h.to)return;h.to==p&&(h=!1)}}if(p>=d)break;for(var T=Math.min(d,m);;){if(v){var k=p+v.length;if(!h){var M=k>T?v.slice(0,T-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",f,s)}if(k>=T){v=v.slice(T-p),p=T;break}p=k,c=""}v=i.slice(o,o=r[g++]),l=ct(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),ct(r[N+1],t.cm.options))}function yt(e,t,r){this.line=t,this.rest=de(t),this.size=this.rest?A(g(this.rest))-r+1:1,this.node=this.text=null,this.hidden=ve(e,t)}function bt(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new yt(e.doc,M(e.doc,o),o);n=o+l.size,i.push(l)}return i}function wt(e){_l?_l.ops.push(e):e.ownsGroup=_l={ops:[e],delayedCallbacks:[]}}function xt(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}function Ct(e,t){var r=e.ownsGroup;if(r)try{xt(r)}finally{_l=null,t(r)}}function St(e,t){var r=Ne(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);_l?n=_l.delayedCallbacks:$l?n=$l:(n=$l=[],setTimeout(Lt,0));for(var o=0;o<r.length;++o)!function(e){n.push(function(){return r[e].apply(null,i)})}(o)}}function Lt(){var e=$l;$l=null;for(var t=0;t<e.length;++t)e[t]()}function Tt(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?Ot(e,t):"gutter"==o?At(e,t,r,n):"class"==o?Wt(e,t):"widget"==o&&Dt(e,t,n)}t.changes=null}function kt(e){return e.node==e.text&&(e.node=n("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),Zo&&Qo<8&&(e.node.style.zIndex=2)),e.node}function Mt(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var i=kt(t);t.background=i.insertBefore(n("div",null,r),i.firstChild),e.display.input.setUneditable(t.background)}}function Nt(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):ft(e,t)}function Ot(e,t){var r=t.text.className,n=Nt(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,Wt(e,t)):r&&(t.text.className=r)}function Wt(e,t){Mt(e,t),t.line.wrapClass?kt(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function At(e,t,r,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=kt(t);t.gutterBackground=n("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var l=t.line.gutterMarkers;if(e.options.lineNumbers||l){var s=kt(t),a=t.gutter=n("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(a),s.insertBefore(a,t.text),t.line.gutterClass&&(a.className+=" "+t.line.gutterClass),!e.options.lineNumbers||l&&l["CodeMirror-linenumbers"]||(t.lineNumber=a.appendChild(n("div",P(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),l)for(var u=0;u<e.options.gutters.length;++u){var c=e.options.gutters[u],f=l.hasOwnProperty(c)&&l[c];f&&a.appendChild(n("div",[f],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Dt(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);Pt(e,t,r)}function Ht(e,t,r,n){var i=Nt(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),Wt(e,t),At(e,t,r,n),Pt(e,t,n),t.node}function Pt(e,t,r){if(Et(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)Et(e,t.rest[n],t,r,!1)}function Et(e,t,r,i,o){if(t.widgets)for(var l=kt(r),s=0,a=t.widgets;s<a.length;++s){var u=a[s],c=n("div",[u.node],"CodeMirror-linewidget");u.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Ft(u,c,r,i),e.display.input.setUneditable(c),o&&u.above?l.insertBefore(c,r.gutter||r.text):l.appendChild(c),St(u,"redraw")}}function Ft(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function It(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!o(document.body,e.node)){var i="position: relative;";e.coverGutter&&(i+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(i+="width: "+t.display.wrapper.clientWidth+"px;"),r(t.display.measure,n("div",[e.node],null,i))}return e.height=e.node.parentNode.offsetHeight}function zt(e,t){for(var r=Re(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Rt(e){return e.lineSpace.offsetTop}function Bt(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Gt(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=r(e.measure,n("pre","x")),i=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,o={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(e.cachedPaddingH=o),o}function Ut(e){return xl-e.display.nativeBarWidth}function Vt(e){return e.display.scroller.clientWidth-Ut(e)-e.display.barWidth}function Kt(e){return e.display.scroller.clientHeight-Ut(e)-e.display.barHeight}function jt(e,t,r){var n=e.options.lineWrapping,i=n&&Vt(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}function Xt(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(A(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Yt(e,t){t=fe(t);var n=A(t),i=e.display.externalMeasured=new yt(e.doc,t,n);i.lineN=n;var o=i.built=ft(e,i);return i.text=o.pre,r(e.display.lineMeasure,o.pre),i}function _t(e,t,r,n){return Zt(e,qt(e,t),r,n)}function $t(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Lr(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function qt(e,t){var r=A(t),n=$t(e,r);n&&!n.text?n=null:n&&n.changes&&(Tt(e,n,r,br(e)),e.curOp.forceUpdate=!0),n||(n=Yt(e,t));var i=Xt(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,
31
+ before:i.before,hasHeights:!1}}function Zt(e,t,r,n,i){t.before&&(r=-1);var o,l=r+(n||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(jt(e,t.view,t.rect),t.hasHeights=!0),o=er(e,t,r,n),o.bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}function Qt(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?(i=t-s,o=i+1):(u==e.length-3||t==a&&e[u+3]>t)&&(o=a-s,i=o-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[2+(u+=3)],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Jt(e,t){var r=ql;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function er(e,t,r,n){var i,o=Qt(t.map,r,n),l=o.node,s=o.start,a=o.end,u=o.collapse;if(3==l.nodeType){for(var c=0;c<4;c++){for(;s&&S(t.line.text.charAt(o.coverStart+s));)--s;for(;o.coverStart+a<o.coverEnd&&S(t.line.text.charAt(o.coverStart+a));)++a;if(i=Zo&&Qo<9&&0==s&&a==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():Jt(dl(l,s,a).getClientRects(),n),i.left||i.right||0==s)break;a=s,s-=1,u="right"}Zo&&Qo<11&&(i=tr(e.display.measure,i))}else{s>0&&(u=n="right");var f;i=e.options.lineWrapping&&(f=l.getClientRects()).length>1?f["right"==n?f.length-1:0]:l.getBoundingClientRect()}if(Zo&&Qo<9&&!s&&(!i||!i.left&&!i.right)){var h=l.parentNode.getClientRects()[0];i=h?{left:h.left,right:h.left+yr(e.display),top:h.top,bottom:h.bottom}:ql}for(var d=i.top-t.rect.top,p=i.bottom-t.rect.top,g=(d+p)/2,v=t.view.measure.heights,m=0;m<v.length-1&&!(g<v[m]);m++);var y=m?v[m-1]:0,b=v[m],w={left:("right"==u?i.right:i.left)-t.rect.left,right:("left"==u?i.left:i.right)-t.rect.left,top:y,bottom:b};return i.left||i.right||(w.bogus=!0),e.options.singleCursorHeightPerLine||(w.rtop=d,w.rbottom=p),w}function tr(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Ve(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}function rr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function nr(e){e.display.externalMeasure=null,t(e.display.lineMeasure);for(var r=0;r<e.display.view.length;r++)rr(e.display.view[r])}function ir(e){nr(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function or(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function lr(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function sr(e,t,r,n,i){if(!i&&t.widgets)for(var o=0;o<t.widgets.length;++o)if(t.widgets[o].above){var l=It(t.widgets[o]);r.top+=l,r.bottom+=l}if("line"==n)return r;n||(n="local");var s=ye(t);if("local"==n?s+=Rt(e.display):s-=e.display.viewOffset,"page"==n||"window"==n){var a=e.display.lineSpace.getBoundingClientRect();s+=a.top+("window"==n?0:lr());var u=a.left+("window"==n?0:or());r.left+=u,r.right+=u}return r.top+=s,r.bottom+=s,r}function ar(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=or(),i-=lr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function ur(e,t,r,n,i){return n||(n=M(e.doc,t.line)),sr(e,n,_t(e,n,t.ch,i),r)}function cr(e,t,r,n,i,o){function l(t,l){var s=Zt(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,sr(e,n,s,r)}function s(e,t,r){var n=a[t],i=n.level%2!=0;return l(r?e-1:e,i!=r)}n=n||M(e.doc,t.line),i||(i=qt(e,n));var a=Se(n,e.doc.direction),u=t.ch,c=t.sticky;if(u>=n.text.length?(u=n.text.length,c="before"):u<=0&&(u=0,c="after"),!a)return l("before"==c?u-1:u,"before"==c);var f=Ce(a,u,c),h=Al,d=s(u,f,"before"==c);return null!=h&&(d.other=s(u,h,"before"!=c)),d}function fr(e,t){var r=0;t=U(e.doc,t),e.options.lineWrapping||(r=yr(e.display)*t.ch);var n=M(e.doc,t.line),i=ye(n)+Rt(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function hr(e,t,r,n,i){var o=E(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function dr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return hr(n.first,0,null,!0,-1);var i=D(n,r),o=n.first+n.size-1;if(i>o)return hr(n.first+n.size-1,M(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=M(n,i);;){var s=vr(e,l,i,t,r),a=ue(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=A(l=u.to.line)}}function pr(e,t,r,n){var i=function(n){return sr(e,t,Zt(e,r,n),"line")},o=t.text.length,l=T(function(e){return i(e-1).bottom<=n},o,0);return o=T(function(e){return i(e).top>n},l,o),{begin:l,end:o}}function gr(e,t,r,n){return pr(e,t,r,sr(e,t,Zt(e,r,n),"line").top)}function vr(e,t,r,n,i){i-=ye(t);var o,l=0,s=t.text.length,a=qt(e,t);if(Se(t,e.doc.direction)){if(e.options.lineWrapping){var u;u=pr(e,t,a,i),l=u.begin,s=u.end}o=new E(r,l);var c,f,h=cr(e,o,"line",t,a).left,d=h<n?1:-1,p=h-n;do{if(c=p,f=o,null==(o=Me(e,t,o,d))||o.ch<l||s<=("before"==o.sticky?o.ch-1:o.ch)){o=f;break}p=cr(e,o,"line",t,a).left-n}while(d<0!=p<0&&Math.abs(p)<=Math.abs(c));if(Math.abs(p)>Math.abs(c)){if(p<0==c<0)throw new Error("Broke out of infinite loop in coordsCharInner");o=f}}else{var g=T(function(r){var o=sr(e,t,Zt(e,a,r),"line");return o.top>i?(s=Math.min(r,s),!0):!(o.bottom<=i)&&(o.left>n||!(o.right<n)&&n-o.left<o.right-n)},l,s);g=L(t.text,g,1),o=new E(r,g,g==s?"before":"after")}var v=cr(e,o,"line",t,a);return(i<v.top||v.bottom<i)&&(o.outside=!0),o.xRel=n<v.left?-1:n>v.right?1:0,o}function mr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==jl){jl=n("pre");for(var i=0;i<49;++i)jl.appendChild(document.createTextNode("x")),jl.appendChild(n("br"));jl.appendChild(document.createTextNode("x"))}r(e.measure,jl);var o=jl.offsetHeight/50;return o>3&&(e.cachedTextHeight=o),t(e.measure),o||1}function yr(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=n("span","xxxxxxxxxx"),i=n("pre",[t]);r(e.measure,i);var o=t.getBoundingClientRect(),l=(o.right-o.left)/10;return l>2&&(e.cachedCharWidth=l),l||10}function br(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:wr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function wr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function xr(e){var t=mr(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/yr(e.display)-3);return function(i){if(ve(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function Cr(e){var t=e.doc,r=xr(e);t.iter(function(e){var t=r(e);t!=e.height&&W(e,t)})}function Sr(e,t,r,n){var i=e.display;if(!r&&"true"==Re(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(e){return null}var a,u=dr(e,o,l);if(n&&1==u.xRel&&(a=M(e.doc,u.line).text).length==u.ch){var c=f(a,a.length,e.options.tabSize)-a.length;u=E(u.line,Math.max(0,Math.round((o-Gt(e.display).left)/yr(e.display))-c))}return u}function Lr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function Tr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function kr(e,t){for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t!==!1||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&Mr(e,s.head,i),a||Nr(e,s,o)}}return n}function Mr(e,t,r){var i=cr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=r.appendChild(n("div"," ","CodeMirror-cursor"));if(o.style.left=i.left+"px",o.style.top=i.top+"px",o.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var l=r.appendChild(n("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));l.style.display="",l.style.left=i.other.left+"px",l.style.top=i.other.top+"px",l.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Nr(e,t,r){function i(e,t,r,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),a.appendChild(n("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?f-e:r)+"px;\n height: "+(i-t)+"px"))}function o(t,r,n){function o(r,n){return ur(e,E(t,r),"div",u,n)}var l,a,u=M(s,t),h=u.text.length;return xe(Se(u,s.direction),r||0,null==n?h:n,function(e,t,s){var u,d,p,g=o(e,"left");if(e==t)u=g,d=p=g.left;else{if(u=o(t-1,"right"),"rtl"==s){var v=g;g=u,u=v}d=g.left,p=u.right}null==r&&0==e&&(d=c),u.top-g.top>3&&(i(d,g.top,null,g.bottom),d=c,g.bottom<u.top&&i(d,g.bottom,null,u.top)),null==n&&t==h&&(p=f),(!l||g.top<l.top||g.top==l.top&&g.left<l.left)&&(l=g),(!a||u.bottom>a.bottom||u.bottom==a.bottom&&u.right>a.right)&&(a=u),d<c+1&&(d=c),i(d,u.top,p-d,u.bottom)}),{start:l,end:a}}var l=e.display,s=e.doc,a=document.createDocumentFragment(),u=Gt(e.display),c=u.left,f=Math.max(l.sizerWidth,Vt(e)-l.sizer.offsetLeft)-u.right,h=t.from(),d=t.to();if(h.line==d.line)o(h.line,h.ch,d.ch);else{var p=M(s,h.line),g=M(s,d.line),v=fe(p)==fe(g),m=o(h.line,h.ch,v?p.text.length+1:null).end,y=o(d.line,v?0:null,d.ch).start;v&&(m.top<y.top-2?(i(m.right,m.top,null,m.bottom),i(c,y.top,y.left,y.bottom)):i(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&i(c,m.bottom,null,y.top)}r.appendChild(a)}function Or(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Wr(e){e.state.focused||(e.display.input.focus(),Dr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Hr(e))},100)}function Dr(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(We(e,"focus",e,t),e.state.focused=!0,s(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),Jo&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),Or(e))}function Hr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(We(e,"blur",e,t),e.state.focused=!1,vl(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Pr(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=wr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Er(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=P(e.options,t.first+t.size-1),i=e.display;if(r.length!=i.lineNumChars){var o=i.measure.appendChild(n("div",[n("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),l=o.firstChild.offsetWidth,s=o.offsetWidth-l;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(l,i.lineGutter.offsetWidth-s)+1,i.lineNumWidth=i.lineNumInnerWidth+s,i.lineNumChars=i.lineNumInnerWidth?r.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Mn(e),!0}return!1}function Fr(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(Zo&&Qo<8){var l=i.node.offsetTop+i.node.offsetHeight;o=l-r,r=l}else{var s=i.node.getBoundingClientRect();o=s.bottom-s.top}var a=i.line.height-o;if(o<2&&(o=mr(t)),(a>.001||a<-.001)&&(W(i.line,o),Ir(i.line),i.rest))for(var u=0;u<i.rest.length;u++)Ir(i.rest[u])}}}function Ir(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t)e.widgets[t].height=e.widgets[t].node.parentNode.offsetHeight}function zr(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Rt(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=D(t,n),l=D(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=D(t,ye(M(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=D(t,ye(M(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Yo||Tn(e,{top:t}),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbars.setScrollTop(t),Yo&&Tn(e),wn(e,100))}function Br(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,Pr(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Gr(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function Ur(e){var t=Gr(e);return t.x*=Ql,t.y*=Ql,t}function Vr(e,t){var r=Gr(t),n=r.x,i=r.y,o=e.display,l=o.scroller,s=l.scrollWidth>l.clientWidth,a=l.scrollHeight>l.clientHeight;if(n&&s||i&&a){if(i&&ul&&Jo)e:for(var u=t.target,c=o.view;u!=l;u=u.parentNode)for(var f=0;f<c.length;f++)if(c[f].node==u){e.display.currentWheelTarget=u;break e}if(n&&!Yo&&!rl&&null!=Ql)return i&&a&&Rr(e,Math.max(0,Math.min(l.scrollTop+i*Ql,l.scrollHeight-l.clientHeight))),Br(e,Math.max(0,Math.min(l.scrollLeft+n*Ql,l.scrollWidth-l.clientWidth))),(!i||i&&a)&&Ee(t),void(o.wheelStartX=null);if(i&&null!=Ql){var h=i*Ql,d=e.doc.scrollTop,p=d+o.wrapper.clientHeight;h<0?d=Math.max(0,d+h-50):p=Math.min(e.doc.height,p+h+50),Tn(e,{top:d,bottom:p})}Zl<20&&(null==o.wheelStartX?(o.wheelStartX=l.scrollLeft,o.wheelStartY=l.scrollTop,o.wheelDX=n,o.wheelDY=i,setTimeout(function(){if(null!=o.wheelStartX){var e=l.scrollLeft-o.wheelStartX,t=l.scrollTop-o.wheelStartY,r=t&&o.wheelDY&&t/o.wheelDY||e&&o.wheelDX&&e/o.wheelDX;o.wheelStartX=o.wheelStartY=null,r&&(Ql=(Ql*Zl+r)/(Zl+1),++Zl)}},200)):(o.wheelDX+=n,o.wheelDY+=i))}}function Kr(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Bt(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?r:0,docHeight:n,scrollHeight:n+Ut(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}function jr(e,t){t||(t=Kr(e));var r=e.display.barWidth,n=e.display.barHeight;Xr(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&Fr(e),Xr(e,Kr(e)),r=e.display.barWidth,n=e.display.barHeight}function Xr(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}function Yr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&vl(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new ts[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),Pl(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Br(e,t):Rr(e,t)},e),e.display.scrollbars.addClass&&s(e.display.wrapper,e.display.scrollbars.addClass)}function _r(e,t){if(!Ae(e,"scrollCursorIntoView")){var r=e.display,i=r.sizer.getBoundingClientRect(),o=null;if(t.top+i.top<0?o=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!ol){var l=n("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Rt(e.display))+"px;\n height: "+(t.bottom-t.top+Ut(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(o),e.display.lineSpace.removeChild(l)}}}function $r(e,t,r,n){null==n&&(n=0);for(var i,o=0;o<5;o++){var l=!1,s=cr(e,t),a=r&&r!=t?cr(e,r):s;i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n};var u=Zr(e,i),c=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Rr(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Br(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(l=!0)),!l)break}return i}function qr(e,t){var r=Zr(e,t);null!=r.scrollTop&&Rr(e,r.scrollTop),null!=r.scrollLeft&&Br(e,r.scrollLeft)}function Zr(e,t){var r=e.display,n=mr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Kt(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Bt(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,h=Vt(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>h;return d&&(t.right=t.left+h),t.left<10?l.scrollLeft=0:t.left<f?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>h+f-3&&(l.scrollLeft=t.right+(d?0:10)-h),l}function Qr(e,t,r){null==t&&null==r||en(e),null!=t&&(e.curOp.scrollLeft=(null==e.curOp.scrollLeft?e.doc.scrollLeft:e.curOp.scrollLeft)+t),null!=r&&(e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+r)}function Jr(e){en(e);var t=e.getCursor(),r=t,n=t;e.options.lineWrapping||(r=t.ch?E(t.line,t.ch-1):t,n=E(t.line,t.ch+1)),e.curOp.scrollToPos={from:r,to:n,margin:e.options.cursorScrollMargin}}function en(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var r=fr(e,t.from),n=fr(e,t.to),i=Zr(e,{left:Math.min(r.left,n.left),top:Math.min(r.top,n.top)-t.margin,right:Math.max(r.right,n.right),bottom:Math.max(r.bottom,n.bottom)+t.margin});e.scrollTo(i.scrollLeft,i.scrollTop)}}function tn(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++rs},wt(e.curOp)}function rn(e){Ct(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;nn(e)})}function nn(e){for(var t=e.ops,r=0;r<t.length;r++)on(t[r]);for(var n=0;n<t.length;n++)ln(t[n]);for(var i=0;i<t.length;i++)sn(t[i]);for(var o=0;o<t.length;o++)an(t[o]);for(var l=0;l<t.length;l++)un(t[l])}function on(e){var t=e.cm,r=t.display;Cn(t),e.updateMaxLine&&we(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ns(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ln(e){e.updatedDisplay=e.mustUpdate&&Sn(e.cm,e.update)}function sn(e){var t=e.cm,r=t.display;e.updatedDisplay&&Fr(t),e.barMeasure=Kr(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=_t(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+Ut(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Vt(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection(e.focus))}function an(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Br(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==l()&&(!document.hasFocus||document.hasFocus());e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&jr(t,e.barMeasure),e.updatedDisplay&&Nn(t,e.barMeasure),e.selectionChanged&&Or(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&Wr(e.cm)}function un(e){var t=e.cm,r=t.display,n=t.doc;if(e.updatedDisplay&&Ln(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null==e.scrollTop||r.scroller.scrollTop==e.scrollTop&&!e.forceScroll||(n.scrollTop=Math.max(0,Math.min(r.scroller.scrollHeight-r.scroller.clientHeight,e.scrollTop)),r.scrollbars.setScrollTop(n.scrollTop),r.scroller.scrollTop=n.scrollTop),null==e.scrollLeft||r.scroller.scrollLeft==e.scrollLeft&&!e.forceScroll||(n.scrollLeft=Math.max(0,Math.min(r.scroller.scrollWidth-r.scroller.clientWidth,e.scrollLeft)),r.scrollbars.setScrollLeft(n.scrollLeft),r.scroller.scrollLeft=n.scrollLeft,Pr(t)),e.scrollToPos){_r(t,$r(t,U(n,e.scrollToPos.from),U(n,e.scrollToPos.to),e.scrollToPos.margin))}var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||We(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&We(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&We(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function cn(e,t){if(e.curOp)return t();tn(e);try{return t()}finally{rn(e)}}function fn(e,t){return function(){if(e.curOp)return t.apply(e,arguments);tn(e);try{return t.apply(e,arguments)}finally{rn(e)}}}function hn(e){return function(){if(this.curOp)return e.apply(this,arguments);tn(this);try{return e.apply(this,arguments)}finally{rn(this)}}}function dn(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);tn(t);try{return e.apply(this,arguments)}finally{rn(t)}}}function pn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Wl&&pe(e.doc,t)<i.viewTo&&vn(e);else if(r<=i.viewFrom)Wl&&ge(e.doc,r+n)>i.viewFrom?vn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)vn(e);else if(t<=i.viewFrom){var o=mn(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):vn(e)}else if(r>=i.viewTo){var l=mn(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):vn(e)}else{var s=mn(e,t,t,-1),a=mn(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(bt(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):vn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function gn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[Lr(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);h(l,r)==-1&&l.push(r)}}}function vn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function mn(e,t,r,n){var i,o=Lr(e,t),l=e.display.view;if(!Wl||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;pe(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function yn(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=bt(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=bt(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(Lr(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(bt(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,Lr(e,r)))),n.viewTo=r}function bn(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function wn(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.viewTo&&e.state.highlight.set(t,u(xn,e))}function xn(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=$e(t.mode,et(e,t.frontier)),i=[];t.iter(t.frontier,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(t.frontier>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength,a=Qe(e,o,s?$e(t.mode,n):n,!0);o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var f=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),h=0;!f&&h<l.length;++h)f=l[h]!=o.styles[h];f&&i.push(t.frontier),o.stateAfter=s?n:$e(t.mode,n)}else o.text.length<=e.options.maxHighlightLength&&tt(e,o.text,n),o.stateAfter=t.frontier%5==0?$e(t.mode,n):null;if(++t.frontier,+new Date>r)return wn(e,e.options.workDelay),!0}),i.length&&cn(e,function(){for(var t=0;t<i.length;t++)gn(e,i[t],"text")})}}function Cn(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Ut(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Ut(e)+"px",t.scrollbarsClipped=!0)}function Sn(e,r){var n=e.display,i=e.doc;if(r.editorIsHidden)return vn(e),!1;if(!r.force&&r.visible.from>=n.viewFrom&&r.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==bn(e))return!1;Er(e)&&(vn(e),r.dims=br(e));var o=i.first+i.size,s=Math.max(r.visible.from-e.options.viewportMargin,i.first),a=Math.min(o,r.visible.to+e.options.viewportMargin);n.viewFrom<s&&s-n.viewFrom<20&&(s=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Wl&&(s=pe(e.doc,s),a=ge(e.doc,a));var u=s!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=r.wrapperHeight||n.lastWrapWidth!=r.wrapperWidth;yn(e,s,a),n.viewOffset=ye(M(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=bn(e);if(!u&&0==c&&!r.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var f=l();return c>4&&(n.lineDiv.style.display="none"),kn(e,n.updateLineNumbers,r.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,f&&l()!=f&&f.offsetHeight&&f.focus(),t(n.cursorDiv),t(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,u&&(n.lastWrapHeight=r.wrapperHeight,n.lastWrapWidth=r.wrapperWidth,wn(e,400)),n.updateLineNumbers=null,!0}function Ln(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Vt(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Bt(e.display)-Kt(e),r.top)}),t.visible=zr(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&Sn(e,t);n=!1){Fr(e);var i=Kr(e);Tr(e),jr(e,i),Nn(e,i)}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 Tn(e,t){var r=new ns(e,t);if(Sn(e,r)){Fr(e),Ln(e,r);var n=Kr(e);Tr(e),jr(e,n),Nn(e,n),r.finish()}}function kn(e,r,n){function i(t){var r=t.nextSibling;return Jo&&ul&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var o=e.display,l=e.options.lineNumbers,s=o.lineDiv,a=s.firstChild,u=o.view,c=o.viewFrom,f=0;f<u.length;f++){var d=u[f];if(d.hidden);else if(d.node&&d.node.parentNode==s){for(;a!=d.node;)a=i(a);var p=l&&null!=r&&r<=c&&d.lineNumber;d.changes&&(h(d.changes,"gutter")>-1&&(p=!1),Tt(e,d,c,n)),p&&(t(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(P(e.options,c)))),a=d.node.nextSibling}else{var g=Ht(e,d,c,n);s.insertBefore(g,a)}c+=d.size}for(;a;)a=i(a)}function Mn(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function Nn(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+Ut(e)+"px"}function On(e){var r=e.display.gutters,i=e.options.gutters;t(r);for(var o=0;o<i.length;++o){var l=i[o],s=r.appendChild(n("div",null,"CodeMirror-gutter "+l));"CodeMirror-linenumbers"==l&&(e.display.lineGutter=s,s.style.width=(e.display.lineNumWidth||1)+"px")}r.style.display=o?"":"none",Mn(e)}function Wn(e){var t=h(e.gutters,"CodeMirror-linenumbers");t==-1&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function An(e,t){var r=e[t];e.sort(function(e,t){return F(e.from(),t.from())}),t=h(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(F(o.to(),i.from())>=0){var l=B(o.from(),i.from()),s=R(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new os(a?s:l,a?l:s))}}return new is(e,t)}function Dn(e,t){return new is([new os(e,t||e)],0)}function Hn(e){return e.text?E(e.from.line+e.text.length-1,g(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Pn(e,t){if(F(e,t.from)<0)return e;if(F(e,t.to)<=0)return Hn(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=Hn(t).ch-t.to.ch),E(r,n)}function En(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new os(Pn(i.anchor,t),Pn(i.head,t)))}return An(r,e.sel.primIndex)}function Fn(e,t,r){return e.line==t.line?E(r.line,e.ch-t.ch+r.ch):E(r.line+(e.line-t.line),e.ch)}function In(e,t,r){for(var n=[],i=E(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Fn(s.from,i,o),u=Fn(Hn(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],f=F(c.head,c.anchor)<0;n[l]=new os(f?u:a,f?a:u)}else n[l]=new os(a,a)}return new is(n,e.sel.primIndex)}function zn(e){e.doc.mode=Ye(e.options,e.doc.modeOption),Rn(e)}function Rn(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,wn(e,100),e.state.modeGen++,e.curOp&&pn(e)}function Bn(e,t){return 0==t.from.ch&&0==t.to.ch&&""==g(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Gn(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){at(e,r,i,n),St(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new Kl(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=M(e,s.line),f=M(e,a.line),h=g(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Bn(e,t)){var v=l(0,u.length-1);o(f,f.text,d),p&&e.remove(s.line,p),v.length&&e.insert(s.line,v)}else if(c==f)if(1==u.length)o(c,c.text.slice(0,s.ch)+h+c.text.slice(a.ch),d);else{
32
+ var m=l(1,u.length-1);m.push(new Kl(h+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,m)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+f.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(f,h+f.text.slice(a.ch),d);var y=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,y)}St(e,"change",e,t)}function Un(e,t,r){function n(e,i,o){if(e.linked)for(var l=0;l<e.linked.length;++l){var s=e.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),n(s.doc,e,a))}}}n(e,null,!0)}function Vn(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Cr(e),zn(e),Kn(e),e.options.lineWrapping||we(e),e.options.mode=t.modeOption,pn(e)}function Kn(e){("rtl"==e.doc.direction?s:vl)(e.display.lineDiv,"CodeMirror-rtl")}function jn(e){cn(e,function(){Kn(e),pn(e)})}function Xn(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Yn(e,t){var r={from:z(t.from),to:Hn(t),text:N(e,t.from,t.to)};return ei(e,r,t.from.line,t.to.line+1),Un(e,function(e){return ei(e,r,t.from.line,t.to.line+1)},!0),r}function _n(e){for(;e.length;){if(!g(e).ranges)break;e.pop()}}function $n(e,t){return t?(_n(e.done),g(e.done)):e.done.length&&!g(e.done).ranges?g(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),g(e.done)):void 0}function qn(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=$n(i,i.lastOp==n)))l=g(o.changes),0==F(t.from,t.to)&&0==F(t.from,l.to)?l.to=Hn(t):o.changes.push(Yn(e,t));else{var a=g(i.done);for(a&&a.ranges||Jn(e.sel,i.done),o={changes:[Yn(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(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||We(e,"historyAdded")}function Zn(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Qn(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||Zn(e,o,g(i.done),t))?i.done[i.done.length-1]=t:Jn(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&n.clearRedo!==!1&&_n(i.undone)}function Jn(e,t){var r=g(t);r&&r.ranges&&r.equals(e)||t.push(e)}function ei(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function ti(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function ri(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(ti(r[i]));return n}function ni(e,t){var r=ri(e,t),n=J(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function ii(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?is.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var f in u)(c=f.match(/^spans_(\d+)$/))&&h(t,Number(c[1]))>-1&&(g(s)[f]=u[f],delete u[f])}}}return n}function oi(e,t,r,n){if(e.cm&&e.cm.display.shift||e.extend){var i=t.anchor;if(n){var o=F(r,i)<0;o!=F(n,i)<0?(i=r,r=n):o!=F(r,n)<0&&(r=n)}return new os(i,r)}return new os(n||r,r)}function li(e,t,r,n){hi(e,new is([oi(e,e.sel.primary(),t,r)],0),n)}function si(e,t,r){for(var n=[],i=0;i<e.sel.ranges.length;i++)n[i]=oi(e,e.sel.ranges[i],t[i],null);hi(e,An(n,e.sel.primIndex),r)}function ai(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,hi(e,An(i,e.sel.primIndex),n)}function ui(e,t,r,n){hi(e,Dn(t,r),n)}function ci(e,t,r){var n={ranges:t.ranges,update:function(t){var r=this;this.ranges=[];for(var n=0;n<t.length;n++)r.ranges[n]=new os(U(e,t[n].anchor),U(e,t[n].head))},origin:r&&r.origin};return We(e,"beforeSelectionChange",e,n),e.cm&&We(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?An(n.ranges,n.ranges.length-1):t}function fi(e,t,r){var n=e.history.done,i=g(n);i&&i.ranges?(n[n.length-1]=t,di(e,t,r)):hi(e,t,r)}function hi(e,t,r){di(e,t,r),Qn(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function di(e,t,r){(He(e,"beforeSelectionChange")||e.cm&&He(e.cm,"beforeSelectionChange"))&&(t=ci(e,t,r)),pi(e,vi(e,t,r&&r.bias||(F(t.primary().head,e.sel.primary().head)<0?-1:1),!0)),r&&r.scroll===!1||!e.cm||Jr(e.cm)}function pi(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,De(e.cm)),St(e,"cursorActivity",e))}function gi(e){pi(e,vi(e,e.sel,null,!1),Sl)}function vi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=yi(e,l.anchor,s&&s.anchor,r,n),u=yi(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new os(a,u))}return i?An(i,t.primIndex):t}function mi(e,t,r,n,i){var o=M(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(We(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=bi(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=F(u,r))&&(n<0?c<0:c>0))return mi(e,u,t,n,i)}var f=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(f=bi(e,f,n,f.line==t.line?o:null)),f?mi(e,f,t,n,i):null}}return t}function yi(e,t,r,n,i){var o=n||1,l=mi(e,t,r,o,i)||!i&&mi(e,t,r,o,!0)||mi(e,t,r,-o,i)||!i&&mi(e,t,r,-o,!0);return l?l:(e.cantEdit=!0,E(e.first,0))}function bi(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?U(e,E(t.line-1)):null:r>0&&t.ch==(n||M(e,t.line)).text.length?t.line<e.first+e.size-1?E(t.line+1,0):null:new E(t.line,t.ch+r)}function wi(e){e.setSelection(E(e.firstLine(),0),E(e.lastLine()),Sl)}function xi(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=U(e,t)),r&&(n.to=U(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),We(e,"beforeChange",e,n),e.cm&&We(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Ci(e,t,r){if(e.cm){if(!e.cm.curOp)return fn(e.cm,Ci)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(He(e,"beforeChange")||e.cm&&He(e.cm,"beforeChange"))||(t=xi(e,t,!0))){var n=Ol&&!r&&te(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)Si(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text});else Si(e,t)}}function Si(e,t){if(1!=t.text.length||""!=t.text[0]||0!=F(t.from,t.to)){var r=En(e,t);qn(e,t,r,e.cm?e.cm.curOp.id:NaN),ki(e,t,r,J(e,t));var n=[];Un(e,function(e,r){r||h(n,e.history)!=-1||(Ai(e.history,t),n.push(e.history)),ki(e,t,null,J(e,t))})}}function Li(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;n=l.pop(),n.ranges;){if(Jn(n,s),r&&!n.equals(e.sel))return void hi(e,n,{clearRedo:!1});o=n}var u=[];Jn(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=He(e,"beforeChange")||e.cm&&He(e.cm,"beforeChange"),f=n.changes.length-1;f>=0;--f){var d=function(r){var i=n.changes[r];if(i.origin=t,c&&!xi(e,i,!1))return l.length=0,{};u.push(Yn(e,i)),ki(e,i,r?En(e,i):g(l),ni(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:Hn(i)});var o=[];Un(e,function(e,t){t||h(o,e.history)!=-1||(Ai(e.history,i),o.push(e.history)),ki(e,i,null,ni(e,i))})}(f);if(d)return d.v}}}}function Ti(e,t){if(0!=t&&(e.first+=t,e.sel=new is(v(e.sel.ranges,function(e){return new os(E(e.anchor.line+t,e.anchor.ch),E(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){pn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)gn(e.cm,n,"gutter")}}function ki(e,t,r,n){if(e.cm&&!e.cm.curOp)return fn(e.cm,ki)(e,t,r,n);if(t.to.line<e.first)return void Ti(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);Ti(e,i),t={from:E(e.first,0),to:E(t.to.line+i,t.to.ch),text:[g(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:E(o,M(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=N(e,t.from,t.to),r||(r=En(e,t)),e.cm?Mi(e.cm,t,n):Gn(e,t,n),di(e,r,Sl)}}function Mi(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=A(fe(M(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0})),n.sel.contains(t.from,t.to)>-1&&De(e),Gn(n,t,r,xr(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=be(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0)),n.frontier=Math.min(n.frontier,o.line),wn(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?pn(e):o.line!=l.line||1!=t.text.length||Bn(e.doc,t)?pn(e,o.line,l.line+1,u):gn(e,o.line,"text");var c=He(e,"changes"),f=He(e,"change");if(f||c){var h={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};f&&St(e,"change",e,h),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function Ni(e,t,r,n,i){if(n||(n=r),F(n,r)<0){var o=n;n=r,r=o}"string"==typeof t&&(t=e.splitLines(t)),Ci(e,{from:r,to:n,text:t,origin:i})}function Oi(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Wi(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||(o=e[i]=o.deepCopy(),o.copied=!0);for(var s=0;s<o.ranges.length;s++)Oi(o.ranges[s].anchor,t,r,n),Oi(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=E(u.from.line+n,u.from.ch),u.to=E(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function Ai(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Wi(e.done,r,n,i),Wi(e.undone,r,n,i)}function Di(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=M(e,G(e,t)):i=A(t),null==i?null:(n(o,i)&&e.cm&&gn(e.cm,i,r),o)}function Hi(e,t,r){ye(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Qr(e,null,r)}function Pi(e,t,r,n){var i=new as(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),Di(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!ve(e,t)){var n=ye(t)<e.scrollTop;W(t,t.height+It(i)),n&&Qr(o,null,i.height),o.curOp.forceUpdate=!0}return!0}),St(o,"lineWidgetAdded",o,i,"number"==typeof t?t:A(t)),i}function Ei(e,t,r,n,o){if(n&&n.shared)return Fi(e,t,r,n,o);if(e.cm&&!e.cm.curOp)return fn(e.cm,Ei)(e,t,r,n,o);var l=new cs(e,o),s=F(t,r);if(n&&c(n,l,!1),s>0||0==s&&l.clearWhenEmpty!==!1)return l;if(l.replacedWith&&(l.collapsed=!0,l.widgetNode=i("span",[l.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||l.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(l.widgetNode.insertLeft=!0)),l.collapsed){if(ce(e,t.line,t,r,l)||t.line!=r.line&&ce(e,r.line,t,r,l))throw new Error("Inserting collapsed marker partially overlapping an existing one");X()}l.addToHistory&&qn(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var a,u=t.line,f=e.cm;if(e.iter(u,r.line+1,function(e){f&&l.collapsed&&!f.options.lineWrapping&&fe(e)==f.display.maxLine&&(a=!0),l.collapsed&&u!=t.line&&W(e,0),q(e,new Y(l,u==t.line?t.ch:null,u==r.line?r.ch:null)),++u}),l.collapsed&&e.iter(t.line,r.line+1,function(t){ve(e,t)&&W(t,0)}),l.clearOnEnter&&Pl(l,"beforeCursorEnter",function(){return l.clear()}),l.readOnly&&(j(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),l.collapsed&&(l.id=++us,l.atomic=!0),f){if(a&&(f.curOp.updateMaxLine=!0),l.collapsed)pn(f,t.line,r.line+1);else if(l.className||l.title||l.startStyle||l.endStyle||l.css)for(var h=t.line;h<=r.line;h++)gn(f,h,"text");l.atomic&&gi(f.doc),St(f,"markerAdded",f,l)}return l}function Fi(e,t,r,n,i){n=c(n),n.shared=!1;var o=[Ei(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Un(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(Ei(e,U(e,t),U(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=g(o)}),new fs(o,l)}function Ii(e){return e.findMarks(E(e.first,0),e.clipPos(E(e.lastLine())),function(e){return e.parent})}function zi(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(F(o,l)){var s=Ei(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}function Ri(e){for(var t=0;t<e.length;t++)!function(t){var r=e[t],n=[r.primary.doc];Un(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];h(n,o.doc)==-1&&(o.parent=null,r.markers.splice(i--,1))}}(t)}function Bi(e){var t=this;if(Vi(t),!Ae(t,e)&&!zt(t.display,e)){Ee(e),Zo&&(ps=+new Date);var r=Sr(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),l=0,s=0;s<i;++s)!function(e,n){if(!t.options.allowDropFileTypes||h(t.options.allowDropFileTypes,e.type)!=-1){var s=new FileReader;s.onload=fn(t,function(){var e=s.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++l==i){r=U(t.doc,r);var a={from:r,to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};Ci(t.doc,a),fi(t.doc,Dn(r,Hn(a)))}}),s.readAsText(e)}}(n[s],s);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var a=e.dataTransfer.getData("Text");if(a){var u;if(t.state.draggingText&&!t.state.draggingText.copy&&(u=t.listSelections()),di(t.doc,Dn(r,r)),u)for(var c=0;c<u.length;++c)Ni(t.doc,"",u[c].anchor,u[c].head,"drag");t.replaceSelection(a,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Gi(e,t){if(Zo&&(!e.state.draggingText||+new Date-ps<100))return void ze(t);if(!Ae(e,t)&&!zt(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!nl)){var r=n("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",rl&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),rl&&r.parentNode.removeChild(r)}}function Ui(e,t){var i=Sr(e,t);if(i){var o=document.createDocumentFragment();Mr(e,i,o),e.display.dragCursor||(e.display.dragCursor=n("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),r(e.display.dragCursor,o)}}function Vi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ki(e){if(document.body.getElementsByClassName)for(var t=document.body.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}function ji(){gs||(Xi(),gs=!0)}function Xi(){var e;Pl(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ki(Yi)},100))}),Pl(window,"blur",function(){return Ki(Hr)})}function Yi(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}function _i(e){var t=e.split(/-(?!$)/);e=t[t.length-1];for(var r,n,i,o,l=0;l<t.length-1;l++){var s=t[l];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))r=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);i=!0}}return r&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function $i(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=v(r.split(" "),_i),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function qi(e,t,r,n){t=Ji(t);var i=t.call?t.call(e,n):t[e];if(i===!1)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return qi(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=qi(e,t.fallthrough[o],r,n);if(l)return l}}}function Zi(e){var t="string"==typeof e?e:vs[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Qi(e,t){if(rl&&34==e.keyCode&&e.char)return!1;var r=vs[e.keyCode],n=r;return null!=n&&!e.altGraphKey&&(e.altKey&&"Alt"!=r&&(n="Alt-"+n),(pl?e.metaKey:e.ctrlKey)&&"Ctrl"!=r&&(n="Ctrl-"+n),(pl?e.ctrlKey:e.metaKey)&&"Cmd"!=r&&(n="Cmd-"+n),!t&&e.shiftKey&&"Shift"!=r&&(n="Shift-"+n),n)}function Ji(e){return"string"==typeof e?ws[e]:e}function eo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&F(o.from,g(n).to)<=0;){var l=n.pop();if(F(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}cn(e,function(){for(var t=n.length-1;t>=0;t--)Ni(e.doc,"",n[t].from,n[t].to,"+delete");Jr(e)})}function to(e,t){var r=M(e.doc,t),n=fe(r);return n!=r&&(t=A(n)),ke(!0,e,n,t,1)}function ro(e,t){var r=M(e.doc,t),n=he(r);return n!=r&&(t=A(n)),ke(!0,e,r,t,-1)}function no(e,t){var r=to(e,t.line),n=M(e.doc,r.line),i=Se(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return E(r.line,l?0:o,r.sticky)}return r}function io(e,t,r){if("string"==typeof t&&!(t=Ss[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=Cl}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}function oo(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=qi(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&qi(t,e.options.extraKeys,r,e)||qi(t,e.options.keyMap,r,e)}function lo(e,t,r,n){var i=e.state.keySeq;if(i){if(Zi(t))return"handled";Ls.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),t=i+" "+t}var o=oo(e,t,n);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&St(e,"keyHandled",e,t,r),"handled"!=o&&"multi"!=o||(Ee(r),Or(e)),i&&!o&&/\'$/.test(t)?(Ee(r),!0):!!o}function so(e,t){var r=Qi(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?lo(e,"Shift-"+r,t,function(t){return io(e,t,!0)})||lo(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return io(e,t)}):lo(e,r,t,function(t){return io(e,t)}))}function ao(e,t,r){return lo(e,"'"+r+"'",t,function(t){return io(e,t,!0)})}function uo(e){var t=this;if(t.curOp.focus=l(),!Ae(t,e)){Zo&&Qo<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=so(t,e);rl&&(Ts=n?r:null,!n&&88==r&&!zl&&(ul?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||co(t)}}function co(e){function t(e){18!=e.keyCode&&e.altKey||(vl(r,"CodeMirror-crosshair"),Oe(document,"keyup",t),Oe(document,"mouseover",t))}var r=e.display.lineDiv;s(r,"CodeMirror-crosshair"),Pl(document,"keyup",t),Pl(document,"mouseover",t)}function fo(e){16==e.keyCode&&(this.doc.sel.shift=!1),Ae(this,e)}function ho(e){var t=this;if(!(zt(t.display,e)||Ae(t,e)||e.ctrlKey&&!e.altKey||ul&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(rl&&r==Ts)return Ts=null,void Ee(e);if(!rl||e.which&&!(e.which<10)||!so(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(ao(t,e,i)||t.display.input.onKeyPress(e))}}}function po(e){var t=this,r=t.display;if(!(Ae(t,e)||r.activeTouch&&r.input.supportsTouch())){if(r.input.ensurePolled(),r.shift=e.shiftKey,zt(r,e))return void(Jo||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100)));if(!bo(t,e)){var n=Sr(t,e);switch(window.focus(),Be(e)){case 1:t.state.selectingText?t.state.selectingText(e):n?go(t,e,n):Re(e)==r.scroller&&Ee(e);break;case 2:Jo&&(t.state.lastMiddleDown=+new Date),n&&li(t.doc,n),setTimeout(function(){return r.input.focus()},20),Ee(e);break;case 3:gl?wo(t,e):Ar(t)}}}}function go(e,t,r){Zo?setTimeout(u(Wr,e),0):e.curOp.focus=l();var n,i=+new Date;Cs&&Cs.time>i-400&&0==F(Cs.pos,r)?n="triple":xs&&xs.time>i-400&&0==F(xs.pos,r)?(n="double",Cs={time:i,pos:r}):(n="single",xs={time:i,pos:r});var o,s=e.doc.sel,a=ul?t.metaKey:t.ctrlKey;e.options.dragDrop&&El&&!e.isReadOnly()&&"single"==n&&(o=s.contains(r))>-1&&(F((o=s.ranges[o]).from(),r)<0||r.xRel>0)&&(F(o.to(),r)>0||r.xRel<0)?vo(e,t,r,a):mo(e,t,r,n,a)}function vo(e,t,r,n){var i=e.display,o=+new Date,l=fn(e,function(s){Jo&&(i.scroller.draggable=!1),e.state.draggingText=!1,Oe(document,"mouseup",l),Oe(i.scroller,"drop",l),Math.abs(t.clientX-s.clientX)+Math.abs(t.clientY-s.clientY)<10&&(Ee(s),!n&&+new Date-200<o&&li(e.doc,r),Jo||Zo&&9==Qo?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())});Jo&&(i.scroller.draggable=!0),e.state.draggingText=l,l.copy=ul?t.altKey:t.ctrlKey,i.scroller.dragDrop&&i.scroller.dragDrop(),Pl(document,"mouseup",l),Pl(i.scroller,"drop",l)}function mo(e,t,r,n,i){function o(t){if(0!=F(b,t))if(b=t,"rect"==n){for(var i=[],o=e.options.tabSize,l=f(M(c,r.line).text,r.ch,o),s=f(M(c,t.line).text,t.ch,o),a=Math.min(l,s),u=Math.max(l,s),v=Math.min(r.line,t.line),m=Math.min(e.lastLine(),Math.max(r.line,t.line));v<=m;v++){var y=M(c,v).text,w=d(y,a,o);a==u?i.push(new os(E(v,w),E(v,w))):y.length>w&&i.push(new os(E(v,w),E(v,d(y,u,o))))}i.length||i.push(new os(r,r)),hi(c,An(g.ranges.slice(0,p).concat(i),p),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x=h,C=x.anchor,S=t;if("single"!=n){var L;L="double"==n?e.findWordAt(t):new os(E(t.line,0),U(c,E(t.line+1,0))),F(L.anchor,C)>0?(S=L.head,C=B(x.from(),L.anchor)):(S=L.anchor,C=R(x.to(),L.head))}var T=g.ranges.slice(0);T[p]=new os(U(c,C),S),hi(c,An(T,p),Ll)}}function s(t){var r=++x,i=Sr(e,t,!0,"rect"==n);if(i)if(0!=F(i,b)){e.curOp.focus=l(),o(i);var a=zr(u,c);(i.line>=a.to||i.line<a.from)&&setTimeout(fn(e,function(){x==r&&s(t)}),150)}else{var f=t.clientY<w.top?-20:t.clientY>w.bottom?20:0;f&&setTimeout(fn(e,function(){x==r&&(u.scroller.scrollTop+=f,s(t))}),50)}}function a(t){e.state.selectingText=!1,x=1/0,Ee(t),u.input.focus(),Oe(document,"mousemove",C),Oe(document,"mouseup",S),c.history.lastSelOrigin=null}var u=e.display,c=e.doc;Ee(t);var h,p,g=c.sel,v=g.ranges;if(i&&!t.shiftKey?(p=c.sel.contains(r),h=p>-1?v[p]:new os(r,r)):(h=c.sel.primary(),p=c.sel.primIndex),cl?t.shiftKey&&t.metaKey:t.altKey)n="rect",i||(h=new os(r,r)),r=Sr(e,t,!0,!0),p=-1;else if("double"==n){var m=e.findWordAt(r);h=e.display.shift||c.extend?oi(c,h,m.anchor,m.head):m}else if("triple"==n){var y=new os(E(r.line,0),U(c,E(r.line+1,0)));h=e.display.shift||c.extend?oi(c,h,y.anchor,y.head):y}else h=oi(c,h,r);i?p==-1?(p=v.length,hi(c,An(v.concat([h]),p),{scroll:!1,origin:"*mouse"})):v.length>1&&v[p].empty()&&"single"==n&&!t.shiftKey?(hi(c,An(v.slice(0,p).concat(v.slice(p+1)),0),{scroll:!1,origin:"*mouse"}),g=c.sel):ai(c,p,h,Ll):(p=0,hi(c,new is([h],0),Ll),g=c.sel);var b=r,w=u.wrapper.getBoundingClientRect(),x=0,C=fn(e,function(e){Be(e)?s(e):a(e)}),S=fn(e,a);e.state.selectingText=S,Pl(document,"mousemove",C),Pl(document,"mouseup",S)}function yo(e,t,r,n){var i,o;try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&Ee(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!He(e,r))return Ie(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i){return We(e,r,e,D(e.doc,o),e.options.gutters[a],t),Ie(t)}}}function bo(e,t){return yo(e,t,"gutterClick",!0)}function wo(e,t){zt(e.display,t)||xo(e,t)||Ae(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function xo(e,t){return!!He(e,"gutterContextMenu")&&yo(e,t,"gutterContextMenu",!1)}function Co(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ir(e)}function So(e){On(e),pn(e),Pr(e)}function Lo(e,t,r){if(!t!=!(r&&r!=ks)){var n=e.display.dragFunctions,i=t?Pl:Oe;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function To(e){e.options.lineWrapping?(s(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(vl(e.display.wrapper,"CodeMirror-wrap"),we(e)),Cr(e),pn(e),ir(e),setTimeout(function(){return jr(e)},100)}function ko(e,t){var r=this;if(!(this instanceof ko))return new ko(e,t);this.options=t=t?c(t):{},c(Ms,t,!1),Wn(t);var n=t.value;"string"==typeof n&&(n=new ds(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new ko.inputStyles[t.inputStyle](this),o=this.display=new k(e,n,i);o.wrapper.CodeMirror=this,On(this),Co(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Yr(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 yl,keySeq:null,specialChars:null},t.autofocus&&!al&&o.input.focus(),Zo&&Qo<11&&setTimeout(function(){return r.display.input.reset(!0)},20),Mo(this),ji(),tn(this),this.curOp.forceUpdate=!0,Vn(this,n),t.autofocus&&!al||this.hasFocus()?setTimeout(u(Dr,this),20):Hr(this);for(var l in Ns)Ns.hasOwnProperty(l)&&Ns[l](r,t[l],ks);Er(this),t.finishInit&&t.finishInit(this);for(var s=0;s<Os.length;++s)Os[s](r);rn(this),Jo&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Mo(e){function t(){i.activeTouch&&(o=setTimeout(function(){return i.activeTouch=null},1e3),l=i.activeTouch,l.end=+new Date)}function r(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function n(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}var i=e.display;Pl(i.scroller,"mousedown",fn(e,po)),Zo&&Qo<11?Pl(i.scroller,"dblclick",fn(e,function(t){if(!Ae(e,t)){var r=Sr(e,t);if(r&&!bo(e,t)&&!zt(e.display,t)){Ee(t);var n=e.findWordAt(r);li(e.doc,n.anchor,n.head)}}})):Pl(i.scroller,"dblclick",function(t){return Ae(e,t)||Ee(t)}),gl||Pl(i.scroller,"contextmenu",function(t){return wo(e,t)});var o,l={end:0};Pl(i.scroller,"touchstart",function(t){if(!Ae(e,t)&&!r(t)){i.input.ensurePolled(),clearTimeout(o);var n=+new Date;i.activeTouch={start:n,moved:!1,prev:n-l.end<=300?l:null},1==t.touches.length&&(i.activeTouch.left=t.touches[0].pageX,i.activeTouch.top=t.touches[0].pageY)}}),Pl(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Pl(i.scroller,"touchend",function(r){var o=i.activeTouch;if(o&&!zt(i,r)&&null!=o.left&&!o.moved&&new Date-o.start<300){var l,s=e.coordsChar(i.activeTouch,"page");l=!o.prev||n(o,o.prev)?new os(s,s):!o.prev.prev||n(o,o.prev.prev)?e.findWordAt(s):new os(E(s.line,0),U(e.doc,E(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),Ee(r)}t()}),Pl(i.scroller,"touchcancel",t),Pl(i.scroller,"scroll",function(){i.scroller.clientHeight&&(Rr(e,i.scroller.scrollTop),Br(e,i.scroller.scrollLeft,!0),We(e,"scroll",e))}),Pl(i.scroller,"mousewheel",function(t){return Vr(e,t)}),Pl(i.scroller,"DOMMouseScroll",function(t){return Vr(e,t)}),Pl(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(t){Ae(e,t)||ze(t)},over:function(t){Ae(e,t)||(Ui(e,t),ze(t))},start:function(t){return Gi(e,t)},drop:fn(e,Bi),leave:function(t){Ae(e,t)||Vi(e)}};var s=i.input.getField();Pl(s,"keyup",function(t){return fo.call(e,t)}),Pl(s,"keydown",fn(e,uo)),Pl(s,"keypress",fn(e,ho)),Pl(s,"focus",function(t){return Dr(e,t)}),Pl(s,"blur",function(t){return Hr(e,t)})}function No(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=et(e,t):r="prev");var l=e.options.tabSize,s=M(o,t),a=f(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==Cl||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?f(M(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",d=0;if(e.options.indentWithTabs)for(var g=Math.floor(u/l);g;--g)d+=l,h+="\t";if(d<u&&(h+=p(u-d)),h!=c)return Ni(o,h,E(t,0),E(t,c.length),"+input"),s.stateAfter=null,!0;for(var v=0;v<o.sel.ranges.length;v++){var m=o.sel.ranges[v];if(m.head.line==t&&m.head.ch<c.length){var y=E(t,c.length);ai(o,v,new os(y,y));break}}}function Oo(e){Ws=e}function Wo(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l=e.state.pasteIncoming||"paste"==i,s=Fl(t),a=null;if(l&&n.ranges.length>1)if(Ws&&Ws.text.join("\n")==t){if(n.ranges.length%Ws.text.length==0){a=[];for(var u=0;u<Ws.text.length;u++)a.push(o.splitLines(Ws.text[u]))}}else s.length==n.ranges.length&&(a=v(s,function(e){return[e]}));for(var c,f=n.ranges.length-1;f>=0;f--){var h=n.ranges[f],d=h.from(),p=h.to();h.empty()&&(r&&r>0?d=E(d.line,d.ch-r):e.state.overwrite&&!l?p=E(p.line,Math.min(M(o,p.line).text.length,p.ch+g(s).length)):Ws&&Ws.lineWise&&Ws.text.join("\n")==t&&(d=p=E(d.line,0))),c=e.curOp.updateInput;var m={from:d,to:p,text:a?a[f%a.length]:s,origin:i||(l?"paste":e.state.cutIncoming?"cut":"+input")};Ci(e.doc,m),St(e,"inputRead",e,m)}t&&!l&&Do(e,t),Jr(e),e.curOp.updateInput=c,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ao(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||cn(t,function(){return Wo(t,r,0,null,"paste")}),!0}function Do(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=No(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(M(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=No(e,i.head.line,"smart"));l&&St(e,"electricInput",e,i.head.line)}}}function Ho(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:E(i,0),head:E(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Po(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Eo(){var e=n("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=n("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Jo?e.style.width="1000px":e.setAttribute("wrap","off"),ll&&(e.style.border="1px solid black"),Po(e),t}function Fo(e,t,r,n,i){function o(){var n=t.line+r;return!(n<e.first||n>=e.first+e.size)&&(t=new E(n,t.ch,t.sticky),u=M(e,n))}
33
+ function l(n){var l;if(null==(l=i?Me(e.cm,u,t,r):Te(u,t,r))){if(n||!o())return!1;t=ke(i,e.cm,u,t.line,r)}else t=l;return!0}var s=t,a=r,u=M(e,t.line);if("char"==n)l();else if("column"==n)l(!0);else if("word"==n||"group"==n)for(var c=null,f="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(r<0)||l(!d);d=!1){var p=u.text.charAt(t.ch)||"\n",g=x(p,h)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||d||g||(g="s"),c&&c!=g){r<0&&(r=1,l(),t.sticky="after");break}if(g&&(c=g),r>0&&!l(!d))break}var v=yi(e,t,s,a,!0);return I(s,v)&&(v.hitSide=!0),v}function Io(e,t,r,n){var i,o=e.doc,l=t.left;if("page"==n){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),a=Math.max(s-.5*mr(e.display),3);i=(r>0?t.bottom:t.top)+r*a}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(var u;u=dr(e,l,i),u.outside;){if(r<0?i<=0:i>=o.height){u.hitSide=!0;break}i+=5*r}return u}function zo(e,t){var r=$t(e,t.line);if(!r||r.hidden)return null;var n=M(e.doc,t.line),i=Xt(r,n,t.line),o=Se(n,e.doc.direction),l="left";if(o){l=Ce(o,t.ch)%2?"right":"left"}var s=Qt(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Ro(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function Bo(e,t){return t&&(e.bad=!0),e}function Go(e,t,r,n,i){function o(e){return function(t){return t.id==e}}function l(){c&&(u+=f,c=!1)}function s(e){e&&(l(),u+=e)}function a(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void s(r||t.textContent.replace(/\u200b/g,""));var u,h=t.getAttribute("cm-marker");if(h){var d=e.findMarks(E(n,0),E(i+1,0),o(+h));return void(d.length&&(u=d[0].find())&&s(N(e.doc,u.from,u.to).join(f)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p)$/i.test(t.nodeName);p&&l();for(var g=0;g<t.childNodes.length;g++)a(t.childNodes[g]);p&&(c=!0)}else 3==t.nodeType&&s(t.nodeValue)}for(var u="",c=!1,f=e.doc.lineSeparator();a(t),t!=r;)t=t.nextSibling;return u}function Uo(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Bo(e.clipPos(E(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Vo(o,t,r)}}function Vo(e,t,r){function n(t,r,n){for(var i=-1;i<(f?f.length:0);i++)for(var o=i<0?c.map:f[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var a=A(i<0?e.line:e.rest[i]),u=o[l]+n;return(n<0||s!=t)&&(u=o[l+(n?1:0)]),E(a,u)}}}var i=e.text.firstChild,l=!1;if(!t||!o(i,t))return Bo(E(A(e.line),0),!0);if(t==i&&(l=!0,t=i.childNodes[r],r=0,!t)){var s=e.rest?g(e.rest):e.line;return Bo(E(A(s),s.text.length),l)}var a=3==t.nodeType?t:null,u=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,r&&(r=a.nodeValue.length));u.parentNode!=i;)u=u.parentNode;var c=e.measure,f=c.maps,h=n(a,u,r);if(h)return Bo(h,l);for(var d=u.nextSibling,p=a?a.nodeValue.length-r:0;d;d=d.nextSibling){if(h=n(d,d.firstChild,0))return Bo(E(h.line,h.ch-p),l);p+=d.textContent.length}for(var v=u.previousSibling,m=r;v;v=v.previousSibling){if(h=n(v,v.firstChild,-1))return Bo(E(h.line,h.ch+m),l);m+=v.textContent.length}}function Ko(e,t){function r(){e.value=a.getValue()}if(t=t?c(t):{},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=l();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}var i;if(e.form&&(Pl(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var s=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=s}}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&&(Oe(e.form,"submit",r),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var a=ko(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return a}var jo=navigator.userAgent,Xo=navigator.platform,Yo=/gecko\/\d/i.test(jo),_o=/MSIE \d/.test(jo),$o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jo),qo=/Edge\/(\d+)/.exec(jo),Zo=_o||$o||qo,Qo=Zo&&(_o?document.documentMode||6:+(qo||$o)[1]),Jo=!qo&&/WebKit\//.test(jo),el=Jo&&/Qt\/\d+\.\d+/.test(jo),tl=!qo&&/Chrome\//.test(jo),rl=/Opera\//.test(jo),nl=/Apple Computer/.test(navigator.vendor),il=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(jo),ol=/PhantomJS/.test(jo),ll=!qo&&/AppleWebKit/.test(jo)&&/Mobile\/\w+/.test(jo),sl=/Android/.test(jo),al=ll||sl||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(jo),ul=ll||/Mac/.test(Xo),cl=/\bCrOS\b/.test(jo),fl=/win/i.test(Xo),hl=rl&&jo.match(/Version\/(\d*\.\d*)/);hl&&(hl=Number(hl[1])),hl&&hl>=15&&(rl=!1,Jo=!0);var dl,pl=ul&&(el||rl&&(null==hl||hl<12.11)),gl=Yo||Zo&&Qo>=9,vl=function(t,r){var n=t.className,i=e(r).exec(n);if(i){var o=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(o?i[1]+o:"")}};dl=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var ml=function(e){e.select()};ll?ml=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:Zo&&(ml=function(e){try{e.select()}catch(e){}});var yl=function(){this.id=null};yl.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var bl,wl,xl=30,Cl={toString:function(){return"CodeMirror.Pass"}},Sl={scroll:!1},Ll={origin:"*mouse"},Tl={origin:"+move"},kl=[""],Ml=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Nl=/[\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]/,Ol=!1,Wl=!1,Al=null,Dl=function(){function e(e){return e<=247?r.charAt(e):1424<=e&&e<=1524?"R":1536<=e&&e<=1785?n.charAt(e-1536):1774<=e&&e<=2220?"r":8192<=e&&e<=8203?"w":8204==e?"b":"L"}function t(e,t,r){this.level=e,this.from=t,this.to=r}var r="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,o=/[stwN]/,l=/[LRr]/,s=/[Lb1n]/,a=/[1n]/;return function(r,n){var u="ltr"==n?"L":"R";if(0==r.length||"ltr"==n&&!i.test(r))return!1;for(var c=r.length,f=[],h=0;h<c;++h)f.push(e(r.charCodeAt(h)));for(var d=0,p=u;d<c;++d){var v=f[d];"m"==v?f[d]=p:p=v}for(var m=0,y=u;m<c;++m){var b=f[m];"1"==b&&"r"==y?f[m]="n":l.test(b)&&(y=b,"r"==b&&(f[m]="R"))}for(var w=1,x=f[0];w<c-1;++w){var C=f[w];"+"==C&&"1"==x&&"1"==f[w+1]?f[w]="1":","!=C||x!=f[w+1]||"1"!=x&&"n"!=x||(f[w]=x),x=C}for(var S=0;S<c;++S){var L=f[S];if(","==L)f[S]="N";else if("%"==L){var T=void 0;for(T=S+1;T<c&&"%"==f[T];++T);for(var k=S&&"!"==f[S-1]||T<c&&"1"==f[T]?"1":"N",M=S;M<T;++M)f[M]=k;S=T-1}}for(var N=0,O=u;N<c;++N){var W=f[N];"L"==O&&"1"==W?f[N]="L":l.test(W)&&(O=W)}for(var A=0;A<c;++A)if(o.test(f[A])){var D=void 0;for(D=A+1;D<c&&o.test(f[D]);++D);for(var H="L"==(A?f[A-1]:u),P="L"==(D<c?f[D]:u),E=H==P?H?"L":"R":u,F=A;F<D;++F)f[F]=E;A=D-1}for(var I,z=[],R=0;R<c;)if(s.test(f[R])){var B=R;for(++R;R<c&&s.test(f[R]);++R);z.push(new t(0,B,R))}else{var G=R,U=z.length;for(++R;R<c&&"L"!=f[R];++R);for(var V=G;V<R;)if(a.test(f[V])){G<V&&z.splice(U,0,new t(1,G,V));var K=V;for(++V;V<R&&a.test(f[V]);++V);z.splice(U,0,new t(2,K,V)),G=V}else++V;G<R&&z.splice(U,0,new t(1,G,R))}return 1==z[0].level&&(I=r.match(/^\s+/))&&(z[0].from=I[0].length,z.unshift(new t(0,0,I[0].length))),1==g(z).level&&(I=r.match(/\s+$/))&&(g(z).to-=I[0].length,z.push(new t(0,c-I[0].length,c))),"rtl"==n?z.reverse():z}}(),Hl=[],Pl=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Hl).concat(r)}},El=function(){if(Zo&&Qo<9)return!1;var e=n("div");return"draggable"in e||"dragDrop"in e}(),Fl=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);i==-1&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");l!=-1?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},Il=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)},zl=function(){var e=n("div");return"oncopy"in e||(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Rl=null,Bl={},Gl={},Ul={},Vl=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0};Vl.prototype.eol=function(){return this.pos>=this.string.length},Vl.prototype.sol=function(){return this.pos==this.lineStart},Vl.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Vl.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Vl.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Vl.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Vl.prototype.eatSpace=function(){for(var e=this,t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++e.pos;return this.pos>t},Vl.prototype.skipToEnd=function(){this.pos=this.string.length},Vl.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Vl.prototype.backUp=function(e){this.pos-=e},Vl.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=f(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Vl.prototype.indentation=function(){return f(this.string,null,this.tabSize)-(this.lineStart?f(this.string,this.lineStart,this.tabSize):0)},Vl.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return t!==!1&&(this.pos+=e.length),!0},Vl.prototype.current=function(){return this.string.slice(this.start,this.pos)},Vl.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}};var Kl=function(e,t,r){this.text=e,ne(this,t),this.height=r?r(this):1};Kl.prototype.lineNo=function(){return A(this)},Pe(Kl);var jl,Xl={},Yl={},_l=null,$l=null,ql={left:0,right:0,top:0,bottom:0},Zl=0,Ql=null;Zo?Ql=-.53:Yo?Ql=15:tl?Ql=-.7:nl&&(Ql=-1/3);var Jl=function(e,t,r){this.cm=r;var i=this.vert=n("div",[n("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=n("div",[n("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(i),e(o),Pl(i,"scroll",function(){i.clientHeight&&t(i.scrollTop,"vertical")}),Pl(o,"scroll",function(){o.clientWidth&&t(o.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,Zo&&Qo<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Jl.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n: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=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n: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==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Jl.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},Jl.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},Jl.prototype.zeroWidthHack=function(){var e=ul&&!il?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new yl,this.disableVert=new yl},Jl.prototype.enableZeroWidthBar=function(e,t){function r(){var n=e.getBoundingClientRect();document.elementFromPoint(n.left+1,n.bottom-1)!=e?e.style.pointerEvents="none":t.set(1e3,r)}e.style.pointerEvents="auto",t.set(1e3,r)},Jl.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var es=function(){};es.prototype.update=function(){return{bottom:0,right:0}},es.prototype.setScrollLeft=function(){},es.prototype.setScrollTop=function(){},es.prototype.clear=function(){};var ts={native:Jl,null:es},rs=0,ns=function(e,t,r){var n=e.display;this.viewport=t,this.visible=zr(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Vt(e),this.force=r,this.dims=br(e),this.events=[]};ns.prototype.signal=function(e,t){He(e,t)&&this.events.push(arguments)},ns.prototype.finish=function(){for(var e=this,t=0;t<this.events.length;t++)We.apply(null,e.events[t])};var is=function(e,t){this.ranges=e,this.primIndex=t};is.prototype.primary=function(){return this.ranges[this.primIndex]},is.prototype.equals=function(e){var t=this;if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var r=0;r<this.ranges.length;r++){var n=t.ranges[r],i=e.ranges[r];if(!I(n.anchor,i.anchor)||!I(n.head,i.head))return!1}return!0},is.prototype.deepCopy=function(){for(var e=this,t=[],r=0;r<this.ranges.length;r++)t[r]=new os(z(e.ranges[r].anchor),z(e.ranges[r].head));return new is(t,this.primIndex)},is.prototype.somethingSelected=function(){for(var e=this,t=0;t<this.ranges.length;t++)if(!e.ranges[t].empty())return!0;return!1},is.prototype.contains=function(e,t){var r=this;t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=r.ranges[n];if(F(t,i.from())>=0&&F(e,i.to())<=0)return n}return-1};var os=function(e,t){this.anchor=e,this.head=t};os.prototype.from=function(){return B(this.anchor,this.head)},os.prototype.to=function(){return R(this.anchor,this.head)},os.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};var ls=function(e){var t=this;this.lines=e,this.parent=null;for(var r=0,n=0;n<e.length;++n)e[n].parent=t,r+=e[n].height;this.height=r};ls.prototype.chunkSize=function(){return this.lines.length},ls.prototype.removeInner=function(e,t){for(var r=this,n=e,i=e+t;n<i;++n){var o=r.lines[n];r.height-=o.height,ut(o),St(o,"delete")}this.lines.splice(e,t)},ls.prototype.collapse=function(e){e.push.apply(e,this.lines)},ls.prototype.insertInner=function(e,t,r){var n=this;this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=n},ls.prototype.iterN=function(e,t,r){for(var n=this,i=e+t;e<i;++e)if(r(n.lines[e]))return!0};var ss=function(e){var t=this;this.children=e;for(var r=0,n=0,i=0;i<e.length;++i){var o=e[i];r+=o.chunkSize(),n+=o.height,o.parent=t}this.size=r,this.height=n,this.parent=null};ss.prototype.chunkSize=function(){return this.size},ss.prototype.removeInner=function(e,t){var r=this;this.size-=t;for(var n=0;n<this.children.length;++n){var i=r.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e),s=i.height;if(i.removeInner(e,l),r.height-=s-i.height,o==l&&(r.children.splice(n--,1),i.parent=null),0==(t-=l))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ls))){var a=[];this.collapse(a),this.children=[new ls(a)],this.children[0].parent=this}},ss.prototype.collapse=function(e){for(var t=this,r=0;r<this.children.length;++r)t.children[r].collapse(e)},ss.prototype.insertInner=function(e,t,r){var n=this;this.size+=t.length,this.height+=r;for(var i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<=l){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(var s=o.lines.length%25+25,a=s;a<o.lines.length;){var u=new ls(o.lines.slice(a,a+=25));o.height-=u.height,n.children.splice(++i,0,u),u.parent=n}o.lines=o.lines.slice(0,s),n.maybeSpill()}break}e-=l}},ss.prototype.maybeSpill=function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new ss(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=h(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new ss(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},ss.prototype.iterN=function(e,t,r){for(var n=this,i=0;i<this.children.length;++i){var o=n.children[i],l=o.chunkSize();if(e<l){var s=Math.min(t,l-e);if(o.iterN(e,s,r))return!0;if(0==(t-=s))break;e=0}else e-=l}};var as=function(e,t,r){var n=this;if(r)for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i]);this.doc=e,this.node=t};as.prototype.clear=function(){var e=this,t=this.doc.cm,r=this.line.widgets,n=this.line,i=A(n);if(null!=i&&r){for(var o=0;o<r.length;++o)r[o]==e&&r.splice(o--,1);r.length||(n.widgets=null);var l=It(this);W(n,Math.max(0,n.height-l)),t&&(cn(t,function(){Hi(t,n,-l),gn(t,i,"widget")}),St(t,"lineWidgetCleared",t,this,i))}},as.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=It(this)-t;i&&(W(n,n.height+i),r&&cn(r,function(){r.curOp.forceUpdate=!0,Hi(r,n,i),St(r,"lineWidgetChanged",r,e,A(n))}))},Pe(as);var us=0,cs=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++us};cs.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){var t=this.doc.cm,r=t&&!t.curOp;if(r&&tn(t),He(this,"clear")){var n=this.find();n&&St(this,"clear",n.from,n.to)}for(var i=null,o=null,l=0;l<this.lines.length;++l){var s=e.lines[l],a=_(s.markedSpans,e);t&&!e.collapsed?gn(t,A(s),"text"):t&&(null!=a.to&&(o=A(s)),null!=a.from&&(i=A(s))),s.markedSpans=$(s.markedSpans,a),null==a.from&&e.collapsed&&!ve(e.doc,s)&&t&&W(s,mr(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var u=0;u<this.lines.length;++u){var c=fe(e.lines[u]),f=be(c);f>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=f,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&pn(t,i,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&gi(t.doc)),t&&St(t,"markerCleared",t,this,i,o),r&&rn(t),this.parent&&this.parent.clear()}},cs.prototype.find=function(e,t){var r=this;null==e&&"bookmark"==this.type&&(e=1);for(var n,i,o=0;o<this.lines.length;++o){var l=r.lines[o],s=_(l.markedSpans,r);if(null!=s.from&&(n=E(t?l:A(l),s.from),e==-1))return n;if(null!=s.to&&(i=E(t?l:A(l),s.to),1==e))return i}return n&&{from:n,to:i}},cs.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&cn(n,function(){var i=t.line,o=A(t.line),l=$t(n,o);if(l&&(rr(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!ve(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=It(r)-s;a&&W(i,i.height+a)}St(n,"markerChanged",n,e)})},cs.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&h(t.maybeHiddenMarkers,this)!=-1||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},cs.prototype.detachLine=function(e){if(this.lines.splice(h(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},Pe(cs);var fs=function(e,t){var r=this;this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=r};fs.prototype.clear=function(){var e=this;if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)e.markers[t].clear();St(this,"clear")}},fs.prototype.find=function(e,t){return this.primary.find(e,t)},Pe(fs);var hs=0,ds=function(e,t,r,n,i){if(!(this instanceof ds))return new ds(e,t,r,n,i);null==r&&(r=0),ss.call(this,[new ls([new Kl("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.frontier=r;var o=E(r,0);this.sel=Dn(o),this.history=new Xn(null),this.id=++hs,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Gn(this,{from:o,to:o,text:e}),hi(this,Dn(o),Sl)};ds.prototype=b(ss.prototype,{constructor:ds,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=O(this,this.first,this.first+this.size);return e===!1?t:t.join(e||this.lineSeparator())},setValue:dn(function(e){var t=E(this.first,0),r=this.first+this.size-1;Ci(this,{from:t,to:E(r,M(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),hi(this,Dn(t))}),replaceRange:function(e,t,r,n){t=U(this,t),r=r?U(this,r):t,Ni(this,e,t,r,n)},getRange:function(e,t,r){var n=N(this,U(this,e),U(this,t));return r===!1?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(H(this,e))return M(this,e)},getLineNumber:function(e){return A(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=M(this,e)),fe(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return U(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||e===!1?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:dn(function(e,t,r){ui(this,U(this,"number"==typeof e?E(e,t||0):e),null,r)}),setSelection:dn(function(e,t,r){ui(this,U(this,e),U(this,t||e),r)}),extendSelection:dn(function(e,t,r){li(this,U(this,e),t&&U(this,t),r)}),extendSelections:dn(function(e,t){si(this,K(this,e),t)}),extendSelectionsBy:dn(function(e,t){si(this,K(this,v(this.sel.ranges,e)),t)}),setSelections:dn(function(e,t,r){var n=this;if(e.length){for(var i=[],o=0;o<e.length;o++)i[o]=new os(U(n,e[o].anchor),U(n,e[o].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),hi(this,An(i,t),r)}}),addSelection:dn(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new os(U(this,e),U(this,t||e))),hi(this,An(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this,n=this.sel.ranges,i=0;i<n.length;i++){var o=N(r,n[i].from(),n[i].to());t=t?t.concat(o):o}return e===!1?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=this,r=[],n=this.sel.ranges,i=0;i<n.length;i++){var o=N(t,n[i].from(),n[i].to());e!==!1&&(o=o.join(e||t.lineSeparator())),r[i]=o}return r},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:dn(function(e,t,r){for(var n=this,i=[],o=this.sel,l=0;l<o.ranges.length;l++){var s=o.ranges[l];i[l]={from:s.from(),to:s.to(),text:n.splitLines(e[l]),origin:r}}for(var a=t&&"end"!=t&&In(this,i,t),u=i.length-1;u>=0;u--)Ci(n,i[u]);a?fi(this,a):this.cm&&Jr(this.cm)}),undo:dn(function(){Li(this,"undo")}),redo:dn(function(){Li(this,"redo")}),undoSelection:dn(function(){Li(this,"undo",!0)}),redoSelection:dn(function(){Li(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Xn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:ii(this.history.done),undone:ii(this.history.undone)}},setHistory:function(e){var t=this.history=new Xn(this.history.maxGeneration);t.done=ii(e.done.slice(0),null,!0),t.undone=ii(e.undone.slice(0),null,!0)},setGutterMarker:dn(function(e,t,r){return Di(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&C(n)&&(e.gutterMarkers=null),!0})}),clearGutter:dn(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&Di(t,r,"gutter",function(){return r.gutterMarkers[e]=null,C(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!H(this,e))return null;if(t=e,!(e=M(this,e)))return null}else if(null==(t=A(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:dn(function(t,r,n){return Di(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass";if(t[i]){if(e(n).test(t[i]))return!1;t[i]+=" "+n}else t[i]=n;return!0})}),removeLineClass:dn(function(t,r,n){return Di(this,t,"gutter"==r?"gutter":"class",function(t){var i="text"==r?"textClass":"background"==r?"bgClass":"gutter"==r?"gutterClass":"wrapClass",o=t[i];if(!o)return!1;if(null==n)t[i]=null;else{var l=o.match(e(n));if(!l)return!1;var s=l.index+l[0].length;t[i]=o.slice(0,l.index)+(l.index&&s!=o.length?" ":"")+o.slice(s)||null}return!0})}),addLineWidget:dn(function(e,t,r){return Pi(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return Ei(this,U(this,e),U(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return e=U(this,e),Ei(this,e,e,r,"bookmark")},findMarksAt:function(e){e=U(this,e);var t=[],r=M(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=U(this,e),t=U(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),U(this,E(r,t))},indexFromPos:function(e){e=U(this,e);var t=e.ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new ds(O(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new ds(O(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],zi(n,Ii(this)),n},unlinkDoc:function(e){var t=this;if(e instanceof ko&&(e=e.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=t.linked[r];if(n.doc==e){t.linked.splice(r,1),e.unlinkDoc(t),Ri(Ii(t));break}}if(e.history==this.history){var i=[e.id];Un(e,function(e){return i.push(e.id)},!0),e.history=new Xn(null),e.history.done=ii(this.history.done,i),e.history.undone=ii(this.history.undone,i)}},iterLinkedDocs:function(e){Un(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Fl(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:dn(function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&jn(this.cm))})}),ds.prototype.eachLine=ds.prototype.iter;for(var ps=0,gs=!1,vs={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",
34
+ 63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},ms=0;ms<10;ms++)vs[ms+48]=vs[ms+96]=String(ms);for(var ys=65;ys<=90;ys++)vs[ys]=String.fromCharCode(ys);for(var bs=1;bs<=12;bs++)vs[bs+111]=vs[bs+63235]="F"+bs;var ws={};ws.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"},ws.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"},ws.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"},ws.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"]},ws.default=ul?ws.macDefault:ws.pcDefault;var xs,Cs,Ss={selectAll:wi,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),Sl)},killLine:function(e){return eo(e,function(t){if(t.empty()){var r=M(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:E(t.head.line+1,0)}:{from:t.head,to:E(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return eo(e,function(t){return{from:E(t.from().line,0),to:U(e.doc,E(t.to().line+1,0))}})},delLineLeft:function(e){return eo(e,function(e){return{from:E(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return eo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return eo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(E(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(E(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return to(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return no(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return ro(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},Tl)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},Tl)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?no(e,t.head):n},Tl)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=f(e.getLine(o.line),o.ch,n);t.push(p(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return cn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=M(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new E(i.line,i.ch-1)),i.ch>0)i=new E(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),E(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=M(e.doc,i.line-1).text;l&&(i=new E(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),E(i.line-1,l.length-1),i,"+transpose"))}r.push(new os(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return cn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Jr(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}},Ls=new yl,Ts=null,ks={toString:function(){return"CodeMirror.Init"}},Ms={},Ns={};ko.defaults=Ms,ko.optionHandlers=Ns;var Os=[];ko.defineInitHook=function(e){return Os.push(e)};var Ws=null,As=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new yl,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};As.prototype.init=function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())Oo({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Ho(i);Oo({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation(function(){i.setSelections(t.ranges,0,Sl),i.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var r=Ws.text.join("\n");if(e.clipboardData.setData("Text",r),e.clipboardData.getData("Text")==r)return void e.preventDefault()}var l=Eo(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Ws.text.join("\n");var a=document.activeElement;ml(s),setTimeout(function(){i.display.lineSpace.removeChild(l),a.focus(),a==o&&n.showPrimarySelection()},50)}}var r=this,n=this,i=n.cm,o=n.div=e.lineDiv;Po(o,i.options.spellcheck),Pl(o,"paste",function(e){Ae(i,e)||Ao(e,i)||Qo<=11&&setTimeout(fn(i,function(){return r.updateFromDOM()}),20)}),Pl(o,"compositionstart",function(e){r.composing={data:e.data,done:!1}}),Pl(o,"compositionupdate",function(e){r.composing||(r.composing={data:e.data,done:!1})}),Pl(o,"compositionend",function(e){r.composing&&(e.data!=r.composing.data&&r.readFromDOMSoon(),r.composing.done=!0)}),Pl(o,"touchstart",function(){return n.forceCompositionEnd()}),Pl(o,"input",function(){r.composing||r.readFromDOMSoon()}),Pl(o,"copy",t),Pl(o,"cut",t)},As.prototype.prepareSelection=function(){var e=kr(this.cm,!1);return e.focus=this.cm.state.focused,e},As.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},As.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm.doc.sel.primary(),r=Uo(this.cm,e.anchorNode,e.anchorOffset),n=Uo(this.cm,e.focusNode,e.focusOffset);if(!r||r.bad||!n||n.bad||0!=F(B(r,n),t.from())||0!=F(R(r,n),t.to())){var i=zo(this.cm,t.from()),o=zo(this.cm,t.to());if(!i&&!o)return void e.removeAllRanges();var l=this.cm.display.view,s=e.rangeCount&&e.getRangeAt(0);if(i){if(!o){var a=l[l.length-1].measure,u=a.maps?a.maps[a.maps.length-1]:a.map;o={node:u[u.length-1],offset:u[u.length-2]-u[u.length-3]}}}else i={node:l[0].measure.map[2],offset:0};var c;try{c=dl(i.node,i.offset,o.offset,o.node)}catch(e){}c&&(!Yo&&this.cm.state.focused?(e.collapse(i.node,i.offset),c.collapsed||(e.removeAllRanges(),e.addRange(c))):(e.removeAllRanges(),e.addRange(c)),s&&null==e.anchorNode?e.addRange(s):Yo&&this.startGracePeriod()),this.rememberSelection()}},As.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},As.prototype.showMultipleSelections=function(e){r(this.cm.display.cursorDiv,e.cursors),r(this.cm.display.selectionDiv,e.selection)},As.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},As.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return o(this.div,t)},As.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},As.prototype.blur=function(){this.div.blur()},As.prototype.getField=function(){return this.div},As.prototype.supportsTouch=function(){return!0},As.prototype.receivedFocus=function(){function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}var t=this;this.selectionInEditor()?this.pollSelection():cn(this.cm,function(){return t.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,e)},As.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},As.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(sl&&tl&&this.cm.options.gutters.length&&Ro(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Uo(t,e.anchorNode,e.anchorOffset),n=Uo(t,e.focusNode,e.focusOffset);r&&n&&cn(t,function(){hi(t.doc,Dn(r,n),Sl),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},As.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,r=e.doc.sel.primary(),n=r.from(),i=r.to();if(0==n.ch&&n.line>e.firstLine()&&(n=E(n.line-1,M(e.doc,n.line-1).length)),i.ch==M(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=E(i.line+1,0)),n.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,s;n.line==t.viewFrom||0==(o=Lr(e,n.line))?(l=A(t.view[0].line),s=t.view[0].node):(l=A(t.view[o].line),s=t.view[o-1].node.nextSibling);var a,u,c=Lr(e,i.line);if(c==t.view.length-1?(a=t.viewTo-1,u=t.lineDiv.lastChild):(a=A(t.view[c+1].line)-1,u=t.view[c+1].node.previousSibling),!s)return!1;for(var f=e.doc.splitLines(Go(e,s,u,l,a)),h=N(e.doc,E(l,0),E(a,M(e.doc,a).text.length));f.length>1&&h.length>1;)if(g(f)==g(h))f.pop(),h.pop(),a--;else{if(f[0]!=h[0])break;f.shift(),h.shift(),l++}for(var d=0,p=0,v=f[0],m=h[0],y=Math.min(v.length,m.length);d<y&&v.charCodeAt(d)==m.charCodeAt(d);)++d;for(var b=g(f),w=g(h),x=Math.min(b.length-(1==f.length?d:0),w.length-(1==h.length?d:0));p<x&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)++p;if(1==f.length&&1==h.length&&l==n.line)for(;d&&d>n.ch&&b.charCodeAt(b.length-p-1)==w.charCodeAt(w.length-p-1);)d--,p++;f[f.length-1]=b.slice(0,b.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var C=E(l,d),S=E(a,h.length?g(h).length-p:0);return f.length>1||f[0]||F(C,S)?(Ni(e.doc,f,C,S,"+input"),!0):void 0},As.prototype.ensurePolled=function(){this.forceCompositionEnd()},As.prototype.reset=function(){this.forceCompositionEnd()},As.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},As.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))},As.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||cn(this.cm,function(){return pn(e.cm)})},As.prototype.setUneditable=function(e){e.contentEditable="false"},As.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||fn(this.cm,Wo)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},As.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},As.prototype.onContextMenu=function(){},As.prototype.resetPosition=function(){},As.prototype.needsContentAttribute=!0;var Ds=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new yl,this.inaccurateSelection=!1,this.hasSelection=!1,this.composing=null};Ds.prototype.init=function(e){function t(e){if(!Ae(i,e)){if(i.somethingSelected())Oo({lineWise:!1,text:i.getSelections()}),n.inaccurateSelection&&(n.prevInput="",n.inaccurateSelection=!1,l.value=Ws.text.join("\n"),ml(l));else{if(!i.options.lineWiseCopyCut)return;var t=Ho(i);Oo({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,Sl):(n.prevInput="",l.value=t.text.join("\n"),ml(l))}"cut"==e.type&&(i.state.cutIncoming=!0)}}var r=this,n=this,i=this.cm,o=this.wrapper=Eo(),l=this.textarea=o.firstChild;e.wrapper.insertBefore(o,e.wrapper.firstChild),ll&&(l.style.width="0px"),Pl(l,"input",function(){Zo&&Qo>=9&&r.hasSelection&&(r.hasSelection=null),n.poll()}),Pl(l,"paste",function(e){Ae(i,e)||Ao(e,i)||(i.state.pasteIncoming=!0,n.fastPoll())}),Pl(l,"cut",t),Pl(l,"copy",t),Pl(e.scroller,"paste",function(t){zt(e,t)||Ae(i,t)||(i.state.pasteIncoming=!0,n.focus())}),Pl(e.lineSpace,"selectstart",function(t){zt(e,t)||Ee(t)}),Pl(l,"compositionstart",function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Pl(l,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},Ds.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=kr(e);if(e.options.moveInputWithCursor){var i=cr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Ds.prototype.showSelection=function(e){var t=this.cm,n=t.display;r(n.cursorDiv,e.cursors),r(n.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ds.prototype.reset=function(e){if(!this.contextMenuPending){var t,r,n=this.cm,i=n.doc;if(n.somethingSelected()){this.prevInput="";var o=i.sel.primary();t=zl&&(o.to().line-o.from().line>100||(r=n.getSelection()).length>1e3);var l=t?"-":r||n.getSelection();this.textarea.value=l,n.state.focused&&ml(this.textarea),Zo&&Qo>=9&&(this.hasSelection=l)}else e||(this.prevInput=this.textarea.value="",Zo&&Qo>=9&&(this.hasSelection=null));this.inaccurateSelection=t}},Ds.prototype.getField=function(){return this.textarea},Ds.prototype.supportsTouch=function(){return!1},Ds.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!al||l()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ds.prototype.blur=function(){this.textarea.blur()},Ds.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ds.prototype.receivedFocus=function(){this.slowPoll()},Ds.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ds.prototype.fastPoll=function(){function e(){r.poll()||t?(r.pollingFast=!1,r.slowPoll()):(t=!0,r.polling.set(60,e))}var t=!1,r=this;r.pollingFast=!0,r.polling.set(20,e)},Ds.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||Il(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(Zo&&Qo>=9&&this.hasSelection===i||ul&&/[\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||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,s=Math.min(n.length,i.length);l<s&&n.charCodeAt(l)==i.charCodeAt(l);)++l;return cn(t,function(){Wo(t,i.slice(l),n.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.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},Ds.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ds.prototype.onKeyPress=function(){Zo&&Qo>=9&&(this.hasSelection=null),this.fastPoll()},Ds.prototype.onContextMenu=function(e){function t(){if(null!=l.selectionStart){var e=i.somethingSelected(),t="​"+(e?l.value:"");l.value="⇚",l.value=t,n.prevInput=e?"":"​",l.selectionStart=1,l.selectionEnd=t.length,o.selForContextMenu=i.doc.sel}}function r(){if(n.contextMenuPending=!1,n.wrapper.style.cssText=c,l.style.cssText=u,Zo&&Qo<9&&o.scrollbars.setScrollTop(o.scroller.scrollTop=a),null!=l.selectionStart){(!Zo||Zo&&Qo<9)&&t();var e=0,r=function(){o.selForContextMenu==i.doc.sel&&0==l.selectionStart&&l.selectionEnd>0&&"​"==n.prevInput?fn(i,wi)(i):e++<10?o.detectingSelectAll=setTimeout(r,500):(o.selForContextMenu=null,o.input.reset())};o.detectingSelectAll=setTimeout(r,200)}}var n=this,i=n.cm,o=i.display,l=n.textarea,s=Sr(i,e),a=o.scroller.scrollTop;if(s&&!rl){i.options.resetSelectionOnContextMenu&&i.doc.sel.contains(s)==-1&&fn(i,hi)(i.doc,Dn(s),Sl);var u=l.style.cssText,c=n.wrapper.style.cssText;n.wrapper.style.cssText="position: absolute";var f=n.wrapper.getBoundingClientRect();l.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(Zo?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var h;if(Jo&&(h=window.scrollY),o.input.focus(),Jo&&window.scrollTo(null,h),o.input.reset(),i.somethingSelected()||(l.value=n.prevInput=" "),n.contextMenuPending=!0,o.selForContextMenu=i.doc.sel,clearTimeout(o.detectingSelectAll),Zo&&Qo>=9&&t(),gl){ze(e);var d=function(){Oe(window,"mouseup",d),setTimeout(r,20)};Pl(window,"mouseup",d)}else setTimeout(r,50)}},Ds.prototype.readOnlyChanged=function(e){e||this.reset()},Ds.prototype.setUneditable=function(){},Ds.prototype.needsContentAttribute=!1,function(e){function t(t,n,i,o){e.defaults[t]=n,i&&(r[t]=o?function(e,t,r){r!=ks&&i(e,t,r)}:i)}var r=e.optionHandlers;e.defineOption=t,e.Init=ks,t("value","",function(e,t){return e.setValue(t)},!0),t("mode",null,function(e,t){e.doc.modeOption=t,zn(e)},!0),t("indentUnit",2,zn,!0),t("indentWithTabs",!1),t("smartIndent",!0),t("tabSize",4,function(e){Rn(e),ir(e),pn(e)},!0),t("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(o==-1)break;i=o+t.length,r.push(E(n,o))}n++});for(var i=r.length-1;i>=0;i--)Ni(e.doc,t,r[i],E(r[i].line,r[i].ch+t.length))}}),t("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ks&&e.refresh()}),t("specialCharPlaceholder",ht,function(e){return e.refresh()},!0),t("electricChars",!0),t("inputStyle",al?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),t("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),t("rtlMoveVisually",!fl),t("wholeLineUpdateBefore",!0),t("theme","default",function(e){Co(e),So(e)},!0),t("keyMap","default",function(e,t,r){var n=Ji(t),i=r!=ks&&Ji(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),t("extraKeys",null),t("lineWrapping",!1,To,!0),t("gutters",[],function(e){Wn(e.options),So(e)},!0),t("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?wr(e.display)+"px":"0",e.refresh()},!0),t("coverGutterNextToScrollbar",!1,function(e){return jr(e)},!0),t("scrollbarStyle","native",function(e){Yr(e),jr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),t("lineNumbers",!1,function(e){Wn(e.options),So(e)},!0),t("firstLineNumber",1,So,!0),t("lineNumberFormatter",function(e){return e},So,!0),t("showCursorWhenSelecting",!1,Tr,!0),t("resetSelectionOnContextMenu",!0),t("lineWiseCopyCut",!0),t("readOnly",!1,function(e,t){"nocursor"==t?(Hr(e),e.display.input.blur(),e.display.disabled=!0):e.display.disabled=!1,e.display.input.readOnlyChanged(t)}),t("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),t("dragDrop",!0,Lo),t("allowDropFileTypes",null),t("cursorBlinkRate",530),t("cursorScrollMargin",0),t("cursorHeight",1,Tr,!0),t("singleCursorHeightPerLine",!0,Tr,!0),t("workTime",100),t("workDelay",100),t("flattenSpans",!0,Rn,!0),t("addModeClass",!1,Rn,!0),t("pollInterval",100),t("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),t("historyEventDelay",1250),t("viewportMargin",10,function(e){return e.refresh()},!0),t("maxHighlightLength",1e4,Rn,!0),t("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),t("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),t("autofocus",null),t("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(ko),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&fn(this,t[e])(this,r,i),We(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"](Ji(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:hn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");m(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,pn(this)}),removeOverlay:hn(function(e){for(var t=this,r=this.state.overlays,n=0;n<r.length;++n){var i=r[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return r.splice(n,1),t.state.modeGen++,void pn(t)}}),indentLine:hn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),H(this.doc,e)&&No(this,e,t,r)}),indentSelection:hn(function(e){for(var t=this,r=this.doc.sel.ranges,n=-1,i=0;i<r.length;i++){var o=r[i];if(o.empty())o.head.line>n&&(No(t,o.head.line,e,!0),n=o.head.line,i==t.doc.sel.primIndex&&Jr(t));else{var l=o.from(),s=o.to(),a=Math.max(n,l.line);n=Math.min(t.lastLine(),s.line-(s.ch?0:1))+1;for(var u=a;u<n;++u)No(t,u,e);var c=t.doc.sel.ranges;0==l.ch&&r.length==c.length&&c[i].from().ch>0&&ai(t.doc,i,new os(l,c[i].to()),Sl)}}}),getTokenAt:function(e,t){return it(this,e,t)},getLineTokens:function(e,t){return it(this,E(e),t,!0)},getTokenTypeAt:function(e){e=U(this.doc,e);var t,r=Je(this,M(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=this,i=[];if(!r.hasOwnProperty(t))return i;var o=r[t],l=this.getModeAt(e);if("string"==typeof l[t])o[l[t]]&&i.push(o[l[t]]);else if(l[t])for(var s=0;s<l[t].length;s++){var a=o[l[t][s]];a&&i.push(a)}else l.helperType&&o[l.helperType]?i.push(o[l.helperType]):o[l.name]&&i.push(o[l.name]);for(var u=0;u<o._global.length;u++){var c=o._global[u];c.pred(l,n)&&h(i,c.val)==-1&&i.push(c.val)}return i},getStateAfter:function(e,t){var r=this.doc;return e=G(r,null==e?r.first+r.size-1:e),et(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel.primary();return r=null==e?n.head:"object"==typeof e?U(this.doc,e):e?n.from():n.to(),cr(this,r,t||"page")},charCoords:function(e,t){return ur(this,U(this.doc,e),t||"page")},coordsChar:function(e,t){return e=ar(this,e,t||"page"),dr(this,e.left,e.top)},lineAtHeight:function(e,t){return e=ar(this,{top:e,left:0},t||"page").top,D(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=M(this.doc,e)}else n=e;return sr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-ye(n):0)},defaultTextHeight:function(){return mr(this.display)},defaultCharWidth:function(){return yr(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=cr(this,U(this.doc,e));var l=e.bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==n)l=e.top;else if("above"==n||"near"==n){var a=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>a)&&e.top>t.offsetHeight?l=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=a&&(l=e.bottom),s+t.offsetWidth>u&&(s=u-t.offsetWidth)}t.style.top=l+"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"),r&&qr(this,{left:s,top:l,right:s+t.offsetWidth,bottom:l+t.offsetHeight})},triggerOnKeyDown:hn(uo),triggerOnKeyPress:hn(ho),triggerOnKeyUp:fo,execCommand:function(e){if(Ss.hasOwnProperty(e))return Ss[e].call(null,this)},triggerElectric:hn(function(e){Do(this,e)}),findPosH:function(e,t,r,n){var i=this,o=1;t<0&&(o=-1,t=-t);for(var l=U(this.doc,e),s=0;s<t&&(l=Fo(i.doc,l,o,r,n),!l.hitSide);++s);return l},moveH:hn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Fo(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},Tl)}),deleteH:hn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):eo(this,function(r){var i=Fo(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=this,o=1,l=n;t<0&&(o=-1,t=-t);for(var s=U(this.doc,e),a=0;a<t;++a){var u=cr(i,s,"div");if(null==l?l=u.left:u.left=l,s=Io(i,u,o,r),s.hitSide)break}return s},moveV:hn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=cr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Io(r,s,e,t);return"page"==t&&l==n.sel.primary()&&Qr(r,null,ur(r,a,"div").top-s.top),a},Tl),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=this.doc,r=M(t,e.line).text,n=e.ch,i=e.ch;if(r){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=r.length||!n?++i:--n;for(var l=r.charAt(n),s=x(l,o)?function(e){return x(e,o)}:/\s/.test(l)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!x(e)};n>0&&s(r.charAt(n-1));)--n;for(;i<r.length&&s(r.charAt(i));)++i}return new os(E(e.line,n),E(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?s(this.display.cursorDiv,"CodeMirror-overwrite"):vl(this.display.cursorDiv,"CodeMirror-overwrite"),We(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==l()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:hn(function(e,t){null==e&&null==t||en(this),null!=e&&(this.curOp.scrollLeft=e),null!=t&&(this.curOp.scrollTop=t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Ut(this)-this.display.barHeight,width:e.scrollWidth-Ut(this)-this.display.barWidth,clientHeight:Kt(this),clientWidth:Vt(this)}},scrollIntoView:hn(function(e,t){if(null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:E(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line)en(this),this.curOp.scrollToPos=e;else{var r=Zr(this,{left:Math.min(e.from.left,e.to.left),top:Math.min(e.from.top,e.to.top)-e.margin,right:Math.max(e.from.right,e.to.right),bottom:Math.max(e.from.bottom,e.to.bottom)+e.margin});this.scrollTo(r.scrollLeft,r.scrollTop)}}),setSize:hn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&nr(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){gn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,We(this,"refresh",this)}),operation:function(e){return cn(this,e)},refresh:hn(function(){var e=this.display.cachedTextHeight;pn(this),this.curOp.forceUpdate=!0,ir(this),this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop),Mn(this),(null==e||Math.abs(e-mr(this.display))>.5)&&Cr(this),We(this,"refresh",this)}),swapDoc:hn(function(e){var t=this.doc
35
+ ;return t.cm=null,Vn(this,e),ir(this),this.display.input.reset(),this.scrollTo(e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,St(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},Pe(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(ko);var Hs="iter insert remove copy getEditor constructor".split(" ");for(var Ps in ds.prototype)ds.prototype.hasOwnProperty(Ps)&&h(Hs,Ps)<0&&(ko.prototype[Ps]=function(e){return function(){return e.apply(this.doc,arguments)}}(ds.prototype[Ps]));return Pe(ds),ko.inputStyles={textarea:Ds,contenteditable:As},ko.defineMode=function(e){ko.defaults.mode||"null"==e||(ko.defaults.mode=e),Ke.apply(this,arguments)},ko.defineMIME=je,ko.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),ko.defineMIME("text/plain","null"),ko.defineExtension=function(e,t){ko.prototype[e]=t},ko.defineDocExtension=function(e,t){ds.prototype[e]=t},ko.fromTextArea=Ko,function(e){e.off=Oe,e.on=Pl,e.wheelEventPixels=Ur,e.Doc=ds,e.splitLines=Fl,e.countColumn=f,e.findColumn=d,e.isWordChar=w,e.Pass=Cl,e.signal=We,e.Line=Kl,e.changeEnd=Hn,e.scrollbarModel=ts,e.Pos=E,e.cmpPos=F,e.modes=Bl,e.mimeModes=Gl,e.resolveMode=Xe,e.getMode=Ye,e.modeExtensions=Ul,e.extendMode=_e,e.copyState=$e,e.startState=Ze,e.innerMode=qe,e.commands=Ss,e.keyMap=ws,e.keyName=Qi,e.isModifierKey=Zi,e.lookupKey=qi,e.normalizeKeyMap=$i,e.StringStream=Vl,e.SharedTextMarker=fs,e.TextMarker=cs,e.LineWidget=as,e.e_preventDefault=Ee,e.e_stopPropagation=Fe,e.e_stop=ze,e.addClass=s,e.contains=o,e.rmClass=vl,e.keyNames=vs}(ko),ko.version="5.25.0",ko});
36
+ },{}],16:[function(require,module,exports){
37
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,n,r,a,o){this.indented=e,this.column=t,this.type=n,this.info=r,this.align=a,this.prev=o}function n(e,n,r,a){var o=e.indented;return e.context&&"statement"==e.context.type&&"statement"!=r&&(o=e.context.indented),e.context=new t(o,n,r,a,null,e.context)}function r(e){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}function a(e,t,n){return"variable"==t.prevToken||"variable-3"==t.prevToken||(!!/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n))||(!(!t.typeAtEndOfLine||e.column()!=e.indentation())||void 0))}function o(e){for(;;){if(!e||"top"==e.type)return!0;if("}"==e.type&&"namespace"!=e.prev.info)return!1;e=e.prev}}function i(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}function l(e,t){return"function"==typeof e?e(t):e.propertyIsEnumerable(t)}function s(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if("\\"==n&&e.match(/^.$/)){r=s;break}if("/"==n&&e.match(/^\/[\/\*]/,!1))break;e.next()}return t.tokenize=r,"meta"}function c(e,t){return"variable-3"==t.prevToken&&"variable-3"}function u(e){return e.eatWhile(/[\w\.']/),"number"}function d(e,t){if(e.backUp(1),e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);return!!n&&(t.cpp11RawStringDelim=n[1],t.tokenize=m,m(e,t))}return e.match(/(u8|u|U|L)/)?!!e.match(/["']/,!1)&&"string":(e.next(),!1)}function f(e){var t=/(\w+)::(\w+)$/.exec(e);return t&&t[1]==t[2]}function p(e,t){for(var n;null!=(n=e.next());)if('"'==n&&!e.eat('"')){t.tokenize=null;break}return"string"}function m(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");return e.match(new RegExp(".*?\\)"+n+'"'))?t.tokenize=null:e.skipToEnd(),"string"}function h(t,n){function r(e){if(e)for(var t in e)e.hasOwnProperty(t)&&a.push(t)}"string"==typeof t&&(t=[t]);var a=[];r(n.keywords),r(n.types),r(n.builtin),r(n.atoms),a.length&&(n.helperType=t[0],e.registerHelper("hintWords",t[0],a));for(var o=0;o<t.length;++o)e.defineMIME(t[o],n)}function g(e,t){for(var n=!1;!e.eol();){if(!n&&e.match('"""')){t.tokenize=null;break}n="\\"==e.next()&&!n}return"string"}function y(e){return function(t,n){for(var r,a=!1,o=!1;!t.eol();){if(!e&&!a&&t.match('"')){o=!0;break}if(e&&t.match('"""')){o=!0;break}r=t.next(),!a&&"$"==r&&t.match("{")&&t.skipTo("}"),a=!a&&"\\"==r&&!e}return!o&&e||(n.tokenize=null),"string"}}function x(e){return function(t,n){for(var r,a=!1,o=!1;!t.eol();){if(!a&&t.match('"')&&("single"==e||t.match('""'))){o=!0;break}if(!a&&t.match("``")){w=x(e),o=!0;break}r=t.next(),a="single"==e&&!a&&"\\"==r}return o&&(n.tokenize=null),"string"}}e.defineMode("clike",function(i,s){function c(e,t){var n=e.next();if(S[n]){var r=S[n](e,t);if(r!==!1)return r}if('"'==n||"'"==n)return t.tokenize=u(n),t.tokenize(e,t);if(D.test(n))return p=n,null;if(L.test(n)){if(e.backUp(1),e.match(I))return"number";e.next()}if("/"==n){if(e.eat("*"))return t.tokenize=d,d(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(F.test(n)){for(;!e.match(/^\/[\/*]/,!1)&&e.eat(F););return"operator"}if(e.eatWhile(/[\w\$_\xa1-\uffff]/),P)for(;e.match(P);)e.eatWhile(/[\w\$_\xa1-\uffff]/);var a=e.current();return l(x,a)?(l(w,a)&&(p="newstatement"),l(v,a)&&(m=!0),"keyword"):l(b,a)?"variable-3":l(k,a)?(l(w,a)&&(p="newstatement"),"builtin"):l(_,a)?"atom":"variable"}function u(e){return function(t,n){for(var r,a=!1,o=!1;null!=(r=t.next());){if(r==e&&!a){o=!0;break}a=!a&&"\\"==r}return(o||!a&&!C)&&(n.tokenize=null),"string"}}function d(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=null;break}r="*"==n}return"comment"}function f(e,t){s.typeFirstDefinitions&&e.eol()&&o(t.context)&&(t.typeAtEndOfLine=a(e,t,e.pos))}var p,m,h=i.indentUnit,g=s.statementIndentUnit||h,y=s.dontAlignCalls,x=s.keywords||{},b=s.types||{},k=s.builtin||{},w=s.blockKeywords||{},v=s.defKeywords||{},_=s.atoms||{},S=s.hooks||{},C=s.multiLineStrings,T=s.indentStatements!==!1,M=s.indentSwitch!==!1,P=s.namespaceSeparator,D=s.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,L=s.numberStart||/[\d\.]/,I=s.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,F=s.isOperatorChar||/[+\-*&%=<>!?|\/]/;return{startState:function(e){return{tokenize:null,context:new t((e||0)-h,0,"top",null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(e,t){var i=t.context;if(e.sol()&&(null==i.align&&(i.align=!1),t.indented=e.indentation(),t.startOfLine=!0),e.eatSpace())return f(e,t),null;p=m=null;var l=(t.tokenize||c)(e,t);if("comment"==l||"meta"==l)return l;if(null==i.align&&(i.align=!0),";"==p||":"==p||","==p&&e.match(/^\s*(?:\/\/.*)?$/,!1))for(;"statement"==t.context.type;)r(t);else if("{"==p)n(t,e.column(),"}");else if("["==p)n(t,e.column(),"]");else if("("==p)n(t,e.column(),")");else if("}"==p){for(;"statement"==i.type;)i=r(t);for("}"==i.type&&(i=r(t));"statement"==i.type;)i=r(t)}else p==i.type?r(t):T&&(("}"==i.type||"top"==i.type)&&";"!=p||"statement"==i.type&&"newstatement"==p)&&n(t,e.column(),"statement",e.current());if("variable"==l&&("def"==t.prevToken||s.typeFirstDefinitions&&a(e,t,e.start)&&o(t.context)&&e.match(/^\s*\(/,!1))&&(l="def"),S.token){var u=S.token(e,t,l);void 0!==u&&(l=u)}return"def"==l&&s.styleDefs===!1&&(l="variable"),t.startOfLine=!1,t.prevToken=m?"def":l||p,f(e,t),l},indent:function(t,n){if(t.tokenize!=c&&null!=t.tokenize||t.typeAtEndOfLine)return e.Pass;var r=t.context,a=n&&n.charAt(0);if("statement"==r.type&&"}"==a&&(r=r.prev),s.dontIndentStatements)for(;"statement"==r.type&&s.dontIndentStatements.test(r.info);)r=r.prev;if(S.indent){var o=S.indent(t,r,n);if("number"==typeof o)return o}var i=a==r.type,l=r.prev&&"switch"==r.prev.info;if(s.allmanIndentation&&/[{(]/.test(a)){for(;"top"!=r.type&&"}"!=r.type;)r=r.prev;return r.indented}return"statement"==r.type?r.indented+("{"==a?0:g):!r.align||y&&")"==r.type?")"!=r.type||i?r.indented+(i?0:h)+(i||!l||/^(?:case|default)\b/.test(n)?0:h):r.indented+g:r.column+(i?0:1)},electricInput:M?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});var b="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile",k="int long char short double float unsigned signed void size_t ptrdiff_t";h(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:i(b),types:i(k+" bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t"),blockKeywords:i("case do else for if switch while struct"),defKeywords:i("struct"),typeFirstDefinitions:!0,atoms:i("null true false"),hooks:{"#":s,"*":c},modeProps:{fold:["brace","include"]}}),h(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:i(b+" asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override"),types:i(k+" bool wchar_t"),blockKeywords:i("catch class do else finally for if struct switch try while"),defKeywords:i("class namespace struct enum union"),typeFirstDefinitions:!0,atoms:i("true false null"),dontIndentStatements:/^template$/,hooks:{"#":s,"*":c,u:d,U:d,L:d,R:d,0:u,1:u,2:u,3:u,4:u,5:u,6:u,7:u,8:u,9:u,token:function(e,t,n){if("variable"==n&&"("==e.peek()&&(";"==t.prevToken||null==t.prevToken||"}"==t.prevToken)&&f(e.current()))return"def"}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}}),h("text/x-java",{name:"clike",keywords:i("abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface"),types:i("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:i("catch class do else finally for if switch try while"),defKeywords:i("class interface package enum @interface"),typeFirstDefinitions:!0,atoms:i("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(e){return!e.match("interface",!1)&&(e.eatWhile(/[\w\$_]/),"meta")}},modeProps:{fold:["brace","import"]}}),h("text/x-csharp",{name:"clike",keywords:i("abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),types:i("Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),blockKeywords:i("catch class do else finally for foreach if struct switch try while"),defKeywords:i("class interface namespace struct var"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"@":function(e,t){return e.eat('"')?(t.tokenize=p,p(e,t)):(e.eatWhile(/[\w\$_]/),"meta")}}}),h("text/x-scala",{name:"clike",keywords:i("abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble"),types:i("AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),multiLineStrings:!0,blockKeywords:i("catch class do else finally for forSome if match switch try while"),defKeywords:i("class def object package trait type val var"),atoms:i("true false null"),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return!!e.match('""')&&(t.tokenize=g,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},"=":function(e,n){var r=n.context;return!("}"!=r.type||!r.align||!e.eat(">"))&&(n.context=new t(r.indented,r.column,r.type,r.info,null,r.prev),"operator")}},modeProps:{closeBrackets:{triples:'"'}}}),h("text/x-kotlin",{name:"clike",keywords:i("package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend"),types:i("Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:i("catch class do else finally for if where try while enum"),defKeywords:i("class val var object package interface fun"),atoms:i("true false null this"),hooks:{'"':function(e,t){return t.tokenize=y(e.match('""')),t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}}),h(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:i("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:i("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:i("for while do if else struct"),builtin:i("radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4"),atoms:i("true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers"),indentSwitch:!1,hooks:{"#":s},modeProps:{fold:["brace","include"]}}),h("text/x-nesc",{name:"clike",keywords:i(b+"as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends"),types:i(k),blockKeywords:i("case do else for if switch while struct"),atoms:i("null true false"),hooks:{"#":s},modeProps:{fold:["brace","include"]}}),h("text/x-objectivec",{name:"clike",keywords:i(b+"inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly"),types:i(k),atoms:i("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(e){return e.eatWhile(/[\w\$]/),"keyword"},"#":s,indent:function(e,t,n){if("statement"==t.type&&/^@\w/.test(n))return t.indented}},modeProps:{fold:"brace"}}),h("text/x-squirrel",{name:"clike",keywords:i("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:i(k),blockKeywords:i("case catch class else for foreach if switch try while"),defKeywords:i("function local class"),typeFirstDefinitions:!0,atoms:i("true false null"),hooks:{"#":s},modeProps:{fold:["brace","include"]}});var w=null;h("text/x-ceylon",{name:"clike",keywords:i("abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while"),types:function(e){var t=e.charAt(0);return t===t.toUpperCase()&&t!==t.toLowerCase()},blockKeywords:i("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:i("class dynamic function interface module object package value"),builtin:i("abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable"),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:i("true false null larger smaller equal empty finished"),indentSwitch:!1,styleDefs:!1,hooks:{"@":function(e){return e.eatWhile(/[\w\$_]/),"meta"},'"':function(e,t){return t.tokenize=x(e.match('""')?"triple":"single"),t.tokenize(e,t)},"`":function(e,t){return!(!w||!e.match("`"))&&(t.tokenize=w,w=null,t.tokenize(e,t))},"'":function(e){return e.eatWhile(/[\w\$_\xa1-\uffff]/),"atom"},token:function(e,t,n){if(("variable"==n||"variable-3"==n)&&"."==t.prevToken)return"variable-2"}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});
38
+ },{"../../lib/codemirror":15}],17:[function(require,module,exports){
39
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},r=0;r<e.length;++r)t[e[r].toLowerCase()]=!0;return t}function r(e,t){for(var r,o=!1;null!=(r=e.next());){if(o&&"/"==r){t.tokenize=null;break}o="*"==r}return["comment","comment"]}e.defineMode("css",function(t,r){function o(e,t){return h=t,e}function a(e,t){var r=e.next();if(f[r]){var a=f[r](e,t);if(a!==!1)return a}return"@"==r?(e.eatWhile(/[\w\\\-]/),o("def",e.current())):"="==r||("~"==r||"|"==r)&&e.eat("=")?o(null,"compare"):'"'==r||"'"==r?(t.tokenize=i(r),t.tokenize(e,t)):"#"==r?(e.eatWhile(/[\w\\\-]/),o("atom","hash")):"!"==r?(e.match(/^\s*\w*/),o("keyword","important")):/\d/.test(r)||"."==r&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),o("number","unit")):"-"!==r?/[,+>*\/]/.test(r)?o(null,"select-op"):"."==r&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?o("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(r)?o(null,r):"u"==r&&e.match(/rl(-prefix)?\(/)||"d"==r&&e.match("omain(")||"r"==r&&e.match("egexp(")?(e.backUp(1),t.tokenize=n,o("property","word")):/[\w\\\-]/.test(r)?(e.eatWhile(/[\w\\\-]/),o("property","word")):o(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),o("number","unit")):e.match(/^-[\w\\\-]+/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?o("variable-2","variable-definition"):o("variable-2","variable")):e.match(/^\w+-/)?o("meta","meta"):void 0}function i(e){return function(t,r){for(var a,i=!1;null!=(a=t.next());){if(a==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==a}return(a==e||!i&&")"!=e)&&(r.tokenize=null),o("string","string")}}function n(e,t){return e.next(),e.match(/\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=i(")"),o(null,"(")}function l(e,t,r){this.type=e,this.indent=t,this.prev=r}function s(e,t,r,o){return e.context=new l(r,t.indentation()+(o===!1?0:b),e.context),r}function c(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function d(e,t,r){return _[r.context.type](e,t,r)}function p(e,t,r,o){for(var a=o||1;a>0;a--)r.context=r.context.prev;return d(e,t,r)}function u(e){var t=e.current().toLowerCase();g=K.hasOwnProperty(t)?"atom":j.hasOwnProperty(t)?"keyword":"variable"}var m=r.inline;r.propertyKeywords||(r=e.resolveMode("text/css"));var h,g,b=t.indentUnit,f=r.tokenHooks,y=r.documentTypes||{},w=r.mediaTypes||{},k=r.mediaFeatures||{},v=r.mediaValueKeywords||{},x=r.propertyKeywords||{},z=r.nonStandardPropertyKeywords||{},q=r.fontProperties||{},P=r.counterDescriptors||{},j=r.colorKeywords||{},K=r.valueKeywords||{},B=r.allowNested,C=r.lineComment,T=r.supportsAtComponent===!0,_={};return _.top=function(e,t,r){if("{"==e)return s(r,t,"block");if("}"==e&&r.context.prev)return c(r);if(T&&/@component/.test(e))return s(r,t,"atComponentBlock");if(/^@(-moz-)?document$/.test(e))return s(r,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/.test(e))return s(r,t,"atBlock");if(/^@(font-face|counter-style)/.test(e))return r.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return s(r,t,"at");if("hash"==e)g="builtin";else if("word"==e)g="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return s(r,t,"interpolation");if(":"==e)return"pseudo";if(B&&"("==e)return s(r,t,"parens")}return r.context.type},_.block=function(e,t,r){if("word"==e){var o=t.current().toLowerCase();return x.hasOwnProperty(o)?(g="property","maybeprop"):z.hasOwnProperty(o)?(g="string-2","maybeprop"):B?(g=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(g+=" error","maybeprop")}return"meta"==e?"block":B||"hash"!=e&&"qualifier"!=e?_.top(e,t,r):(g="error","block")},_.maybeprop=function(e,t,r){return":"==e?s(r,t,"prop"):d(e,t,r)},_.prop=function(e,t,r){if(";"==e)return c(r);if("{"==e&&B)return s(r,t,"propBlock");if("}"==e||"{"==e)return p(e,t,r);if("("==e)return s(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)u(t);else if("interpolation"==e)return s(r,t,"interpolation")}else g+=" error";return"prop"},_.propBlock=function(e,t,r){return"}"==e?c(r):"word"==e?(g="property","maybeprop"):r.context.type},_.parens=function(e,t,r){return"{"==e||"}"==e?p(e,t,r):")"==e?c(r):"("==e?s(r,t,"parens"):"interpolation"==e?s(r,t,"interpolation"):("word"==e&&u(t),"parens")},_.pseudo=function(e,t,r){return"meta"==e?"pseudo":"word"==e?(g="variable-3",r.context.type):d(e,t,r)},_.documentTypes=function(e,t,r){return"word"==e&&y.hasOwnProperty(t.current())?(g="tag",r.context.type):_.atBlock(e,t,r)},_.atBlock=function(e,t,r){if("("==e)return s(r,t,"atBlock_parens");if("}"==e||";"==e)return p(e,t,r);if("{"==e)return c(r)&&s(r,t,B?"block":"top");if("interpolation"==e)return s(r,t,"interpolation");if("word"==e){var o=t.current().toLowerCase();g="only"==o||"not"==o||"and"==o||"or"==o?"keyword":w.hasOwnProperty(o)?"attribute":k.hasOwnProperty(o)?"property":v.hasOwnProperty(o)?"keyword":x.hasOwnProperty(o)?"property":z.hasOwnProperty(o)?"string-2":K.hasOwnProperty(o)?"atom":j.hasOwnProperty(o)?"keyword":"error"}return r.context.type},_.atComponentBlock=function(e,t,r){return"}"==e?p(e,t,r):"{"==e?c(r)&&s(r,t,B?"block":"top",!1):("word"==e&&(g="error"),r.context.type)},_.atBlock_parens=function(e,t,r){return")"==e?c(r):"{"==e||"}"==e?p(e,t,r,2):_.atBlock(e,t,r)},_.restricted_atBlock_before=function(e,t,r){return"{"==e?s(r,t,"restricted_atBlock"):"word"==e&&"@counter-style"==r.stateArg?(g="variable","restricted_atBlock_before"):d(e,t,r)},_.restricted_atBlock=function(e,t,r){return"}"==e?(r.stateArg=null,c(r)):"word"==e?(g="@font-face"==r.stateArg&&!q.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==r.stateArg&&!P.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},_.keyframes=function(e,t,r){return"word"==e?(g="variable","keyframes"):"{"==e?s(r,t,"top"):d(e,t,r)},_.at=function(e,t,r){return";"==e?c(r):"{"==e||"}"==e?p(e,t,r):("word"==e?g="tag":"hash"==e&&(g="builtin"),"at")},_.interpolation=function(e,t,r){return"}"==e?c(r):"{"==e||";"==e?p(e,t,r):("word"==e?g="variable":"variable"!=e&&"("!=e&&")"!=e&&(g="error"),"interpolation")},{startState:function(e){return{tokenize:null,state:m?"block":"top",stateArg:null,context:new l(m?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||a)(e,t);return r&&"object"==typeof r&&(h=r[1],r=r[0]),g=r,t.state=_[t.state](h,e,t),g},indent:function(e,t){var r=e.context,o=t&&t.charAt(0),a=r.indent;return"prop"!=r.type||"}"!=o&&")"!=o||(r=r.prev),r.prev&&("}"!=o||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"restricted_atBlock"!=r.type?(")"!=o||"parens"!=r.type&&"atBlock_parens"!=r.type)&&("{"!=o||"at"!=r.type&&"atBlock"!=r.type)||(a=Math.max(0,r.indent-b),r=r.prev):(r=r.prev,a=r.indent)),a},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:C,fold:"brace"}});var o=["domain","regexp","url","url-prefix"],a=t(o),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],n=t(i),l=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],s=t(l),c=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],d=t(c),p=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],u=t(p),m=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],h=t(m),g=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],b=t(g),f=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],y=t(f),w=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=t(w),v=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","spell-out","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],x=t(v),z=o.concat(i).concat(l).concat(c).concat(p).concat(m).concat(w).concat(v);e.registerHelper("hintWords","css",z),e.defineMIME("text/css",{documentTypes:a,mediaTypes:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:b,counterDescriptors:y,colorKeywords:k,valueKeywords:x,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:k,valueKeywords:x,fontProperties:b,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},":":function(e){return!!e.match(/\s*\{/)&&[null,"{"]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:n,mediaFeatures:s,mediaValueKeywords:d,propertyKeywords:u,nonStandardPropertyKeywords:h,colorKeywords:k,valueKeywords:x,fontProperties:b,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=r,r(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:n,mediaFeatures:s,propertyKeywords:u,nonStandardPropertyKeywords:h,fontProperties:b,counterDescriptors:y,colorKeywords:k,valueKeywords:x,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=r,r(e,t))}},name:"css",helperType:"gss"})});
40
+ },{"../../lib/codemirror":15}],18:[function(require,module,exports){
41
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("go",function(e){function t(e,t){var i=e.next();if('"'==i||"'"==i||"`"==i)return t.tokenize=n(i),t.tokenize(e,t);if(/[\d\.]/.test(i))return"."==i?e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==i?e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/):e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(i))return c=i,null;if("/"==i){if(e.eat("*"))return t.tokenize=r,r(e,t);if(e.eat("/"))return e.skipToEnd(),"comment"}if(d.test(i))return e.eatWhile(d),"operator";e.eatWhile(/[\w\$_\xa1-\uffff]/);var o=e.current();return l.propertyIsEnumerable(o)?("case"!=o&&"default"!=o||(c="case"),"keyword"):f.propertyIsEnumerable(o)?"atom":"variable"}function n(e){return function(n,r){for(var i,o=!1,a=!1;null!=(i=n.next());){if(i==e&&!o){a=!0;break}o=!o&&"`"!=e&&"\\"==i}return(a||!o&&"`"!=e)&&(r.tokenize=t),"string"}}function r(e,n){for(var r,i=!1;r=e.next();){if("/"==r&&i){n.tokenize=t;break}i="*"==r}return"comment"}function i(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function o(e,t,n){return e.context=new i(e.indented,t,n,null,e.context)}function a(e){if(e.context.prev){var t=e.context.type;return")"!=t&&"]"!=t&&"}"!=t||(e.indented=e.context.indented),e.context=e.context.prev}}var c,u=e.indentUnit,l={break:!0,case:!0,chan:!0,const:!0,continue:!0,default:!0,defer:!0,else:!0,fallthrough:!0,for:!0,func:!0,go:!0,goto:!0,if:!0,import:!0,interface:!0,map:!0,package:!0,range:!0,return:!0,select:!0,struct:!0,switch:!0,type:!0,var:!0,bool:!0,byte:!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,int:!0,uint:!0,uintptr:!0,error:!0,rune:!0},f={true:!0,false:!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,delete:!0,imag:!0,len:!0,make:!0,new:!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},d=/[+\-*&^%:=<>!|\/]/;return{startState:function(e){return{tokenize:null,context:new i((e||0)-u,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,n){var r=n.context;if(e.sol()&&(null==r.align&&(r.align=!1),n.indented=e.indentation(),n.startOfLine=!0,"case"==r.type&&(r.type="}")),e.eatSpace())return null;c=null;var i=(n.tokenize||t)(e,n);return"comment"==i?i:(null==r.align&&(r.align=!0),"{"==c?o(n,e.column(),"}"):"["==c?o(n,e.column(),"]"):"("==c?o(n,e.column(),")"):"case"==c?r.type="case":"}"==c&&"}"==r.type?r=a(n):c==r.type&&a(n),n.startOfLine=!1,i)},indent:function(e,n){if(e.tokenize!=t&&null!=e.tokenize)return 0;var r=e.context,i=n&&n.charAt(0);if("case"==r.type&&/^(?:case|default)\b/.test(n))return e.context.type="}",r.indented;var o=i==r.type;return r.align?r.column+(o?0:1):r.indented+(o?0:u)},electricChars:"{}):",closeBrackets:"()[]{}''\"\"``",fold:"brace",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}}),e.defineMIME("text/x-go","go")});
42
+ },{"../../lib/codemirror":15}],19:[function(require,module,exports){
43
+ !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],t):t(CodeMirror)}(function(t){"use strict";function e(t,e,a){var n=t.current(),l=n.search(e);return l>-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}function a(t){var e=i[t];return e?e:i[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function n(t,e){var n=t.match(a(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function l(t,e){return new RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function r(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],r=l.length-1;r>=0;r--)n.unshift(l[r])}function o(t,e){for(var a=0;a<t.length;a++){var l=t[a];if(!l[0]||l[1].test(n(e,l[0])))return l[2]}}var c={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},i={};t.defineMode("htmlmixed",function(a,n){function i(n,r){var c,m=s.token(n,r.htmlState),d=/\btag\b/.test(m);if(d&&!/[<>\s\/]/.test(n.current())&&(c=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&u.hasOwnProperty(c))r.inTag=c+" ";else if(r.inTag&&d&&/>$/.test(n.current())){var f=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var p=">"==n.current()&&o(u[f[1]],f[2]),g=t.getMode(a,p),h=l(f[1],!0),S=l(f[1],!1);r.token=function(t,a){return t.match(h,!1)?(a.token=i,a.localState=a.localMode=null,null):e(t,S,a.localMode.token(t,a.localState))},r.localMode=g,r.localState=t.startState(g,s.indent(r.htmlState,""))}else r.inTag&&(r.inTag+=n.current(),n.eol()&&(r.inTag+=" "));return m}var s=t.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag}),u={},m=n&&n.tags,d=n&&n.scriptTypes;if(r(c,u),m&&r(m,u),d)for(var f=d.length-1;f>=0;f--)u.script.unshift(["type",d[f].matches,d[f].mode]);return{startState:function(){return{token:i,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a){return!e.localMode||/^\s*<\//.test(a)?s.indent(e.htmlState,a):e.localMode.indent?e.localMode.indent(e.localState,a):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")});
44
+ },{"../../lib/codemirror":15,"../css/css":17,"../javascript/javascript":20,"../xml/xml":27}],20:[function(require,module,exports){
45
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e,t,r){return/^(?:operator|sof|keyword c|case|new|export|default|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(r||0)))}e.defineMode("javascript",function(r,n){function a(e){for(var t,r=!1,n=!1;null!=(t=e.next());){if(!r){if("/"==t&&!n)return;"["==t?n=!0:n&&"]"==t&&(n=!1)}r=!r&&"\\"==t}}function i(e,t,r){return Ve=e,Ee=r,t}function o(e,r){var n=e.next();if('"'==n||"'"==n)return r.tokenize=c(n),r.tokenize(e,r);if("."==n&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return i("number","number");if("."==n&&e.match(".."))return i("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(n))return i(n);if("="==n&&e.eat(">"))return i("=>","operator");if("0"==n&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),i("number","number");if("0"==n&&e.eat(/o/i))return e.eatWhile(/[0-7]/i),i("number","number");if("0"==n&&e.eat(/b/i))return e.eatWhile(/[01]/i),i("number","number");if(/\d/.test(n))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),i("number","number");if("/"==n)return e.eat("*")?(r.tokenize=u,u(e,r)):e.eat("/")?(e.skipToEnd(),i("comment","comment")):t(e,r,1)?(a(e),e.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/),i("regexp","string-2")):(e.eatWhile(Oe),i("operator","operator",e.current()));if("`"==n)return r.tokenize=l,l(e,r);if("#"==n)return e.skipToEnd(),i("error","error");if(Oe.test(n))return">"==n&&r.lexical&&">"==r.lexical.type||e.eatWhile(Oe),i("operator","operator",e.current());if(qe.test(n)){e.eatWhile(qe);var o=e.current(),s=Ce.propertyIsEnumerable(o)&&Ce[o];return s&&"."!=r.lastType?i(s.type,s.style,o):i("variable","variable",o)}}function c(e){return function(t,r){var n,a=!1;if(Ae&&"@"==t.peek()&&t.match(We))return r.tokenize=o,i("jsonld-keyword","meta");for(;null!=(n=t.next())&&(n!=e||a);)a=!a&&"\\"==n;return a||(r.tokenize=o),i("string","string")}}function u(e,t){for(var r,n=!1;r=e.next();){if("/"==r&&n){t.tokenize=o;break}n="*"==r}return i("comment","comment")}function l(e,t){for(var r,n=!1;null!=(r=e.next());){if(!n&&("`"==r||"$"==r&&e.eat("{"))){t.tokenize=o;break}n=!n&&"\\"==r}return i("quasi","string-2",e.current())}function s(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(r<0)){if($e){var n=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,r));n&&(r=n.index)}for(var a=0,i=!1,o=r-1;o>=0;--o){var c=e.string.charAt(o),u=Pe.indexOf(c);if(u>=0&&u<3){if(!a){++o;break}if(0==--a){"("==c&&(i=!0);break}}else if(u>=3&&u<6)++a;else if(qe.test(c))i=!0;else{if(/["'\/]/.test(c))return;if(i&&!a){++o;break}}}i&&!a&&(t.fatArrowAt=o)}}function f(e,t,r,n,a,i){this.indented=e,this.column=t,this.type=r,this.prev=a,this.info=i,null!=n&&(this.align=n)}function d(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function p(e,t,r,n,a){var i=e.cc;for(Ne.state=e,Ne.stream=a,Ne.marked=null,Ne.cc=i,Ne.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){if((i.length?i.pop():Te?j:g)(r,n)){for(;i.length&&i[i.length-1].lex;)i.pop()();return Ne.marked?Ne.marked:"variable"==r&&d(e,n)?"variable-2":t}}}function m(){for(var e=arguments.length-1;e>=0;e--)Ne.cc.push(arguments[e])}function v(){return m.apply(null,arguments),!0}function y(e){function t(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var r=Ne.state;if(Ne.marked="def",r.context){if(t(r.localVars))return;r.localVars={name:e,next:r.localVars}}else{if(t(r.globalVars))return;n.globalVars&&(r.globalVars={name:e,next:r.globalVars})}}function k(){Ne.state.context={prev:Ne.state.context,vars:Ne.state.localVars},Ne.state.localVars=Be}function b(){Ne.state.localVars=Ne.state.context.vars,Ne.state.context=Ne.state.context.prev}function x(e,t){var r=function(){var r=Ne.state,n=r.indented;if("stat"==r.lexical.type)n=r.lexical.indented;else for(var a=r.lexical;a&&")"==a.type&&a.align;a=a.prev)n=a.indented;r.lexical=new f(n,Ne.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function h(){var e=Ne.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function w(e){function t(r){return r==e?v():";"==e?m():v(t)}return t}function g(e,t){return"var"==e?v(x("vardef",t.length),Z,w(";"),h):"keyword a"==e?v(x("form"),V,g,h):"keyword b"==e?v(x("form"),g,h):"{"==e?v(x("}"),J,h):";"==e?v():"if"==e?("else"==Ne.state.lexical.info&&Ne.state.cc[Ne.state.cc.length-1]==h&&Ne.state.cc.pop()(),v(x("form"),V,g,h,ne)):"function"==e?v(le):"for"==e?v(x("form"),ae,g,h):"variable"==e?v(x("stat"),N):"switch"==e?v(x("form"),V,x("}","switch"),w("{"),J,h,h):"case"==e?v(j,w(":")):"default"==e?v(w(":")):"catch"==e?v(x("form"),k,w("("),se,w(")"),g,h,b):"class"==e?v(x("form"),de,h):"export"==e?v(x("stat"),ye,h):"import"==e?v(x("stat"),be,h):"module"==e?v(x("form"),_,x("}"),w("{"),J,h,h):"type"==e?v(L,w("operator"),L,w(";")):"async"==e?v(g):m(x("stat"),j,w(";"),h)}function j(e){return E(e,!1)}function M(e){return E(e,!0)}function V(e){return"("!=e?m():v(x(")"),j,w(")"),h)}function E(e,t){if(Ne.state.fatArrowAt==Ne.stream.start){var r=t?O:C;if("("==e)return v(k,x(")"),F(_,")"),h,w("=>"),r,b);if("variable"==e)return m(k,_,w("=>"),r,b)}var n=t?T:A;return Se.hasOwnProperty(e)?v(n):"function"==e?v(le,n):"class"==e?v(x("form"),fe,h):"keyword c"==e||"async"==e?v(t?z:I):"("==e?v(x(")"),I,w(")"),h,n):"operator"==e||"spread"==e?v(t?M:j):"["==e?v(x("]"),je,h,n):"{"==e?G(H,"}",null,n):"quasi"==e?m($,n):"new"==e?v(W(t)):v()}function I(e){return e.match(/[;\}\)\],]/)?m():m(j)}function z(e){return e.match(/[;\}\)\],]/)?m():m(M)}function A(e,t){return","==e?v(j):T(e,t,!1)}function T(e,t,r){var n=0==r?A:T,a=0==r?j:M;return"=>"==e?v(k,r?O:C,b):"operator"==e?/\+\+|--/.test(t)?v(n):"?"==t?v(j,w(":"),a):v(a):"quasi"==e?m($,n):";"!=e?"("==e?G(M,")","call",n):"."==e?v(B,n):"["==e?v(x("]"),I,w("]"),h,n):void 0:void 0}function $(e,t){return"quasi"!=e?m():"${"!=t.slice(t.length-2)?v($):v(j,q)}function q(e){if("}"==e)return Ne.marked="string-2",Ne.state.tokenize=l,v($)}function C(e){return s(Ne.stream,Ne.state),m("{"==e?g:j)}function O(e){return s(Ne.stream,Ne.state),m("{"==e?g:M)}function W(e){return function(t){return"."==t?v(e?S:P):m(e?M:j)}}function P(e,t){if("target"==t)return Ne.marked="keyword",v(A)}function S(e,t){if("target"==t)return Ne.marked="keyword",v(T)}function N(e){return":"==e?v(h,g):m(A,w(";"),h)}function B(e){if("variable"==e)return Ne.marked="property",v()}function H(e,t){return"async"==e?(Ne.marked="property",v(H)):"variable"==e||"keyword"==Ne.style?(Ne.marked="property",v("get"==t||"set"==t?U:D)):"number"==e||"string"==e?(Ne.marked=Ae?"property":Ne.style+" property",v(D)):"jsonld-keyword"==e?v(D):"modifier"==e?v(H):"["==e?v(j,w("]"),D):"spread"==e?v(j):":"==e?m(D):void 0}function U(e){return"variable"!=e?m(D):(Ne.marked="property",v(le))}function D(e){return":"==e?v(M):"("==e?m(le):void 0}function F(e,t,r){function n(a,i){if(r?r.indexOf(a)>-1:","==a){var o=Ne.state.lexical;return"call"==o.info&&(o.pos=(o.pos||0)+1),v(function(r,n){return r==t||n==t?m():m(e)},n)}return a==t||i==t?v():v(w(t))}return function(r,a){return r==t||a==t?v():m(e,n)}}function G(e,t,r){for(var n=3;n<arguments.length;n++)Ne.cc.push(arguments[n]);return v(x(t,r),F(e,t),h)}function J(e){return"}"==e?v():m(g,J)}function K(e,t){if($e){if(":"==e)return v(L);if("?"==t)return v(K)}}function L(e){return"variable"==e?(Ne.marked="variable-3",v(Y)):"string"==e||"number"==e||"atom"==e?v(Y):"{"==e?v(x("}"),F(R,"}",",;"),h):"("==e?v(F(X,")"),Q):void 0}function Q(e){if("=>"==e)return v(L)}function R(e,t){return"variable"==e||"keyword"==Ne.style?(Ne.marked="property",v(R)):"?"==t?v(R):":"==e?v(L):void 0}function X(e){return"variable"==e?v(X):":"==e?v(L):void 0}function Y(e,t){return"<"==t?v(x(">"),F(L,">"),h,Y):"|"==t||"."==e?v(L):"["==e?v(w("]"),Y):void 0}function Z(){return m(_,K,te,re)}function _(e,t){return"modifier"==e?v(_):"variable"==e?(y(t),v()):"spread"==e?v(_):"["==e?G(_,"]"):"{"==e?G(ee,"}"):void 0}function ee(e,t){return"variable"!=e||Ne.stream.match(/^\s*:/,!1)?("variable"==e&&(Ne.marked="property"),"spread"==e?v(_):"}"==e?m():v(w(":"),_,te)):(y(t),v(te))}function te(e,t){if("="==t)return v(M)}function re(e){if(","==e)return v(Z)}function ne(e,t){if("keyword b"==e&&"else"==t)return v(x("form","else"),g,h)}function ae(e){if("("==e)return v(x(")"),ie,w(")"),h)}function ie(e){return"var"==e?v(Z,w(";"),ce):";"==e?v(ce):"variable"==e?v(oe):m(j,w(";"),ce)}function oe(e,t){return"in"==t||"of"==t?(Ne.marked="keyword",v(j)):v(A,ce)}function ce(e,t){return";"==e?v(ue):"in"==t||"of"==t?(Ne.marked="keyword",v(j)):m(j,w(";"),ue)}function ue(e){")"!=e&&v(j)}function le(e,t){return"*"==t?(Ne.marked="keyword",v(le)):"variable"==e?(y(t),v(le)):"("==e?v(k,x(")"),F(se,")"),h,K,g,b):void 0}function se(e){return"spread"==e?v(se):m(_,K,te)}function fe(e,t){return"variable"==e?de(e,t):pe(e,t)}function de(e,t){if("variable"==e)return y(t),v(pe)}function pe(e,t){return"<"==t?v(x(">"),F(L,">"),h,pe):"extends"==t||"implements"==t||$e&&","==e?v($e?L:j,pe):"{"==e?v(x("}"),me,h):void 0}function me(e,t){return"variable"==e||"keyword"==Ne.style?("async"==t||"static"==t||"get"==t||"set"==t||$e&&("public"==t||"private"==t||"protected"==t||"readonly"==t||"abstract"==t))&&Ne.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(Ne.marked="keyword",v(me)):(Ne.marked="property",v($e?ve:le,me)):"["==e?v(j,w("]"),$e?ve:le,me):"*"==t?(Ne.marked="keyword",v(me)):";"==e?v(me):"}"==e?v():void 0}function ve(e,t){return"?"==t?v(ve):":"==e?v(L,te):"="==t?v(M):m(le)}function ye(e,t){return"*"==t?(Ne.marked="keyword",v(ge,w(";"))):"default"==t?(Ne.marked="keyword",v(j,w(";"))):"{"==e?v(F(ke,"}"),ge,w(";")):m(g)}function ke(e,t){return"as"==t?(Ne.marked="keyword",v(w("variable"))):"variable"==e?m(M,ke):void 0}function be(e){return"string"==e?v():m(xe,he,ge)}function xe(e,t){return"{"==e?G(xe,"}"):("variable"==e&&y(t),"*"==t&&(Ne.marked="keyword"),v(we))}function he(e){if(","==e)return v(xe,he)}function we(e,t){if("as"==t)return Ne.marked="keyword",v(xe)}function ge(e,t){if("from"==t)return Ne.marked="keyword",v(j)}function je(e){return"]"==e?v():m(F(M,"]"))}function Me(e,t){return"operator"==e.lastType||","==e.lastType||Oe.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}var Ve,Ee,Ie=r.indentUnit,ze=n.statementIndent,Ae=n.jsonld,Te=n.json||Ae,$e=n.typescript,qe=n.wordCharacters||/[\w$\xa1-\uffff]/,Ce=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),a=e("operator"),i={type:"atom",style:"atom"},o={if:e("if"),while:t,with:t,else:r,do:r,try:r,finally:r,return:n,break:n,continue:n,new:e("new"),delete:n,throw:n,debugger:n,var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:a,typeof:a,instanceof:a,true:i,false:i,null:i,undefined:i,NaN:i,Infinity:i,this:e("this"),class:e("class"),super:e("atom"),yield:n,export:e("export"),import:e("import"),extends:n,await:n,async:e("async")};if($e){var c={type:"variable",style:"variable-3"},u={interface:e("class"),implements:n,namespace:n,module:e("module"),enum:e("module"),type:e("type"),public:e("modifier"),private:e("modifier"),protected:e("modifier"),abstract:e("modifier"),as:a,string:c,number:c,boolean:c,any:c};for(var l in u)o[l]=u[l]}return o}(),Oe=/[+\-*&%=<>!?|~^]/,We=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/,Pe="([{}])",Se={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,"jsonld-keyword":!0},Ne={state:null,column:null,marked:null,cc:null},Be={name:"this",next:{name:"arguments"}};return h.lex=!0,{startState:function(e){var t={tokenize:o,lastType:"sof",cc:[],lexical:new f((e||0)-Ie,0,"block",!1),localVars:n.localVars,context:n.localVars&&{vars:n.localVars},indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),s(e,t)),t.tokenize!=u&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==Ve?r:(t.lastType="operator"!=Ve||"++"!=Ee&&"--"!=Ee?Ve:"incdec",p(t,r,Ve,Ee,e))},indent:function(t,r){if(t.tokenize==u)return e.Pass;if(t.tokenize!=o)return 0;var a,i=r&&r.charAt(0),c=t.lexical;if(!/^\s*else\b/.test(r))for(var l=t.cc.length-1;l>=0;--l){var s=t.cc[l];if(s==h)c=c.prev;else if(s!=ne)break}for(;("stat"==c.type||"form"==c.type)&&("}"==i||(a=t.cc[t.cc.length-1])&&(a==A||a==T)&&!/^[,\.=+\-*:?[\(]/.test(r));)c=c.prev;ze&&")"==c.type&&"stat"==c.prev.type&&(c=c.prev);var f=c.type,d=i==f;return"vardef"==f?c.indented+("operator"==t.lastType||","==t.lastType?c.info+1:0):"form"==f&&"{"==i?c.indented:"form"==f?c.indented+Ie:"stat"==f?c.indented+(Me(t,r)?ze||Ie:0):"switch"!=c.info||d||0==n.doubleIndentSwitch?c.align?c.column+(d?0:1):c.indented+(d?0:Ie):c.indented+(/^(?:case|default)\b/.test(r)?Ie:2*Ie)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:Te?null:"/*",blockCommentEnd:Te?null:"*/",lineComment:Te?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:Te?"json":"javascript",jsonldMode:Ae,jsonMode:Te,expressionAllowed:t,skipExpression:function(e){var t=e.cc[e.cc.length-1];t!=j&&t!=M||e.cc.pop()}}}),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})});
46
+ },{"../../lib/codemirror":15}],21:[function(require,module,exports){
47
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],e):e(CodeMirror)}(function(e){"use strict";function t(e){for(var t={},_=e.split(" "),r=0;r<_.length;++r)t[_[r]]=!0;return t}function _(e,t,s){return 0==e.length?r(t):function(i,l){for(var n=e[0],a=0;a<n.length;a++)if(i.match(n[a][0]))return l.tokenize=_(e.slice(1),t),n[a][1];return l.tokenize=r(t,s),"string"}}function r(e,t){return function(_,r){return s(_,r,e,t)}}function s(e,t,r,s){if(s!==!1&&e.match("${",!1)||e.match("{$",!1))return t.tokenize=null,"string";if(s!==!1&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/))return e.match("[",!1)&&(t.tokenize=_([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],r,s)),e.match(/\-\>\w/,!1)&&(t.tokenize=_([[["->",null]],[[/[\w]+/,"variable"]]],r,s)),"variable-2";for(var i=!1;!e.eol()&&(i||s===!1||!e.match("{$",!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1));){if(!i&&e.match(r)){t.tokenize=null,t.tokStack.pop(),t.tokStack.pop();break}i="\\"==e.next()&&!i}return"string"}var i="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally",l="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__",n="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents file_put_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists array_intersect_key array_combine array_column pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once json_decode json_encode json_last_error json_last_error_msg curl_close curl_copy_handle curl_errno curl_error curl_escape curl_exec curl_file_create curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_multi_setopt curl_multi_strerror curl_pause curl_reset curl_setopt_array curl_setopt curl_share_close curl_share_init curl_share_setopt curl_strerror curl_unescape curl_version mysqli_affected_rows mysqli_autocommit mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect_errno mysqli_connect_error mysqli_connect mysqli_data_seek mysqli_debug mysqli_dump_debug_info mysqli_errno mysqli_error_list mysqli_error mysqli_fetch_all mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_charset mysqli_get_client_info mysqli_get_client_stats mysqli_get_client_version mysqli_get_connection_stats mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_more_results mysqli_multi_query mysqli_next_result mysqli_num_fields mysqli_num_rows mysqli_options mysqli_ping mysqli_prepare mysqli_query mysqli_real_connect mysqli_real_escape_string mysqli_real_query mysqli_reap_async_query mysqli_refresh mysqli_rollback mysqli_select_db mysqli_set_charset mysqli_set_local_infile_default mysqli_set_local_infile_handler mysqli_sqlstate mysqli_ssl_set mysqli_stat mysqli_stmt_init mysqli_store_result mysqli_thread_id mysqli_thread_safe mysqli_use_result mysqli_warning_count";e.registerHelper("hintWords","php",[i,l,n].join(" ").split(" ")),e.registerHelper("wordChars","php",/[\w$]/);var a={name:"clike",helperType:"php",keywords:t(i),blockKeywords:t("catch do else elseif for foreach if switch try while finally"),defKeywords:t("class function interface namespace trait"),atoms:t(l),builtin:t(n),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"},"<":function(e,t){var _;if(_=e.match(/<<\s*/)){var s=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(_[0].length+(s?2:1));if(s&&e.eat(s),i)return(t.tokStack||(t.tokStack=[])).push(i,0),t.tokenize=r(i,"'"!=s),"string"}return!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1},'"':function(e,t){return(t.tokStack||(t.tokStack=[])).push('"',0),t.tokenize=r('"'),"string"},"{":function(e,t){return t.tokStack&&t.tokStack.length&&t.tokStack[t.tokStack.length-1]++,!1},"}":function(e,t){return t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]&&(t.tokenize=r(t.tokStack[t.tokStack.length-2])),!1}}};e.defineMode("php",function(t,_){function r(t,_){var r=_.curMode==i;if(t.sol()&&_.pending&&'"'!=_.pending&&"'"!=_.pending&&(_.pending=null),r)return r&&null==_.php.tokenize&&t.match("?>")?(_.curMode=s,_.curState=_.html,_.php.context.prev||(_.php=null),"meta"):i.token(t,_.curState);if(t.match(/^<\?\w*/))return _.curMode=i,_.php||(_.php=e.startState(i,s.indent(_.html,""))),_.curState=_.php,"meta";if('"'==_.pending||"'"==_.pending){for(;!t.eol()&&t.next()!=_.pending;);var l="string"}else if(_.pending&&t.pos<_.pending.end){t.pos=_.pending.end;var l=_.pending.style}else var l=s.token(t,_.curState);_.pending&&(_.pending=null);var n,a=t.current(),o=a.search(/<\?/);return o!=-1&&("string"==l&&(n=a.match(/[\'\"]$/))&&!/\?>/.test(a)?_.pending=n[0]:_.pending={end:t.pos,style:l},t.backUp(a.length-o)),l}var s=e.getMode(t,"text/html"),i=e.getMode(t,a);return{startState:function(){var t=e.startState(s),r=_.startOpen?e.startState(i):null;return{html:t,php:r,curMode:_.startOpen?i:s,curState:_.startOpen?r:t,pending:null}},copyState:function(t){var _,r=t.html,l=e.copyState(s,r),n=t.php,a=n&&e.copyState(i,n);return _=t.curMode==s?l:a,{html:l,php:a,curMode:t.curMode,curState:_,pending:t.pending}},token:r,indent:function(e,t){return e.curMode!=i&&/^\s*<\//.test(t)||e.curMode==i&&/^\?>/.test(t)?s.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),e.defineMIME("application/x-httpd-php","php"),e.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),e.defineMIME("text/x-php",a)});
48
+ },{"../../lib/codemirror":15,"../clike/clike":16,"../htmlmixed/htmlmixed":19}],22:[function(require,module,exports){
49
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";function t(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}function n(e){return e.scopes[e.scopes.length-1]}var r=t(["and","or","not","is"]),i=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield","in"],o=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"];e.registerHelper("hintWords","python",i.concat(o)),e.defineMode("python",function(a,s){function l(e,t){if(e.sol()&&(t.indent=e.indentation()),e.sol()&&"py"==n(t).type){var r=n(t).offset;if(e.eatSpace()){var i=e.indentation();return i>r?p(t):i<r&&d(e,t)&&"#"!=e.peek()&&(t.errorToken=!0),null}var o=c(e,t);return r>0&&d(e,t)&&(o+=" "+h),o}return c(e,t)}function c(e,t){if(e.eatSpace())return null;if("#"==e.peek())return e.skipToEnd(),"comment";if(e.match(/^[0-9\.]/,!1)){var n=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),e.match(/^[\d_]+\.\d*/)&&(n=!0),e.match(/^\.\d+/)&&(n=!0),n)return e.eat(/J/i),"number";var i=!1;if(e.match(/^0x[0-9a-f_]+/i)&&(i=!0),e.match(/^0b[01_]+/i)&&(i=!0),e.match(/^0o[0-7_]+/i)&&(i=!0),e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)&&(e.eat(/J/i),i=!0),e.match(/^0(?![\dx])/i)&&(i=!0),i)return e.eat(/L/i),"number"}return e.match(E)?(t.tokenize=u(e.current()),t.tokenize(e,t)):e.match(v)||e.match(g)?"punctuation":e.match(y)||e.match(z)?"operator":e.match(b)?"punctuation":"."==t.lastToken&&e.match(F)?"property":e.match(T)||e.match(r)?"keyword":e.match(O)?"builtin":e.match(/^(self|cls)\b/)?"variable-2":e.match(F)?"def"==t.lastToken||"class"==t.lastToken?"def":"variable":(e.next(),h)}function u(e){function t(t,i){for(;!t.eol();)if(t.eatWhile(/[^'"\\]/),t.eat("\\")){if(t.next(),n&&t.eol())return r}else{if(t.match(e))return i.tokenize=l,r;t.eat(/['"]/)}if(n){if(s.singleLineStringErrors)return h;i.tokenize=l}return r}for(;"rubf".indexOf(e.charAt(0).toLowerCase())>=0;)e=e.substr(1);var n=1==e.length,r="string";return t.isString=!0,t}function p(e){for(;"py"!=n(e).type;)e.scopes.pop();e.scopes.push({offset:n(e).offset+a.indentUnit,type:"py",align:null})}function f(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+x,type:n,align:r})}function d(e,t){for(var r=e.indentation();t.scopes.length>1&&n(t).offset>r;){if("py"!=n(t).type)return!0;t.scopes.pop()}return n(t).offset!=r}function m(e,t){e.sol()&&(t.beginningOfLine=!0);var r=t.tokenize(e,t),i=e.current();if(t.beginningOfLine&&"@"==i)return e.match(F,!1)?"meta":w?"operator":h;/\S/.test(i)&&(t.beginningOfLine=!1),"variable"!=r&&"builtin"!=r||"meta"!=t.lastToken||(r="meta"),"pass"!=i&&"return"!=i||(t.dedent+=1),"lambda"==i&&(t.lambda=!0),":"!=i||t.lambda||"py"!=n(t).type||p(t);var o=1==i.length?"[({".indexOf(i):-1;if(o!=-1&&f(e,t,"])}".slice(o,o+1)),(o="])}".indexOf(i))!=-1){if(n(t).type!=i)return h;t.indent=t.scopes.pop().offset-x}return t.dedent>0&&e.eol()&&"py"==n(t).type&&(t.scopes.length>1&&t.scopes.pop(),t.dedent-=1),r}var h="error",b=s.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,y=s.doubleOperators||/^([!<>]==|<>|<<|>>|\/\/|\*\*)/,g=s.doubleDelimiters||/^(\+=|\-=|\*=|%=|\/=|&=|\|=|\^=)/,v=s.tripleDelimiters||/^(\/\/=|>>=|<<=|\*\*=)/,x=s.hangingIndent||a.indentUnit,k=i,_=o;void 0!=s.extra_keywords&&(k=k.concat(s.extra_keywords)),void 0!=s.extra_builtins&&(_=_.concat(s.extra_builtins));var w=!(s.version&&Number(s.version)<3);if(w){var z=s.singleOperators||/^[\+\-\*\/%&|\^~<>!@]/,F=s.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;k=k.concat(["nonlocal","False","True","None","async","await"]),_=_.concat(["ascii","bytes","exec","print"]);var E=new RegExp("^(([rbuf]|(br))?('{3}|\"{3}|['\"]))","i")}else{var z=s.singleOperators||/^[\+\-\*\/%&|\^~<>!]/,F=s.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;k=k.concat(["exec","print"]),_=_.concat(["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"]);var E=new RegExp("^(([rubf]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var T=t(k),O=t(_);return{startState:function(e){return{tokenize:l,scopes:[{offset:e||0,type:"py",align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var n=t.errorToken;n&&(t.errorToken=!1);var r=m(e,t);return r&&"comment"!=r&&(t.lastToken="keyword"==r||"punctuation"==r?e.current():r),"punctuation"==r&&(r=null),e.eol()&&t.lambda&&(t.lambda=!1),n?r+" "+h:r},indent:function(t,r){if(t.tokenize!=l)return t.tokenize.isString?e.Pass:0;var i=n(t),o=i.type==r.charAt(0);return null!=i.align?i.align-(o?1:0):i.offset-(o?x:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:"'\""},lineComment:"#",fold:"indent"}}),e.defineMIME("text/x-python","python");e.defineMIME("text/x-cython",{name:"python",extra_keywords:function(e){return e.split(" ")}("by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE")})});
50
+ },{"../../lib/codemirror":15}],23:[function(require,module,exports){
51
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ruby",function(e){function t(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}function n(e,t,n){return n.tokenize.push(e),e(t,n)}function r(e,t){if(e.sol()&&e.match("=begin")&&e.eol())return t.tokenize.push(l),"comment";if(e.eatSpace())return null;var r,o=e.next();if("`"==o||"'"==o||'"'==o)return n(u(o,"string",'"'==o||"`"==o),e,t);if("/"==o)return i(e)?n(u(o,"string-2",!0),e,t):"operator";if("%"==o){var a="string",s=!0;e.eat("s")?a="atom":e.eat(/[WQ]/)?a="string":e.eat(/[r]/)?a="string-2":e.eat(/[wxq]/)&&(a="string",s=!1);var c=e.eat(/[^\w\s=]/);return c?(k.propertyIsEnumerable(c)&&(c=k[c]),n(u(c,a,s,!0),e,t)):"operator"}if("#"==o)return e.skipToEnd(),"comment";if("<"==o&&(r=e.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return n(f(r[1]),e,t);if("0"==o)return e.eat("x")?e.eatWhile(/[\da-fA-F]/):e.eat("b")?e.eatWhile(/[01]/):e.eatWhile(/[0-7]/),"number";if(/\d/.test(o))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==o){for(;e.match(/^\\[CM]-/););return e.eat("\\")?e.eatWhile(/\w/):e.next(),"string"}if(":"==o)return e.eat("'")?n(u("'","atom",!1),e,t):e.eat('"')?n(u('"',"atom",!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),"atom"):e.eat(/[\+\-\*\/\&\|\:\!]/)?"atom":e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),"atom"):"operator";if("@"==o&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat("@"),e.eatWhile(/[\w\xa1-\uffff]/),"variable-2";if("$"==o)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),"variable-3";if(/[a-zA-Z_\xa1-\uffff]/.test(o))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(":")?"atom":"ident";if("|"!=o||!t.varList&&"{"!=t.lastTok&&"do"!=t.lastTok){if(/[\(\)\[\]{}\\;]/.test(o))return d=o,null;if("-"==o&&e.eat(">"))return"arrow";if(/[=+\-\/*:\.^%<>~|]/.test(o)){var p=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return"."!=o||p||(d="."),"operator"}return null}return d="|",null}function i(e){for(var t,n=e.pos,r=0,i=!1,o=!1;null!=(t=e.next());)if(o)o=!1;else{if("[{(".indexOf(t)>-1)r++;else if("]})".indexOf(t)>-1){if(--r<0)break}else if("/"==t&&0==r){i=!0;break}o="\\"==t}return e.backUp(e.pos-n),i}function o(e){return e||(e=1),function(t,n){if("}"==t.peek()){if(1==e)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=o(e-1)}else"{"==t.peek()&&(n.tokenize[n.tokenize.length-1]=o(e+1));return r(t,n)}}function a(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,r(t,n))}}function u(e,t,n,r){return function(i,u){var f,l=!1;for("read-quoted-paused"===u.context.type&&(u.context=u.context.prev,i.eat("}"));null!=(f=i.next());){if(f==e&&(r||!l)){u.tokenize.pop();break}if(n&&"#"==f&&!l){if(i.eat("{")){"}"==e&&(u.context={prev:u.context,type:"read-quoted-paused"}),u.tokenize.push(o());break}if(/[@\$]/.test(i.peek())){u.tokenize.push(a());break}}l=!l&&"\\"==f}return t}}function f(e){return function(t,n){return t.match(e)?n.tokenize.pop():t.skipToEnd(),"string"}}function l(e,t){return e.sol()&&e.match("=end")&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),"comment"}var d,s=t(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload","__END__","__FILE__","__LINE__","__dir__"]),c=t(["def","class","case","for","while","until","module","then","catch","loop","proc","begin"]),p=t(["end","until"]),k={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[r],indented:0,context:{type:"top",indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){d=null,e.sol()&&(t.indented=e.indentation());var n,r=t.tokenize[t.tokenize.length-1](e,t),i=d;if("ident"==r){var o=e.current();r="."==t.lastTok?"property":s.propertyIsEnumerable(e.current())?"keyword":/^[A-Z]/.test(o)?"tag":"def"==t.lastTok||"class"==t.lastTok||t.varList?"def":"variable","keyword"==r&&(i=o,c.propertyIsEnumerable(o)?n="indent":p.propertyIsEnumerable(o)?n="dedent":"if"!=o&&"unless"!=o||e.column()!=e.indentation()?"do"==o&&t.context.indented<t.indented&&(n="indent"):n="indent")}return(d||r&&"comment"!=r)&&(t.lastTok=i),"|"==d&&(t.varList=!t.varList),"indent"==n||/[\(\[\{]/.test(d)?t.context={prev:t.context,type:d||r,indented:t.indented}:("dedent"==n||/[\)\]\}]/.test(d))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine="\\"==d||"operator"==r),r},indent:function(t,n){if(t.tokenize[t.tokenize.length-1]!=r)return 0;var i=n&&n.charAt(0),o=t.context,a=o.type==k[i]||"keyword"==o.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return o.indented+(a?0:e.indentUnit)+(t.continuedLine?e.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:"#"}}),e.defineMIME("text/x-ruby","ruby")});
52
+ },{"../../lib/codemirror":15}],24:[function(require,module,exports){
53
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("shell",function(){function e(e,t){for(var n=t.split(" "),r=0;r<n.length;r++)i[n[r]]=e}function t(e,t){if(e.eatSpace())return null;var s=e.sol(),u=e.next();if("\\"===u)return e.next(),null;if("'"===u||'"'===u||"`"===u)return t.tokens.unshift(n(u,"`"===u?"quote":"string")),r(e,t);if("#"===u)return s&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===u)return t.tokens.unshift(o),r(e,t);if("+"===u||"="===u)return"operator";if("-"===u)return e.eat("-"),e.eatWhile(/\w/),"attribute";if(/\d/.test(u)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var f=e.current();return"="===e.peek()&&/\w+/.test(f)?"def":i.hasOwnProperty(f)?i[f]:null}function n(e,t){var i="("==e?")":e;return function(s,u){for(var f,l=!1,c=!1;null!=(f=s.next());){if(f===i&&!c){l=!0;break}if("$"===f&&!c&&"'"!==e){c=!0,s.backUp(1),u.tokens.unshift(o);break}if(!c&&"("===f&&"("===e)return u.tokens.unshift(n(e,t)),r(s,u);c=!c&&"\\"===f}return!l&&c||u.tokens.shift(),t}}function r(e,n){return(n.tokens[0]||t)(e,n)}var i={};e("atom","true false"),e("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function"),e("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh");var o=function(e,t){t.tokens.length>1&&e.eat("$");var i=e.next(),o=/\w/;return"{"===i&&(o=/[^}]/),/['"(]/.test(i)?(t.tokens[0]=n(i,"("==i?"quote":"string"),r(e,t)):(/\d/.test(i)||(e.eatWhile(o),e.eat("}")),t.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(e,t){return r(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}}),e.defineMIME("text/x-sh","shell")});
54
+ },{"../../lib/codemirror":15}],25:[function(require,module,exports){
55
+ !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby")):"function"==typeof define&&define.amd?define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t):t(CodeMirror)}(function(t){"use strict";t.defineMode("slim",function(e){function n(t,e,n){var i=function(i,r){return r.tokenize=e,i.pos<t?(i.pos=t,n):r.tokenize(i,r)};return function(t,n){return n.tokenize=i,e(t,n)}}function i(t,e,i,r,o){var u=t.current(),a=u.search(i);return a>-1&&(e.tokenize=n(t.pos,e.tokenize,o),t.backUp(u.length-a-r)),o}function r(t,e){t.stack={parent:t.stack,style:"continuation",indented:e,tokenize:t.line},t.line=t.tokenize}function o(t){t.line==t.tokenize&&(t.line=t.stack.tokenize,t.stack=t.stack.parent)}function u(t,e){return function(n,i){if(o(i),n.match(/^\\$/))return r(i,t),"lineContinuation";var u=e(n,i);return n.eol()&&n.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)&&n.backUp(1),u}}function a(t,e){return function(n,i){o(i);var u=e(n,i);return n.eol()&&n.current().match(/,$/)&&r(i,t),u}}function c(t,e){return function(n,i){return n.peek()==t&&1==i.rubyState.tokenize.length?(n.next(),i.tokenize=e,"closeAttributeTag"):s(n,i)}}function l(e){var n,i=function(t,i){if(1==i.rubyState.tokenize.length&&!i.rubyState.context.prev){if(t.backUp(1),t.eatSpace())return i.rubyState=n,i.tokenize=e,e(t,i);t.next()}return s(t,i)};return function(e,r){return n=r.rubyState,r.rubyState=t.startState(Z),r.tokenize=i,s(e,r)}}function s(t,e){return Z.token(t,e.rubyState)}function k(t,e){return t.match(/^\\$/)?"lineContinuation":d(t,e)}function d(t,e){return t.match(/^#\{/)?(e.tokenize=c("}",e.tokenize),null):i(t,e,/[^\\]#\{/,1,P.token(t,e.htmlState))}function m(t){return function(e,n){var i=k(e,n);return e.eol()&&(n.tokenize=t),i}}function f(t,e,n){return e.stack={parent:e.stack,style:"html",indented:t.column()+n,tokenize:e.line},e.line=e.tokenize=d,null}function b(t,e){return t.skipToEnd(),e.stack.style}function z(t,e){return e.stack={parent:e.stack,style:"comment",indented:e.indented+1,tokenize:e.line},e.line=b,b(t,e)}function p(t,e){return t.eat(e.stack.endQuote)?(e.line=e.stack.line,e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,null):t.match(K)?(e.tokenize=x,"slimAttribute"):(t.next(),null)}function x(t,e){return t.match(/^==?/)?(e.tokenize=h,null):p(t,e)}function h(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=q(n,"string",!0,!1,p),t.next(),e.tokenize(t,e)):"["==n?l(p)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=p,"keyword"):l(p)(t,e)}function y(t,e,n){return t.stack={parent:t.stack,style:"wrapper",indented:t.indented+1,tokenize:n,line:t.line,endQuote:e},t.line=t.tokenize=p,null}function S(e,n){if(e.match(/^#\{/))return n.tokenize=c("}",n.tokenize),null;var i=new t.StringStream(e.string.slice(n.stack.indented),e.tabSize);i.pos=e.pos-n.stack.indented,i.start=e.start-n.stack.indented,i.lastColumnPos=e.lastColumnPos-n.stack.indented,i.lastColumnValue=e.lastColumnValue-n.stack.indented;var r=n.subMode.token(i,n.subState);return e.pos=i.pos+n.stack.indented,r}function w(t,e){return e.stack.indented=t.column(),e.line=e.tokenize=S,e.tokenize(t,e)}function g(n){var i=D[n],r=t.mimeModes[i];if(r)return t.getMode(e,r);var o=t.modes[i];return o?o(e,{name:i}):t.getMode(e,"null")}function M(t){return _.hasOwnProperty(t)?_[t]:_[t]=g(t)}function v(e,n){var i=M(e),r=t.startState(i);return n.subMode=i,n.subState=r,n.stack={parent:n.stack,style:"sub",indented:n.indented+1,tokenize:n.line},n.line=n.tokenize=w,"slimSubmode"}function C(t,e){return t.skipToEnd(),"slimDoctype"}function E(t,e){if("<"==t.peek())return(e.tokenize=m(e.tokenize))(t,e);if(t.match(/^[|']/))return f(t,e,1);if(t.match(/^\/(!|\[\w+])?/))return z(t,e);if(t.match(/^(-|==?[<>]?)/))return e.tokenize=u(t.column(),a(t.column(),s)),"slimSwitch";if(t.match(/^doctype\b/))return e.tokenize=C,"keyword";var n=t.match(Q);return n?v(n[1],e):L(t,e)}function A(t,e){return e.startOfLine?E(t,e):L(t,e)}function L(t,e){return t.eat("*")?(e.tokenize=l($),null):t.match(H)?(e.tokenize=$,"slimTag"):T(t,e)}function $(t,e){return t.match(/^(<>?|><?)/)?(e.tokenize=T,null):T(t,e)}function T(t,e){return t.match(W)?(e.tokenize=T,"slimId"):t.match(N)?(e.tokenize=T,"slimClass"):U(t,e)}function U(t,e){return t.match(/^([\[\{\(])/)?y(e,B[RegExp.$1],U):t.match(J)?(e.tokenize=j,"slimAttribute"):"*"==t.peek()?(t.next(),e.tokenize=l(I),null):I(t,e)}function j(t,e){return t.match(/^==?/)?(e.tokenize=O,null):U(t,e)}function O(t,e){var n=t.peek();return'"'==n||"'"==n?(e.tokenize=q(n,"string",!0,!1,U),t.next(),e.tokenize(t,e)):"["==n?l(U)(t,e):":"==n?l(R)(t,e):t.match(/^(true|false|nil)\b/)?(e.tokenize=U,"keyword"):l(U)(t,e)}function R(t,e){return t.backUp(1),t.match(/^[^\s],(?=:)/)?(e.tokenize=l(R),null):(t.next(),U(t,e))}function q(t,e,n,i,u){return function(a,l){o(l);var s=0==a.current().length;if(a.match(/^\\$/,s))return s?(r(l,l.indented),"lineContinuation"):e;if(a.match(/^#\{/,s))return s?(l.tokenize=c("}",l.tokenize),null):e;for(var k,d=!1;null!=(k=a.next());){if(k==t&&(i||!d)){l.tokenize=u;break}if(n&&"#"==k&&!d&&a.eat("{")){a.backUp(2);break}d=!d&&"\\"==k}return a.eol()&&d&&a.backUp(1),e}}function I(t,e){return t.match(/^==?/)?(e.tokenize=s,"slimSwitch"):t.match(/^\/$/)?(e.tokenize=A,null):t.match(/^:/)?(e.tokenize=L,"slimSwitch"):(f(t,e,0),e.tokenize(t,e))}var P=t.getMode(e,{name:"htmlmixed"}),Z=t.getMode(e,"ruby"),_={html:P,ruby:Z},D={ruby:"ruby",javascript:"javascript",css:"text/css",sass:"text/x-sass",scss:"text/x-scss",less:"text/x-less",styl:"text/x-styl",coffee:"coffeescript",asciidoc:"text/x-asciidoc",markdown:"text/x-markdown",textile:"text/x-textile",creole:"text/x-creole",wiki:"text/x-wiki",mediawiki:"text/x-mediawiki",rdoc:"text/x-rdoc",builder:"text/x-builder",nokogiri:"text/x-nokogiri",erb:"application/x-erb"},Q=function(t){var e=[];for(var n in t)e.push(n);return new RegExp("^("+e.join("|")+"):")}(D),V={commentLine:"comment",slimSwitch:"operator special",slimTag:"tag",slimId:"attribute def",slimClass:"attribute qualifier",slimAttribute:"attribute",slimSubmode:"keyword special",closeAttributeTag:null,slimDoctype:null,lineContinuation:null},B={"{":"}","[":"]","(":")"},F="_a-zA-ZÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�",G=F+"\\-0-9·̀-ͯ‿-⁀",H=new RegExp("^[:"+F+"](?::["+G+"]|["+G+"]*)"),J=new RegExp("^[:"+F+"][:\\."+G+"]*(?=\\s*=)"),K=new RegExp("^[:"+F+"][:\\."+G+"]*"),N=/^\.-?[_a-zA-Z]+[\w\-]*/,W=/^#[_a-zA-Z]+[\w\-]*/,X={startState:function(){return{htmlState:t.startState(P),rubyState:t.startState(Z),stack:null,last:null,tokenize:A,line:A,indented:0}},copyState:function(e){return{htmlState:t.copyState(P,e.htmlState),rubyState:t.copyState(Z,e.rubyState),subMode:e.subMode,subState:e.subMode&&t.copyState(e.subMode,e.subState),stack:e.stack,last:e.last,tokenize:e.tokenize,line:e.line}},token:function(t,e){if(t.sol())for(e.indented=t.indentation(),e.startOfLine=!0,e.tokenize=e.line;e.stack&&e.stack.indented>e.indented&&"slimSubmode"!=e.last;)e.line=e.tokenize=e.stack.tokenize,e.stack=e.stack.parent,e.subMode=null,e.subState=null;if(t.eatSpace())return null;var n=e.tokenize(t,e);return e.startOfLine=!1,n&&(e.last=n),V.hasOwnProperty(n)?V[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine)return t.subMode.blankLine(t.subState)},innerMode:function(t){return t.subMode?{state:t.subState,mode:t.subMode}:{state:t,mode:X}}};return X},"htmlmixed","ruby"),t.defineMIME("text/x-slim","slim"),t.defineMIME("application/x-slim","slim")});
56
+ },{"../../lib/codemirror":15,"../htmlmixed/htmlmixed":19,"../ruby/ruby":23}],26:[function(require,module,exports){
57
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("sql",function(t,r){function a(e,t){var r=e.next();if(g[r]){var a=g[r](e,t);if(a!==!1)return a}if(p.hexNumber&&("0"==r&&e.match(/^[xX][0-9a-fA-F]+/)||("x"==r||"X"==r)&&e.match(/^'[0-9a-fA-F]+'/)))return"number";if(p.binaryNumber&&(("b"==r||"B"==r)&&e.match(/^'[01]+'/)||"0"==r&&e.match(/^b[01]+/)))return"number";if(r.charCodeAt(0)>47&&r.charCodeAt(0)<58)return e.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/),p.decimallessFloat&&e.eat("."),"number";if("?"==r&&(e.eatSpace()||e.eol()||e.eat(";")))return"variable-3";if("'"==r||'"'==r&&p.doubleQuote)return t.tokenize=n(r),t.tokenize(e,t);if((p.nCharCast&&("n"==r||"N"==r)||p.charsetCast&&"_"==r&&e.match(/[a-z][a-z0-9]*/i))&&("'"==e.peek()||'"'==e.peek()))return"keyword";if(/^[\(\),\;\[\]]/.test(r))return null;if(p.commentSlashSlash&&"/"==r&&e.eat("/"))return e.skipToEnd(),"comment";if(p.commentHash&&"#"==r||"-"==r&&e.eat("-")&&(!p.commentSpaceRequired||e.eat(" ")))return e.skipToEnd(),"comment";if("/"==r&&e.eat("*"))return t.tokenize=i,t.tokenize(e,t);if("."!=r){if(d.test(r))return e.eatWhile(d),null;if("{"==r&&(e.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/)||e.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/)))return"number";e.eatWhile(/^[_\w\d]/);var o=e.current().toLowerCase();return b.hasOwnProperty(o)&&(e.match(/^( )+'[^']*'/)||e.match(/^( )+"[^"]*"/))?"number":c.hasOwnProperty(o)?"atom":u.hasOwnProperty(o)?"builtin":m.hasOwnProperty(o)?"keyword":l.hasOwnProperty(o)?"string-2":null}return p.zerolessFloat&&e.match(/^(?:\d+(?:e[+-]?\d+)?)/i)?"number":p.ODBCdotTable&&e.match(/^[a-zA-Z_]+/)?"variable-2":void 0}function n(e){return function(t,r){for(var n,i=!1;null!=(n=t.next());){if(n==e&&!i){r.tokenize=a;break}i=!i&&"\\"==n}return"string"}}function i(e,t){for(;;){if(!e.skipTo("*")){e.skipToEnd();break}if(e.next(),e.eat("/")){t.tokenize=a;break}}return"comment"}function o(e,t,r){t.context={prev:t.context,indent:e.indentation(),col:e.column(),type:r}}function s(e){e.indent=e.context.indent,e.context=e.context.prev}var l=r.client||{},c=r.atoms||{false:!0,true:!0,null:!0},u=r.builtin||{},m=r.keywords||{},d=r.operatorChars||/^[*+\-%<>!=&|~^]/,p=r.support||{},g=r.hooks||{},b=r.dateSQL||{date:!0,time:!0,timestamp:!0};return{startState:function(){return{tokenize:a,context:null}},token:function(e,t){if(e.sol()&&t.context&&null==t.context.align&&(t.context.align=!1),e.eatSpace())return null;var r=t.tokenize(e,t);if("comment"==r)return r;t.context&&null==t.context.align&&(t.context.align=!0);var a=e.current();return"("==a?o(e,t,")"):"["==a?o(e,t,"]"):t.context&&t.context.type==a&&s(t),r},indent:function(r,a){var n=r.context;if(!n)return e.Pass;var i=a.charAt(0)==n.type;return n.align?n.col+(i?0:1):n.indent+(i?0:t.indentUnit)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:p.commentSlashSlash?"//":p.commentHash?"#":null}}),function(){function t(e){for(var t;null!=(t=e.next());)if("`"==t&&!e.eat("`"))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function r(e){for(var t;null!=(t=e.next());)if('"'==t&&!e.eat('"'))return"variable-2";return e.backUp(e.current().length-1),e.eatWhile(/\w/)?"variable-2":null}function a(e){return e.eat("@")&&(e.match(/^session\./),e.match(/^local\./),e.match(/^global\./)),e.eat("'")?(e.match(/^.*'/),"variable-2"):e.eat('"')?(e.match(/^.*"/),"variable-2"):e.eat("`")?(e.match(/^.*`/),"variable-2"):e.match(/^[0-9a-zA-Z$\.\_]+/)?"variable-2":null}function n(e){return e.eat("N")?"atom":e.match(/^[a-zA-Z.#!?]/)?"variable-2":null}function i(e){for(var t={},r=e.split(" "),a=0;a<r.length;++a)t[r[a]]=!0;return t}var o="alter and as asc between by count create delete desc distinct drop from group having in insert into is join like not on or order select set table union update values where limit ";e.defineMIME("text/x-sql",{name:"sql",keywords:i(o+"begin"),builtin:i("bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-mssql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec"),builtin:i("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date datetimeoffset datetime2 smalldatetime datetime time"),hooks:{"@":a}}),e.defineMIME("text/x-mysql",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group group_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":a,"`":t,"\\":n}}),e.defineMIME("text/x-mariadb",{name:"sql",client:i("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"),keywords:i(o+"accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"),hooks:{"@":a,"`":t,"\\":n}}),e.defineMIME("text/x-sqlite",{name:"sql",client:i("auth backup bail binary changes check clone databases dbinfo dump echo eqp exit explain fullschema headers help import imposter indexes iotrace limit lint load log mode nullvalue once open output print prompt quit read restore save scanstats schema separator session shell show stats system tables testcase timeout timer trace vfsinfo vfslist vfsname width"),keywords:i(o+"abort action add after all analyze attach autoincrement before begin cascade case cast check collate column commit conflict constraint cross current_date current_time current_timestamp database default deferrable deferred detach each else end escape except exclusive exists explain fail for foreign full glob if ignore immediate index indexed initially inner instead intersect isnull key left limit match natural no notnull null of offset outer plan pragma primary query raise recursive references regexp reindex release rename replace restrict right rollback row savepoint temp temporary then to transaction trigger unique using vacuum view virtual when with without"),builtin:i("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text clob bigint int int2 int8 integer float double char varchar date datetime year unsigned signed numeric real"),atoms:i("null current_date current_time current_timestamp"),operatorChars:/^[*+\-%<>!=&|\/~]/,dateSQL:i("date time timestamp datetime"),support:i("decimallessFloat zerolessFloat"),identifierQuote:'"',hooks:{"@":a,":":a,"?":a,$:a,'"':r,"`":t}}),e.defineMIME("text/x-cassandra",{name:"sql",client:{},keywords:i("add all allow alter and any apply as asc authorize batch begin by clustering columnfamily compact consistency count create custom delete desc distinct drop each_quorum exists filtering from grant if in index insert into key keyspace keyspaces level limit local_one local_quorum modify nan norecursive nosuperuser not of on one order password permission permissions primary quorum rename revoke schema select set storage superuser table three to token truncate ttl two type unlogged update use user users using values where with writetime"),builtin:i("ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint"),atoms:i("false true infinity NaN"),operatorChars:/^[<>=]/,dateSQL:{},support:i("commentSlashSlash decimallessFloat"),hooks:{}}),e.defineMIME("text/x-plsql",{name:"sql",client:i("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"),keywords:i("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elseif elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning returns reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"),builtin:i("abs acos add_months ascii asin atan atan2 average bfile bfilename bigserial bit blob ceil character chartorowid chr clob concat convert cos cosh count dec decode deref dual dump dup_val_on_index empty error exp false float floor found glb greatest hextoraw initcap instr instrb int integer isopen last_day least length lengthb ln lower lpad ltrim lub make_ref max min mlslabel mod months_between natural naturaln nchar nclob new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null number numeric nvarchar2 nvl others power rawtohex real reftohex round rowcount rowidtochar rowtype rpad rtrim serial sign signtype sin sinh smallint soundex sqlcode sqlerrm sqrt stddev string substr substrb sum sysdate tan tanh to_char text to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid unlogged upper user userenv varchar varchar2 variance varying vsize xml"),operatorChars:/^[*+\-%<>!=~]/,dateSQL:i("date time timestamp"),support:i("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber")}),e.defineMIME("text/x-hive",{name:"sql",keywords:i("select alter $elem$ $key$ $value$ add after all analyze and archive as asc before between binary both bucket buckets by cascade case cast change cluster clustered clusterstatus collection column columns comment compute concatenate continue create cross cursor data database databases dbproperties deferred delete delimited desc describe directory disable distinct distribute drop else enable end escaped exclusive exists explain export extended external false fetch fields fileformat first format formatted from full function functions grant group having hold_ddltime idxproperties if import in index indexes inpath inputdriver inputformat insert intersect into is items join keys lateral left like limit lines load local location lock locks mapjoin materialized minus msck no_drop nocompress not of offline on option or order out outer outputdriver outputformat overwrite partition partitioned partitions percent plus preserve procedure purge range rcfile read readonly reads rebuild recordreader recordwriter recover reduce regexp rename repair replace restrict revoke right rlike row schema schemas semi sequencefile serde serdeproperties set shared show show_database sort sorted ssl statistics stored streamtable table tables tablesample tblproperties temporary terminated textfile then tmp to touch transform trigger true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with"),builtin:i("bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=]/,dateSQL:i("date timestamp"),support:i("ODBCdotTable doubleQuote binaryNumber hexNumber")}),e.defineMIME("text/x-pgsql",{name:"sql",client:i("source"),keywords:i(o+"a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array_agg array_max_cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli binary bit_length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain characteristics characters character_length character_set_catalog character_set_name character_set_schema char_length check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column columns column_name command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constraint constraints constraint_catalog constraint_name constraint_schema constructor contains content continue control conversion convert copy corr corresponding cost covar_pop covar_samp cross csv cube cume_dist current current_catalog current_date current_default_transform_group current_path current_role current_row current_schema current_time current_timestamp current_transform_group_for_type current_user cursor cursor_name cycle data database datalink datetime_interval_code datetime_interval_precision day db deallocate dec declare default defaults deferrable deferred defined definer degree delimiter delimiters dense_rank depth deref derived describe descriptor deterministic diagnostics dictionary disable discard disconnect dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain dynamic dynamic_function dynamic_function_code each element else empty enable encoding encrypted end end-exec end_frame end_partition enforced enum equals escape event every except exception exclude excluding exclusive exec execute exists exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreign fortran forward found frame_row free freeze fs full function functions fusion g general generated get global go goto grant granted greatest grouping groups handler header hex hierarchy hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import including increment indent index indexes indicator inherit inherits initially inline inner inout input insensitive instance instantiable instead integrity intersect intersection invoker isnull isolation k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like_regex link listen ln load local localtime localtimestamp location locator lock locked logged lower m map mapping match matched materialized max maxvalue max_cardinality member merge message_length message_octet_length message_text method min minute minvalue mod mode modifies module month more move multiset mumps name names namespace national natural nchar nclob nesting new next nfc nfd nfkc nfkd nil no none normalize normalized nothing notify notnull nowait nth_value ntile null nullable nullif nulls number object occurrences_regex octets octet_length of off offset oids old only open operator option options ordering ordinality others out outer output over overlaps overlay overriding owned owner p pad parameter parameter_mode parameter_name parameter_ordinal_position parameter_specific_catalog parameter_specific_name parameter_specific_schema parser partial partition pascal passing passthrough password percent percentile_cont percentile_disc percent_rank period permission placing plans pli policy portion position position_regex power precedes preceding prepare prepared preserve primary prior privileges procedural procedure program public quote range rank read reads reassign recheck recovery recursive ref references referencing refresh regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy regr_syy reindex relative release rename repeatable replace replica requiring reset respect restart restore restrict result return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns revoke right role rollback rollup routine routine_catalog routine_name routine_schema row rows row_count row_number rule savepoint scale schema schema_name scope scope_catalog scope_name scope_schema scroll search second section security selective self sensitive sequence sequences serializable server server_name session session_user setof sets share show similar simple size skip snapshot some source space specific specifictype specific_name sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset substring substring_regex succeeds sum symmetric sysid system system_time system_user t tables tablesample tablespace table_name temp template temporary then ties timezone_hour timezone_minute to token top_level_count trailing transaction transactions_committed transactions_rolled_back transaction_active transform transforms translate translate_regex translation treat trigger trigger_catalog trigger_name trigger_schema trim trim_array true truncate trusted type types uescape unbounded uncommitted under unencrypted unique unknown unlink unlisten unlogged unnamed unnest until untyped upper uri usage user user_defined_type_catalog user_defined_type_code user_defined_type_name user_defined_type_schema using vacuum valid validate validator value value_of varbinary variadic var_pop var_samp verbose version versioning view views volatile when whenever whitespace width_bucket window within work wrapper write xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes loop repeat"),builtin:i("bigint int8 bigserial serial8 bit varying varbit boolean bool box bytea character char varchar cidr circle date double precision float8 inet integer int int4 interval json jsonb line lseg macaddr money numeric decimal path pg_lsn point polygon real float4 smallint int2 smallserial serial2 serial serial4 text time without zone with timetz timestamp timestamptz tsquery tsvector txid_snapshot uuid xml"),atoms:i("false true null unknown"),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:i("date time timestamp"),support:i("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast")}),e.defineMIME("text/x-gql",{name:"sql",keywords:i("ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where"),atoms:i("false true"),builtin:i("blob datetime first key __key__ string integer double boolean null"),operatorChars:/^[*+\-%<>!=]/})}()});
58
+ },{"../../lib/codemirror":15}],27:[function(require,module,exports){
59
+ !function(t){"object"==typeof exports&&"object"==typeof module?t(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],t):t(CodeMirror)}(function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};t.defineMode("xml",function(r,o){function a(t,e){function n(n){return e.tokenize=n,n(t,e)}var r=t.next();if("<"==r)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(u("atom","]]>")):null:t.match("--")?n(u("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(d(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=u("meta","?>"),"meta"):(C=t.eat("/")?"closeTag":"openTag",e.tokenize=i,"tag bracket");if("&"==r){var o;return o=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),o?"atom":"error"}return t.eatWhile(/[^&<]/),null}function i(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=a,C=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return C="equals",null;if("<"==n){e.tokenize=a,e.state=m,e.tagName=e.tagStart=null;var r=e.tokenize(t,e);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=l(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=i;break}return"string"};return e.isInAttribute=!0,e}function u(t,e){return function(n,r){for(;!n.eol();){if(n.match(e)){r.tokenize=a;break}n.next()}return t}}function d(t){return function(e,n){for(var r;null!=(r=e.next());){if("<"==r)return n.tokenize=d(t+1),n.tokenize(e,n);if(">"==r){if(1==t){n.tokenize=a;break}return n.tokenize=d(t-1),n.tokenize(e,n)}}return"meta"}}function c(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(z.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function f(t){t.context&&(t.context=t.context.prev)}function s(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!z.contextGrabbers.hasOwnProperty(n)||!z.contextGrabbers[n].hasOwnProperty(e))return;f(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),g):"closeTag"==t?p:m}function g(t,e,n){return"word"==t?(n.tagName=e.current(),I="tag",x):(I="error",g)}function p(t,e,n){if("word"==t){var r=e.current();return n.context&&n.context.tagName!=r&&z.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||z.matchClosing===!1?(I="tag",h):(I="tag error",b)}return I="error",b}function h(t,e,n){return"endTag"!=t?(I="error",h):(f(n),m)}function b(t,e,n){return I="error",h(t,e,n)}function x(t,e,n){if("word"==t)return I="attribute",k;if("endTag"==t||"selfcloseTag"==t){var r=n.tagName,o=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||z.autoSelfClosers.hasOwnProperty(r)?s(n,r):(s(n,r),n.context=new c(n,r,o==n.indented)),m}return I="error",x}function k(t,e,n){return"equals"==t?v:(z.allowMissing||(I="error"),x(t,e,n))}function v(t,e,n){return"string"==t?w:"word"==t&&z.allowUnquoted?(I="string",x):(I="error",x(t,e,n))}function w(t,e,n){return"string"==t?w:x(t,e,n)}var y=r.indentUnit,z={},N=o.htmlMode?e:n;for(var T in N)z[T]=N[T];for(var T in o)z[T]=o[T];var C,I;return a.isInText=!0,{startState:function(t){var e={tokenize:a,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;C=null;var n=e.tokenize(t,e);return(n||C)&&"comment"!=n&&(I=null,e.state=e.state(C||n,t,e),I&&(n="error"==I?n+" error":I)),n},indent:function(e,n,r){var o=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+y;if(o&&o.noIndent)return t.Pass;if(e.tokenize!=i&&e.tokenize!=a)return r?r.match(/^(\s*)/)[0].length:0;if(e.tagName)return z.multilineTagIndentPastTag!==!1?e.tagStart+e.tagName.length+2:e.tagStart+y*(z.multilineTagIndentFactor||1);if(z.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;o;){if(o.tagName==l[2]){o=o.prev;break}if(!z.implicitlyClosed.hasOwnProperty(o.tagName))break;o=o.prev}else if(l)for(;o;){var u=z.contextGrabbers[o.tagName];if(!u||!u.hasOwnProperty(l[2]))break;o=o.prev}for(;o&&o.prev&&!o.startOfLine;)o=o.prev;return o?o.indent+y:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(t){t.state==v&&(t.state=x)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})});
60
+ },{"../../lib/codemirror":15}],28:[function(require,module,exports){
61
+ !function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("yaml",function(){var e=["true","false","on","off","yes","no"],i=new RegExp("\\b(("+e.join(")|(")+"))$","i");return{token:function(e,t){var r=e.peek(),n=t.escaped;if(t.escaped=!1,"#"==r&&(0==e.pos||/\s/.test(e.string.charAt(e.pos-1))))return e.skipToEnd(),"comment";if(e.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return"string";if(t.literal&&e.indentation()>t.keyCol)return e.skipToEnd(),"string";if(t.literal&&(t.literal=!1),e.sol()){if(t.keyCol=0,t.pair=!1,t.pairStart=!1,e.match(/---/))return"def";if(e.match(/\.\.\./))return"def";if(e.match(/\s*-\s+/))return"meta"}if(e.match(/^(\{|\}|\[|\])/))return"{"==r?t.inlinePairs++:"}"==r?t.inlinePairs--:"["==r?t.inlineList++:t.inlineList--,"meta";if(t.inlineList>0&&!n&&","==r)return e.next(),"meta";if(t.inlinePairs>0&&!n&&","==r)return t.keyCol=0,t.pair=!1,t.pairStart=!1,e.next(),"meta";if(t.pairStart){if(e.match(/^\s*(\||\>)\s*/))return t.literal=!0,"meta";if(e.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==t.inlinePairs&&e.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(t.inlinePairs>0&&e.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(e.match(i))return"keyword"}return!t.pair&&e.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)?(t.pair=!0,t.keyCol=e.indentation(),"atom"):t.pair&&e.match(/^:\s*/)?(t.pairStart=!0,"meta"):(t.pairStart=!1,t.escaped="\\"==r,e.next(),null)},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),e.defineMIME("text/x-yaml","yaml"),e.defineMIME("text/yaml","yaml")});
62
+ },{"../../lib/codemirror":15}],29:[function(require,module,exports){
63
+ function Emitter(t){if(t)return mixin(t)}function mixin(t){for(var e in Emitter.prototype)t[e]=Emitter.prototype[e];return t}"undefined"!=typeof module&&(module.exports=Emitter),Emitter.prototype.on=Emitter.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},Emitter.prototype.once=function(t,e){function i(){this.off(t,i),e.apply(this,arguments)}return i.fn=e,this.on(t,i),this},Emitter.prototype.off=Emitter.prototype.removeListener=Emitter.prototype.removeAllListeners=Emitter.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r,s=0;s<i.length;s++)if((r=i[s])===e||r.fn===e){i.splice(s,1);break}return this},Emitter.prototype.emit=function(t){this._callbacks=this._callbacks||{};var e=[].slice.call(arguments,1),i=this._callbacks["$"+t];if(i){i=i.slice(0);for(var r=0,s=i.length;r<s;++r)i[r].apply(this,e)}return this},Emitter.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},Emitter.prototype.hasListeners=function(t){return!!this.listeners(t).length};
64
+ },{}],30:[function(require,module,exports){
65
+ var CodeMirror=require("codemirror");require("codemirror/addon/runmode/runmode.js");var Highlighter={aliases:{bash:"text/x-sh",c:"text/x-csrc",html:"text/html",js:"text/javascript",json:"application/json",java:"text/x-java",markup:"text/html",sass:"text/x-sass",scss:"text/x-scss",sh:"text/x-sh"},addAlias:function(a){for(var s in a)self.aliases[s]=a[s]},aliasLang:function(a){return self.aliases[a]||a},process:function(a,s,t){var e={json:!1};"json"==s&&(e.json=!0),CodeMirror.runMode(a,self.aliasLang(s),t,e)},highlightEl:function(a){var s=a.dataset.lang||a.dataset.language;if(!s){if(classMatch=a.className.match(/lang.*?-(\S+)/),!classMatch)return;s=classMatch[1]}a.classList.contains("language-"+s)&&a.classList.remove("language-"+s),a.classList.add("lang-"+s),a.classList.add("highlighted");var t=a.textContent.trim();self.process(t,s,a),a.innerHTML="<code class='highlighted-code static-code cm-s-default'>"+a.innerHTML+"</code>"},highlight:function(a){a=a||'[class*="language-"], [class*="lang-"], [data-lang], [data-language]';var s=document.querySelectorAll(a);Array.prototype.forEach.call(s,function(a){self.highlightEl(a)})}};module.exports=self=Highlighter;
66
+ },{"codemirror":15,"codemirror/addon/runmode/runmode.js":14}],31:[function(require,module,exports){
67
+ function on(){setEvent("on",slice.call(arguments))}function off(){setEvent("off",slice.call(arguments))}function one(){setEvent("one",slice.call(arguments))}function fire(){args=slice.call(arguments);var e=(args[0],[]);args[1].split(" ").forEach(function(n){var n=animationEvent.transform(n);isEmpty(n)||e.push(n)}),isEmpty(e)||(args[1]=e.join(" "),bean.fire.apply(this,args))}function setEvent(e,n){transformArgs(n).forEach(function(n){bean[e].apply(null,n)})}function keyOne(e,n,r){"function"==typeof n&&(r=n,n="all"),key(e,n,function(t){key.unbind(e,n),r(t)})}function afterAnimation(e,n){!window.getComputedStyle(e).getPropertyValue("animation-duration")?n():one(e,"animationend",n)}function transformArgs(e){var n=[],r={},t=e.shift(),a=e.shift();if("function"!=typeof e[0])var i=e.shift();if("string"==typeof a){var o={};o[a]=e.shift(),a=o}for(event in a)if(a.hasOwnProperty(event)){var l=a[event];event.split(" ").forEach(function(e){e=animationEvent.transform(e),isEmpty(e)?l():e.match(/tap/)?r.touchstart=tap(l):r[e]=l})}for(event in r){var c=[];c.push(t,event),i&&c.push(i),c.push(r[event]),n.push(c.concat(e))}return n}function isEmpty(e){var n=Object.prototype.hasOwnProperty;if(null==e||0===e.length)return!0;if(0<e.length)return!1;for(var r in e)if(n.call(e,r))return!1;return!0}require("./lib/shims/custom-event");var bean=require("bean"),key=require("keymaster"),animationEvent=require("./lib/animation-events"),page=require("./lib/page"),tap=require("./lib/tap-events"),debounce=require("./lib/debounce"),throttle=require("./lib/throttle"),delay=require("./lib/delay"),repeat=require("./lib/repeat"),bubbleFormEvents=require("./lib/bubble-form-events"),scroll=require("./lib/scroll"),resize=require("./lib/resize"),callbackManager=require("./lib/callback-manager"),media=require("./lib/media"),slice=Array.prototype.slice,formBubbling=!1;module.exports={on:on,off:off,one:one,fire:fire,clone:bean.clone,ready:page.ready,change:page.change,afterAnimation:afterAnimation,media:media,key:key,keyOn:key,keyOff:key.unbind,keyOne:keyOne,debounce:debounce,throttle:throttle,delay:delay,repeat:repeat,scroll:scroll,resize:resize,callbackManager:callbackManager,callback:callbackManager.callback,bubbleFormEvents:bubbleFormEvents};
68
+ },{"./lib/animation-events":32,"./lib/bubble-form-events":33,"./lib/callback-manager":34,"./lib/debounce":35,"./lib/delay":36,"./lib/media":37,"./lib/page":39,"./lib/repeat":40,"./lib/resize":41,"./lib/scroll":42,"./lib/shims/custom-event":43,"./lib/tap-events":44,"./lib/throttle":45,"bean":12,"keymaster":57}],32:[function(require,module,exports){
69
+ function camelCaseEventTypes(n){return n=n||"",{animationstart:n+"AnimationStart",animationend:n+"AnimationEnd",animationiteration:n+"AnimationIteration"}}function lowerCaseEventTypes(n){return n=n||"",{animationstart:n+"animationstart",animationend:n+"animationend",animationiteration:n+"animationiteration"}}function getAnimationEventTypes(){var n=["webkit","Moz","O",""],t=document.documentElement.style;if(void 0!==t.animationName)return lowerCaseEventTypes();for(var e,i=0,a=n.length;i<a;i++)if(e=n[i],void 0!==t[e+"AnimationName"]){if(0===i)return camelCaseEventTypes(e.toLowerCase());if(1===i)return lowerCaseEventTypes();if(2===i)return lowerCaseEventTypes(e.toLowerCase())}return{}}function transformAnimationEvents(n){return n.match(/animation/i)?cssAnimEventTypes[n]?cssAnimEventTypes[n]:("test"!=window.env&&console.error('"'+n+'" is not a supported animation event'),""):n}var cssAnimEventTypes=getAnimationEventTypes(),supported=void 0!==cssAnimEventTypes.animationstart;module.exports={transform:transformAnimationEvents};
70
+ },{}],33:[function(require,module,exports){
71
+ var Event=require("bean"),page=require("./page"),formEls,formBubbling=!1,fireBubble=function(e){if(e.detail&&e.detail.triggered)return!1;var t=new CustomEvent(e.type,{bubbles:!0,cancelable:!0,detail:{triggered:!0}});e.stopPropagation(),e.target.dispatchEvent(t),t.defaultPrevented&&e.preventDefault()},eventType=function(e){return"FORM"==e.tagName?"submit":"focus blur"},bubbleOn=function(e){Event.on(e,eventType(e),fireBubble)},bubbleOff=function(e){Event.off(e,eventType(e),fireBubble)},bubbleFormEvents=function(){if(!e){page.change(function(){formEls&&Array.prototype.forEach.call(formEls,bubbleOff),formEls=document.querySelectorAll("form, input"),Array.prototype.forEach.call(formEls,bubbleOn)});var e=!0}};module.exports=bubbleFormEvents;
72
+ },{"./page":39,"bean":12}],34:[function(require,module,exports){
73
+ var Manager={new:function(){var n={callbacks:[],add:function(a){var c=Manager.callback.new(a);return n.callbacks.push(c),c},stop:function(){n.callbacks.forEach(function(n){n.stop()})},start:function(){n.callbacks.forEach(function(n){n.start()})},toggle:function(a){n.callbacks.forEach(function(n){n.toggle(a)})},remove:function(){n.callbacks=[]},fire:function(){var a=Array.prototype.slice.call(arguments);n.callbacks.forEach(function(n){n.apply(this,a)})}};return n},callback:{new:function(n){var a=function(){a.enabled&&n.apply(n,arguments)};return a.stop=function(){a.enabled=!1},a.start=function(){a.enabled=!0},a.toggle=function(n){a.enabled=0 in arguments?n:!a.enabled},a.enabled=!0,a}}};module.exports=Manager;
74
+ },{}],35:[function(require,module,exports){
75
+ var now=function(){return Date.now()},pickFunction=function(){var n;return Array.prototype.forEach.call(arguments,function(i){"function"!=typeof i||n||(n=i)}),n},debounce=function(n,i,t){t="object"==typeof n?n:t||{},i=t.wait||i||0;var a,o=t.max||!1,e="leading"in t&&t.leading,c=!("trailing"in t)||t.trailing,r=pickFunction(t.leading,t.trailing,t.callback,n),u=pickFunction(t.trailing,t.leading,t.callback,n),l=!1,f={},g=0,p=0,d=!1,w=function(n){g=now(),p=now(),l=!1,d=!0,"leading"===n?r.apply(r,a):u.apply(u,a)},m=function(){l||(l=!0,f.value=requestAnimationFrame(k))},v=function(){"value"in f&&(cancelAnimationFrame(f.value),l=!1,g=0,p=0,d=!1)},y=function(){return o&&now()-p>=o},b=function(){return now()-g>=i},k=function(){l=!1,e&&!d?w("leading"):y()?w(e?"leading":"trailing"):b()?(c&&w("trailing"),e&&(d=!1)):m()},F=function(){g=now(),a=arguments,m()};return F.stop=v,F};module.exports=debounce;
76
+ },{}],36:[function(require,module,exports){
77
+ var now=function(){return Date.now()},delay=function(e,a){var t=null!=a?2:1,n={};return n.args=Array.prototype.slice.call(arguments,t),n.wait=a||0,n.start=now(),n.stop=function(){"value"in n&&cancelAnimationFrame(n.value)},n.loop=function(){now()-n.start>=n.wait?(e.apply(e,n.args),n.repeat?(n.repeat=n.repeat-1,n.start=now(),queueDelay(n)):0===n.repeat&&n.complete&&n.complete()):queueDelay(n)},queueDelay(n)},queueDelay=function(e){return e.value=requestAnimationFrame(e.loop),e};module.exports=delay;
78
+ },{}],37:[function(require,module,exports){
79
+ function parseQuery(i,n){var e={};return"string"==typeof i?i:(e.min=size(i.min,"min-"+n),e.max=size(i.max,"max-"+n),e.min&&e.max&&(e.query=e.min+" and "+e.max),e.query||e.min||e.max)}function size(i,n){return i?"("+n+": "+toPx(i)+")":null}function toPx(i){return"number"==typeof i?i+"px":i}var media={width:function(i,n){return media.listen(parseQuery(i,"width"),n)},minWidth:function(i,n){return media.width({min:i},n)},maxWidth:function(i,n){return media.width({max:i},n)},height:function(i,n){return media.listen(parseQuery(i,"height"),n)},minHeight:function(i,n){return media.height({min:i},n)},maxHeight:function(i,n){return media.height({max:i},n)},listen:function(i,n){var e=window.matchMedia(i);return n&&(n(e),e.addListener(n)),e}};module.exports=media;
80
+ },{}],38:[function(require,module,exports){
81
+ var Event=require("bean"),callbackManager=require("./callback-manager"),throttle=require("./throttle"),debounce=require("./debounce"),optimizedEventManager={new:function(e){var n={run:callbackManager.new(),start:callbackManager.new(),stop:callbackManager.new()},t=throttle(n.run.fire),r=debounce({leading:n.start.fire,trailing:!1,wait:150}),a=debounce(n.stop.fire,150);Event.on(window,e,function(){t(),r(),a()});var i=function(e){return n.run.add(e)};return i.start=function(e){return n.start.add(e)},i.stop=function(e){return n.stop.add(e)},i(function(){Event.fire(window,"optimized"+e[0].toUpperCase()+e.substring(1))}),i.start(function(){Event.fire(window,e+"Start")}),i.stop(function(){Event.fire(window,e+"Stop")}),i}};module.exports=optimizedEventManager;
82
+ },{"./callback-manager":34,"./debounce":35,"./throttle":45,"bean":12}],39:[function(require,module,exports){
83
+ var Event=require("bean"),callbackManager=require("./callback-manager"),manager={ready:callbackManager.new(),change:callbackManager.new(),readyAlready:!1,changed:!1};manager.ready.add(function(){manager.readyAlready=!0}),manager.ready.add(function(){window.Turbolinks||manager.changed||(manager.changed=!0,manager.change.fire())});var ready=function(a){return manager.readyAlready&&a(),manager.ready.add(a)},change=function(a){return manager.changed&&a(),manager.change.add(a)};ready.fire=function(){manager.ready.fire(),manager.ready.stop()},change.fire=function(){manager.change.fire()},Event.on(document,"DOMContentLoaded",ready.fire),Event.on(document,"page:change",change.fire),module.exports={ready:ready,change:change};
84
+ },{"./callback-manager":34,"bean":12}],40:[function(require,module,exports){
85
+ var delay=require("./delay"),repeat=function(e,r,a){var l=1,t=delay(e,r);return null!=a?l=3:null!=r&&(l=2),t.repeat=a||-1,t.args=Array.prototype.slice.call(arguments,l),t.stop=t.cancel,t};module.exports=repeat;
86
+ },{"./delay":36}],41:[function(require,module,exports){
87
+ var manager=require("./optimized-event-manager"),resize=manager.new("resize");resize.disableAnimation=function(){document.querySelector("style#fullstop")||document.head.insertAdjacentHTML("beforeend",'<style id="fullstop">.no-animation *, .no-animation *:after, .no-animation *:before { transition: none !important; animation: none !important }</style>'),resize.start(function(){document.body.classList.add("no-animation")}),resize.stop(function(){document.body.classList.remove("no-animation")})},module.exports=resize;
88
+ },{"./optimized-event-manager":38}],42:[function(require,module,exports){
89
+ var manager=require("./optimized-event-manager"),scroll=manager.new("scroll");scroll.disablePointer=function(){scroll.start(function(){document.documentElement.style.pointerEvents="none"}),scroll.stop(function(){document.documentElement.style.pointerEvents=""})},module.exports=scroll;
90
+ },{"./optimized-event-manager":38}],43:[function(require,module,exports){
91
+ !function(){function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if("function"==typeof window.CustomEvent)return!1;t.prototype=window.Event.prototype,window.CustomEvent=t}();
92
+ },{}],44:[function(require,module,exports){
93
+ function Tap(e,t){function n(t){function n(n){if(t!==n&&(a(),!n.defaultPrevented)){var o=t.preventDefault,r=t.stopPropagation;t.stopPropagation=function(){r.call(t),r.call(n)},t.preventDefault=function(){o.call(t),o.call(n)},e.apply(u,i)}}function a(e){t!==e&&(clearTimeout(c),r.removeEventListener("touchmove",a),endEvents.forEach(function(e){r.removeEventListener(e,n)}))}if(t.touches&&!(t.touches.length>1)){var r=t.target,u=this,i=arguments,c=setTimeout(a,o);r.addEventListener("touchmove",a),endEvents.forEach(function(e){r.addEventListener(e,n)})}}t=t||{};var o=t.timeout||Tap.timeout;return n.handler=e,n}var endEvents=["touchend"];module.exports=Tap,Tap.timeout=200;
94
+ },{}],45:[function(require,module,exports){
95
+ var debounce=require("./debounce"),throttle=function(e,t,a){return"object"==typeof e?(a=e,e=void 0):a=a||{},a.wait=a.wait||t||0,a.max=a.max||a.wait,a.callback=a.callback||e,a.leading=!0,a.trailing=!0,debounce(a)};module.exports=throttle;
96
+ },{"./debounce":35}],46:[function(require,module,exports){
97
+ var validation=require("./lib/validation"),progressive=require("./lib/progressive");module.exports={validate:validation.validate,invalidateField:validation.invalidateField,next:progressive.next};
98
+ },{"./lib/progressive":47,"./lib/validation":48}],47:[function(require,module,exports){
99
+ function reset(){formCallbacks={next:[]},registeredForms=[]}function newForm(e){function t(){return m[p]}function o(){return m[p+1]}function n(){return t()&&!t().disabled}function r(){a(p+1)}function a(e){e=Number(e);var o=m[e];if(o&&o!=t()){var r=p<e?"forward":"reverse";if(n())return s(function(){a(e)},r);p=e,c(r)}}function s(e,o){o=o||"forward",t().classList.remove("active","enter"),t().classList.add("exit"),t().dataset.direction=o,Event.afterAnimation(t(),function(){l(),"function"==typeof e&&e()})}function i(e,o){n()||(o=o||"reverse",t().classList.remove("exit","completed"),t().classList.add("active","enter"),t().dataset.direction=o,u(),Event.afterAnimation(t(),function(){"function"==typeof e&&e()}))}function c(e){u(),t().classList.remove("completed"),t().dataset.direction=e,t().classList.add("active","enter");var o=t().querySelector("input:not([hidden]), textarea, select");o&&o.focus(),f()}function l(){t().disabled=!0,t().classList.add("completed"),t().classList.remove("enter","exit")}function f(){toolbox.each(e.querySelectorAll("nav [data-step]"),function(e){e.dataset.step<p+1&&(e.classList.remove("here","next"),e.classList.add("previous","completed")),e.dataset.step==p+1&&(e.classList.remove("previous","next"),e.classList.add("here")),e.dataset.step>p+1&&(e.classList.remove("previous","here"),e.classList.add("next"))})}function d(e){toolbox.each(e.querySelectorAll("fieldset.form-step[disabled]"),function(e){e.disabled=!1})}function u(){m.forEach(function(e){e.disabled=e!=t()})}if(e){var m=toolbox.slice(e.querySelectorAll(".form-step")),p=0;if(0!=m.length){if(m.forEach(function(e,o){e.disabled=e!=t(),e.dataset.step=o}),e.dataset.nav){var v='<nav class="progressive-form-nav">';m.forEach(function(e,t){v+='<a href="#" class="progressive-form-nav-item" data-step="'+(t+1)+'">',v+=e.dataset.nav||"Step "+(t+1),v+="</a> "}),v+="</nav>",e.insertAdjacentHTML("afterbegin",v)}c(),registeredForms.push(function(n,c){var l=n.currentTarget;if("show-step"===c)n.preventDefault(),toolbox.matches(l,".previous, .completed, .completed + a")&&a(l.dataset.step-1);else if("next"===c){var f="FORM"==l.tagName?l:toolbox.getClosest(l,"form");if(e==f&&!t().querySelector(":invalid")){var m=getCallbacks(e);o()?u():d(e),m?(n.preventDefault(),m(n,{fieldset:t(),form:e,forward:r,dismiss:s,revisit:i,showStep:a,complete:!o(),formData:toolbox.formData(t())})):o()&&(n.preventDefault(),r())}}})}}}function fire(e,t){registeredForms.forEach(function(o){o(e,t)})}function getCallbacks(e,t){t=t||"next";var o,n=[];return formCallbacks[t].forEach(function(t){(o=t(e))&&n.push(o)}),!!n.length&&function(){var e=toolbox.slice(arguments);n.forEach(function(t){t.apply(t,e)})}}function next(e,t){on(e,"next",t)}function on(e,t,o){if("object"==typeof t)for(type in t)on(e,type,t[type]);else if(formCallbacks[t]){var n=function(t){if(t==e)return o};formCallbacks[t].push(n)}}var toolbox=require("compose-toolbox"),Event=toolbox.event,Callback=toolbox.event.callback,formSelector="form.progressive",watching=!1,formCallbacks,registeredForms;Event.ready(function(){reset(),Event.bubbleFormEvents();var e=formSelector+" [type=submit], "+formSelector+" .next-step",t=formSelector+" .back-step";Event.on(document,"click",e,fire,"next"),Event.on(document,"click",t,fire,"back"),Event.on(document,"click",".progressive-form-nav-item[data-step]",fire,"show-step"),document.head.insertAdjacentHTML("beforeend","<style>.form-step[disabled], .form-step.completed { position: absolute !important; top: -9999px !important; left: -9999px !important; left: 0 !important; right: 0 !important; }</style>"),Event.change(function(){reset(),toolbox.each(document.querySelectorAll(formSelector),function(e){newForm(e)})})}),module.exports={next:next,new:newForm};
100
+ },{"compose-toolbox":51}],48:[function(require,module,exports){
101
+ function supported(){return"function"==typeof document.createElement("input").checkValidity}function validateForm(e){var t,a=e.querySelectorAll("[required]");return toolbox.slice(a).some(function(e){if(!getClosest(e,"[disabled]")&&!checkInput(e))return t=e,!0}),!t||(focus(t),showMessage(t),!1)}function checkInput(e,t){var a=statusEl(e),n=isValid(e);return"keydown"!=t||n||e!=document.activeElement?(a.classList.toggle("invalid",!n),a.classList.toggle("valid",n)):a.classList.remove("invalid","valid"),n}function isValid(e){e.value.replace(/\s/g,"").length||(e.value="");var t=checkValue(e)||checkLength(e)||"";return e.setCustomValidity(t),e.checkValidity()}function checkValue(e){if(e.dataset.invalidValue){var t=escapedRegex(e.dataset.invalidValue,"i");if(e.value.match(t))return e.dataset.cachedMessage=e.dataset.message,e.dataset.message="",e.dataset.invalidValueMessage||"Value '"+e.value+"' is not permitted";e.dataset.cachedMessage&&(e.dataset.message=e.dataset.cachedMessage,e.dataset.cachedMessage="")}}function escapedRegex(e,t){var a=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return new RegExp("^"+a+"$",t)}function checkLength(e){return checkCount(e,"min")||checkCount(e,"max")}function checkCount(e,t){var a=e.dataset[t+"Words"];if(a){var n=wordCount(e.value)<a;if(phrasing="min"==t?"at least ":"no more than ",valid="min"==t?!n:n,e.value&&!valid)return"Please write "+phrasing+a+" words."}}function statusEl(e){return getClosest(e,"label")||e}function focus(e){e="none"!==e.style.display?e:e.nextSibling,e.focus()}function submit(e){validateForm("FORM"==e.target.tagName?e.target:getClosest(e.target,"form"))||(checkValidation.stop(),Event.delay(checkValidation.start,500),e.preventDefault(),e.stopImmediatePropagation())}function invalidateField(e,t){e&&e.value&&(e.dataset.invalidValue=e.value,t&&(e.dataset.invalidValueMessage=t))}function hideMessage(e){var t=getClosest(e,"form"),a=t.querySelector(".validation-message");a&&a.parentNode.removeChild(a)}function showMessage(e){hideMessage(e);var t=getClosest(e,"label"),a=e.dataset.message||e.validationMessage;t&&t.insertAdjacentHTML("beforeend",'<aside class="validation-message"><p>'+a+"</p></aside>")}var toolbox=require("compose-toolbox"),Event=toolbox.event,getClosest=toolbox.getClosest,wordCount=toolbox.wordCount,textSelectors="[required]",invalidHandler=Event.callback.new(function(e){e.preventDefault(),e.stopPropagation()});Event.ready(function(){supported()&&(Event.bubbleFormEvents(),document.addEventListener("invalid",invalidHandler,!0),Event.on(document.body,"click","[type=submit]",submit),Event.on(document,"validate","form",function(e){validateForm(e.target)}),Event.on(document,"blur","[required]",checkValidation),Event.on(document,"keydown","[required]",Event.debounce(checkValidation,200)),Event.on(document,"input","select[required]",Event.debounce(checkValidation,200)))});var checkValidation=Event.callback.new(function(e){checkInput(e.target,e.type)&&hideMessage(e.target)});module.exports={validate:validateForm,invalidateField:invalidateField};
102
+ },{"compose-toolbox":51}],49:[function(require,module,exports){
103
+ var classify=function(e){return"."+e.replace(/\s/g,".")},merge=function(){var e=[{}].concat(Array.prototype.slice.call(arguments));return Object.assign.apply(this,e)},defaultSettings={parent:"body",className:"loader",loading:"Loading…",success:"Success!",failure:"An error occurred.",removeAfter:800},Loader={new:function(e){function t(){return i||(u.parent.insertAdjacentHTML("beforeend",'<div class="'+u.className+'"></div>'),i=u.parent.lastChild),i}function n(e){e=merge(u,e||{}),i=t(),i.textContent=e.message,i.className=u.className,i.classList.add(e.className),e.removeAfter&&setTimeout(function(){c(e.callback)},e.removeAfter)}function r(e){n(o(e,"loading"))}function a(e){n(o(e,"success"))}function s(e){n(o(e,"failure"))}function o(e,t){return"string"==typeof e&&(e={message:e}),e=merge({message:u[t],className:t},e||{}),void 0===e.removeAfter&&(e.removeAfter="loading"!=t&&u.removeAfter),e}function c(e){requestAnimationFrame(function(){u.parent.removeChild(t()),i=null,"function"==typeof e&&e()})}var i,u=merge(defaultSettings,e||{});return"string"==typeof u.parent&&(u.parent=document.querySelector(u.parent)),{options:u,loading:r,success:a,failure:s,show:n,element:t,remove:c}},defaults:function(e){return Object.assign(defaultSettings,e||{})}};module.exports=Loader;
104
+ },{}],50:[function(require,module,exports){
105
+ var Event=require("compose-event"),Toggler={checkboxSelector:"[type=checkbox][data-toggle], [type=checkbox][data-show], [type=checkbox][data-hide]",radioSelector:"input[type=radio][data-show], input[type=radio][data-hide], input[type=radio][data-add-class], input[type=radio][data-remove-class]",selectSelector:"option[data-hide], option[data-show]",listen:function(){Event.on(document,"click change","[data-toggle], [data-show], [data-hide], [data-toggle-class], [data-add-class], [data-remove-class]",Toggler.trigger),Event.on(document,"change",".select-toggler",Toggler.trigger)},refresh:function(){Toggler.toggleCheckboxes(),Toggler.setupSelects(),Toggler.setupRadios()},trigger:function(e){"#"==e.currentTarget.getAttribute("href")&&(e.preventDefault(),e.stop()),Toggler.triggerToggling(e.currentTarget)},triggerToggling:function(e){var t,a=["hide","toggle","show","removeClass","toggleClass","addClass"];e.tagName.match(/select/i)&&(t=e,e=t.selectedOptions[0]),(t||"radio"==e.type)&&(a=a.filter(function(e){return!e.match(/toggle/)})),a.forEach(function(t){Toggler.dispatch(e,t)})},dispatch:function(e,t){var a=t,o=e.dataset[t];o&&void 0!==o&&""!=o&&("checkbox"==e.type&&(a=t.match(/hide|remove/i)?!e.checked:e.checked),o&&(t.match(/class/i)?Toggler.setClass(o,a,e):Toggler.setState(o,a)))},setClass:function(e,t,a){if(void 0!==e&&""!=e){if("boolean"==typeof t&&(t=t?"add":"remove"),e.match(/&/))return void e.split("&").forEach(function(e){Toggler.setClass(e.trim(),t,a)});var o=e.split(";"),r=o[0].trim(),l=[];e=o[1],e?l=document.querySelectorAll(e):a&&a.tagName.match(/option/i)?l=[Toggler.getSelectFromOption(a)]:a&&(l=[a]),Array.prototype.forEach.call(l,function(e){Array.prototype.forEach.call(r.split(" "),function(a){var o=t.replace(/Class/,"");e.classList[o](a)}),Toggler.triggerTogglerEventsOnChildren(e,"class")})}},setState:function(e,t){var a=document.querySelectorAll(e);Array.prototype.forEach.call(a,function(e){var a=Toggler.toggleAction(e,t);Toggler[a](e),Toggler.triggerTogglerEventsOnChildren(e,a)})},toggleAction:function(e,t){return"boolean"==typeof t&&(t=t?"show":"hide"),"toggle"==t&&(t=e.classList.contains("hidden")?"show":"hide"),t},show:function(e){e.classList.remove("hidden"),e.classList.add("visible"),void 0!==e.disabled&&(e.disabled=!1);var t=e.querySelector("[data-focus]");t&&t.focus();e.querySelectorAll("[type=range]")},hide:function(e){e.classList.remove("visible"),e.classList.add("hidden"),void 0!==e.disabled&&(e.disabled=!0)},getLeafNodes:function(e){return e.hasChildNodes()?Array.prototype.slice.call(e.getElementsByTagName("*"),0).filter(function(e){return e.children&&0===e.children.length}):[e]},triggerTogglerEventsOnChildren:function(e,t){var a=Toggler.getLeafNodes(e);Array.prototype.forEach.call(a,function(e){Event.fire(e,"toggler:"+t)})},toggleCheckboxes:function(e){e=e||document.querySelectorAll(Toggler.checkboxSelector),Array.prototype.forEach.call(e,Toggler.triggerToggling)},setupRadios:function(){Array.prototype.forEach.call(document.querySelectorAll(Toggler.radioSelector),function(e,t){if(!e.dataset.togglerActive){var a,o=e.getAttribute("name"),r=Toggler.parentForm(e).querySelectorAll('[type=radio][name="'+o+'"]'),l=Toggler.dataAttributes(r,"show"),s=Toggler.dataAttributes(r,"addClass");Array.prototype.forEach.call(r,function(e){e.dataset.show=e.dataset.show||"",e.dataset.addClass=e.dataset.addClass||"",e.dataset.hide&&e.dataset.hide.length>0&&(l=l.concat(e.dataset.hide.split(","))),e.dataset.hide=l.filter(function(t){return e.dataset.show.indexOf(t)}).join(","),e.dataset.addClass=e.dataset.addClass||"",e.dataset.removeClass=s.filter(function(t){return e.dataset.addClass.indexOf(t)}).join("&"),e.dataset.togglerActive=!0,e.checked&&(a=e)}),a?Toggler.triggerToggling(a):(Toggler.setState(l.join(","),"hide"),Toggler.setClass(s.join(" & "),"removeClass"))}})},setupSelects:function(){Array.prototype.forEach.call(document.querySelectorAll(Toggler.selectSelector),function(e){if(!e.dataset.togglerActive){e.dataset.show=e.dataset.show||"";var t=Toggler.getSelectFromOption(e);t.classList.add("select-toggler");var a=t.querySelectorAll("option"),o=Toggler.dataAttributes(a,"show"),r=Toggler.dataAttributes(a,"addClass");Array.prototype.forEach.call(a,function(e){e.dataset.show=e.dataset.show||"",e.dataset.addClass=e.dataset.addClass||"",e.dataset.hide&&e.dataset.hide.length>0&&(o=o.concat(e.dataset.hide.split(","))),e.dataset.hide=o.filter(function(t){return e.dataset.show.indexOf(t)}).join(","),e.dataset.removeClass=r.filter(function(t){return e.dataset.addClass.indexOf(t)}).join(" & "),e.dataset.togglerActive=!0}),Toggler.triggerToggling(t)}})},getSelectFromOption:function(e){var t=e.parentElement;return"SELECT"==t.tagName?t:Toggler.getSelectFromOption(t)},parentForm:function(e){for(var t=e;t&&"FORM"!=t.tagName;)t=t.parentNode;return t||document},dataAttributes:function(e,t){return Array.prototype.map.call(e,function(e){return e.dataset[t]}).filter(function(e,t,a){return""!=e&&void 0!==e&&a.indexOf(e)===t})}};Event.ready(Toggler.listen),Event.change(Toggler.refresh),module.exports=Toggler;
106
+ },{"compose-event":31}],51:[function(require,module,exports){
107
+ require("./lib/shims/_classlist");var merge=require("./lib/shims/_object.assign"),event=require("compose-event"),scrollTo=require("./lib/scrollto"),fromTop=require("./lib/fromtop"),ease=require("./lib/ease"),toolbox={event:event,scrollTo:scrollTo,fromTop:fromTop,merge:merge,ease:ease,getClosest:function(e,r){for(;e&&e!==document;e=e.parentNode)if(toolbox.matches(e,r))return e;return!1},getNext:function(e,r){for(;e&&e!==document;e=e.parentNode)if(e.querySelector(r))return e.querySelector(r);return!1},matches:function(e,r){return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,r)},wordCount:function(e){var r=e.match(/\S+/g);return r?r.length:0},slice:function(e,r){return Array.prototype.slice.call(e,r)},each:function(e,r){return Array.prototype.forEach.call(e,r)},formData:function(e){var r=new FormData,o=e.querySelectorAll("input[name]");return toolbox.each(o,function(e){r.append(e.name,e.value)}),r}};module.exports=toolbox;
108
+ },{"./lib/ease":52,"./lib/fromtop":53,"./lib/scrollto":54,"./lib/shims/_classlist":55,"./lib/shims/_object.assign":56,"compose-event":31}],52:[function(require,module,exports){
109
+ var ease={inOutQuad:function(t,u,n,e){return(t/=e/2)<1?n/2*t*t+u:(t--,-n/2*(t*(t-2)-1)+u)},inOutCubic:function(t,u,n,e){return(t/=e/2)<1?n/2*t*t*t+u:(t-=2,n/2*(t*t*t+2)+u)},inOutQuint:function(t,u,n,e){var r=(t/=e)*t,i=r*t;return u+n*(6*i*r+-15*r*r+10*i)},inOutCirc:function(t,u,n,e){return(t/=e/2)<1?-n/2*(Math.sqrt(1-t*t)-1)+u:(t-=2,n/2*(Math.sqrt(1-t*t)+1)+u)}};ease.default=ease.inOutQuad,module.exports=ease;
110
+ },{}],53:[function(require,module,exports){
111
+ module.exports=function(t){return Math.round(t.getBoundingClientRect().top+window.pageYOffset)};
112
+ },{}],54:[function(require,module,exports){
113
+ function move(o){document.documentElement.scrollTop=o,document.body.parentNode.scrollTop=o,document.body.scrollTop=o}function position(){return document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop}function scrollTo(o,e,n){"object"==typeof o&&(o=fromTop(o)),"number"==typeof e&&(n=e,e=null),n=void 0===n?500:n;var t=position(),r=o-t,c=0,l=function(){c+=20,move(ease.default(c,t,r,n)),c<n?requestAnimationFrame(l):e&&"function"==typeof e&&e()};l()}var ease=require("./ease"),fromTop=require("./fromtop");module.exports=scrollTo;
114
+ },{"./ease":52,"./fromtop":53}],55:[function(require,module,exports){
115
+ "document"in self&&("classList"in document.createElement("_")?function(){"use strict";var t=document.createElement("_");if(t.classList.add("c1","c2"),!t.classList.contains("c2")){var e=function(t){var e=DOMTokenList.prototype[t];DOMTokenList.prototype[t]=function(t){var n,i=arguments.length;for(n=0;n<i;n++)t=arguments[n],e.call(this,t)}};e("add"),e("remove")}if(t.classList.toggle("c3",!1),t.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(t,e){return 1 in arguments&&!this.contains(t)==!e?e:n.call(this,t)}}t=null}():function(t){"use strict";if("Element"in t){var e=t.Element.prototype,n=Object,i=String.prototype.trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array.prototype.indexOf||function(t){for(var e=0;e<this.length;e++)if(e in this&&this[e]===t)return e;return-1},r=function(t,e){this.name=t,this.code=DOMException[t],this.message=e},o=function(t,e){if(""===e)throw new r("SYNTAX_ERR","An invalid or illegal string was specified");if(/\s/.test(e))throw new r("INVALID_CHARACTER_ERR","String contains an invalid character");return s.call(t,e)},a=function(t){for(var e=i.call(t.getAttribute("class")||""),n=e?e.split(/\s+/):[],s=0;s<n.length;s++)this.push(n[s]);this._updateClassName=function(){t.setAttribute("class",this.toString())}},c=a.prototype=[],l=function(){return new a(this)};if(r.prototype=Error.prototype,c.item=function(t){return this[t]||null},c.contains=function(t){return t+="",o(this,t)!==-1},c.add=function(){var t,e=arguments,n=0,i=e.length,s=!1;do{t=e[n]+"",o(this,t)===-1&&(this.push(t),s=!0)}while(++n<i);s&&this._updateClassName()},c.remove=function(){var t,e,n=arguments,i=0,s=n.length,r=!1;do{for(t=n[i]+"",e=o(this,t);e!==-1;)this.splice(e,1),r=!0,e=o(this,t)}while(++i<s);r&&this._updateClassName()},c.toggle=function(t,e){t+="";var n=this.contains(t),i=n?e!==!0&&"remove":e!==!1&&"add";return i&&this[i](t),e===!0||e===!1?e:!n},c.toString=function(){return this.join(" ")},n.defineProperty){var u={get:l,enumerable:!0,configurable:!0};try{n.defineProperty(e,"classList",u)}catch(t){t.number===-2146823252&&(u.enumerable=!1,n.defineProperty(e,"classList",u))}}else n.prototype.__defineGetter__&&e.__defineGetter__("classList",l)}}(self));
116
+ },{}],56:[function(require,module,exports){
117
+ "function"!=typeof Object.assign&&function(){Object.assign=function(t){"use strict";if(void 0===t||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(t),e=1;e<arguments.length;e++){var n=arguments[e];if(void 0!==n&&null!==n)for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r}}();var merge=function(){var t=[{}].concat(Array.prototype.slice.call(arguments));return Object.assign.apply(this,t)};module.exports=merge;
118
+ },{}],57:[function(require,module,exports){
119
+ !function(e){function n(e,n){for(var t=e.length;t--;)if(e[t]===n)return t;return-1}function t(e,n){if(e.length!=n.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function o(e){for(m in b)b[m]=e[T[m]]}function r(e){var t,r,i,l,c,u;if(t=e.keyCode,n(S,t)==-1&&S.push(t),93!=t&&224!=t||(t=91),t in b){b[t]=!0;for(i in C)C[i]==t&&(f[i]=!0)}else if(o(e),f.filter.call(this,e)&&t in E)for(u=p(),l=0;l<E[t].length;l++)if(r=E[t][l],r.scope==u||"all"==r.scope){c=r.mods.length>0;for(i in b)(!b[i]&&n(r.mods,+i)>-1||b[i]&&n(r.mods,+i)==-1)&&(c=!1);(0!=r.mods.length||b[16]||b[18]||b[17]||b[91])&&!c||r.method(e,r)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function i(e){var t,o=e.keyCode,r=n(S,o);if(r>=0&&S.splice(r,1),93!=o&&224!=o||(o=91),o in b){b[o]=!1;for(t in C)C[t]==o&&(f[t]=!1)}}function l(){for(m in b)b[m]=!1;for(m in C)f[m]=!1}function f(e,n,t){var o,r;o=g(e),void 0===t&&(t=n,n="all");for(var i=0;i<o.length;i++)r=[],e=o[i].split("+"),e.length>1&&(r=v(e),e=[e[e.length-1]]),e=e[0],e=P(e),e in E||(E[e]=[]),E[e].push({shortcut:o[i],scope:n,method:t,key:o[i],mods:r})}function c(e,n){var o,r,i,l,f,c=[];for(o=g(e),l=0;l<o.length;l++){if(r=o[l].split("+"),r.length>1&&(c=v(r),e=r[r.length-1]),e=P(e),void 0===n&&(n=p()),!E[e])return;for(i=0;i<E[e].length;i++)f=E[e][i],f.scope===n&&t(f.mods,c)&&(E[e][i]={})}}function u(e){return"string"==typeof e&&(e=P(e)),n(S,e)!=-1}function a(){return S.slice(0)}function s(e){var n=(e.target||e.srcElement).tagName;return!("INPUT"==n||"SELECT"==n||"TEXTAREA"==n)}function d(e){w=e||"all"}function p(){return w||"all"}function h(e){var n,t,o;for(n in E)for(t=E[n],o=0;o<t.length;)t[o].scope===e?t.splice(o,1):o++}function g(e){var n;return e=e.replace(/\s/g,""),n=e.split(","),""==n[n.length-1]&&(n[n.length-2]+=","),n}function v(e){for(var n=e.slice(0,e.length-1),t=0;t<n.length;t++)n[t]=C[n[t]];return n}function y(e,n,t){e.addEventListener?e.addEventListener(n,t,!1):e.attachEvent&&e.attachEvent("on"+n,function(){t(window.event)})}function k(){var n=e.key;return e.key=A,n}var m,E={},b={16:!1,18:!1,17:!1,91:!1},w="all",C={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},K={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},P=function(e){return K[e]||e.toUpperCase().charCodeAt(0)},S=[];for(m=1;m<20;m++)K["f"+m]=111+m;var T={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};for(m in C)f[m]=!1;y(document,"keydown",function(e){r(e)}),y(document,"keyup",i),y(window,"focus",l);var A=e.key;e.key=f,e.key.setScope=d,e.key.getScope=p,e.key.deleteScope=h,e.key.filter=s,e.key.isPressed=u,e.key.getPressedKeyCodes=a,e.key.noConflict=k,e.key.unbind=c,"undefined"!=typeof module&&(module.exports=f)}(this);
120
+ },{}],58:[function(require,module,exports){
121
+ !function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e(t,document):"function"==typeof define&&define.amd?define(null,function(){e(t,document)}):t.rangetouch=e(t,document)}("undefined"!=typeof window?window:this,function(t,e){"use strict";function n(t){return t instanceof HTMLElement&&t.classList.contains(l.selectors.disabled)}function o(t,e,n){t.addEventListener(e,n,!1)}function i(t){var e=(""+t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}function u(t,e){if(e<1){var n=i(parseInt(e));return parseFloat(t.toFixed(n))}return Math.round(t/e)*e}function r(t){var e,n=t.target,o=t.changedTouches[0],i=parseFloat(n.getAttribute("min"))||0,r=parseFloat(n.getAttribute("max"))||100,a=parseFloat(n.getAttribute("step"))||1,c=r-i,s=n.getBoundingClientRect(),d=100/s.width*(l.thumbWidth/2)/100;return e=100/s.width*(o.clientX-s.left),e<0?e=0:e>100&&(e=100),e<50?e-=(100-2*e)*d:e>50&&(e+=2*(e-50)*d),i+u(c*(e/100),a)}function a(t){l.enabled&&"range"===t.target.type&&!n(t.target)&&(t.preventDefault(),t.target.value=r(t),s(t.target,t.type===l.events.end?"change":"input"))}function c(){o(e.body,l.events.start,a),o(e.body,l.events.move,a),o(e.body,l.events.end,a)}function s(t,e,n){t.dispatchEvent(new CustomEvent(e,n))}function d(){return[l.selectors.range,":not(.",l.selectors.disabled,")"].join("")}var l={enabled:!0,selectors:{range:'[type="range"]',disabled:"rangetouch--disabled"},thumbWidth:15,events:{start:"touchstart",move:"touchmove",end:"touchend"}};return function(){if("ontouchstart"in e.documentElement){for(var t=e.querySelectorAll(d()),n=t.length-1;n>=0;n--)t[n].style.touchAction="manipulation",t[n].style.webkitUserSelect="none";c()}}(),{set:function(t,e){l[t]=e}}}),function(){"use strict";function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}if("function"==typeof window.CustomEvent)return!1;t.prototype=window.Event.prototype,window.CustomEvent=t}();
122
+ },{}],59:[function(require,module,exports){
123
+ function noop(){}function serialize(e){if(!isObject(e))return e;var t=[];for(var r in e)pushEncodedKeyValuePair(t,r,e[r]);return t.join("&")}function pushEncodedKeyValuePair(e,t,r){if(null!=r)if(Array.isArray(r))r.forEach(function(r){pushEncodedKeyValuePair(e,t,r)});else if(isObject(r))for(var s in r)pushEncodedKeyValuePair(e,t+"["+s+"]",r[s]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(r));else null===r&&e.push(encodeURIComponent(t))}function parseString(e){for(var t,r,s={},n=e.split("&"),o=0,i=n.length;o<i;++o)t=n[o],r=t.indexOf("="),r==-1?s[decodeURIComponent(t)]="":s[decodeURIComponent(t.slice(0,r))]=decodeURIComponent(t.slice(r+1));return s}function parseHeader(e){var t,r,s,n,o=e.split(/\r?\n/),i={};o.pop();for(var u=0,a=o.length;u<a;++u)r=o[u],t=r.indexOf(":"),s=r.slice(0,t).toLowerCase(),n=trim(r.slice(t+1)),i[s]=n;return i}function isJSON(e){return/[\/+]json\b/.test(e)}function type(e){return e.split(/ *; */).shift()}function params(e){return e.split(/ *; */).reduce(function(e,t){var r=t.split(/ *= */),s=r.shift(),n=r.shift();return s&&n&&(e[s]=n),e},{})}function Response(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this._setStatusProperties(this.xhr.status),this.header=this.headers=parseHeader(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function Request(e,t){var r=this;this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new Response(r)}catch(t){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=t,e.rawResponse=r.xhr&&r.xhr.responseText?r.xhr.responseText:null,e.statusCode=r.xhr&&r.xhr.status?r.xhr.status:null,r.callback(e)}r.emit("response",t);var s;try{(t.status<200||t.status>=300)&&(s=new Error(t.statusText||"Unsuccessful HTTP response"),s.original=e,s.response=t,s.status=t.status)}catch(e){s=e}s?r.callback(s,t):r.callback(null,t)})}function del(e,t){var r=request("DELETE",e);return t&&r.end(t),r}var root;"undefined"!=typeof window?root=window:"undefined"!=typeof self?root=self:(console.warn("Using browser-only version of superagent in non-browser environment"),root=this);var Emitter=require("emitter"),requestBase=require("./request-base"),isObject=require("./is-object"),request=module.exports=require("./request").bind(null,Request);request.getXHR=function(){if(!(!root.XMLHttpRequest||root.location&&"file:"==root.location.protocol&&root.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}throw Error("Browser-only verison of superagent could not find XHR")};var trim="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};request.serializeObject=serialize,request.parseString=parseString,request.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},request.serialize={"application/x-www-form-urlencoded":serialize,"application/json":JSON.stringify},request.parse={"application/x-www-form-urlencoded":parseString,"application/json":JSON.parse},Response.prototype.get=function(e){return this.header[e.toLowerCase()]},Response.prototype._setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=type(t);var r=params(t);for(var s in r)this[s]=r[s]},Response.prototype._parseBody=function(e){var t=request.parse[this.type];return!t&&isJSON(this.type)&&(t=request.parse["application/json"]),t&&e&&(e.length||e instanceof Object)?t(e):null},Response.prototype._setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},Response.prototype.toError=function(){var e=this.req,t=e.method,r=e.url,s="cannot "+t+" "+r+" ("+this.status+")",n=new Error(s);return n.status=this.status,n.method=t,n.url=r,n},request.Response=Response,Emitter(Request.prototype);for(var key in requestBase)Request.prototype[key]=requestBase[key];Request.prototype.type=function(e){return this.set("Content-Type",request.types[e]||e),this},Request.prototype.responseType=function(e){return this._responseType=e,this},Request.prototype.accept=function(e){return this.set("Accept",request.types[e]||e),this},Request.prototype.auth=function(e,t,r){switch(r||(r={type:"basic"}),r.type){case"basic":var s=btoa(e+":"+t);this.set("Authorization","Basic "+s);break;case"auto":this.username=e,this.password=t}return this},Request.prototype.query=function(e){return"string"!=typeof e&&(e=serialize(e)),e&&this._query.push(e),this},Request.prototype.attach=function(e,t,r){return this._getFormData().append(e,t,r||t.name),this},Request.prototype._getFormData=function(){return this._formData||(this._formData=new root.FormData),this._formData},Request.prototype.callback=function(e,t){var r=this._callback;this.clearTimeout(),r(e,t)},Request.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},Request.prototype._timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},Request.prototype._appendQueryString=function(){var e=this._query.join("&");e&&(this.url+=~this.url.indexOf("?")?"&"+e:"?"+e)},Request.prototype.end=function(e){var t=this,r=this.xhr=request.getXHR(),s=this._timeout,n=this._formData||this._data;this._callback=e||noop,r.onreadystatechange=function(){if(4==r.readyState){var e;try{e=r.status}catch(t){e=0}if(0==e){if(t.timedout)return t._timeoutError();if(t._aborted)return;return t.crossDomainError()}t.emit("end")}};var o=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{r.onprogress=o.bind(null,"download"),r.upload&&(r.upload.onprogress=o.bind(null,"upload"))}catch(e){}if(s&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},s)),this._appendQueryString(),this.username&&this.password?r.open(this.method,this.url,!0,this.username,this.password):r.open(this.method,this.url,!0),this._withCredentials&&(r.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var i=this._header["content-type"],u=this._serializer||request.serialize[i?i.split(";")[0]:""];!u&&isJSON(i)&&(u=request.serialize["application/json"]),u&&(n=u(n))}for(var a in this.header)null!=this.header[a]&&r.setRequestHeader(a,this.header[a]);return this._responseType&&(r.responseType=this._responseType),this.emit("request",this),r.send(void 0!==n?n:null),this},request.Request=Request,request.get=function(e,t,r){var s=request("GET",e);return"function"==typeof t&&(r=t,t=null),t&&s.query(t),r&&s.end(r),s},request.head=function(e,t,r){var s=request("HEAD",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.options=function(e,t,r){var s=request("OPTIONS",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.del=del,request.delete=del,request.patch=function(e,t,r){var s=request("PATCH",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.post=function(e,t,r){var s=request("POST",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s},request.put=function(e,t,r){var s=request("PUT",e);return"function"==typeof t&&(r=t,t=null),t&&s.send(t),r&&s.end(r),s};
124
+ },{"./is-object":60,"./request":62,"./request-base":61,"emitter":29}],60:[function(require,module,exports){
125
+ function isObject(e){return null!==e&&"object"==typeof e}module.exports=isObject;
126
+ },{}],61:[function(require,module,exports){
127
+ var isObject=require("./is-object");exports.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},exports.parse=function(t){return this._parser=t,this},exports.serialize=function(t){return this._serializer=t,this},exports.timeout=function(t){return this._timeout=t,this},exports.then=function(t,e){if(!this._fullfilledPromise){var i=this;this._fullfilledPromise=new Promise(function(t,e){i.end(function(i,r){i?e(i):t(r)})})}return this._fullfilledPromise.then(t,e)},exports.catch=function(t){return this.then(void 0,t)},exports.use=function(t){return t(this),this},exports.get=function(t){return this._header[t.toLowerCase()]},exports.getHeader=exports.get,exports.set=function(t,e){if(isObject(t)){for(var i in t)this.set(i,t[i]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},exports.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},exports.field=function(t,e){if(null===t||void 0===t)throw new Error(".field(name, val) name can not be empty");if(isObject(t)){for(var i in t)this.field(i,t[i]);return this}if(null===e||void 0===e)throw new Error(".field(name, val) val can not be empty");return this._getFormData().append(t,e),this},exports.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},exports.withCredentials=function(){return this._withCredentials=!0,this},exports.redirects=function(t){return this._maxRedirects=t,this},exports.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},exports._isHost=function(t){switch({}.toString.call(t)){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}},exports.send=function(t){var e=isObject(t),i=this._header["content-type"];if(e&&isObject(this._data))for(var r in t)this._data[r]=t[r];else"string"==typeof t?(i||this.type("form"),i=this._header["content-type"],this._data="application/x-www-form-urlencoded"==i?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)?this:(i||this.type("json"),this)};
128
+ },{"./is-object":60}],62:[function(require,module,exports){
129
+ function request(e,n,t){return"function"==typeof t?new e("GET",n).end(t):2==arguments.length?new e("GET",n):new e(n,t)}module.exports=request;
130
+ },{}]},{},[5])(5)
131
+ });
132
+
133
+
134
+ //# sourceMappingURL=/assets/ratchet/core-0.1.14.map.json