diff --git a/bin/gollum b/bin/gollum index 197e996a..e72ec854 100644 --- a/bin/gollum +++ b/bin/gollum @@ -129,6 +129,9 @@ MSG opts.on('--critic-markup', 'Enable support for annotations using CriticMarkup.') do wiki_options[:critic_markup] = true end + opts.on('--mermaid', 'Enable support for Mermaid diagrams.') do + wiki_options[:mermaid] = true + end opts.on('--irb', 'Launch Gollum in \'console mode\', with a predefined API.') do options[:irb] = true end diff --git a/lib/gollum/app.rb b/lib/gollum/app.rb index f0acf0cc..16c555d8 100644 --- a/lib/gollum/app.rb +++ b/lib/gollum/app.rb @@ -31,6 +31,8 @@ require File.expand_path '../helpers', __FILE__ Gollum::set_git_timeout(120) Gollum::set_git_max_filesize(190 * 10**6) +Gollum::Filter::Code.language_handlers[/mermaid/] = Proc.new { |lang, code| "
\n#{code}\n
" } + # Run the frontend, based on Sinatra # # There are a number of wiki options that can be set for the frontend @@ -126,6 +128,8 @@ module Precious @js = settings.wiki_options[:js] @mathjax_config = settings.wiki_options[:mathjax_config] @mathjax = settings.wiki_options[:mathjax] + @mermaid = settings.wiki_options[:mermaid] + Gollum::Filter::Code.language_handlers.delete(/mermaid/) unless @mermaid @use_static_assets = settings.wiki_options.fetch(:static, settings.environment != :development) @static_assets_path = settings.wiki_options.fetch(:static_assets_path, ::File.join(File.dirname(__FILE__), 'public/assets')) diff --git a/lib/gollum/assets.rb b/lib/gollum/assets.rb index f6736b10..49dddef6 100644 --- a/lib/gollum/assets.rb +++ b/lib/gollum/assets.rb @@ -1,8 +1,9 @@ require 'octicons' +require 'uglifier' module Precious module Assets - MANIFEST = %w(app.js editor.js app.css criticmarkup.css fileview.css ie7.css print.css *.png *.jpg *.svg *.eot *.ttf) + MANIFEST = %w(app.js editor.js mermaid.js app.css criticmarkup.css fileview.css ie7.css print.css *.png *.jpg *.svg *.eot *.ttf) ASSET_URL = 'gollum/assets' def self.sprockets(dir = File.dirname(File.expand_path(__FILE__))) @@ -16,7 +17,7 @@ module Precious env.append_path ::File.join(dir, 'public/gollum/images') env.append_path ::File.join(dir, 'public/gollum/fonts') - env.js_compressor = :uglify unless Precious::App.development? + env.js_compressor = ::Uglifier.new(harmony: true) unless Precious::App.development? env.css_compressor = :scss env.context_class.class_eval do diff --git a/lib/gollum/public/assets/.sprockets-manifest-2050088b4e6511eb710e1ec05e329636.json b/lib/gollum/public/assets/.sprockets-manifest-2050088b4e6511eb710e1ec05e329636.json new file mode 100644 index 00000000..b09a8c16 --- /dev/null +++ b/lib/gollum/public/assets/.sprockets-manifest-2050088b4e6511eb710e1ec05e329636.json @@ -0,0 +1 @@ +{"files":{"app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js":{"logical_path":"app.js","mtime":"2022-09-13T11:01:08+02:00","size":189238,"digest":"04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef","integrity":"sha256-BNQLwsWVrts+BfOoEG8a4yvyusSnDtmX3n8XRQjuqe8="},"editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js":{"logical_path":"editor.js","mtime":"2022-09-13T10:48:33+02:00","size":745698,"digest":"dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f","integrity":"sha256-3HR3T4kGwVQWfIjs2p+WtVS2+KNdEwZbRYjjPnAsFX8="},"mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js":{"logical_path":"mermaid.js","mtime":"2022-09-13T11:01:07+02:00","size":1215628,"digest":"7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a","integrity":"sha256-czfV5QVg5hKz4gfEDDAu1AZ04Tq/K0t9VHbOVpzFRFo="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2022-09-13T11:01:08+02:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2020-03-29T22:28:51+02:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2020-03-30T11:12:22+02:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js","editor.js":"editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js","mermaid.js":"mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}} \ No newline at end of file diff --git a/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json b/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json deleted file mode 100644 index 4599e6f4..00000000 --- a/lib/gollum/public/assets/.sprockets-manifest-9ac24f50c124b745e80f4ecb2d86282b.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js":{"logical_path":"app.js","mtime":"2022-06-03T19:51:43-07:00","size":188397,"digest":"6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc","integrity":"sha256-a+9rGQFMZiDqtNr3vFgfnUP/93i9x4qp/lOqosknyMw="},"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js":{"logical_path":"editor.js","mtime":"2022-06-03T19:51:43-07:00","size":745160,"digest":"ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a","integrity":"sha256-699TSgBj/jsFp+far3qkC3j6uYYxQrFh2I8yo/A1N4o="},"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css":{"logical_path":"app.css","mtime":"2022-06-03T19:51:43-07:00","size":396731,"digest":"309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5","integrity":"sha256-MJvgMjlueDsTpH31jzibfI4RwrLUJkBWC4dPZ3wl9uU="},"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css":{"logical_path":"criticmarkup.css","mtime":"2021-02-24T23:16:14-08:00","size":646,"digest":"31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4","integrity":"sha256-Ma5dMoK7uOe3w8mRfp+2jjMVprSnXabOxI0huIRpBcQ="},"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css":{"logical_path":"print.css","mtime":"2021-02-24T23:16:14-08:00","size":75,"digest":"512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb","integrity":"sha256-USSYw2i+DT+xuhBd+oQomuSDgOyfy++Ui9TiOwsJW/s="}},"assets":{"app.js":"app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js","editor.js":"editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js","app.css":"app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css","criticmarkup.css":"criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css","print.css":"print-512498c368be0d3fb1ba105dfa84289ae48380ec9fcbef948bd4e23b0b095bfb.css"}} \ No newline at end of file diff --git a/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js b/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js new file mode 100644 index 00000000..33bbe798 --- /dev/null +++ b/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js @@ -0,0 +1,28 @@ +function brokenAvatarImage(e){return e.onerror="",e.src='data:image/svg+xml;utf8,',!0}function routePath(e){return path=gollumRoutes[e],prefixBaseUrl(path)}function prefixBaseUrl(e){if(baseUrl==undefined)console.log("Gollum error: baseUrl undefined");else{if(e!=undefined)return""==baseUrl?e:("/"==baseUrl.charAt(baseUrl.length-1)?result=baseUrl+e:result=baseUrl+"/"+e,result.replace(/\/{2}/g,"/"));console.log("Could not find route with name: "+name)}}function cleanPath(e){return("/"+e.replace(/\/$/,"")).replace(/\/{2}/g,"/")}function pageName(){return"undefined"==typeof pageFullPath?undefined:(name=pageFullPath.split("/").pop(),name.substring(0,name.lastIndexOf(".")))}function pagePath(){return"undefined"==typeof pageFullPath?undefined:pageFullPath.split("/").slice(0,-1).join("/")}function htmlEscape(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function abspath(e,t){"/"!=t[0]&&(t="/"+t,e&&(t="/"+e+t));var n=t.split("/");return[n.slice(0,-1).join("/"),n.pop()]}function setTextDirection(){$(".markdown-body p, .markdown-body span, .markdown-body pre, .markdown-body table").attr("dir","auto")}function preparePage(){setTextDirection(),"true"==criticMarkup&&($("#wiki-content").addClass("criticmarkup"),$("ins.break").unwrap(),$("span.critic.comment").wrap(''),$("span.critic.comment").filter(function(){return""!=$(this).text()}).before("‡"))}function getLocalTime(e,t){return t===undefined&&(t="Y-m-d %H:%M:%S O"),new Date(e).format(t)}function flashNotice(e,t,n,r,i){nested_button_html="",void 0!==n&&void 0!==r&&(i=void 0!==i&&"danger"==i?" btn-danger":"",nested_button_html='"),html='

'+t+nested_button_html+"

",$("#gollum-flash").remove(),$("#wiki-content").before(html),"success"==e&&setTimeout(function(){$("#gollum-flash").fadeOut()},5e3)}!function(e,t,n){function r(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function i(e){if("keypress"==e.type){var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}return d[e.which]?d[e.which]:f[e.which]?f[e.which]:String.fromCharCode(e.which).toLowerCase()}function o(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function a(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function s(e,t){var n,r=[],i=e;for("+"===i?i=["+"]:i=(i=i.replace(/\+{2}/g,"+plus")).split("+"),n=0;ns||d.hasOwnProperty(s)&&(c[d[s]]=s);n=c[i]?"keydown":"keypress"}return"keypress"==n&&r.length&&(n="keydown"),{key:o,modifiers:r,action:n}}function u(e,n){return null!==e&&e!==t&&(e===n||u(e.parentNode,n))}function l(e){function n(e){e=e||{};var t,n=!1;for(t in g)e[t]?n=!0:g[t]=0;n||(b=!1)}function u(e,t,n,r,i,o){var s,u=[],l=n.type;if(!p._callbacks[e])return[];for("keyup"==l&&a(e)&&(t=[e]),s=0;s":".","?":"/","|":"\\"},p={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};for(n=1;20>n;++n)d[111+n]="f"+n;for(n=0;9>=n;++n)d[n+96]=n.toString();l.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},l.prototype.unbind=function(e,t){return this.bind.call(this,e,function(){},t)},l.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},l.prototype.reset=function(){return this._callbacks={},this._directMap={},this},l.prototype.stopCallback=function(e,t){if(-1<(" "+t.className+" ").indexOf(" mousetrap ")||u(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},l.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},l.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(d[t]=e[t]);c=null},l.init=function(){var e,n=l(t);for(e in n)"_"!==e.charAt(0)&&(l[e]=function(e){return function(){return n[e].apply(n,arguments)}}(e))},l.init(),e.Mousetrap=l,"undefined"!=typeof module&&module.exports&&(module.exports=l),"function"==typeof define&&define.amd&&define(function(){return l})}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null), +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +function(e,t){function n(e){return H.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}function r(e){if(!yt[e]){var t=O.body,n=H("<"+e+">").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(ht||((ht=O.createElement("iframe")).frameBorder=ht.width=ht.height=0),t.appendChild(ht),pt&&ht.createElement||((pt=(ht.contentWindow||ht.contentDocument).document).write((H.support.boxModel?"":"")+""),pt.close()),n=pt.createElement(e),pt.body.appendChild(n),r=H.css(n,"display"),t.removeChild(ht)),yt[e]=r}return yt[e]}function i(e,t){var n={};return H.each(Tt.concat.apply([],Tt.slice(0,t)),function(){n[this]=e}),n}function o(){gt=t}function a(){return setTimeout(o,0),gt=H.now()}function s(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function u(){try{return new e.XMLHttpRequest}catch(t){}}function l(e,n){e.dataFilter&&(n=e.dataFilter(n,e.dataType));var r,i,o,a,s,u,l,c,d=e.dataTypes,f={},h=d.length,p=d[0];for(r=1;r0){if("border"!==n)for(;i=0===n})}function k(e){return!e||!e.parentNode||11===e.parentNode.nodeType}function C(){return!0}function M(){return!1}function _(e,t,n){var r=t+"defer",i=t+"queue",o=t+"mark",a=H._data(e,r);a&&("queue"===n||!H._data(e,i))&&("mark"===n||!H._data(e,o))&&setTimeout(function(){!H._data(e,i)&&!H._data(e,o)&&(H.removeData(e,r,!0),a.fire())},0)}function N(e){for(var t in e)if(("data"!==t||!H.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function E(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(z,"-$1").toLowerCase();if("string"==typeof(r=e.getAttribute(i))){try{r="true"===r||"false"!==r&&("null"===r?null:H.isNumeric(r)?+r:P.test(r)?H.parseJSON(r):r)}catch(j){}H.data(e,n,r)}else r=t}return r}function A(e){var t,n,r=j[e]={};for(t=0,n=(e=e.split(/\s+/)).length;t)[^>]*$|#([\w\-]*)$)/,d=/\S/,f=/^\s+/,h=/\s+$/,p=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,m=/^[\],:{}\s]*$/,g=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,y=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,v=/(?:^|:|,)(?:\s*\[)+/g,b=/(webkit)[ \/]([\w.]+)/,T=/(opera)(?:.*version)?[ \/]([\w.]+)/,w=/(msie) ([\w.]+)/,x=/(mozilla)(?:.*? rv:([\w.]+))?/,D=/-([a-z]|[0-9])/gi,S=/^-ms-/,k=function(e,t){return(t+"").toUpperCase()},C=F.userAgent,M=Object.prototype.toString,_=Object.prototype.hasOwnProperty,N=Array.prototype.push,E=Array.prototype.slice,A=String.prototype.trim,L=Array.prototype.indexOf,H={};return s.fn=s.prototype={constructor:s,init:function(e,n,r){var i,o,a,u;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!n&&O.body)return this.context=O,this[0]=O.body,this.selector=e,this.length=1,this;if("string"==typeof e){if((i="<"!==e.charAt(0)||">"!==e.charAt(e.length-1)||e.length<3?c.exec(e):[null,e,null])&&(i[1]||!n)){if(i[1])return u=(n=n instanceof s?n[0]:n)?n.ownerDocument||n:O,(a=p.exec(e))?s.isPlainObject(n)?(e=[O.createElement(a[1])],s.fn.attr.call(e,n,!0)):e=[u.createElement(a[1])]:e=((a=s.buildFragment([i[1]],[u])).cacheable?s.clone(a.fragment):a.fragment).childNodes,s.merge(this,e);if((o=O.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=O,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return s.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),s.makeArray(e,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return s.isArray(e)?N.apply(r,e):s.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return s.each(this,e,t)},ready:function(e){return s.bindReady(),o.add(e),this},eq:function(e){return-1===(e=+e)?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(e){return this.pushStack(s.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:N,sort:[].sort,splice:[].splice},s.fn.init.prototype=s.fn,s.extend=s.fn.extend=function(){var e,n,r,i,o,a,u=arguments[0]||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=arguments[1]||{},l=2),"object"!=typeof u&&!s.isFunction(u)&&(u={}),c===l&&(u=this,--l);l0)return;o.fireWith(O,[s]),s.fn.trigger&&s(O).trigger("ready").off("ready")}},bindReady:function(){if(!o){if(o=s.Callbacks("once memory"),"complete"===O.readyState)return setTimeout(s.ready,1);if(O.addEventListener)O.addEventListener("DOMContentLoaded",a,!1),e.addEventListener("load",s.ready,!1);else if(O.attachEvent){O.attachEvent("onreadystatechange",a),e.attachEvent("onload",s.ready);var t=!1;try{t=null==e.frameElement}catch(F){}O.documentElement.doScroll&&t&&n()}}},isFunction:function(e){return"function"===s.type(e)},isArray:Array.isArray||function(e){return"array"===s.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?String(e):H[M.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==s.type(e)||e.nodeType||s.isWindow(e))return!1;try{if(e.constructor&&!_.call(e,"constructor")&&!_.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(O){return!1}var n;for(n in e);return n===t||_.call(e,n)},isEmptyObject:function(e){for(var t in e)return!1;return!0},error:function(e){throw new Error(e)},parseJSON:function(t){return"string"==typeof t&&t?(t=s.trim(t),e.JSON&&e.JSON.parse?e.JSON.parse(t):m.test(t.replace(g,"@").replace(y,"]").replace(v,""))?new Function("return "+t)():void s.error("Invalid JSON: "+t)):null},parseXML:function(n){if("string"!=typeof n||!n)return null;var r;try{e.DOMParser?r=(new DOMParser).parseFromString(n,"text/xml"):((r=new ActiveXObject("Microsoft.XMLDOM")).async="false",r.loadXML(n))}catch(l){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&s.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&d.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(S,"ms-").replace(D,k)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toUpperCase()===t.toUpperCase()},each:function(e,n,r){var i,o=0,a=e.length,u=a===t||s.isFunction(e);if(r)if(u){for(i in e)if(!1===n.apply(e[i],r))break}else for(;o0&&e[0]&&e[l-1]||0===l||s.isArray(e)))for(;u1?$.call(arguments,0):t,u.notifyWith(l,a)}}function n(e){return function(t){r[e]=arguments.length>1?$.call(arguments,0):t,--s||u.resolveWith(u,r)}}var r=$.call(arguments,0),i=0,o=r.length,a=Array(o),s=o,u=o<=1&&e&&H.isFunction(e.promise)?e:H.Deferred(),l=u.promise();if(o>1){for(;i
a",n=f.getElementsByTagName("*"),r=f.getElementsByTagName("a")[0],!n||!n.length||!r)return{};o=(i=O.createElement("select")).appendChild(O.createElement("option")),a=f.getElementsByTagName("input")[0],t={leadingWhitespace:3===f.firstChild.nodeType,tbody:!f.getElementsByTagName("tbody").length,htmlSerialize:!!f.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.55/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:"on"===a.value,optSelected:o.selected,getSetAttribute:"t"!==f.className,enctype:!!O.createElement("form").enctype,html5Clone:"<:nav>"!==O.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},H.boxModel=t.boxModel="CSS1Compat"===O.compatMode,a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,i.disabled=!0,t.optDisabled=!o.disabled;try{delete f.test}catch(Y){t.deleteExpando=!1}if(!f.addEventListener&&f.attachEvent&&f.fireEvent&&(f.attachEvent("onclick",function(){t.noCloneEvent=!1}),f.cloneNode(!0).fireEvent("onclick")),(a=O.createElement("input")).value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","checked"),a.setAttribute("name","t"),f.appendChild(a),(s=O.createDocumentFragment()).appendChild(f.lastChild),t.checkClone=s.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=a.checked,s.removeChild(a),s.appendChild(f),f.attachEvent)for(c in{submit:1,change:1,focusin:1})(d=(l="on"+c)in f)||(f.setAttribute(l,"return;"),d="function"==typeof f[l]),t[c+"Bubbles"]=d;return s.removeChild(f),s=i=o=f=a=null,H(function(){var n,r,i,o,a,s,l,c,h,p,m,g,y=O.getElementsByTagName("body")[0];!y||(l=1,m=(g="padding:0;margin:0;border:")+"0;visibility:hidden;",h="
",(n=O.createElement("div")).style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+l+"px",y.insertBefore(n,y.firstChild),f=O.createElement("div"),n.appendChild(f),f.innerHTML="
t
",u=f.getElementsByTagName("td"),d=0===u[0].offsetHeight,u[0].style.display="",u[1].style.display="none",t.reliableHiddenOffsets=d&&0===u[0].offsetHeight,e.getComputedStyle&&(f.innerHTML="",(s=O.createElement("div")).style.width="0",s.style.marginRight="0",f.style.width="2px",f.appendChild(s),t.reliableMarginRight=0===(parseInt((e.getComputedStyle(s,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof f.style.zoom&&(f.innerHTML="",f.style.width=f.style.padding="1px",f.style.border=0,f.style.overflow="hidden",f.style.display="inline",f.style.zoom=1,t.inlineBlockNeedsLayout=3===f.offsetWidth,f.style.display="block",f.style.overflow="visible",f.innerHTML="
",t.shrinkWrapBlocks=3!==f.offsetWidth),f.style.cssText=p+m,f.innerHTML=h,i=(r=f.firstChild).firstChild,o=r.nextSibling.firstChild.firstChild,a={doesNotAddBorder:5!==i.offsetTop,doesAddBorderForTableAndCells:5===o.offsetTop},i.style.position="fixed",i.style.top="20px",a.fixedPosition=20===i.offsetTop||15===i.offsetTop,i.style.position=i.style.top="",r.style.overflow="hidden",r.style.position="relative",a.subtractsBorderForOverflowNotVisible=-5===i.offsetTop,a.doesNotIncludeMarginInBodyOffset=y.offsetTop!==l,e.getComputedStyle&&(f.style.marginTop="1%",t.pixelMargin="1%"!==(e.getComputedStyle(f,null)||{marginTop:0}).marginTop),"undefined"!=typeof n.style.zoom&&(n.style.zoom=1),y.removeChild(n),s=f=n=null,H.extend(t,a))}),t}();var P=/^(?:\{.*\}|\[.*\])$/,z=/([A-Z])/g;H.extend({cache:{},uuid:0,expando:"jQuery"+(H.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?H.cache[e[H.expando]]:e[H.expando])&&!N(e)},data:function(e,n,r,i){if(H.acceptData(e)){var o,a,s,u=H.expando,l="string"==typeof n,c=e.nodeType,d=c?H.cache:e,f=c?e[u]:e[u]&&u,h="events"===n;if((!f||!d[f]||!h&&!i&&!d[f].data)&&l&&r===t)return;return f||(c?e[u]=f=++H.uuid:f=u),d[f]||(d[f]={},c||(d[f].toJSON=H.noop)),"object"!=typeof n&&"function"!=typeof n||(i?d[f]=H.extend(d[f],n):d[f].data=H.extend(d[f].data,n)),o=a=d[f],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[H.camelCase(n)]=r),h&&!a[n]?o.events:(l?null==(s=a[n])&&(s=a[H.camelCase(n)]):s=a,s)}},removeData:function(e,t,n){if(H.acceptData(e)){var r,i,o,a=H.expando,s=e.nodeType,u=s?H.cache:e,l=s?e[a]:a;if(!u[l])return;if(t&&(r=n?u[l]:u[l].data)){H.isArray(t)||(t in r?t=[t]:t=(t=H.camelCase(t))in r?[t]:t.split(" "));for(i=0,o=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){H.removeData(this,e)})}}),H.extend({_mark:function(e,t){e&&(t=(t||"fx")+"mark",H._data(e,t,(H._data(e,t)||0)+1))},_unmark:function(e,t,n){if(!0!==e&&(n=t,t=e,e=!1),t){var r=(n=n||"fx")+"mark",i=e?0:(H._data(t,r)||1)-1;i?H._data(t,r,i):(H.removeData(t,r,!0),_(t,n,"mark"))}},queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=H._data(e,t),n&&(!r||H.isArray(n)?r=H._data(e,t,H.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=H.queue(e,t),r=n.shift(),i={};"inprogress"===r&&(r=n.shift()),r&&("fx"===t&&n.unshift("inprogress"),H._data(e,t+".run",i),r.call(e,function(){H.dequeue(e,t)},i)),n.length||(H.removeData(e,t+"queue "+t+".run",!0),_(e,t,"queue"))}}),H.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){H.removeAttr(this,e)})},prop:function(e,t){return H.access(this,H.prop,e,t,arguments.length>1)},removeProp:function(e){return e=H.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(O){}})},addClass:function(e){var t,n,r,i,o,a,s;if(H.isFunction(e))return this.each(function(t){H(this).addClass(e.call(this,t,this.className))});if(e&&"string"==typeof e)for(t=e.split(q),n=0,r=this.length;n-1)return!0;return!1},val:function(e){var n,r,i,o=this[0];return arguments.length?(i=H.isFunction(e),this.each(function(r){var o,a=H(this);1===this.nodeType&&(null==(o=i?e.call(this,r,a.val()):e)?o="":"number"==typeof o?o+="":H.isArray(o)&&(o=H.map(o,function(e){return null==e?"":e+""})),(n=H.valHooks[this.type]||H.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))})):o?(n=H.valHooks[o.type]||H.valHooks[o.nodeName.toLowerCase()])&&"get"in n&&(r=n.get(o,"value"))!==t?r:"string"==typeof(r=o.value)?r.replace(U,""):null==r?"":r:void 0}}),H.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r,i,o=e.selectedIndex,a=[],s=e.options,u="select-one"===e.type;if(o<0)return null;for(n=u?o:0,r=u?o+1:s.length;n=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(e,n,r,i){var o,a,s,u=e.nodeType;if(e&&3!==u&&8!==u&&2!==u)return i&&n in H.attrFn?H(e)[n](r):"undefined"==typeof e.getAttribute?H.prop(e,n,r):((s=1!==u||!H.isXMLDoc(e))&&(n=n.toLowerCase(),a=H.attrHooks[n]||(V.test(n)?R:I)),r!==t?null===r?void H.removeAttr(e,n):a&&"set"in a&&s&&(o=a.set(e,r,n))!==t?o:(e.setAttribute(n,""+r),r):a&&"get"in a&&s&&null!==(o=a.get(e,n))?o:null===(o=e.getAttribute(n))?t:o)},removeAttr:function(e,t){var n,r,i,o,a,s=0;if(t&&1===e.nodeType)for(o=(r=t.toLowerCase().split(q)).length;s=0}})});var Z=/^(?:textarea|input|select)$/i,J=/^([^\.]*)?(?:\.(.+))?$/,Q=/(?:^|\s)hover(\.\S+)?\b/,ee=/^key/,te=/^(?:mouse|contextmenu)|click/,ne=/^(?:focusinfocus|focusoutblur)$/,re=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,ie=function(e){var t=re.exec(e);return t&&(t[1]=(t[1]||"").toLowerCase(),t[3]=t[3]&&new RegExp("(?:^|\\s)"+t[3]+"(?:\\s|$)")),t},oe=function(e,t){var n=e.attributes||{};return(!t[1]||e.nodeName.toLowerCase()===t[1])&&(!t[2]||(n.id||{}).value===t[2])&&(!t[3]||t[3].test((n["class"]||{}).value))},ae=function(e){return H.event.special.hover?e:e.replace(Q,"mouseenter$1 mouseleave$1")};H.event={add:function(e,n,r,i,o){var a,s,u,l,c,d,f,h,p,m,g;if(3!==e.nodeType&&8!==e.nodeType&&n&&r&&(a=H._data(e))){for(r.handler&&(r=(p=r).handler,o=p.selector),r.guid||(r.guid=H.guid++),(u=a.events)||(a.events=u={}),(s=a.handle)||(a.handle=s=function(e){return void 0===H||e&&H.event.triggered===e.type?t:H.event.dispatch.apply(s.elem,arguments)},s.elem=e), +n=H.trim(ae(n)).split(" "),l=0;l=0&&(g=g.slice(0,-1),s=!0),g.indexOf(".")>=0&&(g=(y=g.split(".")).shift(),y.sort()),(!i||H.event.customEvent[g])&&!H.event.global[g])return;if((n="object"==typeof n?n[H.expando]?n:new H.Event(g,n):new H.Event(g)).type=g,n.isTrigger=!0,n.exclusive=s,n.namespace=y.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,d=g.indexOf(":")<0?"on"+g:"",!i){for(u in a=H.cache)a[u].events&&a[u].events[g]&&H.event.trigger(n,r,a[u].handle.elem,!0);return}if(n.result=t,n.target||(n.target=i),(r=null!=r?H.makeArray(r):[]).unshift(n),(f=H.event.special[g]||{}).trigger&&!1===f.trigger.apply(i,r))return;if(p=[[i,f.bindType||g]],!o&&!f.noBubble&&!H.isWindow(i)){for(m=f.delegateType||g,l=ne.test(m+g)?i:i.parentNode,c=null;l;l=l.parentNode)p.push([l,m]),c=l;c&&c===i.ownerDocument&&p.push([c.defaultView||c.parentWindow||e,m])}for(u=0;up&&v.push({elem:this,matches:h.slice(p)}),r=0;r0?this.on(t,null,e,n):this.trigger(t)},H.attrFn&&(H.attrFn[t]=!0),ee.test(t)&&(H.event.fixHooks[t]=H.event.keyHooks),te.test(t)&&(H.event.fixHooks[t]=H.event.mouseHooks)}),function(){function e(e,t,n,r,o,a){for(var s=0,u=r.length;s0){c=l;break}l=l[e]}r[s]=c}}}function n(e,t,n,r,o,a){for(var s=0,u=r.length;s+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i="sizcache"+(Math.random()+"").replace(".",""),o=0,a=Object.prototype.toString,s=!1,u=!0,l=/\\/g,c=/\r\n/g,d=/\W/;[0,0].sort(function(){return u=!1,0});var f=function(e,t,n,i){n=n||[];var o=t=t||O;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var s,u,l,c,d,h,g,y,v=!0,b=f.isXML(t),x=[],D=e;do{if(r.exec(""),(s=r.exec(D))&&(D=s[3],x.push(s[1]),s[2])){c=s[3];break}}while(s);if(x.length>1&&m.exec(e))if(2===x.length&&p.relative[x[0]])u=w(x[0]+x[1],t,i);else for(u=p.relative[x[0]]?[t]:f(x.shift(),t);x.length;)e=x.shift(),p.relative[e]&&(e+=x.shift()),u=w(e,u,i);else if(!i&&x.length>1&&9===t.nodeType&&!b&&p.match.ID.test(x[0])&&!p.match.ID.test(x[x.length-1])&&(t=(d=f.find(x.shift(),t,b)).expr?f.filter(d.expr,d.set)[0]:d.set[0]),t)for(u=(d=i?{expr:x.pop(),set:T(i)}:f.find(x.pop(),1!==x.length||"~"!==x[0]&&"+"!==x[0]||!t.parentNode?t:t.parentNode,b)).expr?f.filter(d.expr,d.set):d.set,x.length>0?l=T(u):v=!1;x.length;)g=h=x.pop(),p.relative[h]?g=x.pop():h="",null==g&&(g=t),p.relative[h](l,g,b);else l=x=[];if(l||(l=u),l||f.error(h||e),"[object Array]"===a.call(l))if(v)if(t&&1===t.nodeType)for(y=0;null!=l[y];y++)l[y]&&(!0===l[y]||1===l[y].nodeType&&f.contains(t,l[y]))&&n.push(u[y]);else for(y=0;null!=l[y];y++)l[y]&&1===l[y].nodeType&&n.push(u[y]);else n.push.apply(n,l);else T(l,n);return c&&(f(c,o,n,i),f.uniqueSort(n)),n};f.uniqueSort=function(e){if(v&&(s=u,e.sort(v),s))for(var t=1;t0},f.find=function(e,t,n){var r,i,o,a,s,u;if(!e)return[];for(i=0,o=p.order.length;i":function(e,t){var n,r="string"==typeof t,i=0,o=e.length;if(r&&!d.test(t)){for(t=t.toLowerCase();i=0)?n||r.push(a):n&&(t[s]=!1));return!1},ID:function(e){return e[1].replace(l,"")},TAG:function(e){return e[1].replace(l,"").toLowerCase()},CHILD:function(e){if("nth"===e[1]){e[2]||f.error(e[0]),e[2]=e[2].replace(/^\+|\s*/g,"");var t=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(("even"===e[2]?"2n":"odd"===e[2]&&"2n+1")||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=t[1]+(t[2]||1)-0,e[3]=t[3]-0}else e[2]&&f.error(e[0]);return e[0]=o++,e},ATTR:function(e,t,n,r,i,o){var a=e[1]=e[1].replace(l,"");return!o&&p.attrMap[a]&&(e[1]=p.attrMap[a]),e[4]=(e[4]||e[5]||"").replace(l,""),"~="===e[2]&&(e[4]=" "+e[4]+" "),e},PSEUDO:function(e,t,n,i,o){if("not"===e[1]){if(!((r.exec(e[3])||"").length>1||/^\w/.test(e[3]))){var a=f.filter(e[3],t,n,!0^o);return n||i.push.apply(i,a),!1}e[3]=f(e[3],null,null,t)}else if(p.match.POS.test(e[0])||p.match.CHILD.test(e[0]))return!0;return e},POS:function(e){return e.unshift(!0),e}},filters:{enabled:function(e){return!1===e.disabled&&"hidden"!==e.type},disabled:function(e){return!0===e.disabled},checked:function(e){return!0===e.checked},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},parent:function(e){return!!e.firstChild},empty:function(e){return!e.firstChild},has:function(e,t,n){return!!f(n[3],e).length},header:function(e){return/h\d/i.test(e.nodeName)},text:function(e){var t=e.getAttribute("type"),n=e.type;return"input"===e.nodeName.toLowerCase()&&"text"===n&&(t===n||null===t)},radio:function(e){return"input"===e.nodeName.toLowerCase()&&"radio"===e.type},checkbox:function(e){return"input"===e.nodeName.toLowerCase()&&"checkbox"===e.type},file:function(e){return"input"===e.nodeName.toLowerCase()&&"file"===e.type},password:function(e){return"input"===e.nodeName.toLowerCase()&&"password"===e.type},submit:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"submit"===e.type},image:function(e){return"input"===e.nodeName.toLowerCase()&&"image"===e.type},reset:function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&"reset"===e.type},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},input:function(e){return/input|select|textarea|button/i.test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(e,t){return 0===t},last:function(e,t,n,r){return t===r.length-1},even:function(e,t){return t%2==0},odd:function(e,t){return t%2==1},lt:function(e,t,n){return tn[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],o=p.filters[i];if(o)return o(e,n,t,r);if("contains"===i)return(e.textContent||e.innerText||h([e])||"").indexOf(t[3])>=0;if("not"===i){for(var a=t[3],s=0,u=a.length;s=0}},ID:function(e,t){return 1===e.nodeType&&e.getAttribute("id")===t},TAG:function(e,t){return"*"===t&&1===e.nodeType||!!e.nodeName&&e.nodeName.toLowerCase()===t},CLASS:function(e,t){return(" "+(e.className||e.getAttribute("class"))+" ").indexOf(t)>-1},ATTR:function(e,t){var n=t[1],r=f.attr?f.attr(e,n):p.attrHandle[n]?p.attrHandle[n](e):null!=e[n]?e[n]:e.getAttribute(n),i=r+"",o=t[2],a=t[4];return null==r?"!="===o:!o&&f.attr?null!=r:"="===o?i===a:"*="===o?i.indexOf(a)>=0:"~="===o?(" "+i+" ").indexOf(a)>=0:a?"!="===o?i!==a:"^="===o?0===i.indexOf(a):"$="===o?i.substr(i.length-a.length)===a:"|="===o&&(i===a||i.substr(0,a.length+1)===a+"-"):i&&!1!==r},POS:function(e,t,n,r){var i=t[2],o=p.setFilters[i];if(o)return o(e,n,t,r)}}},m=p.match.POS,g=function(e,t){return"\\"+(t-0+1)};for(var y in p.match)p.match[y]=new RegExp(p.match[y].source+/(?![^\[]*\])(?![^\(]*\))/.source),p.leftMatch[y]=new RegExp(/(^(?:.|\r|\n)*?)/.source+p.match[y].source.replace(/\\(\d+)/g,g));p.match.globalPOS=m;var v,b,T=function(e,t){return e=Array.prototype.slice.call(e,0),t?(t.push.apply(t,e),t):e};try{Array.prototype.slice.call(O.documentElement.childNodes,0)[0].nodeType}catch(G){T=function(e,t){var n=0,r=t||[];if("[object Array]"===a.call(e))Array.prototype.push.apply(r,e);else if("number"==typeof e.length)for(var i=e.length;n",r.insertBefore(e,r.firstChild),O.getElementById(n)&&(p.find.ID=function(e,n,r){if("undefined"!=typeof n.getElementById&&!r){var i=n.getElementById(e[1]);return i?i.id===e[1]||"undefined"!=typeof i.getAttributeNode&&i.getAttributeNode("id").nodeValue===e[1]?[i]:t:[]}},p.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),r.removeChild(e),r=e=null}(),function(){var e=O.createElement("div");e.appendChild(O.createComment("")),e.getElementsByTagName("*").length>0&&(p.find.TAG=function(e,t){var n=t.getElementsByTagName(e[1]);if("*"===e[1]){for(var r=[],i=0;n[i];i++)1===n[i].nodeType&&r.push(n[i]);n=r}return n}),e.innerHTML="",e.firstChild&&"undefined"!=typeof e.firstChild.getAttribute&&"#"!==e.firstChild.getAttribute("href")&&(p.attrHandle.href=function(e){return e.getAttribute("href",2)}),e=null}(),O.querySelectorAll&&function(){var e=f,t=O.createElement("div"),n="__sizzle__";if(t.innerHTML="

",!t.querySelectorAll||0!==t.querySelectorAll(".TEST").length){for(var r in f=function(t,r,i,o){if(r=r||O,!o&&!f.isXML(r)){var a=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(t);if(a&&(1===r.nodeType||9===r.nodeType)){if(a[1])return T(r.getElementsByTagName(t),i);if(a[2]&&p.find.CLASS&&r.getElementsByClassName)return T(r.getElementsByClassName(a[2]),i)}if(9===r.nodeType){if("body"===t&&r.body)return T([r.body],i);if(a&&a[3]){var s=r.getElementById(a[3]);if(!s||!s.parentNode)return T([],i);if(s.id===a[3])return T([s],i)}try{return T(r.querySelectorAll(t),i)}catch(l){}}else if(1===r.nodeType&&"object"!==r.nodeName.toLowerCase()){var u=r,c=r.getAttribute("id"),d=c||n,h=r.parentNode,m=/^\s*[+~]/.test(t);c?d=d.replace(/'/g,"\\$&"):r.setAttribute("id",d),m&&h&&(r=r.parentNode);try{if(!m||h)return T(r.querySelectorAll("[id='"+d+"'] "+t),i)}catch(y){}finally{c||u.removeAttribute("id")}}}return e(t,r,i,o)},e)f[r]=e[r];t=null}}(),function(){var e=O.documentElement,t=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(t){var n=!t.call(O.createElement("div"),"div"),r=!1;try{t.call(O.documentElement,"[test!='']:sizzle")}catch(H){r=!0}f.matchesSelector=function(e,i){if(i=i.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!f.isXML(e))try{if(r||!p.match.PSEUDO.test(i)&&!/!=/.test(i)){var o=t.call(e,i);if(o||!n||e.document&&11!==e.document.nodeType)return o}}catch(a){}return f(i,null,null,[e]).length>0}}}(),function(){var e=O.createElement("div");if(e.innerHTML="
",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length){if(e.lastChild.className="e",1===e.getElementsByClassName("e").length)return;p.order.splice(1,0,"CLASS"),p.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null}}(),O.documentElement.contains?f.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:O.documentElement.compareDocumentPosition?f.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:f.contains=function(){return!1},f.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var w=function(e,t,n){for(var r,i=[],o="",a=t.nodeType?[t]:t;r=p.match.PSEUDO.exec(e);)o+=r[0],e=e.replace(p.match.PSEUDO,"");e=p.relative[e]?e+"*":e;for(var s=0,u=a.length;s0)for(o=i;o=0:H.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r,i=[],o=this[0];if(H.isArray(e)){for(var a=1;o&&o.ownerDocument&&o!==t;){for(n=0;n-1:H.find.matchesSelector(o,e)){i.push(o);break}if(!(o=o.parentNode)||!o.ownerDocument||o===t||11===o.nodeType)break}return i=i.length>1?H.unique(i):i,this.pushStack(i,"closest",e)},index:function(e){return e?"string"==typeof e?H.inArray(this[0],H(e)):H.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n="string"==typeof e?H(e,t):H.makeArray(e&&e.nodeType?[e]:e),r=H.merge(this.get(),n);return this.pushStack(k(n[0])||k(r[0])?r:H.unique(r))},andSelf:function(){return this.add(this.prevObject)}}),H.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return H.dir(e,"parentNode")},parentsUntil:function(e,t,n){return H.dir(e,"parentNode",n)},next:function(e){return H.nth(e,2,"nextSibling")},prev:function(e){return H.nth(e,2,"previousSibling")},nextAll:function(e){return H.dir(e,"nextSibling")},prevAll:function(e){return H.dir(e,"previousSibling")},nextUntil:function(e,t,n){return H.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return H.dir(e,"previousSibling",n)},siblings:function(e){return H.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return H.sibling(e.firstChild)},contents:function(e){return H.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:H.makeArray(e.childNodes)}},function(e,t){H.fn[e]=function(n,r){var i=H.map(this,t,n);return se.test(e)||(r=n),r&&"string"==typeof r&&(i=H.filter(r,i)),i=this.length>1&&!he[e]?H.unique(i):i,(this.length>1||le.test(r))&&ue.test(e)&&(i=i.reverse()),this.pushStack(i,e,de.call(arguments).join(","))}}),H.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?H.find.matchesSelector(t[0],e)?[t[0]]:[]:H.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!H(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},nth:function(e,t,n){t=t||1;for(var r=0;e&&(1!==e.nodeType||++r!==t);e=e[n]);return e},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var pe="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",me=/ jQuery\d+="(?:\d+|null)"/g,ge=/^\s+/,ye=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=/<([\w:]+)/,be=/]","i"),Se=/checked\s*(?:[^=]|=\s*.checked.)/i,ke=/\/(java|ecma)script/i,Ce=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},_e=D(O);Me.optgroup=Me.option,Me.tbody=Me.tfoot=Me.colgroup=Me.caption=Me.thead,Me.th=Me.td,H.support.htmlSerialize||(Me._default=[1,"div
","
"]),H.fn.extend({text:function(e){return H.access(this,function(e){return e===t?H.text(this):this.empty().append((this[0]&&this[0].ownerDocument||O).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(H.isFunction(e))return this.each(function(t){H(this).wrapAll(e.call(this,t))});if(this[0]){var t=H(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return H.isFunction(e)?this.each(function(t){H(this).wrapInner(e.call(this,t))}):this.each(function(){var t=H(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=H.isFunction(e);return this.each(function(n){H(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){H.nodeName(this,"body")||H(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=H.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,H.clean(arguments)),e}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!H.filter(e,[n]).length||(!t&&1===n.nodeType&&(H.cleanData(n.getElementsByTagName("*")),H.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&H.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return H.clone(this,e,t)})},html:function(e){return H.access(this,function(e){ +var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(me,""):null;if("string"==typeof e&&!we.test(e)&&(H.support.leadingWhitespace||!ge.test(e))&&!Me[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1>");try{for(;r1&&c0?this.clone(!0):this).get();H(i[a])[t](u),r=r.concat(u)}return this.pushStack(r,e,i.selector)}}),H.extend({clone:function(e,t,n){var r,i,o,a=H.support.html5Clone||H.isXMLDoc(e)||!De.test("<"+e.nodeName+">")?e.cloneNode(!0):g(e);if(!(H.support.noCloneEvent&&H.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||H.isXMLDoc(e)))for(T(e,a),r=b(e),i=b(a),o=0;r[o];++o)i[o]&&T(r[o],i[o]);if(t&&(w(e,a),n))for(r=b(e),i=b(a),o=0;r[o];++o)w(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s=[];"undefined"==typeof(t=t||O).createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||O);for(var u,l=0;null!=(u=e[l]);l++)if("number"==typeof u&&(u+=""),u){if("string"==typeof u)if(Te.test(u)){u=u.replace(ye,"<$1>");var c,d=(ve.exec(u)||["",""])[1].toLowerCase(),f=Me[d]||Me._default,h=f[0],p=t.createElement("div"),m=_e.childNodes;for(t===O?_e.appendChild(p):D(t).appendChild(p),p.innerHTML=f[1]+u+f[2];h--;)p=p.lastChild;if(!H.support.tbody){var g=be.test(u),v="table"!==d||g?""!==f[1]||g?[]:p.childNodes:p.firstChild&&p.firstChild.childNodes;for(a=v.length-1;a>=0;--a)H.nodeName(v[a],"tbody")&&!v[a].childNodes.length&&v[a].parentNode.removeChild(v[a])}!H.support.leadingWhitespace&&ge.test(u)&&p.insertBefore(t.createTextNode(ge.exec(u)[0]),p.firstChild),u=p.childNodes,p&&(p.parentNode.removeChild(p),m.length>0&&((c=m[m.length-1])&&c.parentNode&&c.parentNode.removeChild(c)))}else u=t.createTextNode(u);var b;if(!H.support.appendChecked)if(u[0]&&"number"==typeof(b=u.length))for(a=0;a1)},H.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ne(e,"opacity");return""===n?"1":n}return e.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:H.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s=H.camelCase(n),u=e.style,l=H.cssHooks[s];if(n=H.cssProps[s]||s,r===t)return l&&"get"in l&&(o=l.get(e,!1,i))!==t?o:u[n];if("string"===(a=typeof r)&&(o=$e.exec(r))&&(r=+(o[1]+1)*+o[2]+parseFloat(H.css(e,n)),a="number"),null==r||"number"===a&&isNaN(r))return;if("number"===a&&!H.cssNumber[s]&&(r+="px"),!(l&&"set"in l&&(r=l.set(e,r))===t))try{u[n]=r}catch(E){}}},css:function(e,n,r){var i,o;return n=H.camelCase(n),o=H.cssHooks[n],"cssFloat"===(n=H.cssProps[n]||n)&&(n="float"),o&&"get"in o&&(i=o.get(e,!0,r))!==t?i:Ne?Ne(e,n):void 0},swap:function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r}}),H.curCSS=H.css,O.defaultView&&O.defaultView.getComputedStyle&&(Ee=function(e,t){var n,r,i,o,a=e.style;return t=t.replace(Le,"-$1").toLowerCase(),(r=e.ownerDocument.defaultView)&&(i=r.getComputedStyle(e,null))&&(""===(n=i.getPropertyValue(t))&&!H.contains(e.ownerDocument.documentElement,e)&&(n=H.style(e,t))),!H.support.pixelMargin&&i&&Pe.test(t)&&je.test(n)&&(o=a.width,a.width=n,n=i.width,a.width=o),n}),O.documentElement.currentStyle&&(Ae=function(e,t){var n,r,i,o=e.currentStyle&&e.currentStyle[t],a=e.style;return null==o&&a&&(i=a[t])&&(o=i),je.test(o)&&(n=a.left,(r=e.runtimeStyle&&e.runtimeStyle.left)&&(e.runtimeStyle.left=e.currentStyle.left),a.left="fontSize"===t?"1em":o,o=a.pixelLeft+"px",a.left=n,r&&(e.runtimeStyle.left=r)),""===o?"auto":o}),Ne=Ee||Ae,H.each(["height","width"],function(e,t){H.cssHooks[t]={get:function(e,n,r){if(n)return 0!==e.offsetWidth?m(e,t,r):H.swap(e,ze,function(){return m(e,t,r)})},set:function(e,t){return He.test(t)?t+"px":t}}}),H.support.opacity||(H.cssHooks.opacity={get:function(e,t){return Fe.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?parseFloat(RegExp.$1)/100+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=H.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,t>=1&&""===H.trim(o.replace(Oe,""))&&(n.removeAttribute("filter"),r&&!r.filter)||(n.filter=Oe.test(o)?o.replace(Oe,i):o+" "+i)}}),H(function(){H.support.reliableMarginRight||(H.cssHooks.marginRight={get:function(e,t){return H.swap(e,{display:"inline-block"},function(){return t?Ne(e,"margin-right"):e.style.marginRight})}})}),H.expr&&H.expr.filters&&(H.expr.filters.hidden=function(e){var t=e.offsetWidth,n=e.offsetHeight;return 0===t&&0===n||!H.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||H.css(e,"display"))},H.expr.filters.visible=function(e){return!H.expr.filters.hidden(e)}),H.each({margin:"",padding:"",border:"Width"},function(e,t){H.cssHooks[e+t]={expand:function(n){var r,i="string"==typeof n?n.split(" "):[n],o={};for(r=0;r<4;r++)o[e+Ie[r]+t]=i[r]||i[r-2]||i[0];return o}}});var Re,We,Be=/%20/g,qe=/\[\]$/,Ue=/\r?\n/g,Ye=/#.*$/,Ke=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ge=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Ve=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Xe=/^(?:GET|HEAD)$/,Ze=/^\/\//,Je=/\?/,Qe=/)<[^<]*)*<\/script>/gi,et=/^(?:select|textarea)/i,tt=/\s+/,nt=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,it=H.fn.load,ot={},at={},st=["*/"]+["*"];try{Re=L.href}catch(St){(Re=O.createElement("a")).href="",Re=Re.href}We=rt.exec(Re.toLowerCase())||[],H.fn.extend({load:function(e,n,r){if("string"!=typeof e&&it)return it.apply(this,arguments);if(!this.length)return this;var i=e.indexOf(" ");if(i>=0){var o=e.slice(i,e.length);e=e.slice(0,i)}var a="GET";n&&(H.isFunction(n)?(r=n,n=t):"object"==typeof n&&(n=H.param(n,H.ajaxSettings.traditional),a="POST"));var s=this;return H.ajax({url:e,type:a,dataType:"html",data:n,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),s.html(o?H("
").append(n.replace(Qe,"")).find(o):n)),r&&s.each(r,[n,t,e])}}),this},serialize:function(){return H.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?H.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||et.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=H(this).val();return null==n?null:H.isArray(n)?H.map(n,function(e){return{name:t.name,value:e.replace(Ue,"\r\n")}}):{name:t.name,value:n.replace(Ue,"\r\n")}}).get()}}),H.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){H.fn[t]=function(e){return this.on(t,e)}}),H.each(["get","post"],function(e,n){H[n]=function(e,r,i,o){return H.isFunction(r)&&(o=o||i,i=r,r=t),H.ajax({type:n,url:e,data:r,success:i,dataType:o})}}),H.extend({getScript:function(e,n){return H.get(e,t,n,"script")},getJSON:function(e,t,n){return H.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?f(e,H.ajaxSettings):(t=e,e=H.ajaxSettings),f(e,t),e},ajaxSettings:{url:Re,isLocal:Ve.test(We[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":st},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":H.parseJSON,"text xml":H.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:p(ot),ajaxTransport:p(at),ajax:function(e,n){function r(e,n,r,a){if(2!==D){D=2,u&&clearTimeout(u),s=t,o=a||"",S.readyState=e>0?4:0;var d,h,p,w,x,k=n,C=r?c(m,S,r):t;if(e>=200&&e<300||304===e)if(m.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(H.lastModified[i]=w),(x=S.getResponseHeader("Etag"))&&(H.etag[i]=x)),304===e)k="notmodified",d=!0;else try{h=l(m,C),k="success",d=!0}catch(J){k="parsererror",p=J}else p=k,k&&!e||(k="error",e<0&&(e=0));S.status=e,S.statusText=""+(n||k),d?v.resolveWith(g,[h,k,S]):v.rejectWith(g,[S,k,p]),S.statusCode(T),T=t,f&&y.trigger("ajax"+(d?"Success":"Error"),[S,m,d?h:p]),b.fireWith(g,[S,k]),f&&(y.trigger("ajaxComplete",[S,m]),--H.active||H.event.trigger("ajaxStop"))}}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,d,f,p,m=H.ajaxSetup({},n),g=m.context||m,y=g!==m&&(g.nodeType||g instanceof H)?H(g):H.event,v=H.Deferred(),b=H.Callbacks("once memory"),T=m.statusCode||{},w={},x={},D=0,S={readyState:0,setRequestHeader:function(e,t){if(!D){var n=e.toLowerCase();e=x[n]=x[n]||e,w[e]=t}return this},getAllResponseHeaders:function(){return 2===D?o:null},getResponseHeader:function(e){var n;if(2===D){if(!a)for(a={};n=Ke.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return D||(m.mimeType=e),this},abort:function(e){return e=e||"abort",s&&s.abort(e),r(0,e),this}};if(v.promise(S),S.success=S.done,S.error=S.fail,S.complete=b.add,S.statusCode=function(e){var t;if(e)if(D<2)for(t in e)T[t]=[T[t],e[t]];else t=e[S.status],S.then(t,t);return this},m.url=((e||m.url)+"").replace(Ye,"").replace(Ze,We[1]+"//"),m.dataTypes=H.trim(m.dataType||"*").toLowerCase().split(tt),null==m.crossDomain&&(d=rt.exec(m.url.toLowerCase()),m.crossDomain=!(!d||d[1]==We[1]&&d[2]==We[2]&&(d[3]||("http:"===d[1]?80:443))==(We[3]||("http:"===We[1]?80:443)))),m.data&&m.processData&&"string"!=typeof m.data&&(m.data=H.param(m.data,m.traditional)),h(ot,m,n,S),2===D)return!1;if(f=m.global,m.type=m.type.toUpperCase(),m.hasContent=!Xe.test(m.type),f&&0==H.active++&&H.event.trigger("ajaxStart"),!m.hasContent&&(m.data&&(m.url+=(Je.test(m.url)?"&":"?")+m.data,delete m.data),i=m.url,!1===m.cache)){var k=H.now(),C=m.url.replace(nt,"$1_="+k);m.url=C+(C===m.url?(Je.test(m.url)?"&":"?")+"_="+k:"")}for(p in(m.data&&m.hasContent&&!1!==m.contentType||n.contentType)&&S.setRequestHeader("Content-Type",m.contentType),m.ifModified&&(i=i||m.url,H.lastModified[i]&&S.setRequestHeader("If-Modified-Since",H.lastModified[i]),H.etag[i]&&S.setRequestHeader("If-None-Match",H.etag[i])),S.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+st+"; q=0.01":""):m.accepts["*"]),m.headers)S.setRequestHeader(p,m.headers[p]);if(m.beforeSend&&(!1===m.beforeSend.call(g,S,m)||2===D))return S.abort(),!1;for(p in{success:1,error:1,complete:1})S[p](m[p]);if(s=h(at,m,n,S)){S.readyState=1,f&&y.trigger("ajaxSend",[S,m]),m.async&&m.timeout>0&&(u=setTimeout(function(){S.abort("timeout")},m.timeout));try{D=1,s.send(w,r)}catch(Z){if(!(D<2))throw Z;r(-1,Z)}}else r(-1,"No Transport");return S},param:function(e,n){var r=[],i=function(e,t){t=H.isFunction(t)?t():t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=H.ajaxSettings.traditional),H.isArray(e)||e.jquery&&!H.isPlainObject(e))H.each(e,function(){i(this.name,this.value)});else for(var o in e)d(o,e[o],n,i);return r.join("&").replace(Be,"+")}}),H.extend({active:0,lastModified:{},etag:{}});var ut=H.now(),lt=/(\=)\?(&|$)|\?\?/i;H.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return H.expando+"_"+ut++}}),H.ajaxPrefilter("json jsonp",function(t,n,r){var i="string"==typeof t.data&&/^application\/x\-www\-form\-urlencoded/.test(t.contentType);if("jsonp"===t.dataTypes[0]||!1!==t.jsonp&&(lt.test(t.url)||i&<.test(t.data))){var o,a=t.jsonpCallback=H.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s=e[a],u=t.url,l=t.data,c="$1"+a+"$2";return!1!==t.jsonp&&(u=u.replace(lt,c),t.url===u&&(i&&(l=l.replace(lt,c)),t.data===l&&(u+=(/\?/.test(u)?"&":"?")+t.jsonp+"="+a))),t.url=u,t.data=l,e[a]=function(e){o=[e]},r.always(function(){e[a]=s,o&&H.isFunction(s)&&e[a](o[0])}),t.converters["script json"]=function(){return o||H.error(a+" was not called"),o[0]},t.dataTypes[0]="json","script"}}),H.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return H.globalEval(e),e}}}),H.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),H.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=O.head||O.getElementsByTagName("head")[0]||O.documentElement;return{send:function(i,o){(n=O.createElement("script")).async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){(i||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var ct,dt=!!e.ActiveXObject&&function(){for(var e in ct)ct[e](0,1)},ft=0;H.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&u()||s()}:u,function(e){H.extend(H.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(H.ajaxSettings.xhr()),H.support.ajax&&H.ajaxTransport(function(n){var r;if(!n.crossDomain||H.support.cors)return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(z){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,d,f;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=H.noop,dt&&delete ct[a]),i)4!==u.readyState&&u.abort();else{s=u.status,c=u.getAllResponseHeaders(),d={},(f=u.responseXML)&&f.documentElement&&(d.xml=f);try{d.text=u.responseText}catch(e){}try{l=u.statusText}catch(B){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=d.text?200:404}}catch(q){i||o(-1,q)}d&&o(s,l,d,c)},n.async&&4!==u.readyState?(a=++ft,dt&&(ct||(ct={},H(e).unload(dt)),ct[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}});var ht,pt,mt,gt,yt={},vt=/^(?:toggle|show|hide)$/,bt=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,Tt=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];H.fn.extend({show:function(e,t,n){var o,a;if(e||0===e)return this.animate(i("show",3),e,t,n);for(var s=0,u=this.length;s=u.duration+this.startTime){for(t in this.now=this.end,this.pos=this.state=1,this.update(),u.animatedProperties[this.prop]=!0,u.animatedProperties)!0!==u.animatedProperties[t]&&(o=!1);if(o){if(null!=u.overflow&&!H.support.shrinkWrapBlocks&&H.each(["","X","Y"],function(e,t){s.style["overflow"+t]=u.overflow[e]}),u.hide&&H(s).hide(),u.hide||u.show)for(t in u.animatedProperties)H.style(s,t,u.orig[t]),H.removeData(s,"fxshow"+t,!0),H.removeData(s,"toggle"+t,!0);(r=u.complete)&&(u.complete=!1,r.call(s))}return!1}return u.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/u.duration,this.pos=H.easing[u.animatedProperties[this.prop]](this.state,n,0,1,u.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},H.extend(H.fx,{tick:function(){for(var e,t=H.timers,n=0;n-1?(i=(d=a.position()).top,o=d.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),H.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(c.top=t.top-s.top+i),null!=t.left&&(c.left=t.left-s.left+o),"using"in t?t.using.call(e,c):a.css(c)}},H.fn.extend({position:function(){if(!this[0])return null;var e=this[0],t=this.offsetParent(),n=this.offset(),r=Dt.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(H.css(e,"marginTop"))||0,n.left-=parseFloat(H.css(e,"marginLeft"))||0,r.top+=parseFloat(H.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(H.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||O.body;e&&!Dt.test(e.nodeName)&&"static"===H.css(e,"position");)e=e.offsetParent;return e})}}),H.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,r){var i=/Y/.test(r);H.fn[e]=function(o){return H.access(this,function(e,o,a){var s=n(e);if(a===t)return s?r in s?s[r]:H.support.boxModel&&s.document.documentElement[o]||s.document.body[o]:e[o];s?s.scrollTo(i?H(s).scrollLeft():a,i?a:H(s).scrollTop()):e[o]=a},e,o,arguments.length,null)}}),H.each({Height:"height",Width:"width"},function(e,n){var r="client"+e,i="scroll"+e,o="offset"+e;H.fn["inner"+e]=function(){var e=this[0];return e?e.style?parseFloat(H.css(e,n,"padding")):this[n]():null},H.fn["outer"+e]=function(e){var t=this[0];return t?t.style?parseFloat(H.css(t,n,e?"margin":"border")):this[n]():null},H.fn[n]=function(e){return H.access(this,function(e,n,a){var s,u,l,c;return H.isWindow(e)?(u=(s=e.document).documentElement[r],H.support.boxModel&&u||s.body&&s.body[r]||u):9===e.nodeType?(s=e.documentElement)[r]>=s[i]?s[r]:Math.max(e.body[i],s[i],e.body[o],s[o]):a===t?(l=H.css(e,n),c=parseFloat(l),H.isNumeric(c)?c:l):void H(e).css(n,a)},n,e,arguments.length,null)}}),e.jQuery=e.$=H,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return H})}(window), +/** + * Identicon.js 2.3.3 + * http://github.com/stewartlord/identicon.js + * + * PNGLib required for PNG output + * http://www.xarg.org/download/pnglib.js + * + * Copyright 2018, Stewart Lord + * Released under the BSD license + * http://www.opensource.org/licenses/bsd-license.php + */ +function(){var e;e="undefined"!=typeof module&&"undefined"!=typeof module.exports?require("./pnglib"):window.PNGlib;var t=function(e,t){if("string"!=typeof e||e.length<15)throw"A hash of at least 15 characters is required.";this.defaults={background:[240,240,240,255],margin:.08,size:64,saturation:.7,brightness:.5,format:"png"},this.options="object"==typeof t?t:this.defaults,"number"==typeof arguments[1]&&(this.options.size=arguments[1]),arguments[2]&&(this.options.margin=arguments[2]),this.hash=e,this.background=this.options.background||this.defaults.background,this.size=this.options.size||this.defaults.size,this.format=this.options.format||this.defaults.format,this.margin=this.options.margin!==undefined?this.options.margin:this.defaults.margin;var n=parseInt(this.hash.substr(-7),16)/268435455,r=this.options.saturation||this.defaults.saturation,i=this.options.brightness||this.defaults.brightness;this.foreground=this.options.foreground||this.hsl2rgb(n,r,i)};t.prototype={background:null,foreground:null,hash:null,margin:null,size:null,format:null,image:function(){return this.isSvg()?new n(this.size,this.foreground,this.background):new e(this.size,this.size,256)},render:function(){var e,t,n=this.image(),r=this.size,i=Math.floor(r*this.margin),o=Math.floor((r-2*i)/5),a=Math.floor((r-5*o)/2),s=n.color.apply(n,this.background),u=n.color.apply(n,this.foreground);for(e=0;e<15;e++)t=parseInt(this.hash.charAt(e),16)%2?s:u,e<5?this.rectangle(2*o+a,e*o+a,o,o,t,n):e<10?(this.rectangle(1*o+a,(e-5)*o+a,o,o,t,n),this.rectangle(3*o+a,(e-5)*o+a,o,o,t,n)):e<15&&(this.rectangle(0*o+a,(e-10)*o+a,o,o,t,n),this.rectangle(4*o+a,(e-10)*o+a,o,o,t,n));return n},rectangle:function(e,t,n,r,i,o){var a,s;if(this.isSvg())o.rectangles.push({x:e,y:t,w:n,h:r,color:i});else for(a=e;a=0&&r<=255?r/255:1),"rgba("+i.join(",")+")"},getDump:function(){var e,t,n,r=this.foreground,i=this.background,o=.005*this.size;for(t="",e=0;e");return t+=""},getBase64:function(){if("function"==typeof btoa)return btoa(this.getDump());if(Buffer)return new Buffer(this.getDump(),"binary").toString("base64");throw"Cannot generate base64 output"}},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=t:window.Identicon=t}(), +/** + * @overview datejs + * @version 1.0.0-rc3 + * @author Gregory Wild-Smith + * @copyright 2015 Gregory Wild-Smith + * @license MIT + * @homepage https://github.com/abritinthebay/datejs + */ +function(){var e=Date,t=Date.CultureStrings?Date.CultureStrings.lang:null,n={},r={getFromKey:function(e,t){var n;return n=Date.CultureStrings&&Date.CultureStrings[t]&&Date.CultureStrings[t][e]?Date.CultureStrings[t][e]:r.buildFromDefault(e),"/"===e.charAt(0)&&(n=r.buildFromRegex(e,t)),n},getFromObjectValues:function(e,t){var n,i={};for(n in e)e.hasOwnProperty(n)&&(i[n]=r.getFromKey(e[n],t));return i},getFromObjectKeys:function(e,t){var n,i={};for(n in e)e.hasOwnProperty(n)&&(i[r.getFromKey(n,t)]=e[n]);return i},getFromArray:function(e,t){for(var n=[],i=0;it?1:0;throw new TypeError(e+" - "+t)},e.equals=function(e,t){return 0===e.compareTo(t)},e.getDayName=function(e){return Date.CultureInfo.dayNames[e]},e.getDayNumberFromName=function(e){var t=Date.CultureInfo.dayNames,n=Date.CultureInfo.abbreviatedDayNames,r=Date.CultureInfo.shortestDayNames;e=e.toLowerCase();for(var i=0;in)};e.validateMillisecond=function(e){return r(e,0,999,"millisecond")},e.validateSecond=function(e){return r(e,0,59,"second")},e.validateMinute=function(e){return r(e,0,59,"minute")},e.validateHour=function(e){return r(e,0,23,"hour")},e.validateDay=function(t,n,i){return null!=n&&null!=i&&r(t,1,e.getDaysInMonth(n,i),"day")},e.validateWeek=function(e){return r(e,0,53,"week")},e.validateMonth=function(e){return r(e,0,11,"month")},e.validateYear=function(e){return r(e,-271822,275760,"year")},e.validateTimezone=function(e){return 1==={ACDT:1,ACST:1,ACT:1,ADT:1,AEDT:1,AEST:1,AFT:1,AKDT:1,AKST:1,AMST:1,AMT:1,ART:1,AST:1,AWDT:1,AWST:1,AZOST:1,AZT:1,BDT:1,BIOT:1,BIT:1,BOT:1,BRT:1,BST:1,BTT:1,CAT:1,CCT:1,CDT:1,CEDT:1,CEST:1,CET:1,CHADT:1,CHAST:1,CHOT:1,ChST:1,CHUT:1,CIST:1,CIT:1,CKT:1,CLST:1,CLT:1,COST:1,COT:1,CST:1,CT:1,CVT:1,CWST:1,CXT:1,DAVT:1,DDUT:1,DFT:1,EASST:1,EAST:1,EAT:1,ECT:1,EDT:1,EEDT:1,EEST:1,EET:1,EGST:1,EGT:1,EIT:1,EST:1,FET:1,FJT:1,FKST:1,FKT:1,FNT:1,GALT:1,GAMT:1,GET:1,GFT:1,GILT:1,GIT:1,GMT:1,GST:1,GYT:1,HADT:1,HAEC:1,HAST:1,HKT:1,HMT:1,HOVT:1,HST:1,ICT:1,IDT:1,IOT:1,IRDT:1,IRKT:1,IRST:1,IST:1,JST:1,KGT:1,KOST:1,KRAT:1,KST:1,LHST:1,LINT:1,MAGT:1,MART:1,MAWT:1,MDT:1,MET:1,MEST:1,MHT:1,MIST:1,MIT:1,MMT:1,MSK:1,MST:1,MUT:1,MVT:1,MYT:1,NCT:1,NDT:1,NFT:1,NPT:1,NST:1,NT:1,NUT:1,NZDT:1,NZST:1,OMST:1,ORAT:1,PDT:1,PET:1,PETT:1,PGT:1,PHOT:1,PHT:1,PKT:1,PMDT:1,PMST:1,PONT:1,PST:1,PYST:1,PYT:1,RET:1,ROTT:1,SAKT:1,SAMT:1,SAST:1,SBT:1,SCT:1,SGT:1,SLST:1,SRT:1,SST:1,SYOT:1,TAHT:1,THA:1,TFT:1,TJT:1,TKT:1,TLT:1,TMT:1,TOT:1,TVT:1,UCT:1,ULAT:1,UTC:1,UYST:1,UYT:1,UZT:1,VET:1,VLAT:1,VOLT:1,VOST:1,VUT:1,WAKT:1,WAST:1,WAT:1,WEDT:1,WEST:1,WET:1,WST:1,YAKT:1,YEKT:1,Z:1}[e]},e.validateTimezoneOffset=function(e){return-841e}}(),function(){var e=Date,t=e.prototype,n=function(e,t){return t||(t=2),("000"+e).slice(-1*t)},r=function(t){var n,r,i={},o=this;for(n in r=function(n,r,i){if("day"===n){n=void 0!==t.month?t.month:o.getMonth();var a=void 0!==t.year?t.year:o.getFullYear();return e[r](i,a,n)}return e[r](i)},t)if(Object.prototype.hasOwnProperty.call(t,n)){var a="validate"+n.charAt(0).toUpperCase()+n.slice(1);e[a]&&null!==t[n]&&r(n,a,t[n])&&(i[n]=t[n])}return i};t.clearTime=function(){return this.setHours(0),this.setMinutes(0),this.setSeconds(0),this.setMilliseconds(0),this},t.setTimeToNow=function(){var e=new Date;return this.setHours(e.getHours()),this.setMinutes(e.getMinutes()),this.setSeconds(e.getSeconds()),this.setMilliseconds(e.getMilliseconds()),this},t.clone=function(){return new Date(this.getTime())},t.compareTo=function(e){return Date.compare(this,e)},t.equals=function(e){return Date.equals(this,void 0!==e?e:new Date)},t.between=function(e,t){return this.getTime()>=e.getTime()&&this.getTime()<=t.getTime()},t.isAfter=function(e){return 1===this.compareTo(e||new Date)},t.isBefore=function(e){return-1===this.compareTo(e||new Date)},t.isToday=t.isSameDay=function(e){return this.clone().clearTime().equals((e||new Date).clone().clearTime())},t.addMilliseconds=function(e){return e?(this.setTime(this.getTime()+1*e),this):this},t.addSeconds=function(e){return e?this.addMilliseconds(1e3*e):this},t.addMinutes=function(e){return e?this.addMilliseconds(6e4*e):this},t.addHours=function(e){return e?this.addMilliseconds(36e5*e):this},t.addDays=function(e){return e?(this.setDate(this.getDate()+1*e),this):this},t.addWeekdays=function(e){if(!e)return this;var t=this.getDay(),n=Math.ceil(Math.abs(e)/7);if((0===t||6===t)&&0e){for(;0>e;)this.addDays(-1),0!==(t=this.getDay())&&6!==t&&e++;return this}return(5t))return this;this.moveToLastDayOfMonth(),this.is().weekday()&&(t+=1)}return this.addWeekdays(t)}var n=0;if(0(e=-10*(e||this.getTimezoneOffset())/6)?(e=(e-1e4).toString()).charAt(0)+e.substr(2):"+"+(e=(e+1e4).toString()).substr(1)},t.getElapsed=function(e){return(e||new Date)-this},t.set=function(e){for(var t in e=r.call(this,e))if(Object.prototype.hasOwnProperty.call(e,t)){var n,i,o=t.charAt(0).toUpperCase()+t.slice(1);"week"!==t&&"month"!==t&&"timezone"!==t&&"timezoneOffset"!==t&&(o+="s"),n="add"+o,i="get"+o,"month"===t?n+="s":"year"===t&&(i="getFullYear"),"day"!==t&&"timezone"!==t&&"timezoneOffset"!==t&&"week"!==t&&"hour"!==t?this[n](e[t]-this[i]()):"timezone"!==t&&"timezoneOffset"!==t&&"week"!==t&&"hour"!==t||this["set"+o](e[t])}return e.day&&this.addDays(e.day-this.getDate()),this},t.moveToFirstDayOfMonth=function(){return this.set({day:1})},t.moveToLastDayOfMonth=function(){return this.set({day:e.getDaysInMonth(this.getFullYear(),this.getMonth())})};var o=function(e){switch(1*e){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},a=function(e){var t=Date.CultureInfo.formatPatterns;switch(e){case"d":return this.toString(t.shortDate);case"D":return this.toString(t.longDate);case"F":return this.toString(t.fullDateTime);case"m":return this.toString(t.monthDay);case"r":case"R":return(e=this.clone().addMinutes(this.getTimezoneOffset())).toString(t.rfc1123)+" GMT";case"s":return this.toString(t.sortableDateTime);case"t":return this.toString(t.shortTime);case"T":return this.toString(t.longTime);case"u":return(e=this.clone().addMinutes(this.getTimezoneOffset())).toString(t.universalSortableDateTime);case"y":return this.toString(t.yearMonth);default:return!1}},s=function(t){return function(r){if("\\"===r.charAt(0))return r.replace("\\","");switch(r){case"hh":return n(13>t.getHours()?0===t.getHours()?12:t.getHours():t.getHours()-12);case"h":return 13>t.getHours()?0===t.getHours()?12:t.getHours():t.getHours()-12;case"HH":return n(t.getHours());case"H":return t.getHours();case"mm":return n(t.getMinutes());case"m":return t.getMinutes();case"ss":return n(t.getSeconds());case"s":return t.getSeconds();case"yyyy":return n(t.getFullYear(),4);case"yy":return n(t.getFullYear());case"y":return t.getFullYear();case"E":case"dddd":return Date.CultureInfo.dayNames[t.getDay()];case"ddd":return Date.CultureInfo.abbreviatedDayNames[t.getDay()];case"dd":return n(t.getDate());case"d":return t.getDate();case"MMMM":return Date.CultureInfo.monthNames[t.getMonth()];case"MMM":return Date.CultureInfo.abbreviatedMonthNames[t.getMonth()];case"MM":return n(t.getMonth()+1);case"M":return t.getMonth()+1;case"t":return 12>t.getHours()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case"tt":return 12>t.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case"S":return o(t.getDate());case"W":return t.getWeek();case"WW":return t.getISOWeek();case"Q":return"Q"+t.getQuarter();case"q":return String(t.getQuarter());case"z":return t.getTimezone();case"Z":case"X":return Date.getTimezoneOffset(t.getTimezone());case"ZZ":return-60*t.getTimezoneOffset();case"u":return t.getDay();case"L":return e.isLeapYear(t.getFullYear())?1:0;case"B":return"@"+(t.getUTCSeconds()+60*t.getUTCMinutes()+3600*(t.getUTCHours()+1))/86.4;default:return r}}};t.toString=function(e,t){if(!t&&e&&1===e.length&&(output=a.call(this,e)))return output;var n=s(this);return e?e.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q|WW?W?W?)(?![^\[]*\]))/g,n).replace(/\[|\]/g,""):this._toString()}}(),function(){var e=Date,t=e.prototype,n=Number.prototype;t._orient=1,t._nth=null,t._is=!1,t._same=!1,t._isSecond=!1,n._dateElement="days",t.next=function(){return this._move=!0,this._orient=1,this},e.next=function(){return e.today().next()},t.last=t.prev=t.previous=function(){return this._move=!0,this._orient=-1,this},e.last=e.prev=e.previous=function(){return e.today().last()},t.is=function(){return this._is=!0,this},t.same=function(){return this._same=!0,this._isSecond=!1,this},t.today=function(){return this.same().day()},t.weekday=function(){return this._nth?u("Weekday").call(this):this._move?this.addWeekdays(this._orient):!!this._is&&(this._is=!1,!this.is().sat()&&!this.is().sun())},t.weekend=function(){return!!this._is&&(this._is=!1,this.is().sat()||this.is().sun())},t.at=function(t){return"string"==typeof t?e.parse(this.toString("d")+" "+t):this.set(t)},n.fromNow=n.after=function(e){var t={};return t[this._dateElement]=this,(e?e.clone():new Date).add(t)},n.ago=n.before=function(e){var t={};return t["s"!==this._dateElement[this._dateElement.length-1]?this._dateElement+"s":this._dateElement]=-1*this,(e?e.clone():new Date).add(t)};var r="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),i="january february march april may june july august september october november december".split(/\s/),o="Millisecond Second Minute Hour Day Week Month Year Quarter Weekday".split(/\s/),a="Milliseconds Seconds Minutes Hours Date Week Month FullYear Quarter".split(/\s/),s="final first second third fourth fifth".split(/\s/);t.toObject=function(){for(var e={},t=0;tr)throw new RangeError(e.getDayName(t)+" does not occur "+n+" times in the month of "+e.getMonthName(r.getMonth())+" "+r.getFullYear()+".");return this}return this.moveToDayOfWeek(t,this._orient)}};(l=function(n,r,i){for(var o=0;ot.length&&0>t.indexOf(".")&&0>t.indexOf("/"))return r.year=t,e.processTimeObject(r);if(!(t=t.match(this.regex))||!t.length)return null;for(n=0;nu;u++){var l=i.shift();l&&(delete n[l],r--)}try{a=n[s]=n[s]||t.call(this,s)}catch(c){a=n[s]=c}if(r++,i.push(s),a instanceof e.Exception)throw a;return a}},any:function(){var t=arguments;return function(r){for(var i=null,o=0;othis.hour&&Date.Config.strict24hr)throw"Invalid hour and meridian combination";"p"===this.meridian&&12>this.hour?this.hour+=12:"a"===this.meridian&&12===this.hour&&(this.hour=0)}};e.Translator={hour:function(e){return function(){this.hour=Number(e)}},minute:function(e){return function(){this.minute=Number(e)}},second:function(e){return function(){this.second=Number(e)}},secondAndMillisecond:function(e){return function(){var t=e.match(/^([0-5][0-9])\.([0-9]{1,3})/);this.second=Number(t[1]),this.millisecond=Number(t[2])}},meridian:function(e){return function(){this.meridian=e.slice(0,1).toLowerCase()}},timezone:function(e){return function(){var t=e.replace(/[^\d\+\-]/g,"");t.length?this.timezoneOffset=Number(t):this.timezone=e.toLowerCase()}},day:function(e){var t=e[0];return function(){if(this.day=Number(t.match(/\d+/)[0]),1>this.day)throw"invalid day"}},month:function(e){return function(){if(this.month=3===e.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(e)/4:Number(e)-1,0>this.month)throw"invalid month"}},year:function(e){return function(){var t=Number(e);this.year=2e.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return t=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond),100>this.year&&t.setFullYear(this.year),this.timezone?t.set({timezone:this.timezone}):this.timezoneOffset&&t.set({timezoneOffset:this.timezoneOffset}),t},finish:function(r){var i,o,a;if(0===(r=r instanceof Array?t(r):[r]).length)return null;for(i=0;ie?-1:1,s=Math.abs(e);this.setDays(Math.floor(s/864e5)*a),s%=864e5,this.setHours(Math.floor(s/36e5)*a),s%=36e5,this.setMinutes(Math.floor(s/6e4)*a),s%=6e4,this.setSeconds(Math.floor(s/1e3)*a),this.setMilliseconds(s%1e3*a)}else this.set(e,t,r,i,o);return this.getTotalMilliseconds=function(){return 864e5*this.getDays()+36e5*this.getHours()+6e4*this.getMinutes()+1e3*this.getSeconds()},this.compareTo=function(e){var t=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());return t<(e=null===e?new Date(1970,1,1,0,0,0):new Date(1970,1,1,e.getHours(),e.getMinutes(),e.getSeconds()))?-1:t>e?1:0},this.equals=function(e){return 0===this.compareTo(e)},this.add=function(e){return null===e?this:this.addSeconds(e.getTotalMilliseconds()/1e3)},this.subtract=function(e){return null===e?this:this.addSeconds(-e.getTotalMilliseconds()/1e3)},this.addDays=function(e){return new n(this.getTotalMilliseconds()+864e5*e)},this.addHours=function(e){return new n(this.getTotalMilliseconds()+36e5*e)},this.addMinutes=function(e){return new n(this.getTotalMilliseconds()+6e4*e)},this.addSeconds=function(e){return new n(this.getTotalMilliseconds()+1e3*e)},this.addMilliseconds=function(e){return new n(this.getTotalMilliseconds()+e)},this.get12HourHour=function(){return 12this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator},this.toString=function(e){this._toString=function(){return null!==this.getDays()&&0e.toString().length?"0"+e:e};var t=this;return e?e.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g,function(e){switch(e){case"d":return t.getDays();case"dd":return t.p(t.getDays());case"H":return t.getHours();case"HH":return t.p(t.getHours());case"h":return t.get12HourHour();case"hh":return t.p(t.get12HourHour());case"m":return t.getMinutes();case"mm":return t.p(t.getMinutes());case"s":return t.getSeconds();case"ss":return t.p(t.getSeconds());case"t":return(12>t.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case"tt":return 12>t.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator}}):this._toString()},this};!function(n,r){for(var i=0;in;)i();else for(;tl?1:-1;this.dates={start:arguments[0].clone(),end:arguments[1].clone()},n(c,u,l,this);var d=!1==(u.isDaylightSavingTime()===l.isDaylightSavingTime());d&&1===c?u.addHours(-1):d&&u.addHours(1),0!==(u=l-u)&&(u=new TimeSpan(u),this.set(this.years,this.months,u.getDays(),u.getHours(),u.getMinutes(),u.getSeconds(),u.getMilliseconds()))}return this};!function(n,r){for(var i=0;i/"+uploadDest+"/[filename]",action:routePath("upload_file")}],OK:function(){$("#wiki-content").addClass("uploading");var e=new FormData($("#upload").get(0)),t=$("#upload").attr("action");$.ajax({url:t,type:"POST",data:e, +processData:!1,contentType:!1,success:function(){$("#wiki-content").removeClass("uploading"),flashNotice("success","Your file was successfully uploaded.")},error:function(e,t,n){$("#wiki-content").removeClass("uploading"),409==e.status?flashNotice("error","The file you tried to upload already exists. Please rename the file and try again."):flashNotice("error","Error uploading file: "+t+" "+n)}})}}),$("#gollum-dialog-action-ok").attr("disabled",!0),$("input:file").on("change",function(){$(this).val()&&(filename=$("input[type=file]").val().split("\\").pop(),upload_path="/"+uploadDest+"/"+filename,clipboard_button='',news="Your uploaded file will be accessible at
"+clipboard_button+" "+upload_path,$(".context").html(news),$("#gollum-dialog-action-ok").attr("disabled",!1))})})),$(".minibutton-rename-page").length&&($(".minibutton-rename-page").parent().removeClass("jaws"),$(".minibutton-rename-page").click(function(e){e.preventDefault();var t=decodeURI(pagePath()),n=decodeURI(pageName()),r="Renamed page will be under "+htmlEscape(cleanPath(t))+" unless an absolute path is given.";$.GollumDialog.init({title:"Rename Page",fields:[{id:"name",name:"Rename to",type:"text",defaultValue:n||"",context:r}],OK:function(e){var r="Rename Page";e.name&&(r=e.name);var i=abspath(t,r),o=i[0],a="/"+t==o?"Renamed "+n+" to "+r:"Renamed "+n+" to "+i.join("/"),s=$("form[name=rename]");s.children("input[name=rename]").val(i.join("/")),s.children("input[name=message]").val(a),s.submit()}})})),$(".minibutton-new-page").length&&($(".minibutton-new-page").parent().removeClass("jaws"),$(".minibutton-new-page").click(function(e){e.preventDefault();var t=pagePath();t===undefined&&0!=$("#file-browser").length&&(t=window.location.pathname.replace(routePath("overview"),""));var n="Page will be created under "+htmlEscape(cleanPath(t))+" unless an absolute path is given.";$.GollumDialog.init({title:"Create New Page",fields:[{id:"name",name:"Page Name",type:"text",defaultValue:"",context:n}],OK:function(e){var n="New Page";e.name&&(n=e.name);for(var r=[],i=abspath(t,n).join("/").split("/"),o=0;o").attr({type:"hidden",id:$(e).val(),name:"versions[]",value:$(e).val()}).appendTo($("#selection-form")),a()},u=function(e){$("#selection-form #"+$(e).val()).remove(),$(e).closest("li").removeClass(o.join(" ")),a()},l=function(){$("#version-form input").on("change",function(){this.checked?s(this):u(this)})};l(),a();var c=function(e){e.preventDefault(),$(this).hasClass("disabled")||$.ajax({url:$(this).attr("href"),type:"GET",success:function(e){var t=$("#page-history-list",e),n=$("#pagination",e);["#next","#prev"].forEach(function(e){old_btn=$("#pagination "+e),new_btn=n.find(e),old_btn.attr("href",new_btn.attr("href")),new_btn.hasClass("disabled")?old_btn.addClass("disabled"):old_btn.removeClass("disabled")}),$("#page-history-list").replaceWith(t),l(),a()},error:function(e,t,n){console.log("something went wrong: "+t+n)}}),this.blur()};$("#pagination #next, #pagination #prev").each(function(e,t){$(t).on("click",c)})}if($("#last-edit").length&&$("#page-info-toggle").click(function(){$.ajax({url:routePath("last_commit_info"),data:{path:$("#page-info-toggle").data("pagepath")},success:function(e){var t=showLocalTime?getLocalTime(e.date):e.date;$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#last-edit-in-progress").html("Last edited by "+e.author+", "+t)}}),$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#page-info-toggle").before(' Getting commit info...').remove()}),$("#wiki-wrapper.create").length&&($("#gollum-editor-submit").click(function(){window.onbeforeunload=null}),$("#gollum-editor-body").one("change",function(){window.onbeforeunload=function(){return"Leaving will not create a new page!"}}),$.GollumEditor({NewFile:!0,MarkupType:default_markup,commands:r})),$("#search-results").length){$(".toggle-context").each(function(){var e=$(this).parent().next("div.search-context").find("li:hidden");e.length?$(this).click(function(){e.toggle(),$(this).toggle()}):$(this).toggle()});var d=new RegExp(searchTerms.join("|"),"gi");$("div.search-context li span").each(function(){var e=$(this).html().replace(/"/g,""").replace(/'/g,"'").replace(d,function(e){return''+e+""});$(this).html(e)})}if($(".markdown-body").length&&(preparePage(),(match=new RegExp(/[?&]redirected\_from=([^?]*)/).exec(window.location.href))&&(notice="The page you requested was renamed or moved. You've been successfully redirected to its new location.",flashNotice("success",notice)),Mousetrap.bind(["e"],function(e){return e.preventDefault(),window.location=routePath("edit")+"/"+pageFullPath,!1}),$.markupSupportsEditableSections(pageFormat)&&$("a.anchor").each(function(e,t){if(header=$(t).closest(":header"),header.hasClass("editable")){var n=routePath("edit")+"/"+pageFullPath+$(t).attr("href");$(t).clone().addClass("edit").attr("href",n).appendTo(header)}})),$("#wiki-history").length||$("#page-history").length){var f={format:"svg",background:[255,255,255,255]};$("img.identicon").each(function(e,t){var n=$(t),r=n.data("identicon"),i=new Identicon(r,f).toString();i="data:image/svg+xml;base64,"+i,n.attr("src",i)})}}),function(e){var t={debugOn:!1,markupCreated:!1,markup:"",currentAspect:function(){return window.innerWidth<480?"small-mobile":"fixed"==e("#gollum-dialog-dialog").css("position")?"large-mobile":"desktop"},attachEvents:function(n){e("#gollum-dialog-action-ok").click(function(e){t.eventOK(e,n)}),e("#gollum-dialog-action-cancel").click(t.eventCancel),e('#gollum-dialog-dialog input[type="text"]').keydown(function(e){13==e.keyCode&&t.eventOK(e,n)})},detachEvents:function(){e("#gollum-dialog-action-ok").unbind("click"),e("#gollum-dialog-action-cancel").unbind("click")},createFieldMarkup:function(e){for(var n="
",r=0;r"}return n+="
"},createFieldText:function(e){var t="";return e.name&&(t+=""),t+=''),e.context&&(t+=''+e.context+""),t},createFieldFile:function(e){var t="",n=e.id||"upload",r=e.name||"file";return t+='
',t+='',t+="",e.context&&(t+=''+e.context+""),t},createMarkup:function(e,n){return t.markupCreated=!0,'

'+e+'

'+n+'
'},eventCancel:function(e){e.preventDefault(),n("Cancelled dialog."),t.hide()},eventOK:function(n,r){n.preventDefault();var i=[];e("#gollum-dialog-dialog-body input").each(function(){i[e(this).attr("name")]=e(this).val()}),r&&"function"==typeof r&&r(i),t.hide()},hide:function(){e.browser.msie?(e("#gollum-dialog-dialog").hide().removeClass("active"),e("select").css("visibility","visible")):(e("#gollum-dialog-dialog").animate({opacity:0},{duration:200,complete:function(){e("#gollum-dialog-dialog").removeClass("active"),e("#gollum-dialog-dialog").css("display","none")}}),e(window).unbind("resize",t.resize))},init:function(r){var i="",o="";r&&"object"==typeof r?(r.body&&"string"==typeof r.body&&(o="

"+r.body+"

"),r.fields&&"object"==typeof r.fields&&(o+=t.createFieldMarkup(r.fields)),r.title&&"string"==typeof r.title&&(i=r.title),t.markupCreated&&e("#gollum-dialog-dialog").remove(),t.markup=t.createMarkup(i,o),e("body").append(t.markup),r.OK&&"function"==typeof r.OK&&t.attachEvents(r.OK),t.show()):n("Editor Dialog: Cannot init; invalid init object")},show:function(){t.markupCreated?(n("Showing dialog"),e.browser.msie?(e("#gollum-dialog.dialog").addClass("active"),t.position(),e("select").css("visibility","hidden")):(e("#gollum-dialog.dialog").css("display","none"),e("#gollum-dialog-dialog").animate({opacity:0},{duration:0,complete:function(){e("#gollum-dialog-dialog").css("display","block"),t.position(),e("#gollum-dialog-dialog").animate({opacity:1},{duration:500}),e(e('#gollum-dialog-dialog input[type="text"]').get(0)).focus()}})),e(window).bind("resize",t.resize)):n("Dialog: No markup to show. Please use init first.")},resize:function(){t.position()},position:function(){if("small-mobile"==t.currentAspect())e("#gollum-dialog-dialog-inner").css("height","100%").css("margin-top","auto");else if("large-mobile"==t.currentAspect())e("#gollum-dialog-dialog-inner").css("height","auto").css("margin-top","auto");else if("desktop"==t.currentAspect()){var n=e("#gollum-dialog-dialog-inner").height();e("#gollum-dialog-dialog-inner").css("height",n+"px").css("margin-top",-1*parseInt(n/2))}}},n=function(e){t.debugOn&&"undefined"!=typeof console&&console.log(e)};e.GollumDialog=t}(jQuery),function(e){var t={_PLACEHOLDERS:[],_p:function(t){this.fieldObject=t,this.placeholderText=t.val();var n=t.val();t.addClass("ph"),t.blur(function(){""==e(this).val()&&(e(this).val(n),e(this).addClass("ph"))}),t.focus(function(){e(this).removeClass("ph"),e(this).val()==n?e(this).val(""):e(this)[0].select()})},add:function(e){t._PLACEHOLDERS.push(new t._p(e))},clearAll:function(){for(var e=0;e div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),o=!0}}var n,r,i=document.attachEvent,o=!1,a=e.fn.resize;if(e.fn.resize=function(e){return this.each(function(){this==window?a.call(jQuery(this),e):addResizeListener(this,e)})},e.fn.removeResize=function(e){return this.each(function(){removeResizeListener(this,e)})},!i){var s=(r=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return r(e)}),u=(n=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return n(e)});function l(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function c(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height}function d(e){var t=this;l(this),this.__resizeRAF__&&u(this.__resizeRAF__),this.__resizeRAF__=s(function(){c(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach(function(n){n.call(t,e)}))})}var f=!1,h="",p="animationstart",m="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="",v=document.createElement("fakeelement");if(v.style.animationName!==undefined&&(f=!0),!1===f)for(var b=0;b
',e.appendChild(e.__resizeTriggers__),l(e),e.addEventListener("scroll",d,!0),p&&e.__resizeTriggers__.addEventListener(p,function(t){t.animationName==T&&l(e)})),e.__resizeListeners__.push(n))},window.removeResizeListener=function(e,t){i?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",d),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(jQuery),Array.prototype.includes||(Array.prototype.includes=function(e){return 0<=this.indexOf(e)}); \ No newline at end of file diff --git a/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js.gz b/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js.gz new file mode 100644 index 00000000..f401815e Binary files /dev/null and b/lib/gollum/public/assets/app-04d40bc2c595aedb3e05f3a8106f1ae32bf2bac4a70ed997de7f174508eea9ef.js.gz differ diff --git a/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz b/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz index a4a34086..50fd9481 100644 Binary files a/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz and b/lib/gollum/public/assets/app-309be032396e783b13a47df58f389b7c8e11c2b2d42640560b874f677c25f6e5.css.gz differ diff --git a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js deleted file mode 100644 index d2450fca..00000000 --- a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js +++ /dev/null @@ -1,6 +0,0 @@ -function brokenAvatarImage(e){return e.onerror="",e.src='data:image/svg+xml;utf8,',!0}function routePath(e){return path=gollumRoutes[e],prefixBaseUrl(path)}function prefixBaseUrl(e){if(baseUrl==undefined)console.log("Gollum error: baseUrl undefined");else{if(e!=undefined)return""==baseUrl?e:("/"==baseUrl.charAt(baseUrl.length-1)?result=baseUrl+e:result=baseUrl+"/"+e,result.replace(/\/{2}/g,"/"));console.log("Could not find route with name: "+name)}}function cleanPath(e){return("/"+e.replace(/\/$/,"")).replace(/\/{2}/g,"/")}function pageName(){return"undefined"==typeof pageFullPath?undefined:(name=pageFullPath.split("/").pop(),name.substring(0,name.lastIndexOf(".")))}function pagePath(){return"undefined"==typeof pageFullPath?undefined:pageFullPath.split("/").slice(0,-1).join("/")}function htmlEscape(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function abspath(e,t){"/"!=t[0]&&(t="/"+t,e&&(t="/"+e+t));var n=t.split("/");return[n.slice(0,-1).join("/"),n.pop()]}function setTextDirection(){$(".markdown-body p, .markdown-body span, .markdown-body pre, .markdown-body table").attr("dir","auto")}function preparePage(){setTextDirection(),"true"==criticMarkup&&($("#wiki-content").addClass("criticmarkup"),$("ins.break").unwrap(),$("span.critic.comment").wrap(''),$("span.critic.comment").filter(function(){return""!=$(this).text()}).before("‡"))}function getLocalTime(e,t){return t===undefined&&(t="Y-m-d %H:%M:%S O"),new Date(e).format(t)}function flashNotice(e,t,n,r,i){nested_button_html="",void 0!==n&&void 0!==r&&(i=void 0!==i&&"danger"==i?" btn-danger":"",nested_button_html='"),html='

'+t+nested_button_html+"

",$("#gollum-flash").remove(),$("#wiki-content").before(html),"success"==e&&setTimeout(function(){$("#gollum-flash").fadeOut()},5e3)}!function(e,n,t){function r(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent("on"+t,n)}function y(e){if("keypress"!=e.type)return u[e.which]?u[e.which]:a[e.which]?a[e.which]:String.fromCharCode(e.which).toLowerCase();var t=String.fromCharCode(e.which);return e.shiftKey||(t=t.toLowerCase()),t}function i(e){var t=[];return e.shiftKey&&t.push("shift"),e.altKey&&t.push("alt"),e.ctrlKey&&t.push("ctrl"),e.metaKey&&t.push("meta"),t}function v(e){return"shift"==e||"ctrl"==e||"alt"==e||"meta"==e}function b(e,t){var n,r=[],i=e;for("+"===i?i=["+"]:i=(i=i.replace(/\+{2}/g,"+plus")).split("+"),n=0;n":".","?":"/","|":"\\"},c={option:"alt",command:"meta","return":"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"};for(t=1;t<20;++t)u[111+t]="f"+t;for(t=0;t<=9;++t)u[t+96]=t.toString();T.prototype.bind=function(e,t,n){return e=e instanceof Array?e:[e],this._bindMultiple.call(this,e,t,n),this},T.prototype.unbind=function(e,t){return this.bind.call(this,e,function(){},t)},T.prototype.trigger=function(e,t){return this._directMap[e+":"+t]&&this._directMap[e+":"+t]({},e),this},T.prototype.reset=function(){return this._callbacks={},this._directMap={},this},T.prototype.stopCallback=function(e,t){if(-1<(" "+t.className+" ").indexOf(" mousetrap ")||o(t,this.target))return!1;if("composedPath"in e&&"function"==typeof e.composedPath){var n=e.composedPath()[0];n!==e.target&&(t=n)}return"INPUT"==t.tagName||"SELECT"==t.tagName||"TEXTAREA"==t.tagName||t.isContentEditable},T.prototype.handleKey=function(){return this._handleKey.apply(this,arguments)},T.addKeycodes=function(e){for(var t in e)e.hasOwnProperty(t)&&(u[t]=e[t]);s=null},T.init=function(){var e,t=T(n);for(e in t)"_"!==e.charAt(0)&&(T[e]=function(e){return function(){return t[e].apply(t,arguments)}}(e))},T.init(),e.Mousetrap=T,"undefined"!=typeof module&&module.exports&&(module.exports=T),"function"==typeof define&&define.amd&&define(function(){return T})}}("undefined"!=typeof window?window:null,"undefined"!=typeof window?document:null),function(O,F){function c(e){return A.isWindow(e)?e:9===e.nodeType&&(e.defaultView||e.parentWindow)}function g(e){if(!vt[e]){var t=L.body,n=A("<"+e+">").appendTo(t),r=n.css("display");n.remove(),"none"!==r&&""!==r||(pt||((pt=L.createElement("iframe")).frameBorder=pt.width=pt.height=0),t.appendChild(pt),mt&&pt.createElement||((mt=(pt.contentWindow||pt.contentDocument).document).write((A.support.boxModel?"":"")+""),mt.close()),n=mt.createElement(e),mt.body.appendChild(n),r=A.css(n,"display"),t.removeChild(pt)),vt[e]=r}return vt[e]}function s(e,t){var n={};return A.each(wt.concat.apply([],wt.slice(0,t)),function(){n[this]=e}),n}function e(){yt=F}function u(){return setTimeout(e,0),yt=A.now()}function t(){try{return new O.ActiveXObject("Microsoft.XMLHTTP")}catch(F){}}function n(){try{return new O.XMLHttpRequest}catch(F){}}function S(e,t){e.dataFilter&&(t=e.dataFilter(t,e.dataType));var n,r,i,o,a,s,u,l,c=e.dataTypes,d={},f=c.length,h=c[0];for(n=1;n)[^>]*$|#([\w\-]*)$)/,u=/\S/,l=/^\s+/,c=/\s+$/,d=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,h=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,m=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,g=/(?:^|:|,)(?:\s*\[)+/g,y=/(webkit)[ \/]([\w.]+)/,v=/(opera)(?:.*version)?[ \/]([\w.]+)/,b=/(msie) ([\w.]+)/,T=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/gi,x=/^-ms-/,D=function(e,t){return(t+"").toUpperCase()},S=H.userAgent,k=Object.prototype.toString,C=Object.prototype.hasOwnProperty,M=Array.prototype.push,_=Array.prototype.slice,N=String.prototype.trim,E=Array.prototype.indexOf,A={};return f.fn=f.prototype={constructor:f,init:function(e,t,n){var r,i,o,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if("body"===e&&!t&&L.body)return this.context=L,this[0]=L.body,this.selector=e,this.length=1,this;if("string"!=typeof e)return f.isFunction(e)?n.ready(e):(e.selector!==F&&(this.selector=e.selector,this.context=e.context),f.makeArray(e,this));if(!(r="<"!==e.charAt(0)||">"!==e.charAt(e.length-1)||e.length<3?s.exec(e):[null,e,null])||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1])return a=(t=t instanceof f?t[0]:t)?t.ownerDocument||t:L,(o=d.exec(e))?f.isPlainObject(t)?(e=[L.createElement(o[1])],f.fn.attr.call(e,t,!0)):e=[a.createElement(o[1])]:e=((o=f.buildFragment([r[1]],[a])).cacheable?f.clone(o.fragment):o.fragment).childNodes,f.merge(this,e);if((i=L.getElementById(r[2]))&&i.parentNode){if(i.id!==r[2])return n.find(e);this.length=1,this[0]=i}return this.context=L,this.selector=e,this},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return _.call(this,0)},get:function(e){return null==e?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=this.constructor();return f.isArray(e)?M.apply(r,e):f.merge(r,e),r.prevObject=this,r.context=this.context,"find"===t?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return f.each(this,e,t)},ready:function(e){return f.bindReady(),r.add(e),this},eq:function(e){return-1===(e=+e)?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(_.apply(this,arguments),"slice",_.call(arguments).join(","))},map:function(n){return this.pushStack(f.map(this,function(e,t){return n.call(e,t,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:M,sort:[].sort,splice:[].splice},f.fn.init.prototype=f.fn,f.extend=f.fn.extend=function(e,t){var n,r,i,o,a,s,u=e||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof u&&(d=u,u=t||{},l=2),"object"!=typeof u&&!f.isFunction(u)&&(u={}),c===l&&(u=this,--l);l
a",e=g.getElementsByTagName("*"),t=g.getElementsByTagName("a")[0],!e||!e.length||!t)return{};r=(n=L.createElement("select")).appendChild(L.createElement("option")),i=g.getElementsByTagName("input")[0],h={leadingWhitespace:3===g.firstChild.nodeType,tbody:!g.getElementsByTagName("tbody").length,htmlSerialize:!!g.getElementsByTagName("link").length,style:/top/.test(t.getAttribute("style")),hrefNormalized:"/a"===t.getAttribute("href"),opacity:/^0.55/.test(t.style.opacity),cssFloat:!!t.style.cssFloat,checkOn:"on"===i.value,optSelected:r.selected,getSetAttribute:"t"!==g.className,enctype:!!L.createElement("form").enctype,html5Clone:"<:nav>"!==L.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},A.boxModel=h.boxModel="CSS1Compat"===L.compatMode,i.checked=!0,h.noCloneChecked=i.cloneNode(!0).checked,n.disabled=!0,h.optDisabled=!r.disabled;try{delete g.test}catch(Y){h.deleteExpando=!1}if(!g.addEventListener&&g.attachEvent&&g.fireEvent&&(g.attachEvent("onclick",function(){h.noCloneEvent=!1}),g.cloneNode(!0).fireEvent("onclick")),(i=L.createElement("input")).value="t",i.setAttribute("type","radio"),h.radioValue="t"===i.value,i.setAttribute("checked","checked"),i.setAttribute("name","t"),g.appendChild(i),(o=L.createDocumentFragment()).appendChild(g.lastChild),h.checkClone=o.cloneNode(!0).cloneNode(!0).lastChild.checked,h.appendChecked=i.checked,o.removeChild(i),o.appendChild(g),g.attachEvent)for(s in{submit:1,change:1,focusin:1})(m=(a="on"+s)in g)||(g.setAttribute(a,"return;"),m="function"==typeof g[a]),h[s+"Bubbles"]=m;return o.removeChild(g),o=n=r=g=i=null,A(function(){var e,t,n,r,i,o,a,s,u,l,c,d,f=L.getElementsByTagName("body")[0];!f||(a=1,c=(d="padding:0;margin:0;border:")+"0;visibility:hidden;",u="
",(e=L.createElement("div")).style.cssText=c+"width:0;height:0;position:static;top:0;margin-top:"+a+"px",f.insertBefore(e,f.firstChild),g=L.createElement("div"),e.appendChild(g),g.innerHTML="
t
",p=g.getElementsByTagName("td"),m=0===p[0].offsetHeight,p[0].style.display="",p[1].style.display="none",h.reliableHiddenOffsets=m&&0===p[0].offsetHeight,O.getComputedStyle&&(g.innerHTML="",(o=L.createElement("div")).style.width="0",o.style.marginRight="0",g.style.width="2px",g.appendChild(o),h.reliableMarginRight=0===(parseInt((O.getComputedStyle(o,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof g.style.zoom&&(g.innerHTML="",g.style.width=g.style.padding="1px",g.style.border=0,g.style.overflow="hidden",g.style.display="inline",g.style.zoom=1,h.inlineBlockNeedsLayout=3===g.offsetWidth,g.style.display="block",g.style.overflow="visible",g.innerHTML="
",h.shrinkWrapBlocks=3!==g.offsetWidth),g.style.cssText=l+c,g.innerHTML=u,n=(t=g.firstChild).firstChild,r=t.nextSibling.firstChild.firstChild,i={doesNotAddBorder:5!==n.offsetTop,doesAddBorderForTableAndCells:5===r.offsetTop},n.style.position="fixed",n.style.top="20px",i.fixedPosition=20===n.offsetTop||15===n.offsetTop,n.style.position=n.style.top="",t.style.overflow="hidden",t.style.position="relative",i.subtractsBorderForOverflowNotVisible=-5===n.offsetTop,i.doesNotIncludeMarginInBodyOffset=f.offsetTop!==a,O.getComputedStyle&&(g.style.marginTop="1%",h.pixelMargin="1%"!==(O.getComputedStyle(g,null)||{marginTop:0}).marginTop),"undefined"!=typeof e.style.zoom&&(e.style.zoom=1),f.removeChild(e),o=g=e=null,A.extend(h,i))}),h}();var P=/^(?:\{.*\}|\[.*\])$/,z=/([A-Z])/g;A.extend({cache:{},uuid:0,expando:"jQuery"+(A.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return!!(e=e.nodeType?A.cache[e[A.expando]]:e[A.expando])&&!M(e)},data:function(e,t,n,r){if(A.acceptData(e)){var i,o,a,s=A.expando,u="string"==typeof t,l=e.nodeType,c=l?A.cache:e,d=l?e[s]:e[s]&&s,f="events"===t;if((!d||!c[d]||!f&&!r&&!c[d].data)&&u&&n===F)return;return d||(l?e[s]=d=++A.uuid:d=s),c[d]||(c[d]={},l||(c[d].toJSON=A.noop)),"object"!=typeof t&&"function"!=typeof t||(r?c[d]=A.extend(c[d],t):c[d].data=A.extend(c[d].data,t)),i=o=c[d],r||(o.data||(o.data={}),o=o.data),n!==F&&(o[A.camelCase(t)]=n),f&&!o[t]?i.events:(u?null==(a=o[t])&&(a=o[A.camelCase(t)]):a=o,a)}},removeData:function(e,t,n){if(A.acceptData(e)){var r,i,o,a=A.expando,s=e.nodeType,u=s?A.cache:e,l=s?e[a]:a;if(!u[l])return;if(t&&(r=n?u[l]:u[l].data)){A.isArray(t)||(t in r?t=[t]:t=(t=A.camelCase(t))in r?[t]:t.split(" "));for(i=0,o=t.length;if&&g.push({elem:this,matches:d.slice(f)}),t=0;t+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,c="sizcache"+(Math.random()+"").replace(".",""),u=0,v=Object.prototype.toString,d=!1,n=!0,h=/\\/g,o=/\r\n/g,l=/\W/;[0,0].sort(function(){return n=!1,0});var b=function(e,t,n,r){n=n||[];var i=t=t||L;if(1!==t.nodeType&&9!==t.nodeType)return[];if(!e||"string"!=typeof e)return n;var o,a,s,u,l,c,d,f,h=!0,p=b.isXML(t),m=[],g=e;do{if(y.exec(""),(o=y.exec(g))&&(g=o[3],m.push(o[1]),o[2])){u=o[3];break}}while(o);if(1":function(e,t){var n,r="string"==typeof t,i=0,o=e.length;if(r&&!l.test(t)){for(t=t.toLowerCase();in[3]-0},nth:function(e,t,n){return n[3]-0===t},eq:function(e,t,n){return n[3]-0===t}},filter:{PSEUDO:function(e,t,n,r){var i=t[1],o=T.filters[i];if(o)return o(e,n,t,r);if("contains"===i)return 0<=(e.textContent||e.innerText||f([e])||"").indexOf(t[3]);if("not"===i){for(var a=t[3],s=0,u=a.length;s",x.insertBefore(i,x.firstChild),L.getElementById(g)&&(T.find.ID=function(e,t,n){if("undefined"!=typeof t.getElementById&&!n){var r=t.getElementById(e[1]);return r?r.id===e[1]||"undefined"!=typeof r.getAttributeNode&&r.getAttributeNode("id").nodeValue===e[1]?[r]:F:[]}},T.filter.ID=function(e,t){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return 1===e.nodeType&&n&&n.nodeValue===t}),x.removeChild(i),x=i=null,(t=L.createElement("div")).appendChild(L.createComment("")),0

",!e.querySelectorAll||0!==e.querySelectorAll(".TEST").length){for(var t in b=function(e,t,n,r){if(t=t||L,!r&&!b.isXML(t)){var i=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(e);if(i&&(1===t.nodeType||9===t.nodeType)){if(i[1])return D(t.getElementsByTagName(e),n);if(i[2]&&T.find.CLASS&&t.getElementsByClassName)return D(t.getElementsByClassName(i[2]),n)}if(9===t.nodeType){if("body"===e&&t.body)return D([t.body],n);if(i&&i[3]){var o=t.getElementById(i[3]);if(!o||!o.parentNode)return D([],n);if(o.id===i[3])return D([o],n)}try{return D(t.querySelectorAll(e),n)}catch(h){}}else if(1===t.nodeType&&"object"!==t.nodeName.toLowerCase()){var a=t,s=t.getAttribute("id"),u=s||f,l=t.parentNode,c=/^\s*[+~]/.test(e);s?u=u.replace(/'/g,"\\$&"):t.setAttribute("id",u),c&&l&&(t=t.parentNode);try{if(!c||l)return D(t.querySelectorAll("[id='"+u+"'] "+e),n)}catch(p){}finally{s||a.removeAttribute("id")}}}return d(e,t,n,r)},d)b[t]=d[t];e=null}}(),function(){var e=L.documentElement,r=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(r){var i=!r.call(L.createElement("div"),"div"),o=!1;try{r.call(L.documentElement,"[test!='']:sizzle")}catch(A){o=!0}b.matchesSelector=function(e,t){if(t=t.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!b.isXML(e))try{if(o||!T.match.PSEUDO.test(t)&&!/!=/.test(t)){var n=r.call(e,t);if(n||!i||e.document&&11!==e.document.nodeType)return n}}catch(v){}return 0
",e.getElementsByClassName&&0!==e.getElementsByClassName("e").length){if(e.lastChild.className="e",1===e.getElementsByClassName("e").length)return;T.order.splice(1,0,"CLASS"),T.find.CLASS=function(e,t,n){if("undefined"!=typeof t.getElementsByClassName&&!n)return t.getElementsByClassName(e[1])},e=null}}(),L.documentElement.contains?b.contains=function(e,t){return e!==t&&(!e.contains||e.contains(t))}:L.documentElement.compareDocumentPosition?b.contains=function(e,t){return!!(16&e.compareDocumentPosition(t))}:b.contains=function(){return!1},b.isXML=function(e){var t=(e?e.ownerDocument||e:0).documentElement;return!!t&&"HTML"!==t.nodeName};var S=function(e,t,n){for(var r,i=[],o="",a=t.nodeType?[t]:t;r=T.match.PSEUDO.exec(e);)o+=r[0],e=e.replace(T.match.PSEUDO,"");e=T.relative[e]?e+"*":e;for(var s=0,u=a.length;s]*)\/>/gi,ve=/<([\w:]+)/,be=/]","i"),Se=/checked\s*(?:[^=]|=\s*.checked.)/i,ke=/\/(java|ecma)script/i,Ce=/^\s*",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},_e=w(L);Me.optgroup=Me.option,Me.tbody=Me.tfoot=Me.colgroup=Me.caption=Me.thead,Me.th=Me.td,A.support.htmlSerialize||(Me._default=[1,"div
","
"]),A.fn.extend({text:function(e){return A.access(this,function(e){return e===F?A.text(this):this.empty().append((this[0]&&this[0].ownerDocument||L).createTextNode(e))},null,e,arguments.length)},wrapAll:function(t){if(A.isFunction(t))return this.each(function(e){A(this).wrapAll(t.call(this,e))});if(this[0]){var e=A(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(n){return A.isFunction(n)?this.each(function(e){A(this).wrapInner(n.call(this,e))}):this.each(function(){var e=A(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=A.isFunction(t);return this.each(function(e){A(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){A.nodeName(this,"body")||A(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){1===this.nodeType&&this.insertBefore(e,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=A.clean(arguments);return e.push.apply(e,this.toArray()),this.pushStack(e,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=this.pushStack(this,"after",arguments);return e.push.apply(e,A.clean(arguments)),e}},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)e&&!A.filter(e,[n]).length||(!t&&1===n.nodeType&&(A.cleanData(n.getElementsByTagName("*")),A.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)for(1===e.nodeType&&A.cleanData(e.getElementsByTagName("*"));e.firstChild;)e.removeChild(e.firstChild);return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return A.clone(this,e,t)})},html:function(e){return A.access(this,function(e){var t=this[0]||{},n=0,r=this.length;if(e===F)return 1===t.nodeType?t.innerHTML.replace(me,""):null;if("string"==typeof e&&!we.test(e)&&(A.support.leadingWhitespace||!ge.test(e))&&!Me[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ye,"<$1>");try{for(;n")?e.cloneNode(!0):l(e);if(!(A.support.noCloneEvent&&A.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||A.isXMLDoc(e)))for(h(e,a),r=f(e),i=f(a),o=0;r[o];++o)i[o]&&h(r[o],i[o]);if(t&&(p(e,a),n))for(r=f(e),i=f(a),o=0;r[o];++o)p(r[o],i[o]);return r=i=null,a},clean:function(e,t,n,r){var i,o,a,s=[];"undefined"==typeof(t=t||L).createElement&&(t=t.ownerDocument||t[0]&&t[0].ownerDocument||L);for(var u,l=0;null!=(u=e[l]);l++)if("number"==typeof u&&(u+=""),u){if("string"==typeof u)if(Te.test(u)){u=u.replace(ye,"<$1>");var c,d=(ve.exec(u)||["",""])[1].toLowerCase(),f=Me[d]||Me._default,h=f[0],p=t.createElement("div"),m=_e.childNodes;for(t===L?_e.appendChild(p):w(t).appendChild(p),p.innerHTML=f[1]+u+f[2];h--;)p=p.lastChild;if(!A.support.tbody){var g=be.test(u),y="table"!==d||g?""!==f[1]||g?[]:p.childNodes:p.firstChild&&p.firstChild.childNodes;for(a=y.length-1;0<=a;--a)A.nodeName(y[a],"tbody")&&!y[a].childNodes.length&&y[a].parentNode.removeChild(y[a])}!A.support.leadingWhitespace&&ge.test(u)&&p.insertBefore(t.createTextNode(ge.exec(u)[0]),p.firstChild),u=p.childNodes,p&&(p.parentNode.removeChild(p),0)<[^<]*)*<\/script>/gi,et=/^(?:select|textarea)/i,tt=/\s+/,nt=/([?&])_=[^&]*/,rt=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,it=A.fn.load,ot={},at={},st=["*/"]+["*"];try{Re=E.href}catch(kt){(Re=L.createElement("a")).href="",Re=Re.href}We=rt.exec(Re.toLowerCase())||[],A.fn.extend({load:function(e,t,r){if("string"!=typeof e&&it)return it.apply(this,arguments);if(!this.length)return this;var n=e.indexOf(" ");if(0<=n){var i=e.slice(n,e.length);e=e.slice(0,n)}var o="GET";t&&(A.isFunction(t)?(r=t,t=F):"object"==typeof t&&(t=A.param(t,A.ajaxSettings.traditional),o="POST"));var a=this;return A.ajax({url:e,type:o,dataType:"html",data:t,complete:function(e,t,n){n=e.responseText,e.isResolved()&&(e.done(function(e){n=e}),a.html(i?A("
").append(n.replace(Qe,"")).find(i):n)),r&&a.each(r,[n,t,e])}}),this},serialize:function(){return A.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?A.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||et.test(this.nodeName)||Ge.test(this.type))}).map(function(e,t){var n=A(this).val();return null==n?null:A.isArray(n)?A.map(n,function(e){return{name:t.name,value:e.replace(Ue,"\r\n")}}):{name:t.name,value:n.replace(Ue,"\r\n")}}).get()}}),A.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){A.fn[t]=function(e){return this.on(t,e)}}),A.each(["get","post"],function(e,i){A[i]=function(e,t,n,r){return A.isFunction(t)&&(r=r||n,n=t,t=F),A.ajax({type:i,url:e,data:t,success:n,dataType:r})}}),A.extend({getScript:function(e,t){return A.get(e,F,t,"script")},getJSON:function(e,t,n){return A.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?r(e,A.ajaxSettings):(t=e,e=A.ajaxSettings),r(e,t),e},ajaxSettings:{url:Re,isLocal:Ve.test(We[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":st},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":O.String,"text html":!0,"text json":A.parseJSON,"text xml":A.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:i(ot),ajaxTransport:i(at),ajax:function(e,t){function n(e,t,n,r){if(2!==x){x=2,p&&clearTimeout(p),h=F,f=r||"",D.readyState=0=s.duration+this.startTime){for(t in this.now=this.end,this.pos=this.state=1,this.update(),s.animatedProperties[this.prop]=!0,s.animatedProperties)!0!==s.animatedProperties[t]&&(o=!1);if(o){if(null!=s.overflow&&!A.support.shrinkWrapBlocks&&A.each(["","X","Y"],function(e,t){a.style["overflow"+t]=s.overflow[e]}),s.hide&&A(a).hide(),s.hide||s.show)for(t in s.animatedProperties)A.style(a,t,s.orig[t]),A.removeData(a,"fxshow"+t,!0),A.removeData(a,"toggle"+t,!0);(r=s.complete)&&(s.complete=!1,r.call(a))}return!1}return s.duration==Infinity?this.now=i:(n=i-this.startTime,this.state=n/s.duration,this.pos=A.easing[s.animatedProperties[this.prop]](this.state,n,0,1,s.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},A.extend(A.fx,{tick:function(){for(var e,t=A.timers,n=0;n=r[u]?r[s]:Math.max(e.body[u],r[u],e.body[l],r[l]):n===F?(o=A.css(e,t),a=parseFloat(o),A.isNumeric(a)?a:o):void A(e).css(t,n)},n,e,arguments.length,null)}}),O.jQuery=O.$=A,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return A})}(window),function(){var e;e="undefined"!=typeof module&&"undefined"!=typeof module.exports?require("./pnglib"):window.PNGlib;var t=function(e,t,n){if("string"!=typeof e||e.length<15)throw"A hash of at least 15 characters is required.";this.defaults={background:[240,240,240,255],margin:.08,size:64,saturation:.7,brightness:.5,format:"png"},this.options="object"==typeof t?t:this.defaults,"number"==typeof t&&(this.options.size=t),n&&(this.options.margin=n),this.hash=e,this.background=this.options.background||this.defaults.background,this.size=this.options.size||this.defaults.size,this.format=this.options.format||this.defaults.format,this.margin=this.options.margin!==undefined?this.options.margin:this.defaults.margin;var r=parseInt(this.hash.substr(-7),16)/268435455,i=this.options.saturation||this.defaults.saturation,o=this.options.brightness||this.defaults.brightness;this.foreground=this.options.foreground||this.hsl2rgb(r,i,o)};t.prototype={background:null,foreground:null,hash:null,margin:null,size:null,format:null,image:function(){return this.isSvg()?new n(this.size,this.foreground,this.background):new e(this.size,this.size,256)},render:function(){var e,t,n=this.image(),r=this.size,i=Math.floor(r*this.margin),o=Math.floor((r-2*i)/5),a=Math.floor((r-5*o)/2),s=n.color.apply(n,this.background),u=n.color.apply(n,this.foreground);for(e=0;e<15;e++)t=parseInt(this.hash.charAt(e),16)%2?s:u,e<5?this.rectangle(2*o+a,e*o+a,o,o,t,n):e<10?(this.rectangle(1*o+a,(e-5)*o+a,o,o,t,n),this.rectangle(3*o+a,(e-5)*o+a,o,o,t,n)):e<15&&(this.rectangle(0*o+a,(e-10)*o+a,o,o,t,n),this.rectangle(4*o+a,(e-10)*o+a,o,o,t,n));return n},rectangle:function(e,t,n,r,i,o){var a,s;if(this.isSvg())o.rectangles.push({x:e,y:t,w:n,h:r,color:i});else for(a=e;a",e=0;e");return t+=""},getBase64:function(){if("function"==typeof btoa)return btoa(this.getDump());if(Buffer)return new Buffer(this.getDump(),"binary").toString("base64");throw"Cannot generate base64 output"}},"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=t:window.Identicon=t}(),function(){var o=Date,a=Date.CultureStrings?Date.CultureStrings.lang:null,r={},i={getFromKey:function(e,t){var n;return n=Date.CultureStrings&&Date.CultureStrings[t]&&Date.CultureStrings[t][e]?Date.CultureStrings[t][e]:i.buildFromDefault(e),"/"===e.charAt(0)&&(n=i.buildFromRegex(e,t)),n},getFromObjectValues:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=i.getFromKey(e[n],t));return r},getFromObjectKeys:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[i.getFromKey(n,t)]=e[n]);return r},getFromArray:function(e,t){for(var n=[],r=0;r=e.getTime()&&this.getTime()<=t.getTime()},e.isAfter=function(e){return 1===this.compareTo(e||new Date)},e.isBefore=function(e){return-1===this.compareTo(e||new Date)},e.isToday=e.isSameDay=function(e){return this.clone().clearTime().equals((e||new Date).clone().clearTime())},e.addMilliseconds=function(e){return e&&this.setTime(this.getTime()+1*e),this},e.addSeconds=function(e){return e?this.addMilliseconds(1e3*e):this},e.addMinutes=function(e){return e?this.addMilliseconds(6e4*e):this},e.addHours=function(e){return e?this.addMilliseconds(36e5*e):this},e.addDays=function(e){return e&&this.setDate(this.getDate()+1*e),this},e.addWeekdays=function(e){if(!e)return this;var t=this.getDay(),n=Math.ceil(Math.abs(e)/7);if((0===t||6===t)&&0o.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");return e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond),this.year<100&&e.setFullYear(this.year),this.timezone?e.set({timezone:this.timezone}):this.timezoneOffset&&e.set({timezoneOffset:this.timezoneOffset}),e},finish:function(e){var t,n,r;if(0===(e=e instanceof Array?a(e):[e]).length)return null;for(t=0;t/"+uploadDest+"/[filename]",action:routePath("upload_file")}],OK:function(){$("#wiki-content").addClass("uploading");var e=new FormData($("#upload").get(0)),t=$("#upload").attr("action");$.ajax({url:t,type:"POST",data:e,processData:!1,contentType:!1,success:function(){$("#wiki-content").removeClass("uploading"),flashNotice("success","Your file was successfully uploaded.")},error:function(e,t,n){$("#wiki-content").removeClass("uploading"),409==e.status?flashNotice("error","The file you tried to upload already exists. Please rename the file and try again."):flashNotice("error","Error uploading file: "+t+" "+n)}})}}),$("#gollum-dialog-action-ok").attr("disabled",!0),$("input:file").on("change",function(){$(this).val()&&(filename=$("input[type=file]").val().split("\\").pop(),upload_path="/"+uploadDest+"/"+filename,clipboard_button='',news="Your uploaded file will be accessible at
"+clipboard_button+" "+upload_path,$(".context").html(news),$("#gollum-dialog-action-ok").attr("disabled",!1))})})),$(".minibutton-rename-page").length&&($(".minibutton-rename-page").parent().removeClass("jaws"),$(".minibutton-rename-page").click(function(e){e.preventDefault();var a=decodeURI(pagePath()),s=decodeURI(pageName()),t="Renamed page will be under "+htmlEscape(cleanPath(a))+" unless an absolute path is given.";$.GollumDialog.init({title:"Rename Page",fields:[{id:"name",name:"Rename to",type:"text",defaultValue:s||"",context:t}],OK:function(e){var t="Rename Page";e.name&&(t=e.name);var n=abspath(a,t),r=n[0],i="/"+a==r?"Renamed "+s+" to "+t:"Renamed "+s+" to "+n.join("/"),o=$("form[name=rename]");o.children("input[name=rename]").val(n.join("/")),o.children("input[name=message]").val(i),o.submit()}})})),$(".minibutton-new-page").length&&($(".minibutton-new-page").parent().removeClass("jaws"),$(".minibutton-new-page").click(function(e){e.preventDefault();var o=pagePath();o===undefined&&0!=$("#file-browser").length&&(o=window.location.pathname.replace(routePath("overview"),""));var t="Page will be created under "+htmlEscape(cleanPath(o))+" unless an absolute path is given.";$.GollumDialog.init({title:"Create New Page",fields:[{id:"name",name:"Page Name",type:"text",defaultValue:"",context:t}],OK:function(e){var t="New Page";e.name&&(t=e.name);for(var n=[],r=abspath(o,t).join("/").split("/"),i=0;i").attr({type:"hidden",id:$(e).val(),name:"versions[]",value:$(e).val()}).appendTo($("#selection-form")),i()},u=function(e){$("#selection-form #"+$(e).val()).remove(),$(e).closest("li").removeClass(a.join(" ")),i()},l=function(){$("#version-form input").on("change",function(){this.checked?s(this):u(this)})};l(),i();var c=function(e){e.preventDefault(),$(this).hasClass("disabled")||$.ajax({url:$(this).attr("href"),type:"GET",success:function(e){var t=$("#page-history-list",e),n=$("#pagination",e);["#next","#prev"].forEach(function(e){old_btn=$("#pagination "+e),new_btn=n.find(e),old_btn.attr("href",new_btn.attr("href")),new_btn.hasClass("disabled")?old_btn.addClass("disabled"):old_btn.removeClass("disabled")}),$("#page-history-list").replaceWith(t),l(),i()},error:function(e,t,n){console.log("something went wrong: "+t+n)}}),this.blur()};$("#pagination #next, #pagination #prev").each(function(e,t){$(t).on("click",c)})}if($("#last-edit").length&&$("#page-info-toggle").click(function(){$.ajax({url:routePath("last_commit_info"),data:{path:$("#page-info-toggle").data("pagepath")},success:function(e){var t=showLocalTime?getLocalTime(e.date):e.date;$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#last-edit-in-progress").html("Last edited by "+e.author+", "+t)}}),$("#last-edit").next(".dotted-spinner").toggleClass("hidden"),$("#page-info-toggle").before(' Getting commit info...').remove()}),$("#wiki-wrapper.create").length&&($("#gollum-editor-submit").click(function(){window.onbeforeunload=null}),$("#gollum-editor-body").one("change",function(){window.onbeforeunload=function(){return"Leaving will not create a new page!"}}),$.GollumEditor({NewFile:!0,MarkupType:default_markup,commands:r})),$("#search-results").length){$(".toggle-context").each(function(){var e=$(this).parent().next("div.search-context").find("li:hidden");e.length?$(this).click(function(){e.toggle(),$(this).toggle()}):$(this).toggle()});var d=new RegExp(searchTerms.join("|"),"gi");$("div.search-context li span").each(function(){var e=$(this).html().replace(/"/g,""").replace(/'/g,"'").replace(d,function(e){return''+e+""});$(this).html(e)})}if($(".markdown-body").length&&(preparePage(),(match=new RegExp(/[?&]redirected\_from=([^?]*)/).exec(window.location.href))&&(notice="The page you requested was renamed or moved. You've been successfully redirected to its new location.",flashNotice("success",notice)),Mousetrap.bind(["e"],function(e){return e.preventDefault(),window.location=routePath("edit")+"/"+pageFullPath,!1}),$.markupSupportsEditableSections(pageFormat)&&$("a.anchor").each(function(e,t){if(header=$(t).closest(":header"),header.hasClass("editable")){var n=routePath("edit")+"/"+pageFullPath+$(t).attr("href");$(t).clone().addClass("edit").attr("href",n).appendTo(header)}})),$("#wiki-history").length||$("#page-history").length){var f={format:"svg",background:[255,255,255,255]};$("img.identicon").each(function(e,t){var n=$(t),r=n.data("identicon"),i=new Identicon(r,f).toString();i="data:image/svg+xml;base64,"+i,n.attr("src",i)})}}),function(r){var i={debugOn:!1,markupCreated:!1,markup:"",currentAspect:function(){return window.innerWidth<480?"small-mobile":"fixed"==r("#gollum-dialog-dialog").css("position")?"large-mobile":"desktop"},attachEvents:function(t){r("#gollum-dialog-action-ok").click(function(e){i.eventOK(e,t)}),r("#gollum-dialog-action-cancel").click(i.eventCancel),r('#gollum-dialog-dialog input[type="text"]').keydown(function(e){13==e.keyCode&&i.eventOK(e,t)})},detachEvents:function(){r("#gollum-dialog-action-ok").unbind("click"),r("#gollum-dialog-action-cancel").unbind("click")},createFieldMarkup:function(e){for(var t="
",n=0;n"}return t+="
"},createFieldText:function(e){var t="";return e.name&&(t+=""),t+=''),e.context&&(t+=''+e.context+""),t},createFieldFile:function(e){var t="",n=e.id||"upload",r=e.name||"file";return t+='
',t+='',t+="",e.context&&(t+=''+e.context+""),t},createMarkup:function(e,t){return i.markupCreated=!0,'

'+e+'

'+t+'
'},eventCancel:function(e){e.preventDefault(),o("Cancelled dialog."),i.hide()},eventOK:function(e,t){e.preventDefault();var n=[];r("#gollum-dialog-dialog-body input").each(function(){n[r(this).attr("name")]=r(this).val()}),t&&"function"==typeof t&&t(n),i.hide()},hide:function(){r.browser.msie?(r("#gollum-dialog-dialog").hide().removeClass("active"),r("select").css("visibility","visible")):(r("#gollum-dialog-dialog").animate({opacity:0},{duration:200,complete:function(){r("#gollum-dialog-dialog").removeClass("active"),r("#gollum-dialog-dialog").css("display","none")}}),r(window).unbind("resize",i.resize))},init:function(e){var t="",n="";e&&"object"==typeof e?(e.body&&"string"==typeof e.body&&(n="

"+e.body+"

"),e.fields&&"object"==typeof e.fields&&(n+=i.createFieldMarkup(e.fields)),e.title&&"string"==typeof e.title&&(t=e.title),i.markupCreated&&r("#gollum-dialog-dialog").remove(),i.markup=i.createMarkup(t,n),r("body").append(i.markup),e.OK&&"function"==typeof e.OK&&i.attachEvents(e.OK),i.show()):o("Editor Dialog: Cannot init; invalid init object")},show:function(){i.markupCreated?(o("Showing dialog"),r.browser.msie?(r("#gollum-dialog.dialog").addClass("active"),i.position(),r("select").css("visibility","hidden")):(r("#gollum-dialog.dialog").css("display","none"),r("#gollum-dialog-dialog").animate({opacity:0},{duration:0,complete:function(){r("#gollum-dialog-dialog").css("display","block"),i.position(),r("#gollum-dialog-dialog").animate({opacity:1},{duration:500}),r(r('#gollum-dialog-dialog input[type="text"]').get(0)).focus()}})),r(window).bind("resize",i.resize)):o("Dialog: No markup to show. Please use init first.")},resize:function(){i.position()},position:function(){if("small-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","100%").css("margin-top","auto");else if("large-mobile"==i.currentAspect())r("#gollum-dialog-dialog-inner").css("height","auto").css("margin-top","auto");else if("desktop"==i.currentAspect()){var e=r("#gollum-dialog-dialog-inner").height();r("#gollum-dialog-dialog-inner").css("height",e+"px").css("margin-top",-1*parseInt(e/2))}}},o=function(e){i.debugOn&&"undefined"!=typeof console&&console.log(e)};r.GollumDialog=i}(jQuery),function(n){var t={_PLACEHOLDERS:[],_p:function(e){this.fieldObject=e,this.placeholderText=e.val();var t=e.val();e.addClass("ph"),e.blur(function(){""==n(this).val()&&(n(this).val(t),n(this).addClass("ph"))}),e.focus(function(){n(this).removeClass("ph"),n(this).val()==t?n(this).val(""):n(this)[0].select()})},add:function(e){t._PLACEHOLDERS.push(new t._p(e))},clearAll:function(){for(var e=0;e div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),u=!0}}var t,a,s=document.attachEvent,u=!1,l=e.fn.resize;if(e.fn.resize=function(e){return this.each(function(){this==window?l.call(jQuery(this),e):addResizeListener(this,e)})},e.fn.removeResize=function(e){return this.each(function(){removeResizeListener(this,e)})},!s){var c=(a=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return a(e)}),d=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)}),f=!1,h="",p="animationstart",m="Webkit Moz O ms".split(" "),g="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="",v=document.createElement("fakeelement");if(v.style.animationName!==undefined&&(f=!0),!1===f)for(var b=0;b
',t.appendChild(t.__resizeTriggers__),r(t),t.addEventListener("scroll",n,!0),p&&t.__resizeTriggers__.addEventListener(p,function(e){e.animationName==T&&r(t)})),t.__resizeListeners__.push(e))},window.removeResizeListener=function(e,t){s?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",n),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(jQuery),Array.prototype.includes||(Array.prototype.includes=function(e){return 0<=this.indexOf(e)}); \ No newline at end of file diff --git a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz b/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz deleted file mode 100644 index 62d671fb..00000000 Binary files a/lib/gollum/public/assets/app-6bef6b19014c6620eab4daf7bc581f9d43fff778bdc78aa9fe53aaa2c927c8cc.js.gz and /dev/null differ diff --git a/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz b/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz index af69d816..343ad328 100644 Binary files a/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz and b/lib/gollum/public/assets/criticmarkup-31ae5d3282bbb8e7b7c3c9917e9fb68e3315a6b4a75da6cec48d21b8846905c4.css.gz differ diff --git a/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js b/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js new file mode 100644 index 00000000..05490730 --- /dev/null +++ b/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js @@ -0,0 +1,24 @@ +(function(){function e(e){var t=n;e&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(i.original=t.define,t.define=i,t.define.packaged=!0),t.require&&t.require.packaged||(r.original=t.require,t.require=r,t.require.packaged=!0)}var t="ace",n=function(){return this}();if(!n&&"undefined"!=typeof window&&(n=window),t||"undefined"==typeof requirejs){var i=function(e,t,n){"string"==typeof e?(2==arguments.length&&(n=t),i.modules[e]||(i.payloads[e]=n,i.modules[e]=null)):i.original?i.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};i.modules={},i.payloads={};var o=function(e,t,n){if("string"==typeof t){var i=a(e,t);if(i!=undefined)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],s=0,l=t.length;s1&&t(l,"")>-1&&(a=RegExp(this.source,n.replace.call(e(this),"g","")),n.replace.call(r.slice(l.index),a,function(){for(var e=1;el.index&&this.lastIndex--}return l},o||(RegExp.prototype.test=function(e){var t=n.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function e(){}function t(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function n(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if("function"!=typeof n)throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),o=function(){if(this instanceof o){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(e.prototype=n.prototype,o.prototype=new e,e.prototype=null),o});var i,o,r,s,a,l=Function.prototype.call,c=Array.prototype,h=Object.prototype,u=c.slice,d=l.bind(h.toString),g=l.bind(h.hasOwnProperty);if((a=g(h,"__defineGetter__"))&&(i=l.bind(h.__defineGetter__),o=l.bind(h.__defineSetter__),r=l.bind(h.__lookupGetter__),s=l.bind(h.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t,n=[];if(n.splice.apply(n,e(20)),n.splice.apply(n,e(26)),t=n.length,n.splice(5,0,"XXX"),n.length,t+1==n.length)return!0}()){var p=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?p.apply(this,[void 0===e?0:e,void 0===t?this.length-e:t].concat(u.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):null==e?e=0:e<0&&(e=Math.max(n+e,0)),e+ta)for(d=c;d--;)this[l+d]=this[a+d];if(r&&e===h)this.length=h,this.push.apply(this,o);else for(this.length=h+r,d=0;d>>0;if("[object Function]"!=d(e))throw new TypeError;for(;++o>>0,o=Array(i),r=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,r=[],s=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,o=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,o=arguments[1];if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0;if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var o,r=0;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in n){o=n[r++];break}if(++r>=i)throw new TypeError("reduce of empty array with no initial value")}for(;r>>0;if("[object Function]"!=d(e))throw new TypeError(e+" is not a function");if(!i&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var o,r=i-1;if(arguments.length>=2)o=arguments[1];else for(;;){if(r in n){o=n[r--];break}if(--r<0)throw new TypeError("reduceRight of empty array with no initial value")}do{r in this&&(o=e.call(void 0,o,n[r],r,t))}while(r--);return o}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=v&&"[object String]"==d(this)?this.split(""):E(this),i=t.length>>>0;if(!i)return-1;var o=0;for(arguments.length>1&&(o=n(arguments[1])),o=o>=0?o:Math.max(0,i+o);o>>0;if(!i)return-1;var o=i-1;for(arguments.length>1&&(o=Math.min(o,n(arguments[1]))),o=o>=0?o:i-Math.abs(o);o>=0;o--)if(o in t&&e===t[o])return o;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:h)}),!Object.getOwnPropertyDescriptor){var b="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(b+e);if(g(e,t)){var n;if(n={enumerable:!0,configurable:!0},a){var i=e.__proto__;e.__proto__=h;var o=r(e,t),l=s(e,t);if(e.__proto__=i,o||l)return o&&(n.get=o),l&&(n.set=l),n}return n.value=e[t],n}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(f=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(e,t){var n;if(null===e)n=f();else{if("object"!=typeof e)throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var i=function(){};i.prototype=e,(n=new i).__proto__=e}return void 0!==t&&Object.defineProperties(n,t),n});if(Object.defineProperty){var w=t({}),y="undefined"==typeof document||t(document.createElement("div"));if(!w||!y)var x=Object.defineProperty}if(!Object.defineProperty||x){var k="Property description must be an object: ",C="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError(C+e);if("object"!=typeof n&&"function"!=typeof n||null===n)throw new TypeError(k+n);if(x)try{return x.call(Object,e,t,n)}catch(l){}if(g(n,"value"))if(a&&(r(e,t)||s(e,t))){var c=e.__proto__;e.__proto__=h,delete e[t],e[t]=n.value,e.__proto__=c}else e[t]=n.value;else{if(!a)throw new TypeError(S);g(n,"get")&&i(e,t,n.get),g(n,"set")&&o(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)g(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return"function"==typeof t?t:e(t)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";g(e,t);)t+="?";e[t]=!0;var n=g(e,t);return delete e[t],n}),!Object.keys){var $=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],A=_.length;for(var L in{toString:null})$=!1;Object.keys=function(e){if("object"!=typeof e&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var n in e)g(e,n)&&t.push(n);if($)for(var i=0,o=A;i=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||undefined,t.isChrome=parseFloat(o.split(" Chrome/")[1])||undefined,t.isEdge=parseFloat(o.split(" Edge/")[1])||undefined,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t){"use strict";var n=e("./useragent"),i="http://www.w3.org/1999/xhtml";if(t.buildDom=function r(e,t,n){if("string"==typeof e&&e){var i=document.createTextNode(e);return t&&t.appendChild(i),i}if(!Array.isArray(e))return e;if("string"!=typeof e[0]||!e[0]){for(var o=[],s=0;s=1.5,"undefined"!=typeof document){var o=document.createElement("div");t.HI_DPI&&o.style.transform!==undefined&&(t.HAS_CSS_TRANSFORMS=!0),!n.isEdge&&"undefined"!=typeof o.style.animationName&&(t.HAS_CSS_ANIMATION=!0),o=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t){"use strict";var n=e("./oop"),i=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,"super":8,meta:8,command:8,cmd:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in i.FUNCTION_KEYS)e=i.FUNCTION_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);for(t in i.PRINTABLE_KEYS)e=i.PRINTABLE_KEYS[t].toLowerCase(),i[e]=parseInt(t,10);return n.mixin(i,i.MODIFIER_KEYS),n.mixin(i,i.PRINTABLE_KEYS),n.mixin(i,i.FUNCTION_KEYS),i.enter=i["return"],i.escape=i.esc,i.del=i["delete"],i[173]="-",function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)i.KEY_MODS[t]=e.filter(function(e){return t&i.KEY_MODS[e]}).join("-")+"-"}(),i.KEY_MODS[0]="",i.KEY_MODS[-1]="input-",i}();n.mixin(t,i),t.keyCodeToString=function(e){var t=i[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t){"use strict";function n(e,t,n){var i=l(t);if(!r.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var c="location"in t?t.location:t.keyLocation;if(17===n&&1===c)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===c){t.timeStamp-a<50&&(s.altGr=!0)}}}if((n in o.MODIFIER_KEYS&&(n=-1),!i&&13===n)&&(3===(c="location"in t?t.location:t.keyLocation)&&(e(t,i,-n),t.defaultPrevented)))return;if(r.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}function i(){s=Object.create(null)}var o=e("./keys"),r=e("./useragent"),s=null,a=0;t.addListener=function(e,t,n){if(e.addEventListener)return e.addEventListener(t,n,!1);if(e.attachEvent){var i=function(){n.call(e,window.event)};n._wrapper=i,e.attachEvent("on"+t,i)}},t.removeListener=function(e,t,n){if(e.removeEventListener)return e.removeEventListener(t,n,!1);e.detachEvent&&e.detachEvent("on"+t,n._wrapper||n)},t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0},t.preventDefault=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,n,i){function o(e){n&&n(e),i&&i(e),t.removeListener(document,"mousemove",n,!0),t.removeListener(document,"mouseup",o,!0),t.removeListener(document,"dragstart",o,!0)}return t.addListener(document,"mousemove",n,!0),t.addListener(document,"mouseup",o,!0),t.addListener(document,"dragstart",o,!0),o},t.addMouseWheelListener=function(e,n){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){var t=8;e.wheelDeltaX!==undefined?(e.wheelX=-e.wheelDeltaX/t,e.wheelY=-e.wheelDeltaY/t):(e.wheelX=0,e.wheelY=-e.wheelDelta/t),n(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){var t=.35;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=e.deltaX*t||0,e.wheelY=e.deltaY*t||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}n(e)}):t.addListener(e,"DOMMouseScroll",function(e){e.axis&&e.axis==e.HORIZONTAL_AXIS?(e.wheelX=5*(e.detail||0),e.wheelY=0):(e.wheelX=0,e.wheelY=5*(e.detail||0)),n(e)})},t.addMultiMouseDownListener=function(e,n,i,o){function s(e){if(0!==t.getButton(e)?u=0:e.detail>1?++u>4&&(u=1):u=1,r.isIE){var s=Math.abs(e.clientX-l)>5||Math.abs(e.clientY-c)>5;h&&!s||(u=1),h&&clearTimeout(h),h=setTimeout(function(){h=null},n[u-1]||600),1==u&&(l=e.clientX,c=e.clientY)}if(e._clicks=u,i[o]("mousedown",e),u>4)u=0;else if(u>1)return i[o](d[u],e)}function a(e){u=2,h&&clearTimeout(h),h=setTimeout(function(){h=null},n[u-1]||600),i[o]("mousedown",e),i[o](d[u],e)}var l,c,h,u=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",s),r.isOldIE&&t.addListener(e,"dblclick",a)})};var l=!r.isMac||!r.isOpera||"KeyboardEvent"in window?function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}:function(e){return 0|(e.metaKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.ctrlKey?8:0)};if(t.getModifierString=function(e){return o.KEY_MODS[l(e)]},t.addCommandKeyListener=function(e,o){var a=t.addListener;if(r.isOldGecko||r.isOpera&&!("KeyboardEvent"in window)){var l=null;a(e,"keydown",function(e){l=e.keyCode}),a(e,"keypress",function(e){return n(o,e,l)})}else{var c=null;a(e,"keydown",function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=n(o,e,e.keyCode);return c=e.defaultPrevented,t}),a(e,"keypress",function(e){c&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),c=null)}),a(e,"keyup",function(e){s[e.keyCode]=null}),s||(i(),a(window,"focus",i))}},"object"==typeof window&&window.postMessage&&!r.isOldIE){var c=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+c++,o=function(r){r.data==i&&(t.stopPropagation(r),t.removeListener(n,"message",o),e())};t.addListener(n,"message",o),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout(function i(){t.$idleBlocked?setTimeout(i,100):e()},n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout(function(){t.$idleBlocked=!1},e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}}),ace.define("ace/range",["require","exports","module"],function(e,t){"use strict";var n=function(e,t){return e.row-t.row||e.column-t.column},i=function(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}};(function(){this.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var o={row:t+1,column:0};else if(this.start.row0;)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var n=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t){"use strict";var n=e("../lib/event"),i=e("../lib/useragent"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../clipboard"),a=i.isChrome<18,l=i.isIE,c=i.isChrome>63,h=400,u=e("../lib/keys"),d=u.KEY_MODS,g=i.isIOS,p=g?/\s/:/\n/,f=function(e,t){function f(){_=!0,w.blur(),w.focus(),_=!1}function m(e){27==e.keyCode&&w.value.lengthM&&"\n"==A[i]?r=u.end:eM&&A.slice(0,i).split("\n").length>2?r=u.down:i>M&&" "==A[i-1]?(r=u.right,s=d.option):(i>M||i==M&&M!=L&&e==i)&&(r=u.right),e!==i&&(s|=d.shift),r){if(!t.onCommandKey({},s,r)&&t.commands){r=u.keyCodeToString(r);var a=t.commands.findKeyCommand(s,r);a&&t.execCommand(a)}L=e,M=i,T("")}}};document.addEventListener("selectionchange",r),t.on("destroy",function(){document.removeEventListener("selectionchange",r)})}var w=o.createElement("textarea");w.className="ace_text-input",w.setAttribute("wrap","off"),w.setAttribute("autocorrect","off"),w.setAttribute("autocapitalize","off"),w.setAttribute("spellcheck",!1),w.style.opacity="0",e.insertBefore(w,e.firstChild);var y=!1,x=!1,k=!1,C=!1,S="";i.isMobile||(w.style.fontSize="1px");var $=!1,_=!1,A="",L=0,M=0;try{var R=document.activeElement===w}catch(X){}n.addListener(w,"blur",function(e){_||(t.onBlur(e),R=!1)}),n.addListener(w,"focus",function(e){if(!_){if(R=!0,i.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),i.isEdge?setTimeout(T):T()}}),this.$focusScroll=!1,this.focus=function(){if(S||c||"browser"==this.$focusScroll)return w.focus({preventScroll:!0});var e=w.style.top;w.style.position="fixed",w.style.top="0px";try{var t=0!=w.getBoundingClientRect().top}catch(n){return}var i=[];if(t)for(var o=w.parentElement;o&&1==o.nodeType;)i.push(o),o.setAttribute("ace_nocontext",!0),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;w.focus({preventScroll:!0}),t&&i.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){w.style.position="","0px"==w.style.top&&(w.style.top=e)},0)},this.blur=function(){w.blur()},this.isFocused=function(){return R},t.on("beforeEndOperation",function(){t.curOp&&"insertstring"==t.curOp.command.name||(k&&(A=w.value="",U()),T())});var T=g?function(e){if(R&&(!y||e)&&!C){e||(e="");var n="\n ab"+e+"cde fg\n";n!=w.value&&(w.value=A=n);var i=4,o=4+(e.length||(t.selection.isEmpty()?0:1));(L!=i||M!=o)&&w.setSelectionRange(i,o),L=i,M=o}}:function(){if(!k&&!C&&(R||F)){k=!0 +;var e=t.selection,n=e.getRange(),i=e.cursor.row,o=n.start.column,r=n.end.column,s=t.session.getLine(i);if(n.start.row!=i){var a=t.session.getLine(i-1);o=n.start.rowi+1?l.length:r,r+=s.length+1,s=s+"\n"+l}s.length>h&&(o=A.length&&e.value===A&&A&&e.selectionEnd!==M},O=function(){k||(y?y=!1:E(w)&&(t.selectAll(),T()))},I=null;this.setInputHandler=function(e){I=e},this.getInputHandler=function(){return I};var F=!1,B=function(e,n){if(F&&(F=!1),x)return T(),e&&t.onPaste(e),x=!1,"";for(var i=w.selectionStart,o=w.selectionEnd,r=L,s=A.length-M,a=e,l=e.length-i,c=e.length-o,h=0;r>0&&A[h]==e[h];)h++,r--;for(a=a.slice(h),h=1;s>0&&A.length-h>L-1&&A[A.length-h]==e[e.length-h];)h++,s--;l-=h-1,c-=h-1;var u=a.length-h+1;return u<0&&(r=-u,u=0),a=a.slice(0,u),n||l!=a.length||r||s||c?(C=!0,a&&!r&&!s&&!l&&!c||$?t.onTextInput(a):t.onTextInput(a,{extendLeft:r,extendRight:s,restoreStart:l,restoreEnd:c}),C=!1,A=e,L=i,M=o,a):""},H=function(e){if(k)return V();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var n=w.value,i=B(n,!0);(n.length>h+100||p.test(i))&&T()},N=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!a){var o=l||n?"Text":"text/plain";try{return t?!1!==i.setData(o,t):i.getData(o)}catch(e){if(!n)return N(e,t,!0)}}},P=function(e,i){var o=t.getCopyText();if(!o)return n.preventDefault(e);N(e,o)?(g&&(T(o),y=o,setTimeout(function(){y=!1},10)),i?t.onCut():t.onCopy(),n.preventDefault(e)):(y=!0,w.value=o,w.select(),setTimeout(function(){y=!1,T(),i?t.onCut():t.onCopy()}))},D=function(e){P(e,!0)},W=function(e){P(e,!1)},z=function(e){var o=N(e);s.pasteCancelled()||("string"==typeof o?(o&&t.onPaste(o,e),i.isIE&&setTimeout(T),n.preventDefault(e)):(w.value="",x=!0))};n.addCommandKeyListener(w,t.onCommandKey.bind(t)),n.addListener(w,"select",O),n.addListener(w,"input",H),n.addListener(w,"cut",D),n.addListener(w,"copy",W),n.addListener(w,"paste",z),(!("oncut"in w)||!("oncopy"in w)||!("onpaste"in w))&&n.addListener(e,"keydown",function(e){if((!i.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:W(e);break;case 86:z(e);break;case 88:D(e)}});var K=function(){if(!k&&t.onCompositionStart&&!t.$readOnly&&(k={},!$)){setTimeout(V,0),t.on("mousedown",f);var e=t.getSelectionRange();e.end.row=e.start.row,e.end.column=e.start.column,k.markerRange=e,k.selectionStart=L,t.onCompositionStart(k),k.useTextareaForIME?(w.value="",A="",L=0,M=0):(w.msGetInputContext&&(k.context=w.msGetInputContext()),w.getInputContext&&(k.context=w.getInputContext()))}},V=function(){if(k&&t.onCompositionUpdate&&!t.$readOnly){if($)return f();if(k.useTextareaForIME)t.onCompositionUpdate(w.value);else{var e=w.value;B(e),k.markerRange&&(k.context&&(k.markerRange.start.column=k.selectionStart=k.context.compositionStartOffset),k.markerRange.end.column=k.markerRange.start.column+M-k.selectionStart)}}},U=function(e){t.onCompositionEnd&&!t.$readOnly&&(k=!1,t.onCompositionEnd(),t.off("mousedown",f),e&&H())},G=r.delayedCall(V,50).schedule.bind(null,null);n.addListener(w,"compositionstart",K),n.addListener(w,"compositionupdate",V),n.addListener(w,"keyup",m),n.addListener(w,"keydown",G),n.addListener(w,"compositionend",U),this.getElement=function(){return w},this.setCommandMode=function(e){$=e,w.readOnly=!1},this.setReadOnly=function(e){$||(w.readOnly=e)},this.setCopyWithEmptySelection=function(){},this.onContextMenu=function(e){F=!0,T(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,r){S||(S=w.style.cssText),w.style.cssText=(r?"z-index:100000;":"")+(i.isIE?"opacity:0.1;":"")+"text-indent: -"+(L+M)*t.renderer.characterWidth*.5+"px;";var s=t.container.getBoundingClientRect(),a=o.computedStyle(t.container),l=s.top+(parseInt(a.borderTopWidth)||0),c=s.left+(parseInt(s.borderLeftWidth)||0),h=s.bottom-l-w.clientHeight-2,u=function(e){o.translate(w,e.clientX-c-2,Math.min(e.clientY-l-2,h))};u(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(j),i.isWin&&n.capture(t.container,u,v))},this.onContextMenuClose=v;var j,q=function(e){t.textInput.onContextMenu(e),v()};n.addListener(w,"mouseup",q),n.addListener(w,"mousedown",function(e){e.preventDefault(),v()}),n.addListener(t.renderer.scroller,"contextmenu",q),n.addListener(w,"contextmenu",q),g&&b(e,t,w)};t.TextInput=f}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t){"use strict";function n(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(t){e[t]=this[t]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}function i(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}function o(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent"),s=0,a=550;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},this.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var r=o(this.$clickSelection,n);n=r.cursor,e=r.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[e](i.row,i.column);if(this.$clickSelection){var s=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==s&&a<=0)t=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&s>=0)t=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==s&&1==a)i=r.end,t=r.start;else{var l=o(this.$clickSelection,i);i=l.cursor,t=l.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>s||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;o=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),l<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowedh.session.documentToScreenRow(s.row,s.column))return n()}if(c!=i)if(c=i.text.join("
"),d.setHtml(c),d.show(),h._signal("showGutterTooltip",d),h.on("mousewheel",n),e.$tooltipFollowsMouse)r(l);else{var a=l.domEvent.target.getBoundingClientRect(),g=d.getElement().style;g.left=a.right+"px",g.top=a.bottom+"px"}}function n(){a&&(a=clearTimeout(a)),c&&(d.hide(),c=null,h._signal("hideGutterTooltip",d),h.removeEventListener("mousewheel",n))}function r(e){d.setPosition(e.x,e.y)}var a,l,c,h=e.editor,u=h.renderer.$gutterLayer,d=new i(h.container);e.editor.setDefaultHandler("guttermousedown",function(t){if(h.isFocused()&&0==t.getButton()&&"foldWidgets"!=u.getRegion(t)){var n=t.getDocumentPosition().row,i=h.session.selection;if(t.getShiftKey())i.selectTo(n,0);else{if(2==t.domEvent.detail)return h.selectAll(),t.preventDefault();e.$clickSelection=h.selection.getLineRange(n)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(i){var s=i.domEvent.target||i.domEvent.srcElement;if(o.hasCssClass(s,"ace_fold-widget"))return n();c&&e.$tooltipFollowsMouse&&r(i),l=i,a||(a=setTimeout(function(){a=null,l&&!e.isMousePressed?t():n()},50))}),s.addListener(h.renderer.$gutter,"mouseout",function(){l=null,c&&!a&&(a=setTimeout(function(){a=null,n()},50))}),h.on("changeSession",n)}function i(e){a.call(this,e)}var o=e("../lib/dom"),r=e("../lib/oop"),s=e("../lib/event"),a=e("../tooltip").Tooltip;r.inherits(i,a),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();(e+=15)+o>n&&(e-=e+o-n),(t+=15)+r>i&&(t-=20+r),a.prototype.setPosition.call(this,e,t)}}.call(i.prototype),t.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";var n=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";function n(e){function t(e,t){var n=Date.now(),o=!t||e.row!=t.row,r=!t||e.column!=t.column;!A||o||r?(m.moveCursorToPosition(e),A=n,L={x:w,y:y}):i(L.x,L.y,w,y)>c?A=null:n-A>=l&&(m.renderer.scrollCursorIntoView(),A=null)}function n(e,t){var n=Date.now(),i=m.renderer.layerConfig.lineHeight,o=m.renderer.layerConfig.characterWidth,r=m.renderer.scroller.getBoundingClientRect(),s={x:{left:w-r.left,right:r.right-w},y:{top:y-r.top,bottom:r.bottom-y}},l=Math.min(s.x.left,s.x.right),c=Math.min(s.y.top,s.y.bottom),h={row:e.row,column:e.column};l/o<=2&&(h.column+=s.x.left=a&&m.renderer.scrollCursorIntoView(h):_=n:_=null}function h(){var e=C;t(C=m.renderer.screenToTextCoordinates(w,y),e),n(C,e)}function u(){k=m.selection.toOrientedRange(),b=m.session.addMarker(k,"ace_selection",m.getSelectionStyle()),m.clearSelection(),m.isFocused()&&m.renderer.$cursorLayer.setBlinking(!1),clearInterval(x),h(),x=setInterval(h,20),R=0,r.addListener(document,"mousemove",g)}function d(){clearInterval(x),m.session.removeMarker(b),b=null,m.selection.fromOrientedRange(k),m.isFocused()&&!$&&m.$resetCursorStyle(),k=null,C=null,R=0,_=null,A=null,r.removeListener(document,"mousemove",g)}function g(){null==T&&(T=setTimeout(function(){null!=T&&b&&d()},20))}function p(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function f(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=s.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var r="none";return i&&t.indexOf(o)>=0?r="copy":n.indexOf(o)>=0?r="move":t.indexOf(o)>=0&&(r="copy"),r}var m=e.editor,v=o.createElement("img");v.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(v.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(t){e[t]=this[t]},this),m.addEventListener("mousedown",this.onMouseDown.bind(e));var b,w,y,x,k,C,S,$,_,A,L,M=m.container,R=0;this.onDragStart=function(e){if(this.cancelDrag||!M.draggable){var t=this;return setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault()}k=m.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=m.getReadOnly()?"copy":"copyMove",s.isOpera&&(m.container.appendChild(v),v.scrollTop=0),n.setDragImage&&n.setDragImage(v,0,0),s.isOpera&&m.container.removeChild(v),n.clearData(),n.setData("Text",m.session.getTextRange()),$=!0,this.setState("drag")},this.onDragEnd=function(e){if(M.draggable=!1,$=!1,this.setState(null),!m.getReadOnly()){var t=e.dataTransfer.dropEffect;!S&&"move"==t&&m.session.remove(m.getSelectionRange()),m.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return w=e.clientX,y=e.clientY,b||u(),R++,e.dataTransfer.dropEffect=S=f(e),r.preventDefault(e)},this.onDragOver=function(e){if(!m.getReadOnly()&&p(e.dataTransfer))return w=e.clientX,y=e.clientY,b||(u(),R++),null!==T&&(T=null),e.dataTransfer.dropEffect=S=f(e),r.preventDefault(e)},this.onDragLeave=function(e){if(--R<=0&&b)return d(),S=null,r.preventDefault(e)},this.onDrop=function(e){if(C){var t=e.dataTransfer;if($)switch(S){case"move":k=k.contains(C.row,C.column)?{start:C,end:C}:m.moveText(k,C);break;case"copy":k=m.moveText(k,C,!0)}else{var n=t.getData("Text");k={start:C,end:m.session.insert(C,n)},m.focus(),S=null}return d(),r.preventDefault(e)}},r.addListener(M,"dragstart",this.onDragStart.bind(e)),r.addListener(M,"dragend",this.onDragEnd.bind(e)),r.addListener(M,"dragenter",this.onDragEnter.bind(e)),r.addListener(M,"dragover",this.onDragOver.bind(e)),r.addListener(M,"dragleave",this.onDragLeave.bind(e)),r.addListener(M,"drop",this.onDrop.bind(e));var T=null}function i(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}var o=e("../lib/dom"),r=e("../lib/event"),s=e("../lib/useragent"),a=200,l=200,c=5;(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=s.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(){var e=this.editor.container;s.isIE&&"dragReady"==this.state&&(i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&e.dragDrop());"dragWait"===this.state&&(i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(s.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/dom"],function(e,t){"use strict";var n=e("./mouse_event").MouseEvent,i=e("../lib/dom");t.addTouchListeners=function(e,t){function o(){var e=window.navigator&&window.navigator.clipboard,n=!1,o=function(){var o=t.getCopyText(),r=t.session.getUndoManager().hasUndo();b.replaceChild(i.buildDom(n?["span",!o&&["span",{"class":"ace_mobile-button",action:"selectall"},"Select All"],o&&["span",{"class":"ace_mobile-button",action:"copy"},"Copy"],o&&["span",{"class":"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{"class":"ace_mobile-button",action:"paste"},"Paste"],r&&["span",{"class":"ace_mobile-button",action:"undo"},"Undo"],["span",{"class":"ace_mobile-button",action:"find"},"Find"],["span",{"class":"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),b.firstChild)},r=function(i){var r=i.target.getAttribute("action");if("more"==r||!n)return n=!n,o();"paste"==r?e.readText().then(function(e){t.execCommand(r,e)}):r&&("cut"!=r&&"copy"!=r||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),b.firstChild.style.display="none",n=!1,"openCommandPallete"!=r&&t.focus()};b=i.buildDom(["div",{"class":"ace_mobile-menu",ontouchstart:function(e){w="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),r(e)},onclick:r},["span"],["span",{"class":"ace_mobile-button",action:"more"},"..."]],t.container)}function r(){b||o();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.container.getBoundingClientRect();b.style.top=n.pageY-i.top-3+"px",b.style.right="10px",b.style.display="",b.firstChild.style.display="none",t.on("input",s)}function s(){b&&(b.style.display="none"),t.off("input",s)}function a(){p=null,clearTimeout(p);var e=t.selection.getRange(),n=e.contains(m.row,m.column);!e.isEmpty()&&n||(t.selection.moveToPosition(m),t.selection.selectWord()),w="wait",r()}function l(){p=null,clearTimeout(p),t.selection.moveToPosition(m);var e=x>=2?t.selection.getLineRange(m.row):t.session.getBracketRange(m);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),w="wait"}function c(){y+=60,f=setInterval(function(){y--<=0&&(clearInterval(f),f=null),Math.abs(k)<.01&&(k=0),Math.abs(C)<.01&&(C=0),y<20&&(k*=.9),y<20&&(C*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*k,10*C),e==t.session.getScrollTop()&&(y=0)},10)}var h,u,d,g,p,f,m,v,b,w="scroll",y=0,x=0,k=0,C=0;e.addEventListener("contextmenu",function(){v&&t.textInput.getElement().focus()}),e.addEventListener("touchstart",function(e){var i=e.touches;if(p||i.length>1)return clearTimeout(p),p=null,d=-1,void(w="zoom");v=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.lineHeight,s=e.timeStamp;g=s;var c=i[0],f=c.clientX,b=c.clientY;Math.abs(h-f)+Math.abs(u-b)>o&&(d=-1),h=e.clientX=f,u=e.clientY=b,k=C=0;var S=new n(e,t);if(m=S.getDocumentPosition(),s-d<500&&1==i.length&&!y)x++,e.preventDefault(),e.button=0,l();else{x=0;var $=t.selection.cursor,_=t.selection.isEmpty()?$:t.selection.anchor,A=t.renderer.$cursorLayer.getPixelPosition($,!0),L=t.renderer.$cursorLayer.getPixelPosition(_,!0),M=t.renderer.scroller.getBoundingClientRect(),R=function(e,t){return(e/=r)*e+(t=t/o-.75)*t};if(e.clientXE?"cursor":"anchor"),w=E<3.5?"anchor":T<3.5?"cursor":"scroll",p=setTimeout(a,450)}d=s}),e.addEventListener("touchend",function(e){v=t.$mouseHandler.isMousePressed=!1,f&&clearInterval(f),"zoom"==w?(w="",y=0):p?(t.selection.moveToPosition(m),y=0,r()):"scroll"==w?(c(),e.preventDefault(),s()):r(),clearTimeout(p),p=null}),e.addEventListener("touchmove",function(e){p&&(clearTimeout(p),p=null);var i=e.touches;if(!(i.length>1||"zoom"==w)){var o=i[0],r=h-o.clientX,s=u-o.clientY;if("wait"==w){if(!(r*r+s*s>4))return e.preventDefault();w="cursor"}h=o.clientX,u=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var a=e.timeStamp,l=a-g;if(g=a,"scroll"==w){var c=new n(e,t);c.speed=1,c.wheelX=r,c.wheelY=s,10*Math.abs(r)1&&(o=n[n.length-2]);var s=c[t+"Path"];return null==s?s=c.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return c.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(n,i){var o,r;Array.isArray(n)&&(r=n[0],n=n[1]);try{o=e(n)}catch(l){}if(o&&!t.$loading[n])return i&&i(o);if(t.$loading[n]||(t.$loading[n]=[]),t.$loading[n].push(i),!(t.$loading[n].length>1)){var a=function(){e([n],function(e){t._emit("load.module",{name:n,module:e});var i=t.$loading[n];t.$loading[n]=null,i.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();s.loadScript(t.moduleUrl(n,r),a),h()}};var h=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),h=function(){})};t.init=i,t.version="1.4.6"}), +ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(e,t){"use strict";var n=e("../lib/event"),i=e("../lib/useragent"),o=e("./default_handlers").DefaultHandlers,r=e("./default_gutter_handler").GutterHandler,s=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,c=e("../config"),h=function(e){var t=this;this.editor=e,new o(this),new r(this),new a(this);var s=function(){(!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement()))&&window.focus(),e.focus()},c=e.renderer.getMouseEventTarget();n.addListener(c,"click",this.onMouseEvent.bind(this,"click")),n.addListener(c,"mousemove",this.onMouseMove.bind(this,"mousemove")),n.addMultiMouseDownListener([c,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent"),n.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel")),l(e.container,e);var h=e.renderer.$gutter;n.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),n.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick")),n.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),n.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),n.addListener(c,"mousedown",s),n.addListener(h,"mousedown",s),i.isIE&&e.renderer.scrollBarV&&(n.addListener(e.renderer.scrollBarV.element,"mousedown",s),n.addListener(e.renderer.scrollBarH.element,"mousedown",s)),e.on("mousemove",function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),o=e.session.selection.getRange(),r=e.renderer;!o.isEmpty()&&o.insideStart(i.row,i.column)?r.setCursorStyle("default"):r.setCursorStyle("")}})};(function(){this.onMouseEvent=function(e,t){this.editor._emit(e,new s(t,this.editor))},this.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new s(t,this.editor))},this.onMouseWheel=function(e,t){var n=new s(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},this.setState=function(e){this.state=e},this.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var o=this.editor,r=this.editor.renderer;r.$isMousePressed=!0;var a=this,l=function(e){if(e)return i.isWebKit&&!e.which&&a.releaseMouse?a.releaseMouse():(a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new s(e,a.editor),void(a.$mouseMoved=!0))},c=function(e){o.off("beforeEndOperation",u),clearInterval(d),h(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=r.$isMousePressed=!1,r.$keepTextAreaAtCursor&&r.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),o.endOperation()},h=function(){a[a.state]&&a[a.state](),a.$mouseMoved=!1};if(i.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){c(e)});var u=function(){a.releaseMouse&&o.curOp.command.name&&o.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())};o.on("beforeEndOperation",u),o.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=l,a.releaseMouse=n.capture(this.editor.container,l,c);var d=setInterval(h,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&n.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)}}).call(h.prototype),c.defineOptions(h.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:i.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=h}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";function n(e){e.on("click",function(t){var n=t.getDocumentPosition(),o=e.session,r=o.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?o.removeFold(r):o.expandFold(r),t.stop());var s=t.domEvent&&t.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())}),e.on("gutterclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session;i.foldWidgets&&i.foldWidgets[n]&&e.session.onFoldWidgetClick(n,t),e.isFocused()||e.focus(),t.stop()}}),e.on("gutterdblclick",function(t){if("foldWidgets"==e.renderer.$gutterLayer.getRegion(t)){var n=t.getDocumentPosition().row,i=e.session,o=i.getParentFoldRangeData(n,!0),r=o.range||o.firstRange;if(r){n=r.start.row;var s=i.getFoldAt(n,i.getLine(n).length,1);s?i.removeFold(s):(i.addFold("...",r),e.renderer.scrollCursorIntoView({row:r.start.row,column:0}))}t.stop()}})}var i=e("../lib/dom");t.FoldHandler=n}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t){"use strict";var n=e("../lib/keys"),i=e("../lib/event"),o=function(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)};(function(){this.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},this.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},this.addKeyboardHandler=function(e,t){if(e){"function"==typeof e&&!e.handleKeyboard&&(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),t==undefined?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},this.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map(function(n){return n.getStatusText&&n.getStatusText(t,e)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(e,t,n,o){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--&&!((r=this.$handlers[l].handleKeyboard(this.$data,e,t,n,o))&&r.command&&((s="null"==r.command||a.exec(r.command,this.$editor,r.args,o))&&o&&-1!=e&&1!=r.passEvent&&1!=r.command.passEvent&&i.stopEvent(o),s)););return!s&&-1==e&&(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},this.onCommandKey=function(e,t,i){var o=n.keyCodeToString(i);return this.$callKeyboardHandlers(t,o,i,e)},this.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)}}).call(o.prototype),t.KeyBinding=o}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(e,t){"use strict";function n(e,t,n,i){var g=s?d:u,p=null,f=null,m=null,v=0,b=null,w=-1,k=null,S=null,$=[];if(!i)for(k=0,i=[];k0)if(16==b){for(k=w;k-1){for(k=w;k=0&&i[_]==C;_--)t[_]=s}}function i(e,t,n){if(!(a=e){for(i=u+1;i=e;)i++;for(o=u,r=i-1;o=t.length||(o=n[i-1])!=v&&o!=b||(r=t[i+1])!=v&&r!=b?w:(l&&(r=b),r==o?r:w);case $:return(o=i>0?n[i-1]:y)==v&&i+10&&n[i-1]==v)return v;if(l)return w;for(u=i+1,a=t.length;u=1425&&g<=2303||64286==g;if(o=t[u],p&&(o==m||o==k))return m}return i<1||(o=t[i-1])==y?w:n[i-1];case y:return l=!1,c=!0,s;case x:return h=!0,w;case L:case M:case T:case E:case R:l=!1;case O:return w}}function r(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?f:I[t]:5==n?/[\u0591-\u05f4]/.test(e)?m:f:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?A:/[\u0660-\u0669\u066b-\u066c]/.test(e)?b:1642==t?_:/[\u06f0-\u06f9]/.test(e)?v:k:32==n&&t<=8287?F[255&t]:254==n&&t>=65136?k:w}var s=0,a=0,l=!1,c=!1,h=!1,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],g=0,p=1,f=0,m=1,v=2,b=3,w=4,y=5,x=6,k=7,C=8,S=9,$=10,_=11,A=12,L=13,M=14,R=15,T=16,E=17,O=18,I=[O,O,O,O,O,O,O,O,O,x,y,x,C,y,O,O,O,O,O,O,O,O,O,O,O,O,O,O,y,y,y,x,C,w,w,_,_,_,w,w,w,w,w,$,S,$,S,S,v,v,v,v,v,v,v,v,v,v,S,w,w,w,w,w,w,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,w,w,w,w,w,w,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,w,w,w,w,O,O,O,O,O,O,y,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,S,w,_,_,_,_,w,w,w,w,f,w,w,O,w,w,_,_,v,v,w,f,w,w,w,v,f,w,w,w,w,w],F=[C,C,C,C,C,C,C,C,C,C,C,O,O,O,f,m,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,C,y,L,M,R,T,E,S,_,_,_,_,_,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,S,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,C];t.L=f,t.R=m,t.EN=v,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="\xb7",t.doBidiReorder=function(e,o,r){if(e.length<2)return{};var a=e.split(""),l=new Array(a.length),c=new Array(a.length),h=[];s=r?p:g,n(a,h,a.length,o);for(var u=0;uk&&o[u]0&&"\u0644"===a[u-1]&&/\u0622|\u0623|\u0625|\u0627/.test(a[u])&&(h[u-1]=h[u]=t.R_H,u++);a[a.length-1]===t.DOT&&(h[a.length-1]=t.B),"\u202b"===a[0]&&(h[0]=t.RLE);for(u=0;u=0&&(e=this.session.$docRowCache[n])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){e===undefined&&(e=this.getDocumentRow());var o=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var r=this.session.$wrapData[e];r&&(t===undefined&&(t=this.getSplitIndex()),t>0&&r.length?(this.wrapIndent=r.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,o=n.getVisualFromLogicalIdx(i,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!=0&&o++;for(var a=0;at&&r[o]%2==0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},this.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,g=0;g=a&&dn+r/2;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!=0&&o[i]%2==0?(e0&&o[i-1]%2==0&&o[i]%2!=0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2==0||!this.isRtlDir&&0===i&&o[i]%2!=0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!=0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(r.prototype),t.BidiHandler=r}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(e,t){"use strict";var n=e("./lib/oop"),i=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,s=function(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),!t.$isEmpty&&!t.$silent&&t._emit("changeSelection"),!t.$keepDesiredColumnOnChange&&e.old.column!=e.value.column&&(t.$desiredColumn=null)}),this.anchor.on("change",function(){t.$anchorChanged=!0,!t.$isEmpty&&!t.$silent&&t._emit("changeSelection")})};(function(){n.implement(this,o),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?r.fromPoints(t,t):this.isBackwards()?r.fromPoints(t,e):r.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){var o=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!r.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||s)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new r(i,0,n,this.session.getLine(n).length):new r(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},this.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},this.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(n>2)break}}return o.lastIndex=0,n},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e0&&/^\s*$/.test(o));n=o.length,/\s+$/.test(o)||(o="")}var r=i.stringReverse(o),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column);var o=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&o.row===this.lead.row&&o.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[o.row]&&(o.row>0||e>0)&&o.row++,this.moveCursorTo(o.row,o.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},this.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var i=this.getCursor();return r.fromPoints(t,i)}catch(n){return r.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},this.toJSON=function(){if(this.rangeCount)var e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t});else(e=this.getRange()).isBackwards=this.isBackwards();return e},this.fromJSON=function(e){if(e.start==undefined){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=r.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},this.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0}}).call(s.prototype),t.Selection=s}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t){"use strict";var n=e("./config"),i=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)}):(u=1,h=this.removeCapturingGroups(c.regex)),!c.splitRegex&&"string"!=typeof c.token&&a.push(c)),r[o]=l,o+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)},this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}};(function(){this.$setMaxTokenCount=function(e){i=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"==typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;oh){var v=e.substring(h,m-f.length);d.type==g?d.value+=v:(d.type&&c.push(d),d={type:g,value:v})}for(var b=0;bi){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});h1&&n[0]!==o&&n.unshift("#tmp",o),{tokens:c,state:n.length?n:o}},this.reportError=n.reportError}).call(o.prototype),t.Tokenizer=o}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(e,t){"use strict";var n=e("../lib/lang"),i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;for(n=0;t>0;)n+=e[t-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)}}).call(i.prototype),t.TokenIterator=i}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t){"use strict";var n,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,s=e("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],l=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],c={},h={'"':'"',"'":"'"},u=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,c.rangeCount!=e.multiSelect.rangeCount&&(c={rangeCount:e.multiSelect.rangeCount})),c[t])return n=c[t];n=c[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},d=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}},g=function(e){this.add("braces","insertion",function(t,i,o,r,a){var l=o.getCursorPosition(),c=r.doc.getLine(l.row);if("{"==a){u(o);var h=o.getSelectionRange(),p=r.doc.getTextRange(h);if(""!==p&&"{"!==p&&o.getWrapBehavioursEnabled())return d(h,p,"{","}");if(g.isSaneInsertion(o,r))return/[\]\}\)]/.test(c[l.column])||o.inMultiSelectMode||e&&e.braces?(g.recordAutoInsert(o,r,"}"),{text:"{}",selection:[1,1]}):(g.recordMaybeInsert(o,r,"{"),{text:"{",selection:[1,1]})}else if("}"==a){if(u(o),"}"==c.substring(l.column,l.column+1))if(null!==r.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&g.isAutoInsertedClosing(l,c,a))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==a||"\r\n"==a){u(o);var f="";if(g.isMaybeInsertedClosing(l,c)&&(f=s.stringRepeat("}",n.maybeInsertedBrackets),g.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=r.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(r.getLine(m.row))}else{if(!f)return void g.clearMaybeInsertedClosing();v=this.$getIndent(c)}var b=v+r.getTabString();return{text:"\n"+b+"\n"+v+f,selection:[1,b.length,1,b.length]}}g.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){if(u(i),"}"==o.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,o){if("("==o){u(n);var r=n.getSelectionRange(),s=i.doc.getTextRange(r);if(""!==s&&n.getWrapBehavioursEnabled())return d(r,s,"(",")");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==o){u(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r&&(u(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("brackets","insertion",function(e,t,n,i,o){if("["==o){u(n);var r=n.getSelectionRange(),s=i.doc.getTextRange(r);if(""!==s&&n.getWrapBehavioursEnabled())return d(r,s,"[","]");if(g.isSaneInsertion(n,i))return g.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){u(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1))if(null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&g.isAutoInsertedClosing(a,l,o))return g.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r&&(u(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("string_dquotes","insertion",function(e,t,n,i,o){var r=i.$mode.$quotes||h;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;u(n);var s=o,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(""!==l&&(1!=l.length||!r[l])&&n.getWrapBehavioursEnabled())return d(a,l,s,s);if(!l){var c=n.getCursorPosition(),g=i.doc.getLine(c.row),p=g.substring(c.column-1,c.column),f=g.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var b,w=m&&/string|escape/.test(m.type),y=!v||/string|escape/.test(v.type);if(f==s)(b=w!==y)&&/string\.end/.test(v.type)&&(b=!1);else{if(w&&!y)return null;if(w&&y)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var k=x.test(p);x.lastIndex=0;var C=x.test(p);if(k||C)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var S=g[c.column-2];if(p==s&&(S==s||x.test(S)))return null;b=!0}return{text:b?s+s:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,o){var r=i.$mode.$quotes||h,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)&&(u(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o})};g.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new r(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",a)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new r(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",a))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",l)},g.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},g.recordAutoInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isAutoInsertedClosing(o,r,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=o.row,n.autoInsertedLineEnd=i+r.substr(o.column),n.autoInsertedBrackets++},g.recordMaybeInsert=function(e,t,i){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this.isMaybeInsertedClosing(o,r)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=o.row,n.maybeInsertedLineStart=r.substr(0,o.column)+i,n.maybeInsertedLineEnd=r.substr(o.column),n.maybeInsertedBrackets++},g.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},g.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},g.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},g.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},i.inherits(g,o),t.CstyleBehaviour=g}),ace.define("ace/unicode",["require","exports","module"],function(e,t){"use strict";for(var n=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],i=0,o=[],r=0;r2?i%h!=h-1:i%h==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+a.escapeRegExp(p)+")"),v=new RegExp("(?:"+a.escapeRegExp(f)+")\\s*$"),b=function(e,t){y(e,t)||s&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},f),r.insertInLine({row:t,column:c},p))},w=function(e,t){var n;(n=e.match(v))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(m))&&r.removeInLine(t,n[1].length,n[0].length)},y=function(e,n){if(m.test(e))return!0;for(var i=t.getTokens(n),o=0;oe.length&&(x=e.length)}),c==Infinity&&(c=x,s=!1,l=!1),u&&c%h!=0&&(c=Math.floor(c/h)*h),o(l?w:b)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(f=new l(t,i.row,i.column)).getCurrentToken(),h=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var u,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(o.start))){var g=f.getCurrentTokenRow(),p=f.getCurrentTokenColumn()+m;u=new c(g,p,g,p+o.start.length);break}a=f.stepBackward()}var f;for(a=(f=new l(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(o.end))){g=f.getCurrentTokenRow(),p=f.getCurrentTokenColumn()+m;d=new c(g,p,g,p+o.end.length);break}a=f.stepForward()}d&&t.remove(d),u&&(t.remove(u),r=u.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);h.start.row==r&&(h.start.column+=s),h.end.row==r&&(h.end.column+=s),t.selection.fromOrientedRange(h)}},this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var i=e[t],o=i.prototype.$id,r=n.$modes[o];r||(n.$modes[o]=r=new i),n.$modes[t]||(n.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var n=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(o.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t){"use strict";var n=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,s=e("./anchor").Anchor,a=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new r(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new s(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);var i=this.getLine(e);return t==undefined&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))0,i=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){return e instanceof r||(e=r.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},this.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!r.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(i(this.$lines,e,t),this._signal("change",e)))},this.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,o=e.start.row,r=e.start.column,s=0,a=0;s20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=n,-1==i&&(i=n),r<=i&&t.fireUpdateEvent(r,i)}}};(function(){n.implement(this,i),this.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},this.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},this.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},this.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t){"use strict";var n=e("./lib/lang"),i=(e("./lib/oop"),e("./range").Range),o=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,o,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l=s;l<=a;l++){var c=this.cache[l];null==c&&((c=n.getMatchOffsets(o.getLine(l),this.regExp)).length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(e){return new i(l,e.offset,l,e.offset+e.length)}),this.cache[l]=c.length?c:"");for(var h=c.length;h--;)t.drawSingleLineMarker(e,c[h].toScreenRange(o),this.clazz,r)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t){"use strict";function n(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach(function(t){t.start.row+=e,t.end.row+=e})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l0)){var l=n(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},this.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},this.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},this.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},this.merge=function(){for(var e,t=[],i=this.ranges,o=(i=i.sort(function(e,t){return n(e.start,t.start)}))[0],r=1;r=0},this.containsPoint=function(e){return this.pointIndex(e)>=0},this.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},this.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;si)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&c>0&&sh.start.column&&h.end.column==r[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-o,c=t.column-n.column;so)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>o&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>o&&(h.start.row+=l)}if(0!=l&&s=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o=t){a=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort(function(e,t){return e.start.row-t.start.row}),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof r?n=e:(n=new r(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var g=this.getFoldsInRange(n.range);g.length>0&&(this.removeFolds(g),g.forEach(function(e){n.addSubFold(e)}));for(var p=0;p0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n,o;if(null==e?(n=new i(0,0,this.getLength(),0),t=!0):n="number"==typeof e?new i(e,0,e,this.getLine(e).length):"row"in e?i.fromPoints(e,e):e,o=this.getFoldsInRangeList(n),t)this.removeFolds(o);else for(var r=o;r.length;)this.expandFolds(r),r=this.getFoldsInRangeList(n);if(o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,s="";return e.walk(function(e,t,n,a){if(!(th)break}while(r&&l.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn()+r.value.length-2,c}},this.foldAll=function(e,t,i){i==undefined&&(i=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r=e=e||0;r=e){r=s.end.row;try{var a=this.addFold("...",s);a&&(a.collapseChildren=i)}catch(n){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,o=e-1;o>=0;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var t=this.$toggleFoldWidget(e,{});if(!t){var n=this.getParentFoldRangeData(e,!0);if(t=n.range||n.firstRange){e=t.start.row;var i=this.getFoldAt(e,this.getLine(e).length,1);i?this.removeFold(i):this.addFold("...",t)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var i=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator;t.Folding=n}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){if(!(a=this.$findClosingBracket(s[1],e)))return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(s[2],e)))return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var h=c.charAt(l);if(h==o){if(0==(r-=1))return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-s.getCurrentTokenColumn();;){for(var c=a.value,h=c.length;l=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}n.implement(this,s),this.setDocument=function(e){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=e,e.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},this.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t=t);r++);return(n=i[r])?(n.index=r,n.start=o-n.value.length,n):null},this.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=i.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?i.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(e){this.setOption("tabSize",e)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(e){this.setOption("overwrite",e)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}for(var s=t;se&&(e=t.screenWidth)}),this.lineWidgetWidth=e},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:Infinity,a=t.length,l=0;ls){if((l=r.end.row+1)>=a)break;s=(r=this.$foldData[o++])?r.start.row:Infinity}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(r.start.column+=h),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=h)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var a=e.start,l=r.start,h=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=h),e.end.row==a.row&&(e.end.column+=h),e.start.row+=s,e.end.row+=s,e}))}return r},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new c(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s0){var o;if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new c(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=0;if(f=this.getFoldLine(o.row)){f.addRemoveChars(o.row,o.column,i.column-o.column),f.shiftRow(-a);var u=this.getFoldLine(r);u&&u!==f&&(u.merge(f),f=u),h=c.indexOf(f)+1}for(;h=o.row&&f.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);c=this.$foldData,h=0;if(f=this.getFoldLine(r)){var p=f.range.compareInside(i.row,i.column);0==p?(f=f.split(i.row,i.column))&&(f.shiftRow(a),f.addRemoveChars(s,0,o.column-i.column)):-1==p&&(f.addRemoveChars(r,0,o.column-i.column),f.shiftRow(a)),h=c.indexOf(f)+1}for(;h=r&&f.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(f=this.getFoldLine(r))&&f.addRemoveChars(r,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var n,i,o=this.doc.getAllLines(),r=this.getTabSize(),s=this.$wrapData,l=this.$wrapLimit,c=e;for(t=Math.min(t,o.length-1);c<=t;)(i=this.getFoldLine(c,i))?(n=[],i.walk(function(e,t,i,r){var s;if(null!=e){(s=this.$getDisplayTokens(e,n.length))[0]=a;for(var l=1;lt-w;){var y=c+t-w;if(e[y-1]>=p&&e[y]>=p)r(y);else if(e[y]!=a&&e[y]!=h){for(var x=Math.max(y-(t-(t>>2)),c-1);y>x&&e[y]x&&e[y]x&&e[y]==g;)y--}else for(;y>x&&e[y]x?r(++y):(e[y=c+t]==o&&y--,r(y-w))}else{for(;y!=c-1&&e[y]!=a;y--);if(y>c){r(y);continue}for(y=c+t;y39&&l<48||l>57&&l<64?s.push(g):l>=4352&&e(l)?s.push(t,o):s.push(t)}return s},this.$getStringScreenWidth=function(t,n,i){if(0==n)return[0,0];var o,r;for(null==n&&(n=Infinity),i=i||0,r=0;r=4352&&e(o)?i+=2:i+=1,!(i>n));r++);return[i,r]},this.lineWidgets=null,this.getRowLength=function(e){if(this.lineWidgets)var t=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;else t=0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},this.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]=0){a=c[h],r=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;for(var g=this.getLength()-1,p=this.getNextFoldLine(r),f=p?p.start.row:Infinity;a<=e&&!(a+(l=this.getRowLength(r))>e||r>=g);)a+=l,++r>f&&(r=p.end.row+1,f=(p=this.getNextFoldLine(r,p))?p.start.row:Infinity),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a));if(p&&p.start.row<=r)i=this.getFoldDisplayLine(p),r=p.start.row;else{if(a+l<=e||r>g)return{row:g,column:this.getLine(g).length};i=this.getLine(r),p=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var b=this.$wrapData[r];b&&(o=b[v],v>0&&b.length&&(m=b.indent,s=b[v-1]||b[b.length-1],i=i.substring(s)))}return n!==undefined&&this.$bidiHandler.isBidiRow(a+v,r,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),p?p.idxToPosition(s):{row:r,column:s}},this.documentToScreenPosition=function(e,t){if(void 0===t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i=0,o=null,r=null;(r=this.getFoldAt(e,t,1))&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],i=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),g=d?d.start.row:Infinity;a=g){if((s=d.end.row+1)>e)break;g=(d=this.getNextFoldLine(s,d))?d.start.row:Infinity}else s=a+1;i+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var p="";d&&a>=g?(p=this.getFoldDisplayLine(d,e,t),o=d.start.row):(p=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){for(var v=0;p.length>=m[v];)i++,v++;p=p.substring(m[v-1]||0,p.length),f=v>0?m.indent:0}}return{row:i,column:f+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},this.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},this.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=(a=0,(t=this.$foldData[a++])?t.start.row:Infinity);io&&(i=t.end.row+1,o=(t=this.$foldData[a++])?t.start.row:Infinity)}else{e=this.getLength();for(var s=this.$foldData,a=0;an);r++);return[i,r]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=e}.call(g.prototype),e("./edit_session/folding").Folding.call(g.prototype),e("./edit_session/bracket_match").BracketMatch.call(g.prototype),r.defineOptions(g.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=g}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t){"use strict";function n(e,t){function n(e){return/\w/.test(e)||t.regExp?"\\b":""}return n(e[0])+e+n(e[e.length-1])}var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){this.$options={}};(function(){this.set=function(e){return o.mixin(this.$options,e),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach(function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)}),i},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=o.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;df||(s.push(l=new r(u,f,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;vx&&s[d].end.row==n.end.row;)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v=a;n--)if(u(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=l,a=s.row;n>=a;n--)if(u(n,Number.MAX_VALUE,e))return}};else c=function(e){var n=s.row;if(!u(n,s.column,e)){for(n+=1;n<=l;n++)if(u(n,0,e))return;if(0!=t.wrap)for(n=a,l=s.row;n<=l;n++)if(u(n,0,e))return}};if(t.$isMultiLine)var h=n.length,u=function(t,o,r){var s=i?t-h+1:t;if(!(s<0)){var a=e.getLine(s),l=a.search(n[0]);if(!(!i&&lo))return!!r(s,l,s+h-1,u)||void 0}}};else if(i)u=function(t,i,o){var r,s=e.getLine(t),a=[],l=0;for(n.lastIndex=0;r=n.exec(s);){var c=r[0].length;if(l=r.index,!c){if(l>=s.length)break;n.lastIndex=l+=1}if(r.index+c>i)break;a.push(r.index,c)}for(var h=a.length-1;h>=0;h-=2){var u=a[h-1];if(o(t,u,t,u+(c=a[h])))return!0}};else u=function(t,i,o){var r,s,a=e.getLine(t);for(n.lastIndex=i;s=n.exec(a);){var l=s[0].length;if(o(t,r=s.index,t,r+l))return!0;if(!l&&(n.lastIndex=r+=1,r>=a.length))return!1}};return{forEach:c}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t){"use strict";function n(e,t){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function i(e,t){n.call(this,e,t),this.$singleCommand=!1}var o=e("../lib/keys"),r=e("../lib/useragent"),s=o.KEY_MODS;i.prototype=n.prototype,function(){function e(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},this.bindKey=function(e,t,n){if("object"==typeof e&&e&&(n==undefined&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach(function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach(function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)},this)},this._addCommandToBinding=function(t,n,i){var o,r=this.commandKeyBinding;if(n)if(!r[t]||this.$singleCommand)r[t]=n;else{Array.isArray(r[t])?-1!=(o=r[t].indexOf(n))&&r[t].splice(o,1):r[t]=[r[t]],"number"!=typeof i&&(i=e(n));var s=r[t];for(o=0;oi)break}s.splice(o,0,n)}else delete r[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var n=e[t];if(n){if("string"==typeof n)return this.bindKey(n,t);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=t),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(t){this.removeCommand(e[t])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(t){this.bindKey(t,e[t])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},this.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},this.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(n.prototype),t.HashHandler=n,t.MultiHashHandler=i}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){i.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,i),function(){n.implement(this,o),this.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"==typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},this.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e})}}.call(r.prototype),t.CommandManager=r}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t){"use strict";function n(e,t){return{win:e,mac:t}}var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;t.commands=[{name:"showSettingsMenu",bindKey:n("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:n("Alt-E","F4"),exec:function(e){o.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:n("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:n("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:n(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:n("Ctrl-L","Command-L"),exec:function(e,t){"number"==typeof t&&!isNaN(t)&&e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:n("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:n("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:n("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:n("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:n(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:n("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:n("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:n("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:n("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:n("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:n("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:n("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:n("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:n("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:n("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:n("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:n("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:n("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:n("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:n("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:n("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:n("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:n("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:n("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:n("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:n("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:n("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:n("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:n("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:n("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:n("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:n("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:n(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:n("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:n(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:n("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:n("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:n("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:n("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:n("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:n("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:n("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:n(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:n("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:n("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:n("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:n("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:n("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:n("Ctrl-Shift-Up","Alt-Shift-Up"), +exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:n("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:n("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:n("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:n("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:n("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:n("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:n("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:n("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:n("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:n("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:n("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:n("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:n("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:n("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:n("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:n("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:n("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:n("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:n("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:n("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:n("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:n(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:n("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:n("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:n("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",description:"Expand to line",bindKey:n("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:n(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(n.row),c=n.row+1;c<=o.row+1;c++){var h=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(c)));0!==h.length&&(h=" "+h),l+=h}o.row+10?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+a)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;m.loadModule(["keybinding",e],function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&e.bgTokenizer&&e.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(e){this.renderer.onResize(e)},this.setTheme=function(e,t){this.renderer.setTheme(e,t)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(e){this.renderer.setStyle(e)},this.unsetStyle=function(e){this.renderer.unsetStyle(e)},this.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},this.setFontSize=function(e){this.setOption("fontSize",e)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout(function(){e.$highlightPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=t.findMatchingBracket(e.getCursorPosition());if(n)var i=new d(n.row,n.column,n.row,n.column+1);else if(t.$mode.getMatching)i=t.$mode.getMatching(e.session);i&&(t.$bracketHighlight=t.addMarker(i,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var e=this;this.$highlightTagPending=!0,setTimeout(function(){e.$highlightTagPending=!1;var t=e.session;if(t&&t.bgTokenizer){var n=e.getCursorPosition(),i=new v(e.session,n.row,n.column),o=i.getCurrentToken();if(!o||!/\b(?:tag-open|tag-name)/.test(o.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==o.type.indexOf("tag-open")||(o=i.stepForward())){var r=o.value,s=0,a=i.stepBackward();if("<"==a.value){do{a=o,(o=i.stepForward())&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"=0)}else{do{o=a,a=i.stepBackward(),o&&o.value===r&&-1!==o.type.indexOf("tag-name")&&("<"===a.value?s++:"1)&&(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new d(e.row,e.column,e.row,Infinity);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},this.onSelectionChange=function(){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var t=this.selection.getRange(),n=this.getSelectionStyle();e.$selectionMarker=e.addMarker(t,"ace_selection",n)}var i=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(i),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,o=e.getLine(t.start.row),r=o.substring(n,i);if(!(r.length>5e3)&&/[\w\d]/.test(r)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r}),a=o.substring(n-1,i+1);if(s.test(a))return s}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),o=0;oa.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,h=n.getState(o.row),u=(a=n.getLine(o.row),i.checkOutdent(h,a,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new d(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new d(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),n.getDocument().isNewLine(e)){var g=i.getNextLineIndent(h,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},g)}u&&i.autoOutdent(h,n,o.row)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove());((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);tt.toLowerCase()?1:0});var o=new d(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new d(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&n=a&&s<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l});for(var h,u=this.$toggleWordPairs,d=0;dg+1)break;g=p.last}for(h--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new v(this.session,n.row,n.column),o=i.getCurrentToken(),r=o||i.stepForward();if(r){var s,a,l=!1,c={},h=n.column-r.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;h=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),i},this.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(e,t,i){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&n.mixin(t,e);var o=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(o)||this.$search.$options.needle)||(o=this.session.getWordRange(o.start.row,o.start.column),e=this.session.getTextRange(o)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:o});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,i),r):(t.backwards?o.start=o.end:o.end=o.start,void this.selection.setRange(o))},this.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},this.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},this.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",function(){i=!0}),s=this.renderer.on("beforeRender",function(){i&&(t=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;null!=(i=r.top>=0&&a+t.top<0||!(r.topwindow.innerHeight)&&null)&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(i)),i=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,n){var i=this;m.loadModule("./ext/prompt",function(o){o.prompt(i,e,t,n)})}}.call(w.prototype),m.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?y.attach(this):y.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?y.attach(this):y.detach(this)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var y={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t){"use strict";function n(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n"+e.end.row+":"+e.end.column}function a(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(v(t.start,e.end)>=0)h(t,e,-1);else{if(!(v(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(v(t.start,e.end)>=0)h(t,e,-1);else{if(!(v(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(v(t.start,e.start)>=0)h(t,e,1);else{if(!(v(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(v(t.start,e.start)>=0)h(t,e,1);else{if(!(v(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function l(e,t){for(var n=e.length;n--;)for(var i=0;i=0?h(e,t,-1):v(e.start,t.start)<=0?h(t,e,1):(h(e,m.fromPoints(t.start,e.start),-1),h(t,e,1));else if(!n&&i)v(t.start,e.end)>=0?h(t,e,-1):v(t.start,e.start)<=0?h(e,t,1):(h(t,m.fromPoints(e.start,t.start),-1),h(e,t,1));else if(!n&&!i)if(v(t.start,e.end)>=0)h(t,e,-1);else{var o,r;if(!(v(t.end,e.start)<=0))return v(e.start,t.start)<0&&(o=e,e=d(e,t.start)),v(e.end,t.end)>0&&(r=d(e,t.end)),u(t.end,e.start,e.end,-1),r&&!o&&(e.lines=r.lines,e.start=r.start,e.end=r.end,r=e),[t,o,r].filter(Boolean);h(e,t,-1)}return[t,e]}function h(e,t,n){u(e.start,t.start,t.end,n),u(e.end,t.start,t.end,n)}function u(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function d(e,t){var n=e.lines,o=e.end;e.end=i(t);var r=e.end.row-e.start.row,s=n.splice(r,n.length),a=r?t.column:t.column-e.start.column;return n.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:i(t),end:o,lines:s,action:e.action}}function g(e,t){t=o(t);for(var n=e.length;n--;){for(var i=e[n],r=0;r0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){e==undefined&&(e=this.$rev),this.mark=e},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)}}).call(f.prototype);var m=e("./range").Range,v=m.comparePoints;m.comparePoints;t.UndoManager=f}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";var n=e("../lib/dom"),i=function(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0};(function(){this.moveContainer=function(e){n.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},this.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},this.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,o=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-o*this.canvasHeight},this.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLength(e)},this.getLength=function(){return this.cells.length},this.get=function(e){return this.cells[e]},this.shift=function(){this.$cacheCell(this.cells.shift())},this.pop=function(){this.$cacheCell(this.cells.pop())},this.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=n.createFragment(this.element),i=0;is&&(c=r.end.row+1,s=(r=t.getNextFoldLine(c,r))?r.start.row:Infinity),c>o){for(;this.$lines.getLength()>l+1;)this.$lines.pop();break}(a=this.$lines.get(++l))?a.row=c:(a=this.$lines.createCell(c,e,this.session,n),this.$lines.push(a)),this.$renderCell(a,e,r,c),c++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(r+=s.left+s.right)!==this.gutterWidth&&!isNaN(r)&&(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i0;o--)this.$lines.shift();if(i>n)for(o=this.session.getFoldedRowCount(n+1,i);o>0;o--)this.$lines.pop();e.firstRowi&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,i){for(var o=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:Infinity;r>a&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:Infinity),!(r>i);){var l=this.$lines.createCell(r,e,this.session,n);this.$renderCell(l,e,s,r),o.push(l),r++}return o},this.$renderCell=function(e,t,n,o){var r=e.element,s=this.session,a=r.childNodes[0],l=r.childNodes[1],c=s.$firstLineNumber,h=s.$breakpoints,u=s.$decorations,d=s.gutterRenderer||this.$renderer,g=this.$showFoldWidgets&&s.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,f="ace_gutter-cell ";if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o=p&&this.$cursorRow<=n.end.row)&&(f+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),h[o]&&(f+=h[o]),u[o]&&(f+=u[o]),this.$annotations[o]&&(f+=this.$annotations[o].className),r.className!=f&&(r.className=f),g){var m=g[o];null==m&&(m=g[o]=s.getFoldWidget(o))}if(m){f="ace_fold-widget ace_"+m;"start"==m&&o==p&&on.right-t.right?"foldWidgets":void 0}}).call(l.prototype),t.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t){"use strict";var n=e("../range").Range,i=e("../lib/dom"),o=function(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function e(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,s,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ig,h==c),r,h==c?0:1,s)},this.drawMultiLineMarker=function(e,t,n,i,o){var r=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=r+t.start.column*i.characterWidth;(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,o)):this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,o)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"px;top:"+a+"px;left:"+r+"px;"+(o||""))}if(!((s=(t.end.row-t.start.row-1)*i.lineHeight)<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+r+"px;"+(o||""))}},this.drawSingleLineMarker=function(e,t,n,i,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,o,r);var s=i.lineHeight,a=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(r||""))},this.drawBidiSingleLineMarker=function(e,t,n,i,o,r){ +var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(n,"height:"+s+"px;width:"+e.width+(o||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(r||""))},this)},this.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},this.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))}}).call(o.prototype),t.Marker=o}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),r=e("./lines").Lines,s=e("../lib/event_emitter").EventEmitter,a=function(e){this.dom=i,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new r(this.element)};(function(){n.implement(this,s),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;nh&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:Infinity),!(a>o);){var u=r[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)for(;s0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var o=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:Infinity;r>a&&(r=s.end.row+1,a=(s=this.session.getNextFoldLine(r,s))?s.start.row:Infinity),!(r>n);){var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),i.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),i.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",o.push(l),r++}return o},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,n,i){for(var r,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var h=r[1],u=r[2],d=r[3],g=r[4],p=r[5];if(s.showInvisibles||!u){var f=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,f&&l.appendChild(this.dom.createTextNode(f,this.element)),h){var m=s.session.getScreenTabSize(t+r.index);l.appendChild(s.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(u)if(s.showInvisibles){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",b.textContent=o.stringRepeat(s.SPACE_CHAR,u.length),l.appendChild(b)}else l.appendChild(this.com.createTextNode(u,this.element));else if(d){(b=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",b.textContent=o.stringRepeat(s.SPACE_CHAR,d.length),l.appendChild(b)}else if(g){t+=1,(b=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",b.className=s.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",b.textContent=s.showInvisibles?s.SPACE_CHAR:g,l.appendChild(b)}else if(p){t+=1,(b=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",b.className="ace_cjk",b.textContent=p,l.appendChild(b)}}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])e.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),b=this.dom.createElement("span");"fold"==n.type&&(b.style.width=n.value.length*this.config.characterWidth+"px"),b.className=v,b.appendChild(l),e.appendChild(b)}return t+i.length},this.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){for(var o=(i-=i%this.tabSize)/this.tabSize,r=0;r=s;)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat("\xa0",n.indent),this.element)),a=0,s=n[++r]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],o=i.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,i,o));for(var r=1;rthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,o);n=this.$renderToken(e,n,i,o)}},this.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"":"",e.appendChild(r)},this.$renderLine=function(e,t,n){if(!n&&0!=n&&(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);if(r&&r.length){this.$renderWrappedLine(e,i,r);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showInvisibles&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},this.$getFoldLineTokens=function(e,t){function n(e,t,n){for(var i=0,r=0;r+e[i].value.lengthn-t&&(s=s.substring(0,n-t)),o.push({type:e[i].type,value:s}),r=t+s.length,i+=1);for(;rn?o.push({type:e[i].type,value:s.substring(0,n-r)}):o.push(e[i]),r+=s.length,i+=1}}var i=this.session,o=[],r=i.getTokens(e);return t.walk(function(e,t,s,a,l){null!=e?o.push({type:"fold",value:e}):(l&&(r=i.getTokens(t)),r.length&&n(r,a,s))},t.end.row,this.session.getLine(t.end.row).length),o},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(a.prototype),t.Text=a}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";var n=e("../lib/dom"),i=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,i=t.length;i--;)n.setStyle(t[i].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){n.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){n.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},this.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&n.removeCssClass(this.element,"ace_smooth-blinking"),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout(function(){n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this)),n.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout(function(){e(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){e(!0),t()},this.blinkInterval),t()}else this.$stopCssAnimation()},this.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||s.top<0)&&i>1)){var a=this.cursors[o++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[i],this.session):this.isCursorInView(s,e)?(n.setStyle(l,"display","block"),n.translate(a,s.left,s.top),n.setStyle(l,"width",Math.round(e.characterWidth)+"px"),n.setStyle(l,"height",e.lineHeight+"px")):n.setStyle(l,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(i.prototype),t.Cursor=i}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t){"use strict";var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,s=32768,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,e>s?(this.coeff=s/e,e=s):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},this.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)}}.call(l.prototype);var c=function(e,t){a.call(this,e),this.scrollLeft=0,this.height=t.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};n.inherits(c,a),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(e){this.element.style.width=e+"px"},this.setInnerWidth=function(e){this.inner.style.width=e+"px"},this.setScrollWidth=function(e){this.inner.style.width=e+"px"},this.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)}}.call(c.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=c,t.VScrollBar=l,t.HScrollBar=c}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t){"use strict";var n=e("./lib/event"),i=function(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var i=this;this._flush=function(){i.pending=!1;var e=i.changes;if(e&&(n.blockIdle(100),i.changes=0,i.onRender(e)),i.changes){if(i.$recursionLimit--<0)return;i.schedule()}else i.$recursionLimit=2}};(function(){this.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(n.nextFrame(this._flush),this.pending=!0)},this.clear=function(){var e=this.changes;return this.changes=0,e}}).call(i.prototype),t.RenderLoop=i}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(e,t){var n=e("../lib/oop"),i=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/event"),s=e("../lib/useragent"),a=e("../lib/event_emitter").EventEmitter,l=256,c="function"==typeof ResizeObserver,h=200,u=t.FontMetrics=function(e){this.el=i.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=i.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=i.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.innerHTML=o.stringRepeat("X",l),this.$characterSize={width:0,height:0},c?this.$addObserver():this.checkForSizeChanges()};(function(){n.implement(this,a),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",s.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(e===undefined&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},this.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver(function(t){var n=t[0].contentRect;e.checkForSizeChanges({height:n.height,width:n.width/l})}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=r.onIdle(function t(){e.checkForSizeChanges(),r.onIdle(t,500)},500)},this.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/l};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,l),this.$main.getBoundingClientRect().width/l},this.getCharacterWidth=function(e){var t=this.charSizes[e];return t===undefined&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function e(t){return t?(window.getComputedStyle(t).zoom||1)*e(t.parentElement):1},this.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=i.buildDom([e(0,0),e(h,0),e(0,h),e(h,h)],this.el)},this.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=r(1/this.$getZoom(this.el),e));this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),u=s(this.els[3]),d=n(i(u,l),i(u,c),i(o(l,c),o(u,a))),g=r(1+d[0],i(l,a)),p=r(1+d[1],i(c,a));if(t){var f=t,m=d[0]*f[0]/h+d[1]*f[1]/h+1,v=o(r(f[0],g),r(f[1],p));return o(r(1/m/h,v),a)}var b=i(e,a),w=n(i(g,r(d[0],b)),i(p,r(d[1],b)),b);return r(h,w)}}).call(u.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(e,t){"use strict" +;var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./config"),r=e("./layer/gutter").Gutter,s=e("./layer/marker").Marker,a=e("./layer/text").Text,l=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,h=e("./scrollbar").VScrollBar,u=e("./renderloop").RenderLoop,d=e("./layer/font_metrics").FontMetrics,g=e("./lib/event_emitter").EventEmitter,p='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;perspective: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}',f=e("./lib/useragent"),m=f.isIE;i.importCssString(p,"ace_editor.css");var v=function(e,t){var n=this;this.container=e||i.createElement("div"),i.addCssClass(this.container,"ace_editor"),i.HI_DPI&&i.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=i.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=i.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=i.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new r(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var g=this.$textLayer=new a(this.content);this.canvas=g.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new d(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!f.isIOS,this.$loop=new u(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),o.resetOptions(this),o._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,g),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),i.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,n,o){o-=this.$extraHeight||0;var r=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(o&&(e||s.height!=o)&&(s.height=o,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){r|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,i.setStyle(this.scrollBarH.element.style,"left",t+"px"),i.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),i.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";i.setStyle(this.scrollBarH.element.style,"right",l),i.setStyle(this.scroller.style,"right",l),i.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)}return s.$dirty=!n||!o,r&&this._signal("resize",a),r},this.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},this.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(e){return this.setOption("showGutter",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=i.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=i.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var o=this.layerConfig,r=n.top,s=n.left;r-=o.offset;var a=t&&t.useTextareaForIME?this.lineHeight:m?0:1;if(r<0||r>o.height-a)i.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0],a+=2}else r+=this.lineHeight+2;else r+=this.lineHeight;(s-=this.scrollLeft)>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,i.setStyle(e,"height",a+"px"),i.setStyle(e,"width",l+"px"),i.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(r,c))}}}else i.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var o=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;o>0&&(this.scrollTop=o,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),i.translate(this.content,-this.scrollLeft,-n.offset);var r=n.width+2*this.$padding+"px",s=n.minHeight+"px";i.setStyle(this.content.style,"width",r),i.setStyle(this.content.style,"height",s)}return e&this.CHANGE_H_SCROLL&&(i.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender")):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),void this._signal("afterRender"))}this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var o=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,o,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,o=this.$getLongestLine(),r=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-o-2*this.$padding<0),s=this.$horizScroll!==r;s&&(this.$horizScroll=r,this.scrollBarH.setVisible(r));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var h=this.scrollMargin;this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,i-t.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,o+2*this.$padding-t.scrollerWidth+h.right)));var u=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-i+c<0||this.scrollTop>h.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g,p,f=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),b=v+m,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),g=e.documentToScreenRow(v,0),p=e.getRowLength(v)*w,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*w+p,f=this.scrollTop-g*w;var x=0;return(this.layerConfig.width!=o||s)&&(x=this.CHANGE_H_SCROLL),(s||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:g,lastRow:b,lineHeight:w,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:w?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){ +this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>r?(t&&l+s>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-ao?(o=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},this.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(r):Math.round(r);return{row:s,column:a,side:r-a>0?1:-1,offsetX:o}},this.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=this.$blockCursor?Math.floor(r):Math.round(r),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),o)},this.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},this.visualizeFocus=function(){i.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){i.removeCssClass(this.container,"ace_focus")},this.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),e.useTextareaForIME=this.$useTextareaForIME,this.$useTextareaForIME?(i.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),i.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,this.$composition=null,this.$cursorLayer.element.style.display="")},this.addToken=function(e,t,n,i){var o=this.session;o.bgTokenizer.lines[n]=null;var r={type:t,value:e},s=o.getTokens(n);if(null==i)s.push(r);else for(var a=0,l=0;l50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);var h=function(e,t,n){var i=null,o=!1,r=Object.create(a),s=[],h=new c({messageBuffer:s,terminate:function(){},postMessage:function(e){s.push(e),i&&(o?setTimeout(u):u())}});h.setEmitSync=function(e){o=e};var u=function(){var e=s.shift();e.command?i[e.command].apply(i,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){h.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},l.loadModule(["worker",t],function(e){for(i=new e[n](r);s.length;)u()}),h};t.UIWorkerClient=h,t.WorkerClient=c,t.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t){"use strict";var n=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){o.implement(this,i),this.setup=function(){var e=this,t=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=i.addMarker(new n(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)}),i.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=e.addMarker(new n(i.row,i.column,i.row,i.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=i),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a={row:(l=this.others[s]).row,column:l.column+r};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){var l;a={row:(l=this.others[s]).row,column:l.column+r};this.doc.remove(new n(a.row,a.column,a.row,a.column-i))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,i=function(i,o){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),o,null,!1)};i(this.pos,this.mainClass);for(var o=this.others.length;o--;)i(this.others[o],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;n1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new s,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{n=this.getRange();var i=this.isBackwards(),o=n.start.row,r=n.end.row;if(o==r){if(i)var s=n.end,l=n.start;else s=n.start,l=n.end;return this.addRange(a.fromPoints(l,l)),void this.addRange(a.fromPoints(s,s))}var c=[],h=this.getLineRange(o,!0);h.start.column=n.start.column,c.push(h);for(var u=o+1;u1){var e=this.rangeList.ranges,t=e[e.length-1],n=a.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var o=[],r=e.column0;)v--;if(v>0)for(var b=0;o[b].isEmpty();)b++;for(var w=v;w>=b;w--)o[w].isEmpty()&&o.splice(w,1)}return o}}.call(l.prototype);var f=e("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(d.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(d.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,r=1==n||n&&n.$byLines,s=this.session,a=this.selection,c=a.rangeList,h=(o?a:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=a._eventRegistry;a._eventRegistry={};var d=new l(s);this.inVirtualSelectionMode=!0;for(var g=h.length;g--;){if(r)for(;g>0&&h[g].start.row==h[g-1].end.row;)g--;d.fromOrientedRange(h[g]),d.index=g,this.selection=s.selection=d;var p=e.exec?e.exec(this,t||{}):e(this,t||{});!i&&p!==undefined&&(i=p),d.toOrientedRange(h[g])}d.detach(),this.selection=s.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=u,a.mergeOverlappingRanges(),a.ranges[0]&&a.fromOrientedRange(a.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;ir&&(r=n.column),ic?e.insert(i,u.stringRepeat(" ",o-c)):e.remove(new a(i.row,i.column,i.row,i.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=i.row,t.cursor=t.end}),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),h=c.start.row,d=c.end.row,g=h==d;if(g){var p,f=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d0);h<0&&(h=0),d>=f&&(d=f-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,g),this.session.insert({row:h,column:0},m.join("\n")+"\n"),g||(c.start.column=0,c.end.column=m[m.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){function n(e){return u.stringRepeat(" ",e)}function i(e){return e[2]?n(s)+e[2]+n(a-e[2].length+l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function o(e){return e[2]?n(s+a-e[2].length)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function r(e){return e[2]?n(s)+e[2]+n(l)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var s,a,l,c=!0,h=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==s?(s=t[1].length,a=t[2].length,l=t[3].length,t):(s+a+l!=t[1].length+t[2].length+t[3].length&&(h=!1),s!=t[1].length&&(c=!1),s>t[1].length&&(s=t[1].length),at[3].length&&(l=t[3].length),t):[e]}).map(t?i:c?h?o:i:r)}}).call(f.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=o,e("./config").defineOptions(f.prototype,"editor",{enableMultiselect:{set:function(e){o(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",c)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",c))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t){"use strict";var n=e("../../range").Range,i=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(e,t,i){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){for(var a=i||r.length,l=e.getLength(),c=t,h=t;++tc){var g=e.getLine(h).length;return new n(c,a,h,g)}}},this.openingBracketBlock=function(e,t,i,o,r){var s={row:i,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,i,o){var r={row:i,column:o},s=e.$findOpeningBracket(t,r);if(s)return s.column++,r.column--,n.fromPoints(s,r)}}).call(i.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,t){"use strict";function n(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}e("./lib/oop");var i=e("./lib/dom");e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach(function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)}),e},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var t=this.session.lineWidgets;t&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,o=i.start.row,r=i.end.row,s="add"==e.action,a=o+1;a0&&!i[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=r;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(n.prototype),t.LineWidgets=n}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t){"use strict";function n(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(s>0)i=r+1;else{if(!(s<0))return r;o=r-1}}return-(i+1)}function i(e,t,i){var o=e.getAnnotations().sort(s.comparePoints);if(o.length){var r=n(o,{row:t,column:-1},s.comparePoints);r<0&&(r=-r-1),r>=o.length?r=i>0?0:o.length-1:0===r&&i<0&&(r=o.length-1);var a=o[r];if(a&&i){if(a.row===t){do{a=o[r+=i]}while(a&&a.row===t);if(!a)return o.slice()}var l=[];t=a.row;do{l[i<0?"unshift":"push"](a),a=o[r+=i]}while(a&&a.row==t);return l.length&&l}}}var o=e("../line_widgets").LineWidgets,r=e("../lib/dom"),s=e("../range").Range;t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new o(n),n.widgetManager.attach(e));var s=e.getCursorPosition(),a=s.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var c,h=i(n,a,t);if(h){var u=h[0];s.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,s.row=u.row,c=e.renderer.$gutterLayer.$annotations[s.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(s.row),e.selection.moveToPosition(s);var d={row:s.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},g=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var f=e.renderer.$cursorLayer.getPixelPosition(s).left;p.style.left=f+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+c.className,g.innerHTML=c.text.join("
"),g.appendChild(r.createElement("div"));var m=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),e.off("changeSelection",d.destroy),e.off("changeSession",d.destroy),e.off("mouseup",d.destroy),e.off("change",d.destroy))},e.keyBinding.addKeyboardHandler(m),e.on("changeSelection",d.destroy),e.on("changeSession",d.destroy),e.on("mouseup",d.destroy),e.on("change",d.destroy),e.session.widgetManager.addLineWidget(d),d.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,t){"use strict";e("./lib/fixoldbrowsers");var n=e("./lib/dom"),i=e("./lib/event"),o=e("./range").Range,r=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.require=e,"function"==typeof define&&(t.define=define),t.edit=function(e,o){if("string"==typeof e){var s=e;if(!(e=document.getElementById(s)))throw new Error("ace.edit can't find div #"+s)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var a="";if(e&&/input|textarea/i.test(e.tagName)){var c=e;a=c.value,e=n.createElement("pre"),c.parentNode.replaceChild(e,c)}else e&&(a=e.textContent,e.innerHTML="");var h=t.createEditSession(a),u=new r(new l(e),h,o),d={document:h,editor:u,onResize:u.resize.bind(u,null)};return c&&(d.textarea=c),i.addListener(window,"resize",d.onResize),u.on("destroy",function(){i.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=o,t.Editor=r,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l,t.version=t.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace["default"]=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};n.inherits(o,i),o.getTagRule=function(){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t){"use strict";function n(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,i("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function i(e){return[{token:"comment",regex:/\/\*/,next:[r.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[r.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var o=e("../lib/oop"),r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,s=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),o="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[r.getStartRule("doc-start"),i("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+o+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[r.getStartRule("doc-start"),i("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{ +defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||0!=e.jsx)&&n.call(this)),this.embedRules(r,"doc-",[r.getEndRule("no_regex")]),this.normalizeRules()};o.inherits(l,s),t.JavaScriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t){"use strict";var n=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,r=e.findMatchingBracket({row:t,column:o});if(!r||r.row==t)return 0;var s=this.$getIndent(e.getLine(r.row));e.replace(new n(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,r=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(r,o),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(e,t,n,i){var o,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(o=r.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(o=r.match(this.foldingStopMarker))){s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),r=t,s=n.length,a=t+=1,l=e.getLength();++tc)break;var h=this.getFoldWidgetRange(e,"all",t);if(h){if(h.start.row<=r)break;if(h.isMultiLine())t=h.end.row;else if(o==c)break}a=t}}return new i(r,s,a,e.getLine(a).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),r=e.getLength(),s=n,a=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,l=1;++ns)return new i(s,o,n,t.length)}}.call(r.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./javascript_highlight_rules").JavaScriptHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("./folding/cstyle").FoldMode,c=function(){this.HighlightRules=o,this.$outdent=new r,this.$behaviour=new a,this.foldingRules=new l};n.inherits(c,i),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),r=o.tokens,s=o.state;if(r.length&&"comment"==r[r.length-1].type)return i;if("start"==e||"no_regex"==e)(a=t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/))&&(i+=n);else if("doc-start"==e){if("start"==s||"no_regex"==s)return"";var a;(a=t.match(/^\s*(\/?)\*/))&&(a[1]&&(i+=" "),i+="* ")}return i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/javascript"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){var e="[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+e+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+e+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),n.inherits(o,i),t.XmlHighlightRules=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t){"use strict";function n(e,t){return e&&e.type.lastIndexOf(t+".xml")>-1}var i=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,s=(e("../../lib/lang"),function(){this.add("string_dquotes","insertion",function(e,t,i,o,s){if('"'==s||"'"==s){var a=s,l=o.doc.getTextRange(i.getSelectionRange());if(""!==l&&"'"!==l&&'"'!=l&&i.getWrapBehavioursEnabled())return{text:a+l+a,selection:!1};var c=i.getCursorPosition(),h=o.doc.getLine(c.row).substring(c.column,c.column+1),u=new r(o,c.row,c.column),d=u.getCurrentToken();if(h==a&&(n(d,"attribute-value")||n(d,"string")))return{text:"",selection:[1,1]};if(d||(d=u.stepBackward()),!d)return;for(;n(d,"tag-whitespace")||n(d,"whitespace");)d=u.stepBackward();var g=!h||h.match(/\s/);if(n(d,"attribute-equals")&&(g||">"==h)||n(d,"decl-attribute-equals")&&(g||"?"==h))return{text:a+a,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)&&i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==r)return o.end.column++,o}),this.add("autoclosing","insertion",function(e,t,i,o,s){if(">"==s){var a=i.getSelectionRange().start,l=new r(o,a.row,a.column),c=l.getCurrentToken()||l.stepBackward();if(!c||!(n(c,"tag-name")||n(c,"tag-whitespace")||n(c,"attribute-name")||n(c,"attribute-equals")||n(c,"attribute-value")))return;if(n(c,"reference.attribute-value"))return;if(n(c,"attribute-value")){var h=l.getCurrentTokenColumn()+c.value.length;if(a.column/.test(o.getLine(a.row).slice(a.column)))return;for(;!n(c,"tag-name");)if("<"==(c=l.stepBackward()).value){c=l.stepForward();break}var d=l.getCurrentTokenRow(),g=l.getCurrentTokenColumn();if(n(l.stepBackward(),"end-tag-open"))return;var p=c.value;if(d==a.row&&(p=p.substring(0,a.column-g)),this.voidElements.hasOwnProperty(p.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,i,o){if("\n"==o){var s=n.getCursorPosition(),a=i.getLine(s.row),l=new r(i,s.row,s.column),c=l.getCurrentToken();if(c&&-1!==c.type.indexOf("tag-close")){if("/>"==c.value)return;for(;c&&-1===c.type.indexOf("tag-name");)c=l.stepBackward();if(!c)return;var h=c.value,u=l.getCurrentTokenRow();if(!(c=l.stepBackward())||-1!==c.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[h]){var d=i.getTokenAt(s.row,s.column+1),g=(a=i.getLine(u),this.$getIndent(a)),p=g+i.getTabString();return d&&"-1}var i=e("../../lib/oop"),o=(e("../../lib/lang"),e("../../range").Range),r=e("./fold_mode").FoldMode,s=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(e,t){r.call(this),this.voidElements=e||{},this.optionalEndTags=i.mixin({},this.voidElements),t&&i.mixin(this.optionalEndTags,t)};i.inherits(a,r);var l=function(){this.tagName="",this.closing=!1,this.selfClosing=!1,this.start={row:0,column:0},this.end={row:0,column:0}};(function(){this.getFoldWidget=function(e,t,n){var i=this._getFirstTagInLine(e,n);return i?i.closing||!i.tagName&&i.selfClosing?"markbeginend"==t?"end":"":!i.tagName||i.selfClosing||this.voidElements.hasOwnProperty(i.tagName.toLowerCase())?"":this._findEndTagInLine(e,n,i.tagName,i.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,t){return/comment/.test(e.getState(t))&&/"==s.value;break}return o}if(n(s,"tag-close"))return o.selfClosing="/>"==s.value,o;o.start.column+=s.value.length}return null},this._findEndTagInLine=function(e,t,i,o){for(var r=e.getTokens(t),s=0,a=0;a"==t.value,i.end.row=e.getCurrentTokenRow(),i.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(!this.optionalEndTags.hasOwnProperty(n.tagName))return null;e.pop()}},this.getFoldWidgetRange=function(e,t,n){var i=this._getFirstTagInLine(e,n);if(!i)return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var r,a=[];if(i.closing||i.selfClosing){c=new s(e,n,i.end.column);for(var l={row:n,column:i.start.column};r=this._readTagBackward(c);)if(r.selfClosing){if(!a.length)return r.start.column+=r.tagName.length+2,r.end.column-=2,o.fromPoints(r.start,r.end)}else if(r.closing)a.push(r);else if(this._pop(a,r),0==a.length)return r.start.column+=r.tagName.length+2,r.start.row==r.end.row&&r.start.column"},this.createWorker=function(e){var t=new l(["ace"],"ace/mode/xml_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/xml"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",r=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=t.supportConstantColor="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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",u=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":r,"support.constant":s,"support.type":o,"support.constant.color":a,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:u},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};n.inherits(d,i),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t){"use strict";var n={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},i=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var i=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});n.hasOwnProperty(i)||(n[i]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,i){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var o=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(o)?(/([\w\-]+):[^:]*$/.test(o),this.getPropertyValueCompletions(e,t,n,i)):this.getPropertyCompletions(e,t,n,i)}return[]},this.getPropertyCompletions=function(){return Object.keys(n).map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,i){var o=t.getLine(i.row).substr(0,i.column),r=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!r)return[];var s=[];return r in n&&"object"==typeof n[r]&&(s=Object.keys(n[r])),s.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(i.prototype),t.CssCompletions=i}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t){"use strict";var n=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,r=function(){this.inherit(i),this.add("colon","insertion",function(e,t,n,i,r){if(":"===r&&n.selection.isEmpty()){var s=n.getCursorPosition(),a=new o(i,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type){var c=i.doc.getLine(s.row);if(":"===c.substring(s.column,s.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(s.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&":"===s){var a=n.getCursorPosition(),l=new o(i,a.row,a.column),c=l.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=l.stepBackward()),c&&"support.type"===c.type)if(";"===i.doc.getLine(r.start.row).substring(r.end.column,r.end.column+1))return r.end.column++,r}}),this.add("semicolon","insertion",function(e,t,n,i,o){if(";"===o&&n.selection.isEmpty()){var r=n.getCursorPosition();if(";"===i.doc.getLine(r.row).substring(r.column,r.column+1))return{text:"",selection:[1,1]}}}), +this.add("!important","insertion",function(e,t,n,i,o){if("!"===o&&n.selection.isEmpty()){var r=n.getCursorPosition(),s=i.doc.getLine(r.row);if(/^\s*(;|}|$)/.test(s.substring(r.column)))return{text:"!important",selection:[10,10]}}})};n.inherits(r,i),t.CssBehaviour=r}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=o,this.$outdent=new r,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new c};n.inherits(h,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;return o.length&&"comment"==o[o.length-1].type?i:(t.match(/^.*\{\s*$/)&&(i+=n),i)},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){var t=new s(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t},this.$id="ace/mode/css"}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("../lib/lang"),o=e("./css_highlight_rules").CssHighlightRules,r=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(o,"css-","style"),this.embedTagRules(new r({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};n.inherits(l,s),t.HtmlHighlightRules=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};n.inherits(o,i),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,i){var o=this.$getMode(e);return o?o.getFoldWidget(t,n,i):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var i=this.$getMode(e.getState(n-1));return i&&i.getFoldWidget(e,t,n)||(i=this.$getMode(e.getState(n))),i&&i.getFoldWidget(e,t,n)||(i=this.defaultMode),i.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./mixed").FoldMode,o=e("./xml").FoldMode,r=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){i.call(this,new o(e,t),{"js-":new r,"css-":new r})};n.inherits(s,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t){"use strict";function n(e,t){return e.type.lastIndexOf(t+".xml")>-1}function i(e,t){for(var i=new r(e,t.row,t.column),o=i.getCurrentToken();o&&!n(o,"tag-name");)o=i.stepBackward();if(o)return o.value}function o(e,t){for(var i=new r(e,t.row,t.column),o=i.getCurrentToken();o&&!n(o,"attribute-name");)o=i.stepBackward();if(o)return o.value}var r=e("../token_iterator").TokenIterator,s=["onabort","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncuechange","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onmousewheel","onpause","onplay","onplaying","onprogress","onratechange","onreset","onscroll","onseeked","onseeking","onselect","onshow","onstalled","onsubmit","onsuspend","ontimeupdate","onvolumechange","onwaiting"],a=["accesskey","class","contenteditable","contextmenu","dir","draggable","dropzone","hidden","id","inert","itemid","itemprop","itemref","itemscope","itemtype","lang","spellcheck","style","tabindex","title","translate"].concat(s),l={a:{href:1,target:{_blank:1,top:1},ping:1,rel:{nofollow:1,alternate:1,author:1,bookmark:1,help:1,license:1,next:1,noreferrer:1,prefetch:1,prev:1,search:1,tag:1},media:1,hreflang:1,type:1},abbr:{},address:{},area:{shape:1,coords:1,href:1,hreflang:1,alt:1,target:1,media:1,rel:1,ping:1,type:1},article:{pubdate:1},aside:{},audio:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},muted:{muted:1},preload:{auto:1,metadata:1,none:1}},b:{},base:{href:1,target:1},bdi:{},bdo:{},blockquote:{cite:1},body:{onafterprint:1,onbeforeprint:1,onbeforeunload:1,onhashchange:1,onmessage:1,onoffline:1,onpopstate:1,onredo:1,onresize:1,onstorage:1,onundo:1,onunload:1},br:{},button:{autofocus:1,disabled:{disabled:1},form:1,formaction:1,formenctype:1,formmethod:1,formnovalidate:1,formtarget:1,name:1,value:1,type:{button:1,submit:1}},canvas:{width:1,height:1},caption:{},cite:{},code:{},col:{span:1},colgroup:{span:1},command:{type:1,label:1,icon:1,disabled:1,checked:1,radiogroup:1,command:1},data:{},datalist:{},dd:{},del:{cite:1,datetime:1},details:{open:1},dfn:{},dialog:{open:1},div:{},dl:{},dt:{},em:{},embed:{src:1,height:1,width:1,type:1},fieldset:{disabled:1,form:1,name:1},figcaption:{},figure:{},footer:{},form:{"accept-charset":1,action:1,autocomplete:1,enctype:{"multipart/form-data":1,"application/x-www-form-urlencoded":1},method:{get:1,post:1},name:1,novalidate:1,target:{_blank:1,top:1}},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{},header:{},hr:{},html:{manifest:1},i:{},iframe:{name:1,src:1,height:1,width:1,sandbox:{"allow-same-origin":1,"allow-top-navigation":1,"allow-forms":1,"allow-scripts":1},seamless:{seamless:1}},img:{alt:1,src:1,height:1,width:1,usemap:1,ismap:1},input:{type:{text:1,password:1,hidden:1,checkbox:1,submit:1,radio:1,file:1,button:1,reset:1,image:31,color:1,date:1,datetime:1,"datetime-local":1,email:1,month:1,number:1,range:1,search:1,tel:1,time:1,url:1,week:1},accept:1,alt:1,autocomplete:{on:1,off:1},autofocus:{autofocus:1},checked:{checked:1},disabled:{disabled:1},form:1,formaction:1,formenctype:{"application/x-www-form-urlencoded":1,"multipart/form-data":1,"text/plain":1},formmethod:{get:1,post:1},formnovalidate:{formnovalidate:1},formtarget:{_blank:1,_self:1,_parent:1,_top:1},height:1,list:1,max:1,maxlength:1,min:1,multiple:{multiple:1},name:1,pattern:1,placeholder:1,readonly:{readonly:1},required:{required:1},size:1,src:1,step:1,width:1,files:1,value:1},ins:{cite:1,datetime:1},kbd:{},keygen:{autofocus:1,challenge:{challenge:1},disabled:{disabled:1},form:1,keytype:{rsa:1,dsa:1,ec:1},name:1},label:{form:1,"for":1},legend:{},li:{value:1},link:{href:1,hreflang:1,rel:{stylesheet:1,icon:1},media:{all:1,screen:1,print:1},type:{"text/css":1,"image/png":1,"image/jpeg":1,"image/gif":1},sizes:1},main:{},map:{name:1},mark:{},math:{},menu:{type:1,label:1},meta:{"http-equiv":{"content-type":1},name:{description:1,keywords:1},content:{"text/html; charset=UTF-8":1},charset:1},meter:{value:1,min:1,max:1,low:1,high:1,optimum:1},nav:{},noscript:{href:1},object:{param:1,data:1,type:1,height:1,width:1,usemap:1,name:1,form:1,classid:1},ol:{start:1,reversed:1},optgroup:{disabled:1,label:1},option:{disabled:1,selected:1,label:1,value:1},output:{"for":1,form:1,name:1},p:{},param:{name:1,value:1},pre:{},progress:{value:1,max:1},q:{cite:1},rp:{},rt:{},ruby:{},s:{},samp:{},script:{charset:1,type:{"text/javascript":1},src:1,defer:1,async:1},select:{autofocus:1,disabled:1,form:1,multiple:{multiple:1},name:1,size:1,readonly:{readonly:1}},small:{},source:{src:1,type:1,media:1},span:{},strong:{},style:{type:1,media:{all:1,screen:1,print:1},scoped:1},sub:{},sup:{},svg:{},table:{summary:1},tbody:{},td:{headers:1,rowspan:1,colspan:1},textarea:{autofocus:{autofocus:1},disabled:{disabled:1},form:1,maxlength:1,name:1,placeholder:1,readonly:{readonly:1},required:{required:1},rows:1,cols:1,wrap:{on:1,off:1,hard:1,soft:1}},tfoot:{},th:{headers:1,rowspan:1,colspan:1,scope:1},thead:{},time:{datetime:1},title:{},tr:{},track:{kind:1,src:1,srclang:1,label:1,"default":1},section:{},summary:{},u:{},ul:{},"var":{},video:{src:1,autobuffer:1,autoplay:{autoplay:1},loop:{loop:1},controls:{controls:1},width:1,height:1,poster:1,muted:{muted:1},preload:{auto:1,metadata:1,none:1}},wbr:{}},c=Object.keys(l),h=function(){};(function(){this.getCompletions=function(e,t,i,o){var r=t.getTokenAt(i.row,i.column);if(!r)return[];if(n(r,"tag-name")||n(r,"tag-open")||n(r,"end-tag-open"))return this.getTagCompletions(e,t,i,o);if(n(r,"tag-whitespace")||n(r,"attribute-name"))return this.getAttributeCompletions(e,t,i,o);if(n(r,"attribute-value"))return this.getAttributeValueCompletions(e,t,i,o);var s=t.getLine(i.row).substr(0,i.column);return/&[a-z]*$/i.test(s)?this.getHTMLEntityCompletions(e,t,i,o):[]},this.getTagCompletions=function(){return c.map(function(e){return{value:e,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(e,t,n){var o=i(t,n);if(!o)return[];var r=a;return o in l&&(r=r.concat(Object.keys(l[o]))),r.map(function(e){return{caption:e,snippet:e+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(e,t,n){var r=i(t,n),s=o(t,n);if(!r)return[];var a=[];return r in l&&s in l[r]&&"object"==typeof l[r][s]&&(a=Object.keys(l[r][s])),a.map(function(e){return{caption:e,snippet:e,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(){return["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"].map(function(e){return{caption:e,snippet:e,meta:"html entity",score:1e6}})}}).call(h.prototype),t.HtmlCompletions=h}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("../lib/lang"),o=e("./text").Mode,r=e("./javascript").Mode,s=e("./css").Mode,a=e("./html_highlight_rules").HtmlHighlightRules,l=e("./behaviour/xml").XmlBehaviour,c=e("./folding/html").FoldMode,h=e("./html_completions").HtmlCompletions,u=e("../worker/worker_client").WorkerClient,d=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],g=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],p=function(e){this.fragmentContext=e&&e.fragmentContext,this.HighlightRules=a,this.$behaviour=new l,this.$completer=new h,this.createModeDelegates({"js-":r,"css-":s}),this.foldingRules=new c(this.voidElements,i.arrayToMap(g))};n.inherits(p,o),function(){this.blockComment={start:""},this.voidElements=i.arrayToMap(d),this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.checkOutdent=function(){return!1},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(e){if(this.constructor==p){var t=new u(["ace"],"ace/mode/html_worker","Worker");return t.attachToDocument(e.getDocument()),this.fragmentContext&&t.call("setOptions",[{context:this.fragmentContext}]),t.on("error",function(t){e.setAnnotations(t.data)}),t.on("terminate",function(){e.clearAnnotations()}),t}},this.$id="ace/mode/html"}.call(p.prototype),t.Mode=p}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t){"use strict";var n=e("../config").$modes,i=e("../lib/oop"),o=e("../lib/lang"),r=e("./text_highlight_rules").TextHighlightRules,s=e("./html_highlight_rules").HtmlHighlightRules,a=function(e){return"(?:[^"+o.escapeRegExp(e)+"\\\\]|\\\\.)*"},l=function(){s.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,i){var o=e.match(/^(\s*)([`~]+)(.*)/),r=/[\w-]+|$/.exec(o[3])[0];return n[r]||(r=""),i.unshift("githubblock",[],[o[1],o[2],r],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,i){var o=i[1],r=i[2][0],s=i[2][1],a=i[2][2],l=/^(\s*)(`+|~+)\s*$/.exec(e);if(l&&l[1].length=s.length&&l[2][0]==s[0])return i.splice(0,3),this.next=i.shift(),this.token;if(this.next="",a&&n[a]){var c=n[a].getTokenizer().getLineTokens(e,o.slice(0));return i[1]=c.state,c.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+a("]")+")(\\]\\s*\\[)("+a("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+a("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+a('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};i.inherits(l,r),t.MarkdownHighlightRules=l}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=e("../../range").Range,r=t.FoldMode=function(){};n.inherits(r,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"`"==i[0]&&"start"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function i(t){return(u=e.getTokens(t)[0])&&0===u.type.lastIndexOf(d,0)}function r(){var e=u.value[0];return"="==e?6:"-"==e?5:7-u.value.search(/[^#]|$/)}var s=e.getLine(n),a=s.length,l=e.getLength(),c=n,h=n;if(s.match(this.foldingStartMarker)){if("`"==s[0]){if("start"!==e.bgTokenizer.getState(n)){for(;++n0&&!("`"==(s=e.getLine(n))[0]&"```"==s.substring(0,3)););return new o(n,s.length,c,0)}var u,d="markup.heading";if(i(n)){for(var g=r();++n=g)break}if((h=n-(u&&-1!=["=","-"].indexOf(u.value[0])?2:1))>c)for(;h>c&&/^\s*$/.test(e.getLine(h));)h--;if(h>c){var p=e.getLine(h).length;return new o(c,a,h,p)}}}}}.call(r.prototype)}),ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=t.reservedKeywords="!|{|}|case|do|done|elif|else|esac|fi|for|if|in|then|until|while|&|;|export|local|read|typeset|unset|elif|select|set|function|declare|readonly",r=t.languageConstructs="[|]|alias|bg|bind|break|builtin|cd|command|compgen|complete|continue|dirs|disown|echo|enable|eval|exec|exit|fc|fg|getopts|hash|help|history|jobs|kill|let|logout|popd|printf|pushd|pwd|return|set|shift|shopt|source|suspend|test|times|trap|type|ulimit|umask|unalias|wait",s=function(){var e=this.createKeywordMapper({keyword:o,"support.function.builtin":r,"invalid.deprecated":"debugger"},"identifier"),t="(?:(?:[1-9]\\d*)|(?:0))",n="(?:\\d+)",i="(?:(?:"+n+"?"+"(?:\\.\\d+)"+")|(?:"+n+"\\.))",s="(?:"+("(?:(?:"+i+"|"+n+"))")+"|"+i+")",a="(?:&"+n+")",l="[a-zA-Z_][a-zA-Z0-9_]*",c="(?:"+l+"(?==))",h="(?:\\$(?:SHLVL|\\$|\\!|\\?))",u="(?:"+l+"\\s*\\(\\))";this.$rules={start:[{token:"constant",regex:/\\./},{token:["text","comment"],regex:/(^|\s)(#.*)$/},{token:"string.start",regex:'"',push:[{token:"constant.language.escape",regex:/\\(?:[$`"\\]|$)/},{include:"variables"},{token:"keyword.operator",regex:/`/},{token:"string.end",regex:'"',next:"pop"},{defaultToken:"string"}]},{token:"string",regex:"\\$'",push:[{token:"constant.language.escape",regex:/\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/},{token:"string",regex:"'",next:"pop"},{defaultToken:"string"}]},{regex:"<<<",token:"keyword.operator"},{stateName:"heredoc",regex:"(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",onMatch:function(e,t,n){var i="-"==e[2]?"indentedHeredoc":"heredoc",o=e.split(this.splitRegex);return n.push(i,o[4]),[{type:"constant",value:o[1]},{type:"text",value:o[2]},{type:"string",value:o[3]},{type:"support.class",value:o[4]},{type:"string",value:o[5]}]},rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^\t+"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:["keyword","text","text","text","variable"],regex:/(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/},{token:"variable.language",regex:h},{token:"variable",regex:c},{include:"variables"},{token:"support.function",regex:u},{token:"support.function",regex:a},{token:"string",start:"'",end:"'"},{token:"constant.numeric",regex:s},{token:"constant.numeric",regex:t+"\\b"},{token:e,regex:"[a-zA-Z_][a-zA-Z0-9_]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};n.inherits(s,i),t.ShHighlightRules=s}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,r=e("../range").Range,s=e("./folding/cstyle").FoldMode,a=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.HighlightRules=o,this.foldingRules=new s,this.$behaviour=new a};n.inherits(l,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return i;"start"==e&&(t.match(/^.*[\{\(\[:]\s*$/)&&(i+=n));return i};var e={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(t,n,i){if("\r\n"!==i&&"\r"!==i&&"\n"!==i)return!1;var o=this.getTokenizer().getLineTokens(n.trim(),t).tokens;if(!o)return!1;do{var r=o.pop()}while(r&&("comment"==r.type||"text"==r.type&&r.value.match(/^\s+$/)));return!!r&&("keyword"==r.type&&e[r.value])},this.autoOutdent=function(e,t,n){n+=1;var i=this.$getIndent(t.getLine(n)),o=t.getTabString();i.slice(-o.length)==o&&t.remove(new r(n,i.length-o.length,n,i.length))},this.$id="ace/mode/sh"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=(e("./javascript").Mode,e("./xml").Mode,e("./html").Mode,e("./markdown_highlight_rules").MarkdownHighlightRules),r=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new r,this.$behaviour=this.$defaultBehaviour};n.inherits(s,i),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t){if("listblock"==e){var n=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!n)return"";var i=n[2];return i||(i=parseInt(n[3],10)+1+"."),n[1]+i+n[4]}return this.$getIndent(t)},this.$id="ace/mode/markdown"}.call(s.prototype),t.Mode=s}),ace.require(["ace/mode/markdown"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){function e(e){return(/\w/.test(e)?"\\b":"(?:\\B|^)")+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var t="[a-zA-Z\xa1-\uffff]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:t},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:e("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:e("\\*")},{token:"literal",regex:e("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:e("`")},{token:"keyword",regex:e("^")},{token:"keyword",regex:e("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var i in this.$rules)for(var o=this.$rules[i],r=o.length;r--;){var s=o[r];if(s.include||"string"==typeof s){var a=[r,1].concat(this.$rules[s.include||s]);s.noEscape&&(a=a.filter(function(e){return!e.next})),o.splice.apply(o,a)}else s.token in n&&(s.token=n[s.token])}};n.inherits(o,i),t.AsciidocHighlightRules=o}),ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=e("../../range").Range,r=t.FoldMode=function(){};n.inherits(r,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"="==i[0]?this.singleLineHeadingRe.test(i)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":"dissallowDelimitedBlock"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(e,t,n){function i(t){return(u=e.getTokens(t)[0])&&u.type}function r(){var t=u.value.match(p);if(t)return t[0].length +;var i=d.indexOf(u.value[0])+1;return 1==i&&e.getLine(n-1).length!=e.getLine(n).length?Infinity:i}var s=e.getLine(n),a=s.length,l=e.getLength(),c=n,h=n;if(s.match(this.foldingStartMarker)){var u,d=["=","-","~","^","+"],g="markup.heading",p=this.singleLineHeadingRe;if(i(n)==g){for(var f=r();++nc)for(;h>c&&(!i(h)||"["==u.value[0]);)h--;if(h>c){var m=e.getLine(h).length;return new o(c,a,h,m)}}else{if("dissallowDelimitedBlock"==e.bgTokenizer.getState(n)){for(;n-- >0&&-1!=e.bgTokenizer.getState(n).lastIndexOf("Block"););if((h=n+1)c){m=e.getLine(n).length;return new o(c,5,h,m-5)}}}}}}.call(r.prototype)}),ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./asciidoc_highlight_rules").AsciidocHighlightRules,r=e("./folding/asciidoc").FoldMode,s=function(){this.HighlightRules=o,this.foldingRules=new r};n.inherits(s,i),function(){this.type="text",this.getNextLineIndent=function(e,t){if("listblock"==e){var n=/^((?:.+)?)([-+*][ ]+)/.exec(t);return n?new Array(n[1].length+1).join(" ")+n[2]:""}return this.$getIndent(t)},this.$id="ace/mode/asciidoc"}.call(s.prototype),t.Mode=s}),ace.require(["ace/mode/asciidoc"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.require(["ace/mode/text"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(verbatim)(})",next:"verbatim"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(lstlisting)(})",next:"lstlisting"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)([\\w*]*)(})"},{token:"storage.type",regex:/\\verb\b\*?/,next:[{token:["keyword.operator","string","keyword.operator"],regex:"(.)(.*?)(\\1|$)|",next:"start"}]},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}],verbatim:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(verbatim)(})",next:"start"},{defaultToken:"text"}],lstlisting:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(lstlisting)(})",next:"start"},{defaultToken:"text"}]},this.normalizeRules()};n.inherits(o,i),t.LatexHighlightRules=o}),ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=(e("./latex_highlight_rules"),function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell.text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-Z0-9]+|[^a-zA-Z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell.text",regex:"\\s+"},{token:"nospell.text",regex:"\\w+"}]}});n.inherits(o,i),t.RDocHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t){"use strict";var n=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,r=e.findMatchingBracket({row:t,column:o});if(!r||r.row==t)return 0;var s=this.$getIndent(e.getLine(r.row));e.replace(new n(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./rdoc_highlight_rules").RDocHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,s=function(){this.HighlightRules=o,this.$outdent=new r,this.$behaviour=this.$defaultBehaviour};n.inherits(s,i),function(){this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.$id="ace/mode/rdoc"}.call(s.prototype),t.Mode=s}),ace.require(["ace/mode/rdoc"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:function(e){return"h"==e.charAt(0)?"markup.heading."+e.charAt(1):"markup.heading"},regex:"h1|h2|h3|h4|h5|h6|bq|p|bc|pre",next:"blocktag"},{token:"keyword",regex:"[\\*]+|[#]+"},{token:"text",regex:".+"}],blocktag:[{token:"keyword",regex:"\\. ",next:"start"},{token:"keyword",regex:"\\(",next:"blocktagproperties"}],blocktagproperties:[{token:"keyword",regex:"\\)",next:"blocktag"},{token:"string",regex:"[a-zA-Z0-9\\-_]+"},{token:"keyword",regex:"#"}]}};n.inherits(o,i),t.TextileHighlightRules=o}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t){"use strict";var n=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var i=e.getLine(t).match(/^(\s*\})/);if(!i)return 0;var o=i[1].length,r=e.findMatchingBracket({row:t,column:o});if(!r||r.row==t)return 0;var s=this.$getIndent(e.getLine(r.row));e.replace(new n(t,0,t,o-1),s)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./textile_highlight_rules").TextileHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,s=function(){this.HighlightRules=o,this.$outdent=new r,this.$behaviour=this.$defaultBehaviour};n.inherits(s,i),function(){this.type="text",this.getNextLineIndent=function(e,t,n){return"intag"==e?n:""},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/textile"}.call(s.prototype),t.Mode=s}),ace.require(["ace/mode/textile"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/rst_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=function(){var e={title:"markup.heading",list:"markup.heading",table:"constant",directive:"keyword.operator",entity:"string",link:"markup.underline.list",bold:"markup.bold",italic:"markup.italic",literal:"support.function",comment:"comment"},t="(^|\\s|[\"'(<\\[{\\-/:])",n="(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";this.$rules={start:[{token:e.title,regex:"(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"},{token:["text",e.directive,e.literal],regex:"(^\\s*\\.\\. )([^: ]+::)(.*$)",next:"codeblock"},{token:e.directive,regex:"::$",next:"codeblock"},{token:[e.entity,e.link],regex:"(^\\.\\. _[^:]+:)(.*$)"},{token:[e.entity,e.link],regex:"(^__ )(https?://.*$)"},{token:e.entity,regex:"^\\.\\. \\[[^\\]]+\\] "},{token:e.comment,regex:"^\\.\\. .*$",next:"comment"},{token:e.list,regex:"^\\s*[\\*\\+-] "},{token:e.list,regex:"^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "},{token:e.list,regex:"^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "},{token:e.table,regex:"^={2,}(?: +={2,})+$"},{token:e.table,regex:"^\\+-{2,}(?:\\+-{2,})+\\+$"},{token:e.table,regex:"^\\+={2,}(?:\\+={2,})+\\+$"},{token:["text",e.literal],regex:t+"(``)(?=\\S)",next:"code"},{token:["text",e.bold],regex:t+"(\\*\\*)(?=\\S)",next:"bold"},{token:["text",e.italic],regex:t+"(\\*)(?=\\S)",next:"italic"},{token:e.entity,regex:"\\|[\\w\\-]+?\\|"},{token:e.entity,regex:":[\\w-:]+:`\\S",next:"entity"},{token:["text",e.entity],regex:t+"(_`)(?=\\S)",next:"entity"},{token:e.entity,regex:"_[A-Za-z0-9\\-]+?"},{token:["text",e.link],regex:t+"(`)(?=\\S)",next:"link"},{token:e.link,regex:"[A-Za-z0-9\\-]+?__?"},{token:e.link,regex:"\\[[^\\]]+?\\]_"},{token:e.link,regex:"https?://\\S+"},{token:e.table,regex:"\\|"}],codeblock:[{token:e.literal,regex:"^ +.+$",next:"codeblock"},{token:e.literal,regex:"^$",next:"codeblock"},{token:"empty",regex:"",next:"start"}],code:[{token:e.literal,regex:"\\S``"+n,next:"start"},{defaultToken:e.literal}],bold:[{token:e.bold,regex:"\\S\\*\\*"+n,next:"start"},{defaultToken:e.bold}],italic:[{token:e.italic,regex:"\\S\\*"+n,next:"start"},{defaultToken:e.italic}],entity:[{token:e.entity,regex:"\\S`"+n,next:"start"},{defaultToken:e.entity}],link:[{token:e.link,regex:"\\S`__?"+n,next:"start"},{defaultToken:e.link}],comment:[{token:e.comment,regex:"^ +.+$",next:"comment"},{token:e.comment,regex:"^$",next:"comment"},{token:"empty",regex:"",next:"start"}]}};n.inherits(o,i),t.RSTHighlightRules=o}),ace.define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./rst_highlight_rules").RSTHighlightRules,r=function(){this.HighlightRules=o};n.inherits(r,i),function(){this.type="text",this.$id="ace/mode/rst"}.call(r.prototype),t.Mode=r}),ace.require(["ace/mode/rst"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(verbatim)(})",next:"verbatim"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(lstlisting)(})",next:"lstlisting"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)([\\w*]*)(})"},{token:"storage.type",regex:/\\verb\b\*?/,next:[{token:["keyword.operator","string","keyword.operator"],regex:"(.)(.*?)(\\1|$)|",next:"start"}]},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}],verbatim:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(verbatim)(})",next:"start"},{defaultToken:"text"}],lstlisting:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(lstlisting)(})",next:"start"},{defaultToken:"text"}]},this.normalizeRules()};n.inherits(o,i),t.LatexHighlightRules=o}),ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=e("../../range").Range,r=e("../../token_iterator").TokenIterator,s={"\\subparagraph":1,"\\paragraph":2,"\\subsubsubsection":3,"\\subsubsection":4,"\\subsection":5,"\\section":6,"\\chapter":7,"\\part":8,"\\begin":9,"\\end":10},a=t.FoldMode=function(){};n.inherits(a,i),function(){this.foldingStartMarker=/^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var i,o=e.doc.getLine(n);return(i=this.foldingStartMarker.exec(o))?i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index):(i=this.foldingStopMarker.exec(o))?i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length):void 0},this.latexBlock=function(e,t,n,i){var s={"\\begin":1,"\\end":-1},a=new r(e,t,n),l=a.getCurrentToken();if(l&&("storage.type"==l.type||"constant.character.escape"==l.type)){var c=s[l.value],h=function(){var e="lparen"==a.stepForward().type?a.stepForward().value:"";return-1===c&&(a.stepBackward(),e&&a.stepBackward()),e},u=[h()],d=-1===c?a.getCurrentTokenColumn():e.getLine(t).length,g=t;for(a.step=-1===c?a.stepBackward:a.stepForward;l=a.step();)if(l&&("storage.type"==l.type||"constant.character.escape"==l.type)){var p=s[l.value];if(p){var f=h();if(p===c)u.unshift(f);else if(u.shift()!==f||!u.length)break}}if(!u.length){if(1==c&&(a.stepBackward(),a.stepBackward()),i)return a.getCurrentTokenRange();t=a.getCurrentTokenRow();return-1===c?new o(t,e.getLine(t).length,g,d):new o(g,d,t,a.getCurrentTokenColumn())}}},this.latexSection=function(e,t,n){var i=new r(e,t,n),a=i.getCurrentToken();if(a&&"storage.type"==a.type){for(var l=s[a.value]||0,c=0,h=t;a=i.stepForward();)if("storage.type"===a.type){var u=s[a.value]||0;if(u>=9){if(c||(h=i.getCurrentTokenRow()-1),(c+=9==u?1:-1)<0)break}else if(u>=l)break}for(c||(h=i.getCurrentTokenRow()-1);h>t&&!/\S/.test(e.getLine(h));)h--;return new o(t,e.getLine(t).length,h,e.getLine(h).length)}}}.call(a.prototype)}),ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./latex_highlight_rules").LatexHighlightRules,r=e("./behaviour/cstyle").CstyleBehaviour,s=e("./folding/latex").FoldMode,a=function(){this.HighlightRules=o,this.foldingRules=new s,this.$behaviour=new r({braces:!0})};n.inherits(a,i),function(){this.type="text",this.lineCommentStart="%",this.$id="ace/mode/latex",this.getMatching=function(e,t,n){t==undefined&&(t=e.selection.lead),"object"==typeof t&&(n=t.column,t=t.row);var i=e.getTokenAt(t,n);if(i)return"\\begin"==i.value||"\\end"==i.value?this.foldingRules.latexBlock(e,t,n,!0):void 0}}.call(a.prototype),t.Mode=a}),ace.require(["ace/mode/latex"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"],function(e,t){t.isDark=!1,t.cssClass="ace-tomorrow",t.cssText=".ace-tomorrow .ace_gutter {background: #f6f6f6;color: #4D4D4C}.ace-tomorrow .ace_print-margin {width: 1px;background: #f6f6f6}.ace-tomorrow {background-color: #FFFFFF;color: #4D4D4C}.ace-tomorrow .ace_cursor {color: #AEAFAD}.ace-tomorrow .ace_marker-layer .ace_selection {background: #D6D6D6}.ace-tomorrow.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px #FFFFFF;}.ace-tomorrow .ace_marker-layer .ace_step {background: rgb(255, 255, 0)}.ace-tomorrow .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid #D1D1D1}.ace-tomorrow .ace_marker-layer .ace_active-line {background: #EFEFEF}.ace-tomorrow .ace_gutter-active-line {background-color : #dcdcdc}.ace-tomorrow .ace_marker-layer .ace_selected-word {border: 1px solid #D6D6D6}.ace-tomorrow .ace_invisible {color: #D1D1D1}.ace-tomorrow .ace_keyword,.ace-tomorrow .ace_meta,.ace-tomorrow .ace_storage,.ace-tomorrow .ace_storage.ace_type,.ace-tomorrow .ace_support.ace_type {color: #8959A8}.ace-tomorrow .ace_keyword.ace_operator {color: #3E999F}.ace-tomorrow .ace_constant.ace_character,.ace-tomorrow .ace_constant.ace_language,.ace-tomorrow .ace_constant.ace_numeric,.ace-tomorrow .ace_keyword.ace_other.ace_unit,.ace-tomorrow .ace_support.ace_constant,.ace-tomorrow .ace_variable.ace_parameter {color: #F5871F}.ace-tomorrow .ace_constant.ace_other {color: #666969}.ace-tomorrow .ace_invalid {color: #FFFFFF;background-color: #C82829}.ace-tomorrow .ace_invalid.ace_deprecated {color: #FFFFFF;background-color: #8959A8}.ace-tomorrow .ace_fold {background-color: #4271AE;border-color: #4D4D4C}.ace-tomorrow .ace_entity.ace_name.ace_function,.ace-tomorrow .ace_support.ace_function,.ace-tomorrow .ace_variable {color: #4271AE}.ace-tomorrow .ace_support.ace_class,.ace-tomorrow .ace_support.ace_type {color: #C99E00}.ace-tomorrow .ace_heading,.ace-tomorrow .ace_markup.ace_heading,.ace-tomorrow .ace_string {color: #718C00}.ace-tomorrow .ace_entity.ace_name.ace_tag,.ace-tomorrow .ace_entity.ace_other.ace_attribute-name,.ace-tomorrow .ace_meta.ace_tag,.ace-tomorrow .ace_string.ace_regexp,.ace-tomorrow .ace_variable {color: #C82829}.ace-tomorrow .ace_comment {color: #8E908C}.ace-tomorrow .ace_indent-guide {background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bdu3f/BwAlfgctduB85QAAAABJRU5ErkJggg==) right repeat-y}",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.require(["ace/theme/tomorrow"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"],function(e,t){"use strict";function n(e){return{row:e.line,column:e.ch}}function i(e){return new Rt(e.row,e.column)}function o(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),_t.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",ot),S(e),_t.on(e.getInputField(),"paste",h(e))}function r(e){e.setOption("disableInput",!1),e.off("cursorActivity",ot),_t.off(e.getInputField(),"paste",h(e)),e.state.vim=null}function s(e,t){this==_t.keyMap.vim&&_t.rmClass(e.getWrapperElement(),"cm-fat-cursor"),(!t||t.attach!=a)&&r(e)}function a(e,t){this==_t.keyMap.vim&&_t.addClass(e.getWrapperElement(),"cm-fat-cursor"),(!t||t.attach!=a)&&o(e)}function l(e,t){if(!t)return undefined;if(this[e])return this[e];var n=c(e);if(!n)return!1;var i=_t.Vim.findKey(t,n);return"function"==typeof i&&_t.signal(t,"vim-keypress",n),i}function c(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var i=!1,o=0;o")}function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(N(e.getCursor(),0,1)),Yt.enterInsertMode(e,{},t))}),t.onPasteFn}function u(e,t){for(var n=[],i=e;i=e.firstLine()&&t<=e.lastLine()}function g(e){return/^[a-z]$/.test(e)}function p(e){return-1!="()[]{}".indexOf(e)}function f(e){return It.test(e)}function m(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function b(e){return-1!=".?!".indexOf(e)}function w(e,t){for(var n=0;n"==t.slice(-11)){var n=t.length-11,i=e.slice(0,n),o=t.slice(0,n);return i==o&&e.length>n?"full":0==o.indexOf(i)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function W(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"":n="\n";break;case"":n=" ";break;default:n=""}return n}function z(e,t,n){return function(){for(var i=0;i2&&(t=G.apply(undefined,Array.prototype.slice.call(arguments,1))),U(e,t)?e:t}function j(e,t){return arguments.length>2&&(t=j.apply(undefined,Array.prototype.slice.call(arguments,1))),U(e,t)?t:e}function q(e,t,n){var i=U(e,t),o=U(t,n);return i&&o}function X(e,t){return e.getLine(t).length}function Q(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Y(e){return e.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function J(e,t,n){var i=X(e,t),o=new Array(n-i+1).join(" ");e.setCursor(Rt(t,i)),e.replaceRange(o,e.getCursor())}function Z(e,t){var n=[],i=e.listSelections(),o=K(e.clipPos(t)),r=!V(t,o),s=te(i,e.getCursor("head")),a=V(i[s].head,i[s].anchor),l=i.length-1,c=l-s>s?l:0,h=i[c].anchor,u=Math.min(h.line,o.line),d=Math.max(h.line,o.line),g=h.ch,p=o.ch,f=i[c].head.ch-g,m=p-g;f>0&&m<=0?(g++,r||p--):f<0&&m>=0?(g--,a||p++):f<0&&-1==m&&(g--,p++);for(var v=u;v<=d;v++){var b={anchor:new Rt(v,g),head:new Rt(v,p)};n.push(b)}return e.setSelections(n),t.ch=p,h.ch=g,h}function ee(e,t,n){for(var i=[],o=0;ol&&(o.line=l),o.ch=X(e,o.line)}return{ranges:[{anchor:r,head:o}],primary:0}}if("block"==n){for(var c=Math.min(r.line,o.line),h=Math.min(r.ch,o.ch),u=Math.max(r.line,o.line),d=Math.max(r.ch,o.ch)+1,g=u-c+1,p=o.line==c?0:g-1,f=[],m=0;m0&&r&&v(r);r=o.pop())n.line--,n.ch=0;r?(n.line--,n.ch=X(e,n.line)):n.ch=0}}function he(e,t,n){t.ch=0,n.ch=0,n.line++}function ue(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function de(e,t,n,i,o){for(var r=ae(e),s=e.getLine(r.line),a=r.ch,l=o?Ft[0]:Bt[0];!l(s.charAt(a));)if(++a>=s.length)return null;i?l=Bt[0]:(l=Ft[0])(s.charAt(a))||(l=Ft[1]);for(var c=a,h=a;l(s.charAt(c))&&c=0;)h--;if(h++,t){for(var u=c;/\s/.test(s.charAt(c))&&c0;)h--;h||(h=d)}}return{start:Rt(r.line,h),end:Rt(r.line,c)}}function ge(e,t,n){V(t,n)||Ut.jumpList.add(e,t,n)}function pe(e,t){Ut.lastCharacterSearch.increment=e,Ut.lastCharacterSearch.forward=t.forward,Ut.lastCharacterSearch.selectedCharacter=t.selectedCharacter}function fe(e,t,n,i){var o=K(e.getCursor()),r=n?1:-1,s=n?e.lineCount():-1,a=o.ch,l=o.line,c=e.getLine(l),h={lineText:c,nextCh:c.charAt(a),lastCh:null,index:a,symb:i,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[i],forward:n,depth:0,curMoveThrough:!1},u=Jt[i];if(!u)return o;var d=Zt[u].init,g=Zt[u].isComplete;for(d&&d(h);l!==s&&t;){if(h.index+=r,h.nextCh=h.lineText.charAt(h.index),!h.nextCh){if(l+=r,h.lineText=e.getLine(l)||"",r>0)h.index=0;else{var p=h.lineText.length;h.index=p>0?p-1:0}h.nextCh=h.lineText.charAt(h.index)}g(h)&&(o.line=l,o.ch=h.index,t--)}return h.nextCh||h.curMoveThrough?Rt(l,h.index):o}function me(e,t,n,i,o){var r=t.line,s=t.ch,a=e.getLine(r),l=n?1:-1,c=i?Bt:Ft;if(o&&""==a){if(r+=l,a=e.getLine(r),!d(e,r))return null;s=n?0:a.length}for(;;){if(o&&""==a)return{from:0,to:0,line:r};for(var h=l>0?a.length:-1,u=h,g=h;s!=h;){for(var p=!1,f=0;f0?0:a.length}}function ve(e,t,n,i,o,r){var s=K(t),a=[];(i&&!o||!i&&o)&&n++;for(var l=!i||!o,c=0;c0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+i>n.start.row&&t+i0?n.end.row:n.start.row)-t)}var l,c=t.line,h=e.firstLine(),u=e.lastLine(),d=c;if(i){for(;h<=d&&d<=u&&n>0;)a(d),s(d,i)&&n--,d+=i;return new Rt(d,0)}var g=e.state.vim;if(g.visualLine&&s(c,1,!0)){var p=g.sel.anchor;s(p.line,-1,!0)&&(!o||p.line!=c)&&(c+=1)}var f=r(c);for(d=c;d<=u&&n;d++)s(d,1,!0)&&(!o||r(d)!=f)&&n--;for(l=new Rt(d,0),d>u&&!f?f=!0:o=!1,d=c;d>h&&(o&&r(d)!=f&&d!=c||!s(d,-1,!0));d--);return{start:new Rt(d,0),end:l}}function Ce(e,t,n,i){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!d(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln), +t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function r(e,t,n,i){var r=""===(c=e.getLine(t)),s={line:c,ln:t,pos:n,dir:i},a={ln:s.ln,pos:s.pos},l=""===s.line;for(o(e,s);null!==s.line;){if(a.ln=s.ln,a.pos=s.pos,""===s.line&&!l)return{ln:s.ln,pos:s.pos};if(r&&""!==s.line&&!v(s.line[s.pos]))return{ln:s.ln,pos:s.pos};b(s.line[s.pos])&&!r&&(s.pos===s.line.length-1||v(s.line[s.pos+1]))&&(r=!0),o(e,s)}var c=e.getLine(a.ln);a.pos=0;for(var h=c.length-1;h>=0;--h)if(!v(c[h])){a.pos=h;break}return a}function s(e,t,n,i){var r={line:l=e.getLine(t),ln:t,pos:n,dir:i},s={ln:r.ln,pos:null},a=""===r.line;for(o(e,r);null!==r.line;){if(""===r.line&&!a)return null!==s.pos?s:{ln:r.ln,pos:r.pos};if(b(r.line[r.pos])&&null!==s.pos&&(r.ln!==s.ln||r.pos+1!==s.pos))return s;""!==r.line&&!v(r.line[r.pos])&&(a=!1,s={ln:r.ln,pos:r.pos}),o(e,r)}var l=e.getLine(s.ln);s.pos=0;for(var c=0;c0;)a=i<0?s(e,a.ln,a.pos,i):r(e,a.ln,a.pos,i),n--;return Rt(a.ln,a.pos)}function Se(e,t,n,i){var o,r,s=t,a={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],c=e.getLine(s.line).charAt(s.ch)===l?1:0;if(o=e.scanForBracket(Rt(s.line,s.ch+c),-1,undefined,{bracketRegex:a}),r=e.scanForBracket(Rt(s.line,s.ch+c),1,undefined,{bracketRegex:a}),!o||!r)return{start:s,end:s};if(o=o.pos,r=r.pos,o.line==r.line&&o.ch>r.ch||o.line>r.line){var h=o;o=r,r=h}return i?r.ch+=1:o.ch+=1,{start:o,end:r}}function $e(e,t,n,i){var o,r,s,a,l=K(t),c=e.getLine(l.line).split(""),h=c.indexOf(n);if(l.ch-1&&!o;s--)c[s]==n&&(o=s+1);else o=l.ch+1;if(o&&!r)for(s=o,a=c.length;s'+t+"",{bottom:!0,duration:5e3}):alert(t)}function Ne(e,t){var n=''+(e||"")+'';return t&&(n+=' '+t+""),n}function Pe(e,t){var n=(t.prefix||"")+" "+(t.desc||"");Le(e,Ne(t.prefix,t.desc),n,t.onClose,t)}function De(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],i=0;i=t&&e<=n:e==t}function je(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function qe(e,t,n){var i=t.marks[n];return i&&i.find()}function Xe(e,t,n,i,o,r,s,a,l){function c(){e.operation(function(){for(;!p;)h(),u();d()})}function h(){var t=e.getRange(r.from(),r.to()).replace(s,a);r.replace(t)}function u(){for(;r.findNext()&&Ge(r.from(),i,o);)if(n||!f||r.from().line!=f.line)return e.scrollIntoView(r.from(),30),e.setSelection(r.from(),r.to()),f=r.from(),void(p=!1);p=!0}function d(t){if(t&&t(),e.focus(),f){e.setCursor(f);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=f.ch}l&&l()}function g(t,n,i){switch(_t.e_stop(t),_t.keyName(t)){case"Y":h(),u();break;case"N":u();break;case"A":var o=l;l=undefined,e.operation(c),l=o;break;case"L":h();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":d(i)}return p&&d(i),!0}e.state.vim.exMode=!0;var p=!1,f=r.from();if(u(),!p)return t?void Pe(e,{prefix:"replace with "+a+" (y/n/a/q/l)",onKeyDown:g}):(c(),void(l&&l()));He(e,"No matches for "+s.source)}function Qe(e){var t=e.state.vim,n=Ut.macroModeState,i=Ut.registerController.getRegister("."),o=n.isPlaying,r=n.lastInsertModeChanges;o||(e.off("change",it),_t.off(e.getInputField(),"keydown",lt)),!o&&t.insertModeRepeat>1&&(ct(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),i.setText(r.changes.join("")),_t.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&tt(n)}function Ye(e){At.unshift(e)}function Je(e,t,n,i,o){var r={keys:e,type:t};for(var s in r[t]=n,r[t+"Args"]=i,o)r[s]=o[s];Ye(r)}function Ze(e,t,n,i){var o=Ut.registerController.getRegister(i);if(":"==i)return o.keyBuffer[0]&&sn.processCommand(e,o.keyBuffer[0]),void(n.isPlaying=!1);var r=o.keyBuffer,s=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var a=0;a|<\w+>|./.exec(h))[0],h=h.substring(l.index+c.length),_t.Vim.handleKey(e,c,"macro"),t.insertMode){var u=o.insertModeChanges[s++].changes;Ut.macroModeState.lastInsertModeChanges.changes=u,ht(e,u,1),Qe(e)}n.isPlaying=!1}function et(e,t){if(!e.isPlaying){var n=e.latestRegister,i=Ut.registerController.getRegister(n);i&&i.pushText(t)}}function tt(e){if(!e.isPlaying){var t=e.latestRegister,n=Ut.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function nt(e,t){if(!e.isPlaying){var n=e.latestRegister,i=Ut.registerController.getRegister(n);i&&i.pushSearchQuery&&i.pushSearchQuery(t)}}function it(e,t){var n=Ut.macroModeState,i=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(i.expectCursorActivityForChange=!0,i.ignoreCount>1)i.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||t.origin===undefined){var o=e.listSelections().length;o>1&&(i.ignoreCount=o);var r=t.text.join("\n");i.maybeReset&&(i.changes=[],i.maybeReset=!1),r&&(e.state.overwrite&&!/\n/.test(r)?i.changes.push([r]):i.changes.push(r))}t=t.next}}function ot(e){var t=e.state.vim;if(t.insertMode){var n=Ut.macroModeState;if(n.isPlaying)return;var i=n.lastInsertModeChanges;i.expectCursorActivityForChange?i.expectCursorActivityForChange=!1:i.maybeReset=!0}else e.curOp.isVimOp||st(e,t);t.visualMode&&rt(e)}function rt(e){var t=e.state.vim,n=B(e,K(t.sel.head)),i=N(n,0,1);t.fakeCursor&&t.fakeCursor.clear(),t.fakeCursor=e.markText(n,i,{className:"cm-animate-fat-cursor"})}function st(e,t,n){var i=e.getCursor("anchor"),o=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?le(e,!1):!t.visualMode&&!t.insertMode&&e.somethingSelected()&&(t.visualMode=!0,t.visualLine=!1,_t.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var r=U(o,i)?0:-1,s=U(o,i)?-1:0;o=N(o,0,r),i=N(i,0,s),t.sel={anchor:i,head:o},ye(e,t,"<",G(o,i)),ye(e,t,">",j(o,i))}else!t.insertMode&&!n&&(t.lastHPos=e.getCursor().ch)}function at(e){this.keyName=e}function lt(e){function t(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new at(i)),!0}var n=Ut.macroModeState.lastInsertModeChanges,i=_t.keyName(e);i&&(-1!=i.indexOf("Delete")||-1!=i.indexOf("Backspace"))&&_t.lookupKey(i,"vim-insert",t)}function ct(e,t,n,i){function o(){a?qt.processAction(e,t,t.lastEditActionCommand):qt.evalInput(e,t)}function r(n){if(s.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var i=s.lastInsertModeChanges;ht(e,i.changes,n)}}var s=Ut.macroModeState;s.isPlaying=!0;var a=!!t.lastEditActionCommand,l=t.inputState;if(t.inputState=t.lastEditInputState,a&&t.lastEditActionCommand.interlaceInsertRepeat)for(var c=0;c1&&"n"==t[0]&&(t=t.replace("numpad","")),t=an[t]||t;var i="";return n.ctrlKey&&(i+="C-"),n.altKey&&(i+="A-"),(i||t.length>1)&&n.shiftKey&&(i+="S-"),(i+=t).length>1&&(i="<"+i+">"),i}function dt(e){var t=new e.constructor;return Object.keys(e).forEach(function(n){var i=e[n];Array.isArray(i)?i=i.slice():i&&"object"==typeof i&&i.constructor!=Object&&(i=dt(i)),t[n]=i}),e.sel&&(t.sel={head:e.sel.head&&K(e.sel.head),anchor:e.sel.anchor&&K(e.sel.anchor)}),t}function gt(e,t,n){var i=!1,o=Tt.maybeInitVimState_(e),r=o.visualBlock||o.wasInVisualBlock,s=e.ace.inMultiSelectMode;if(o.wasInVisualBlock&&!s?o.wasInVisualBlock=!1:s&&o.visualBlock&&(o.wasInVisualBlock=!0),""!=t||o.insertMode||o.visualMode||!s)if(r||!s||e.ace.inVirtualSelectionMode)i=Tt.handleKey(e,t,n);else{var a=dt(o);e.operation(function(){e.ace.forEachSelection(function(){var o=e.ace.selection;e.state.vim.lastHPos=null==o.$desiredColumn?o.lead.column:o.$desiredColumn;var r=e.getCursor("head"),s=e.getCursor("anchor"),l=U(r,s)?0:-1,c=U(r,s)?-1:0;r=N(r,0,l),s=N(s,0,c),e.state.vim.sel.head=r,e.state.vim.sel.anchor=s,i=ln(e,t,n),o.$desiredColumn=-1==e.state.vim.lastHPos?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=dt(a))}),e.curOp.cursorActivity&&!i&&(e.curOp.cursorActivity=!1)},!0)}else e.ace.exitMultiSelectMode();return i&&!o.visualMode&&!o.insert&&o.visualMode!=e.somethingSelected()&&st(e,o,!0),i}function pt(e,t){t.off("beforeEndOperation",pt);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var ft=e("../range").Range,mt=e("../lib/event_emitter").EventEmitter,vt=e("../lib/dom"),bt=e("../lib/oop"),wt=e("../lib/keys"),yt=e("../lib/event"),xt=e("../search").Search,kt=e("../lib/useragent"),Ct=e("../search_highlight").SearchHighlight,St=e("../commands/multi_select_commands"),$t=e("../mode/text").Mode.prototype.tokenRe;e("../multi_select");var _t=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};_t.Pos=function(e,t){if(!(this instanceof Rt))return new Rt(e,t);this.line=e,this.ch=t},_t.defineOption=function(){},_t.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},_t.keyMap={},_t.addClass=_t.rmClass=function(){},_t.e_stop=_t.e_preventDefault=yt.stopEvent,_t.keyName=function(e){var t=wt[e.keyCode]||e.key||"";return 1==t.length&&(t=t.toUpperCase()),t=yt.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t},_t.keyMap["default"]=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&!1!==t.ace.execCommand(n)}},_t.lookupKey=function hn(e,t,n){t||(t="default"),"string"==typeof t&&(t=_t.keyMap[t]);var i="function"==typeof t?t(e):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return hn(e,t.fallthrough,n);for(var o=0;o0?(a.row+=o,a.column+=a.row==i.row?r:0):!t&&c<=0&&(a.row=n.row,a.column=n.column,0===c&&(a.bias=1))}}};var e=function(e,t,n,i){this.cm=e,this.id=t,this.row=n,this.column=i,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return i(this)},this.setBookmark=function(t,n){var i=new e(this,this.$uid++,t.line,t.ch);return n&&n.insertLeft||(i.$insertRight=!0),this.marks[i.id]=i,i},this.moveH=function(e,t){if("char"==t){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,o){if("page"==n){var r=this.ace.renderer.layerConfig;t*=Math.floor(r.height/r.lineHeight),n="line"}if("line"==n){var s=this.ace.session.documentToScreenPosition(e.line,e.ch);return null!=o&&(s.column=o),s.row+=t,s.row=Math.min(Math.max(0,s.row),this.ace.session.getScreenLength()-1),i(this.ace.session.screenToDocumentPosition(s.row,s.column))}},this.charCoords=function(e,t){if("div"==t||!t)return{left:(i=this.ace.session.documentToScreenPosition(e.line,e.ch)).column,top:i.row};if("local"==t){var n=this.ace.renderer,i=this.ace.session.documentToScreenPosition(e.line,e.ch),o=n.layerConfig.lineHeight,r=n.layerConfig.characterWidth,s=o*i.row;return{left:i.column*r,top:s,bottom:s+o}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if("local"==t){var o=Math.max(0,Math.floor(e.top/n.lineHeight)),r=Math.max(0,Math.floor(e.left/n.characterWidth));return i(n.session.screenToDocumentPosition(o,r))}if("div"==t)throw"not implemented"},this.getSearchCursor=function(e,t){var n=!1,o=!1;e instanceof RegExp&&!e.global&&(n=!e.ignoreCase,e=e.source,o=!0);var r=new xt;t.ch==undefined&&(t.ch=Number.MAX_VALUE);var s={row:t.line,column:t.ch},a=this,l=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){r.setOptions({needle:e,caseSensitive:n,wrap:!1,backwards:t,regExp:o,start:l||s});var i=r.find(a.ace.session);return i&&i.isEmpty()&&a.getLine(i.start.row).length==i.start.column&&(r.$options.start=i,i=r.find(a.ace.session)),l=i},from:function(){return l&&i(l.start)},to:function(){return l&&i(l.end)},replace:function(e){l&&(l.end=a.ace.session.doc.replace(l,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,i=n.layerConfig,o=i.maxHeight;o-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,null!=t&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,o))),null!=e&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,i.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var i=this.ace.renderer,o={top:0,bottom:t};i.scrollCursorIntoView(n(e),2*i.lineHeight/i.$size.scrollerHeight,o)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new ft(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){return n||(n=t),this.ace.session.replace(new ft(t.line,t.ch,n.line,n.ch),e)},this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode)this.ace.session.replace(t.getRange(),e[0]||"");else{t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var i=n.length;i--;)this.ace.session.replace(n[i],e[i]||"");t.inVirtualSelectionMode=!1}},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map(function(e){return this.getRange(e.anchor,e.head)},this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){switch(this.state[e]=n,e){case"indentWithTabs":e=t[e],n=!n;break;case"keyMap":return void(this.state.$keyMap=n);default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var i=t[e];switch(i&&(n=this.ace.getOption(i)),e){case"indentWithTabs":return e=t[e],!n;case"keyMap":return this.state.$keyMap}return i?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new Ct(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=undefined:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var i=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(i),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e,-1)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(n(e));return{to:t&&i(t)}},this.indentLine=function(e,t){!0===t?this.ace.session.indentRows(e,e,"\t"):!1===t&&this.ace.session.outdentRows(new ft(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(n(e))},this.posFromIndex=function(e){return i(this.ace.session.doc.indexToPosition(e))},this.focus=function(){return this.ace.textInput.focus()},this.blur=function(){return this.ace.blur()},this.defaultTextHeight=function(){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,o,r){var s=r.bracketRegex.source,a=/paren|text|operator|tag/;if(1==t)var l=this.ace.session.$findClosingBracket(s.slice(1,2),n(e),a);else l=this.ace.session.$findOpeningBracket(s.slice(-2,-1),{row:e.line,column:e.ch+1},a);return l&&{pos:i(l)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(){}}.call(_t.prototype),(_t.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0}).prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},_t.defineExtension=function(e,t){_t.prototype[e]=t},vt.importCssString(".normal-mode .ace_cursor{ border: none; background-color: rgba(255,0,0,0.5);}.normal-mode .ace_hidden-cursors .ace_cursor{ background-color: transparent; border: 1px solid red; opacity: 0.7}.ace_dialog { position: absolute; left: 0; right: 0; background: inherit; z-index: 15; padding: .1em .8em; overflow: hidden; color: inherit;}.ace_dialog-top { border-bottom: 1px solid #444; top: 0;}.ace_dialog-bottom { border-top: 1px solid #444; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode"),function(){function e(e,t,n){var i;return(i=e.ace.container.appendChild(document.createElement("div"))).className=n?"ace_dialog ace_dialog-bottom":"ace_dialog ace_dialog-top","string"==typeof t?i.innerHTML=t:i.appendChild(t),i}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}_t.defineExtension("openDialog",function(n,i,o){function r(e){if("string"==typeof e)h.value=e;else{if(a)return;if(e&&"blur"==e.type&&document.activeElement===h)return;l.state.dialog=null,a=!0,s.parentNode.removeChild(s),l.focus(),o.onClose&&o.onClose(s)}}if(!this.virtualSelectionMode()){o||(o={}),t(this,null);var s=e(this,n,o.bottom),a=!1,l=this;this.state.dialog=s;var c,h=s.getElementsByTagName("input")[0];return h?(o.value&&(h.value=o.value,!1!==o.selectValueOnOpen&&h.select()),o.onInput&&_t.on(h,"input",function(e){o.onInput(e,h.value,r)}),o.onKeyUp&&_t.on(h,"keyup",function(e){o.onKeyUp(e,h.value,r)}),_t.on(h,"keydown",function(e){o&&o.onKeyDown&&o.onKeyDown(e,h.value,r)||(13==e.keyCode&&i(h.value),(27==e.keyCode||!1!==o.closeOnEnter&&13==e.keyCode)&&(h.blur(),_t.e_stop(e),r()))}),!1!==o.closeOnBlur&&_t.on(h,"blur",r),h.focus()):(c=s.getElementsByTagName("button")[0])&&(_t.on(c,"click",function(){r(),l.focus()}),!1!==o.closeOnBlur&&_t.on(c,"blur",r),c.focus()),r}}),_t.defineExtension("openNotification",function(n,i){function o(){a||(a=!0,clearTimeout(r),s.parentNode.removeChild(s))}if(!this.virtualSelectionMode()){t(this,o);var r,s=e(this,n,i&&i.bottom),a=!1,l=i&&"undefined"!=typeof i.duration?i.duration:5e3;return _t.on(s,"click",function(e){_t.e_preventDefault(e),o()}),l&&(r=setTimeout(o,l)),o}})}();var At=[{keys:"",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0, +toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Lt=At.length,Mt=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Rt=_t.Pos,Tt=function(){return jt};_t.defineOption("vimMode",!1,function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=_t.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var Et={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},Ot={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},It=/[\d]/,Ft=[_t.isWordChar,function(e){return e&&!_t.isWordChar(e)&&!/\s/.test(e)}],Bt=[function(e){return/\S/.test(e)}],Ht=u(65,26),Nt=u(97,26),Pt=u(48,10),Dt=[].concat(Ht,Nt,Pt,["<",">"]),Wt=[].concat(Ht,Nt,Pt,["-",'"',".",":","/"]),zt={};y("filetype",undefined,"string",["ft"],function(e,t){if(t!==undefined){if(e===undefined)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}});var Kt=function(){function e(e,t,a){function l(t){var o=++i%n,r=s[o];r&&r.clear(),s[o]=e.setBookmark(t)}var c=s[i%n];if(c){var h=c.find();h&&!V(h,t)&&l(t)}else l(t);l(a),o=i,(r=i-n+1)<0&&(r=0)}function t(e,t){(i+=t)>o?i=o:i0?1:-1,h=e.getCursor();do{if((a=s[(n+(i+=c))%n])&&(l=a.find())&&!V(h,l))break}while(ir)}return a}var n=100,i=-1,o=0,r=0,s=new Array(n);return{cachedCursor:undefined,add:e,move:t}},Vt=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};C.prototype={exitMacroRecordMode:function(){var e=Ut.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=undefined,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Ut.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog("(recording)["+t+"]",null,{bottom:!0})),this.isRecording=!0)}};var Ut,Gt,jt={buildKeyMap:function(){},getRegisterController:function(){return Ut.registerController},resetVimGlobalState_:$,getVimGlobalState_:function(){return Ut},maybeInitVimState_:S,suppressErrorLogging:!1,InsertModeKey:at,map:function(e,t,n){sn.map(e,t,n)},unmap:function(e,t){sn.unmap(e,t)},noremap:function(e,t,n){function i(e){return e?[e]:["normal","insert","visual"]}for(var o=i(n),r=At.length,s=r-Lt;s=0;o--){var r=i[o];if(e!==r.context)if(r.context)this._mapCommand(r);else{var s=["normal","insert","visual"];for(var a in s)if(s[a]!==e){var l={};for(var c in r)l[c]=r[c];l.context=s[a],this._mapCommand(l)}}}},setOption:x,getOption:k,defineOption:y,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;rn[e]=n,sn.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var i=this.findKey(e,t,n);if("function"==typeof i)return i()},findKey:function(e,t,n){function i(){var i=Ut.macroModeState;if(i.isRecording){if("q"==t)return i.exitMacroRecordMode(),A(e),!0;"mapping"!=n&&et(i,t)}}function o(){if(""==t)return A(e),c.visualMode?le(e):c.insertMode&&Qe(e),!0}function r(n){for(var i;n;)i=/<\w+-.+?>|<\w+>|./.exec(n),t=i[0],n=n.substring(i.index+t.length),_t.Vim.handleKey(e,t,"mapping")}function s(){if(o())return!0;for(var n=c.inputState.keyBuffer=c.inputState.keyBuffer+t,i=1==t.length,r=qt.matchCommand(n,At,c.inputState,"insert");n.length>1&&"full"!=r.type;){n=c.inputState.keyBuffer=n.slice(1);var s=qt.matchCommand(n,At,c.inputState,"insert");"none"!=s.type&&(r=s)}if("none"==r.type)return A(e),!1;if("partial"==r.type)return Gt&&window.clearTimeout(Gt),Gt=window.setTimeout(function(){c.insertMode&&c.inputState.keyBuffer&&A(e)},k("insertModeEscKeysTimeout")),!i;if(Gt&&window.clearTimeout(Gt),i){for(var a=e.listSelections(),l=0;l0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},L.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Vt(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},R.prototype={pushText:function(e,t,n,i,o){i&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var r=this.isValidRegister(e)?this.getRegister(e):null;if(r){m(e)?r.pushText(n,i):r.setText(n,i,o),this.unnamedRegister.setText(r.toString(),i)}else{switch(t){case"yank":this.registers[0]=new L(n,i,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new L(n,i):(this.shiftNumericRegisters_(),this.registers[1]=new L(n,i))}this.unnamedRegister.setText(n,i,o)}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new L),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&w(e,Wt)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},T.prototype={nextMatch:function(e,t){var n=this.historyBuffer,i=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+i;t?o>=0:o=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var qt={matchCommand:function(e,t,n,i){var o,r=P(e,t,i,n);if(!r.full&&!r.partial)return{type:"none"};if(!r.full&&r.partial)return{type:"partial"};for(var s=0;s"==o.keys.slice(-11)){var l=W(e);if(//.test(l)||!l)return{type:"none"};n.selectedCharacter=l}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=H(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var i=t.inputState;if(i.operator){if(i.operator==n.operator)return i.motion="expandToLine",i.motionArgs={linewise:!0},void this.evalInput(e,t);A(e)}i.operator=n.operator,i.operatorArgs=H(n.operatorArgs),n.exitVisualBlock&&(t.visualBlock=!1,re(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var i=t.visualMode,o=H(n.operatorMotionArgs);o&&i&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),i||this.processMotion(e,t,n)},processAction:function(e,t,n){var i=t.inputState,o=i.getRepeat(),r=!!o,s=H(n.actionArgs)||{};i.selectedCharacter&&(s.selectedCharacter=i.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),s.repeat=o||1,s.repeatIsExplicit=r,s.registerName=i.registerName,A(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,i,n),Yt[n.action](e,s,t)},processSearch:function(e,t,n){function i(i,o,r){Ut.searchHistoryController.pushInput(i),Ut.searchHistoryController.reset();try{We(e,i,o,r)}catch(h){return He(e,"Invalid regex: "+i),void A(e)}qt.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}function o(e){i(e,!0,!0);var t=Ut.macroModeState;t.isRecording&&nt(t,e)}function r(t,n,i){var o,r,s,l=_t.keyName(t);"Up"==l||"Down"==l?(o="Up"==l,r=t.target?t.target.selectionEnd:0,i(n=Ut.searchHistoryController.nextMatch(n,o)||""),r&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(r,t.target.value.length))):"Left"!=l&&"Right"!=l&&"Ctrl"!=l&&"Alt"!=l&&"Shift"!=l&&Ut.searchHistoryController.reset();try{s=We(e,n,!0,!0)}catch(t){}s?e.scrollIntoView(Ve(e,!a,s),30):(Ue(e),e.scrollTo(u.left,u.top))}function s(t,n,i){var o=_t.keyName(t);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==n?(Ut.searchHistoryController.pushInput(n),Ut.searchHistoryController.reset(),We(e,h),Ue(e),e.scrollTo(u.left,u.top),_t.e_stop(t),A(e),i(),e.focus()):"Up"==o||"Down"==o?_t.e_stop(t):"Ctrl-U"==o&&(_t.e_stop(t),i(""))}if(e.getSearchCursor){var a=n.searchArgs.forward,l=n.searchArgs.wholeWordOnly;Ae(e).setReversed(!a);var c=a?"/":"?",h=Ae(e).getQuery(),u=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var d=Ut.macroModeState;if(d.isPlaying)i(f=d.replaySearchQueries.shift(),!0,!1);else Pe(e,{onClose:o,prefix:c,desc:nn,onKeyUp:r,onKeyDown:s});break;case"wordUnderCursor":var g=de(e,!1,!0,!1,!0),p=!0;if(g||(g=de(e,!1,!0,!1,!1),p=!1),!g)return;var f=e.getLine(g.start.line).substring(g.start.ch,g.end.ch);f=p&&l?"\\b"+f+"\\b":Y(f),Ut.jumpList.cachedCursor=e.getCursor(),e.setCursor(g.start),i(f,!0,!1)}}},processEx:function(e,t,n){function i(t){Ut.exCommandHistoryController.pushInput(t),Ut.exCommandHistoryController.reset(),sn.processCommand(e,t)}function o(t,n,i){var o,r,s=_t.keyName(t);("Esc"==s||"Ctrl-C"==s||"Ctrl-["==s||"Backspace"==s&&""==n)&&(Ut.exCommandHistoryController.pushInput(n),Ut.exCommandHistoryController.reset(),_t.e_stop(t),A(e),i(),e.focus()),"Up"==s||"Down"==s?(_t.e_stop(t),o="Up"==s,r=t.target?t.target.selectionEnd:0,i(n=Ut.exCommandHistoryController.nextMatch(n,o)||""),r&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(r,t.target.value.length))):"Ctrl-U"==s?(_t.e_stop(t),i("")):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&Ut.exCommandHistoryController.reset()}"keyToEx"==n.type?sn.processCommand(e,n.exArgs.input):t.visualMode?Pe(e,{onClose:i,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):Pe(e,{onClose:i,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,i,o,r=t.inputState,s=r.motion,a=r.motionArgs||{},l=r.operator,c=r.operatorArgs||{},h=r.registerName,u=t.sel,d=K(t.visualMode?B(e,u.head):e.getCursor("head")),g=K(t.visualMode?B(e,u.anchor):e.getCursor("anchor")),p=K(d),f=K(g);if(l&&this.recordLastEdit(t,r),(o=r.repeatOverride!==undefined?r.repeatOverride:r.getRepeat())>0&&a.explicitRepeat?a.repeatIsExplicit=!0:(a.noRepeat||!a.explicitRepeat&&0===o)&&(o=1,a.repeatIsExplicit=!1),r.selectedCharacter&&(a.selectedCharacter=c.selectedCharacter=r.selectedCharacter),a.repeat=o,A(e),s){var m=Xt[s](e,d,a,t);if(t.lastMotion=Xt[s],!m)return;if(a.toJumplist){!l&&null!=e.ace.curOp&&(e.ace.curOp.command.scrollIntoView="center-animate");var v=Ut.jumpList,b=v.cachedCursor;b?(ge(e,b,m),delete v.cachedCursor):ge(e,d,m)}m instanceof Array?(i=m[0],n=m[1]):n=m,n||(n=K(d)),t.visualMode?(t.visualBlock&&n.ch===Infinity||(n=B(e,n,t.visualBlock)),i&&(i=B(e,i,!0)),i=i||f,u.anchor=i,u.head=n,re(e),ye(e,t,"<",U(i,n)?i:n),ye(e,t,">",U(i,n)?n:i)):l||(n=B(e,n),e.setCursor(n.line,n.ch))}if(l){if(c.lastSel){i=f;var w=c.lastSel,y=Math.abs(w.head.line-w.anchor.line),x=Math.abs(w.head.ch-w.anchor.ch);n=w.visualLine?Rt(f.line+y,f.ch):w.visualBlock?Rt(f.line+y,f.ch+x):w.head.line==w.anchor.line?Rt(f.line,f.ch+x):Rt(f.line+y,f.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,u=t.sel={anchor:i,head:n},re(e)}else t.visualMode&&(c.lastSel={anchor:K(u.anchor),head:K(u.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var k,C,S,$,_;if(t.visualMode){if(k=G(u.head,u.anchor),C=j(u.head,u.anchor),S=t.visualLine||c.linewise,_=se(e,{anchor:k,head:C},$=t.visualBlock?"block":S?"line":"char"),S){var L=_.ranges;if("block"==$)for(var M=0;Mc&&o.line==c)return this.moveToEol(e,t,n,i,!0);var h=e.ace.session.getFoldLine(a);return h&&(n.forward?a>h.start.row&&(a=h.end.row+1):a=h.start.row),n.toFirstChar&&(r=ue(e.getLine(a)),i.lastHPos=r),i.lastHSPos=e.charCoords(Rt(a,r),"div").left,Rt(a,r)},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var r=n.repeat;if((a=e.findPosV(o,n.forward?r:-r,"line",i.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(a,"div").top+8,left:i.lastHSPos},a=e.coordsChar(s,"div");else{var l=e.charCoords(Rt(e.firstLine(),0),"div");l.left=i.lastHSPos,a=e.coordsChar(l,"div")}return i.lastHPos=a.ch,a},moveByPage:function(e,t,n){var i=t,o=n.repeat;return e.findPosV(i,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var i=n.forward?1:-1;return ke(e,t,n.repeat,i)},moveBySentence:function(e,t,n){var i=n.forward?1:-1;return Ce(e,t,n.repeat,i)},moveByScroll:function(e,t,n,i){var o=e.getScrollInfo(),r=null,s=n.repeat;s||(s=o.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(n.repeat=s,!(r=Xt.moveByDisplayLines(e,t,n,i)))return null;var l=e.charCoords(r,"local");return e.scrollTo(null,o.top+l.top-a.top),r},moveByWords:function(e,t,n){return ve(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var i=be(e,n.repeat,n.forward,n.selectedCharacter),o=n.forward?-1:1;return pe(o,n),i?(i.ch+=o,i):null},moveToCharacter:function(e,t,n){var i=n.repeat;return pe(0,n),be(e,i,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return fe(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,i){var o=n.repeat;return i.lastHPos=o-1,i.lastHSPos=e.charCoords(t,"div").left,we(e,o)},moveToEol:function(e,t,n,i,o){var r=Rt(t.line+n.repeat-1,Infinity),s=e.clipPos(r);return s.ch--,o||(i.lastHPos=Infinity,i.lastHSPos=e.charCoords(s,"div").left),r},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return Rt(n.line,ue(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,i=t,o=i.line,r=i.ch,s=e.getLine(o);r]/.test(s[r])?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(Rt(o,r+1),{bracketRegex:l}).to}return i},moveToStartOfLine:function(e,t){return Rt(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),Rt(i,ue(e.getLine(i)))},textObjectManipulation:function(e,t,n,i){var o={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},r={"'":!0,'"':!0,"`":!0},s=n.selectedCharacter;"b"==s?s="(":"B"==s&&(s="{");var a,l=!n.textObjectInner;if(o[s])a=Se(e,t,s,l);else if(r[s])a=$e(e,t,s,l);else if("W"===s)a=de(e,l,!0,!0);else if("w"===s)a=de(e,l,!0,!1);else{if("p"!==s)return null;if(a=ke(e,t,n.repeat,0,l),n.linewise=!0,i.visualMode)i.visualLine||(i.visualLine=!0);else{var c=i.inputState.operatorArgs;c&&(c.linewise=!0),a.end.line--}}return e.state.vim.visualMode?oe(e,a.start,a.end):[a.start,a.end]},repeatLastCharacterSearch:function(e,t,n){var i=Ut.lastCharacterSearch,o=n.repeat,r=n.forward===i.forward,s=(i.increment?1:0)*(r?-1:1);e.moveH(-s,"char"),n.inclusive=!!r;var a=be(e,o,r,i.selectedCharacter);return a?(a.ch+=s,a):(e.moveH(s,"char"),t)}},Qt={change:function(e,t,n){var i,o,r=e.state.vim,s=n[0].anchor,a=n[0].head;if(r.visualMode)if(t.fullLine)a.ch=Number.MAX_VALUE,a.line--,e.setSelection(s,a),o=e.getSelection(),e.replaceSelections(""),i=s;else{o=e.getSelection();var l=O("",n.length);e.replaceSelections(l),i=G(n[0].head,n[0].anchor)}else{o=e.getRange(s,a);var c=r.lastEditInputState||{};if("moveByWords"==c.motion&&!v(o)){var h=/\s+$/.exec(o);h&&c.motionArgs&&c.motionArgs.forward&&(a=N(a,0,-h[0].length),o=o.slice(0,-h[0].length))}var u=new Rt(s.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();a.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",u,a):e.replaceRange("",s,a),t.linewise&&(d||(e.setCursor(u),_t.commands.newlineAndIndent(e)),s.ch=Number.MAX_VALUE),i=s}Ut.registerController.pushText(t.registerName,"change",o,t.linewise,n.length>1),Yt.enterInsertMode(e,{head:i},e.state.vim)},"delete":function(e,t,n){var i,o,r=e.state.vim;if(r.visualBlock){o=e.getSelection();var s=O("",n.length);e.replaceSelections(s),i=n[0].anchor}else{var a=n[0].anchor,l=n[0].head;t.linewise&&l.line!=e.firstLine()&&a.line==e.lastLine()&&a.line==l.line-1&&(a.line==e.firstLine()?a.ch=0:a=Rt(a.line-1,X(e,a.line-1))),o=e.getRange(a,l),e.replaceRange("",a,l),i=a,t.linewise&&(i=Xt.moveToFirstNonWhiteSpaceCharacter(e,a))}return Ut.registerController.pushText(t.registerName,"delete",o,t.linewise,r.visualBlock),B(e,i,r.insertMode)},indent:function(e,t,n){var i=e.state.vim,o=n[0].anchor.line,r=i.visualBlock?n[n.length-1].anchor.line:n[0].head.line,s=i.visualMode?t.repeat:1;t.linewise&&r--;for(var a=o;a<=r;a++)for(var l=0;lc.top?(l.line+=(a-c.top)/o,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,a);else{var h=a+e.getScrollInfo().clientHeight;h=o.anchor.line?N(o.head,0,1):Rt(o.anchor.line,0)}else if("inplace"==i&&n.visualMode)return;e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),_t.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),_t.signal(e,"vim-mode-change",{mode:"insert"})),Ut.macroModeState.isPlaying||(e.on("change",it),_t.on(e.getInputField(),"keydown",lt)),n.visualMode&&le(e),ee(e,r,s)}},toggleVisualMode:function(e,t,n){var i,o=t.repeat,r=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),re(e)):le(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,i=B(e,Rt(r.line,r.ch+o-1),!0),n.sel={anchor:r,head:i},_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),re(e),ye(e,n,"<",G(r,i)),ye(e,n,">",j(r,i)))},reselectLastSelection:function(e,t,n){var i=n.lastSelection;if(n.visualMode&&ie(e,n),i){var o=i.anchorMark.find(),r=i.headMark.find();if(!o||!r)return;n.sel={anchor:o,head:r},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,re(e),ye(e,n,"<",G(o,r)),ye(e,n,">",j(o,r)),_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),U(o=e.getCursor("head"),i)){var r=o;o=i,i=r}o.ch=X(e,o.line)-1}else{var s=Math.max(t.repeat,2);i=e.getCursor(),o=B(e,Rt(i.line+s-1,Infinity))}for(var a=0,l=i.line;l1)d=Array(t.repeat+1).join(d);var g,p,f=o.linewise,m=o.blockwise;if(m){d=d.split("\n"),f&&d.pop();for(var v=0;ve.lastLine()&&e.replaceRange("\n",Rt($,0)),X(e,$)l.length&&(i=l.length),o=Rt(s.line,i)}if("\n"==r)n.visualMode||e.replaceRange("",s,o),(_t.commands.newlineAndIndentContinueComment||_t.commands.newlineAndIndent)(e);else{var c=e.getRange(s,o);if(c=c.replace(/[^\n]/g,r),n.visualBlock){var h=new Array(e.getOption("tabSize")+1).join(" ");c=(c=e.getSelection()).replace(/\t/g,h).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(c)}else e.replaceRange(c,s,o);n.visualMode?(s=U(a[0].anchor,a[0].head)?a[0].anchor:a[0].head,e.setCursor(s),le(e,!1)):e.setCursor(N(o,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,r,s=e.getCursor(),a=e.getLine(s.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=l.exec(a))&&(o=(i=n.index)+n[0].length,!(s.ch=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};y("pcre",!0,"boolean"),_e.prototype={getQuery:function(){return Ut.query},setQuery:function(e){Ut.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Ut.isReversed},setReversed:function(e){Ut.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var en={"\\n":"\n","\\r":"\r","\\t":"\t"},tn={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t"},nn="(Javascript regexp)",on=function(){this.buildCommandMap_()};on.prototype={processCommand:function(e,t,n){var i=this;e.operation(function(){e.curOp.isVimOp=!0,i._processCommand(e,t,n)})},_processCommand:function(e,t,n){var i=e.state.vim,o=Ut.registerController.getRegister(":"),r=o.toString();i.visualMode&&le(e);var s=new _t.StringStream(t);o.setText(t);var a,l,c=n||{};c.input=t;try{this.parseInput_(e,s,c)}catch(wt){throw He(e,wt),wt}if(c.commandName){if(a=this.matchCommand_(c.commandName)){if(l=a.name,a.excludeFromCommandHistory&&o.setText(r),this.parseCommandArgs_(s,c,a),"exToKey"==a.type){for(var h=0;h0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var i=this.commandMap_[n];if(0===i.name.indexOf(e))return i}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e
";if(n){n=n.join("");for(var r=0;r"}}else for(var s in i){var a=i[s].toString();a.length&&(o+='"'+s+" "+a+"
")}He(e,o)},sort:function(e,t){function n(){if(t.argString){var e=new _t.StringStream(t.argString);if(e.eat("!")&&(r=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var n=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!n&&!e.eol())return"Invalid arguments";if(n[1]){s=-1!=n[1].indexOf("i"),a=-1!=n[1].indexOf("u");var i=-1!=n[1].indexOf("d")||-1!=n[1].indexOf("n")&&1,o=-1!=n[1].indexOf("x")&&1,h=-1!=n[1].indexOf("o")&&1;if(i+o+h>1)return"Invalid arguments";l=(i?"decimal":o&&"hex")||h&&"octal"}n[2]&&(c=new RegExp(n[2].substr(1,n[2].length-2),s?"i":""))}}function i(e,t){var n;r&&(n=e,e=t,t=n);s&&(e=e.toLowerCase(),t=t.toLowerCase());var i=l&&m.exec(e),o=l&&m.exec(t);return i?(i=parseInt((i[1]+i[2]).toLowerCase(),v))-(o=parseInt((o[1]+o[2]).toLowerCase(),v)):e")}if(i){var d=0,g=function(){if(d=c)return void He(e,"Invalid argument: "+t.argString.substring(o));for(var h=0;h<=c-l;h++){var u=String.fromCharCode(l+h);delete n.marks[u]}}else delete n.marks[r]}else He(e,"Argument required")}},sn=new on;_t.keyMap.vim={attach:a,detach:s,call:l},y("insertModeEscKeysTimeout",200,"number"),_t.keyMap["vim-insert"]={fallthrough:["default"],attach:a,detach:s,call:l},_t.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:a,detach:s,call:l},$(),_t.Vim=Tt(),Tt=_t.Vim;var an={"return":"CR",backspace:"BS","delete":"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"},ln=Tt.handleKey.bind(Tt);Tt.handleKey=function(e,t,n){return e.operation(function(){return ln(e,t,n)},!0)},t.CodeMirror=_t;var cn=Tt.maybeInitVimState_;t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,i,o){var r=this.state.vim||{},s=n.characterWidth,a=n.lineHeight,l=t.top,c=t.left;r.insertMode||!(i.cursor?ft.comparePoints(i.cursor,i.start)<=0:o.selection.isBackwards()||o.selection.isEmpty())&&c>s&&(c-=s);!r.insertMode&&r.status&&(l+=a/=2),vt.translate(e,c,l),vt.setStyle(e.style,"width",s+"px"),vt.setStyle(e.style,"height",a+"px")},handleKeyboard:function(e,t,n,i,o){var r=e.editor,s=r.state.cm,a=cn(s);if(-1!=i){if(a.insertMode||(-1==t?(n.charCodeAt(0)>255&&e.inputKey&&((n=e.inputKey)&&4==e.inputHash&&(n=n.toUpperCase())),e.inputChar=n):4==t||0==t?e.inputKey==n&&e.inputHash==t&&e.inputChar?(n=e.inputChar,t=-1):(e.inputChar=null,e.inputKey=n,e.inputHash=t):e.inputChar=e.inputKey=null),"c"==n&&1==t&&!kt.isMac&&r.getCopyText())return r.once("copy",function(){r.selection.clearSelection()}),{command:"null",passEvent:!0};if("esc"==n&&!a.insertMode&&!a.visualMode&&!s.ace.inMultiSelectMode){var l=Ae(s).getOverlay();l&&s.removeOverlay(l)}if(-1==t||1&t||0===t&&n.length>1){var c=a.insertMode,h=ut(t,n,o||{});null==a.status&&(a.status="");var u=gt(s,h,"user");if(a=cn(s),u&&null!=a.status?a.status+=h:null==a.status&&(a.status=""),s._signal("changeStatus"),!u&&(-1!=t||c))return;return{command:"null",passEvent:!u}}}},attach:function(e){function t(){var t=cn(n).insertMode;n.ace.renderer.setStyle("normal-mode",!t),e.textInput.setCommandMode(!t),e.renderer.$keepTextAreaAtCursor=t,e.renderer.$blockCursor=!t}e.state||(e.state={});var n=new _t(e);e.state.cm=n,e.$vimModeHandler=this,_t.keyMap.vim.attach(n),cn(n).status=null,n.on("vim-command-done",function(){n.virtualSelectionMode()||(cn(n).status=null,n.ace._signal("changeStatus"),n.ace.session.markUndoGroup())}),n.on("changeStatus",function(){n.ace.renderer.updateCursor(),n.ace._signal("changeStatus")}),n.on("vim-mode-change",function(){n.virtualSelectionMode()||(t(),n._signal("changeStatus"))}),t(),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(n)},detach:function(e){var t=e.state.cm;_t.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),e.textInput.setCommandMode(!1),e.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(e){var t=e.state.cm,n=cn(t);if(n.insertMode)return"INSERT";var i="";return n.visualMode&&(i+="VISUAL",n.visualLine&&(i+=" LINE"),n.visualBlock&&(i+=" BLOCK")),n.status&&(i+=(i?" ":"")+n.status),i}},Tt.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),Tt.defineEx("write","w",function(){console.log(":write is not implemented")}),At.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Yt.aceCommand=function(e,t){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",pt):pt(null,e.ace)},Yt.fold=function(e,t){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=At,t.handler.actions=Yt,t.Vim=Tt}),ace.require(["ace/keyboard/vim"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t){"use strict";function n(){}var i=e("./lib/oop"),o=(e("./range").Range,e("./search").Search),r=e("./edit_session").EditSession,s=e("./search_highlight").SearchHighlight;i.inherits(n,o),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var i=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(i),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),i=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),i&&e.moveCursorToPosition(i),!0},this.highlight=function(e,t){(e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new s(null,"ace_occur-highlight","text"))).setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),i=n.map(function(e){return e.content}),o=new r(i.join("\n"));o.$occur=this,o.$occurMatchingLines=n,e.setSession(o),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,o.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(o,t.re),o._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,i={row:0,column:0};if(!n)return i;for(var o=0;o30&&this.$data.shift()},append:function(e){var t=this.$data.length-1,n=this.$data[t]||"";e&&(n+=e),n&&(this.$data[t]=n)},get:function(e){return e=e||1,this.$data.slice(this.$data.length-e,this.$data.length).reverse().join("\n")},pop:function(){return this.$data.length>1&&this.$data.pop(),this.get()},rotate:function(){return this.$data.unshift(this.$data.pop()),this.get()}}}),ace.require(["ace/keyboard/emacs"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t){"use strict";var n=function(e){this.$editor=e;var t=this,n=[],i=!1;this.onAfterExec=function(){i=!1,t.processRows(n),n=[]},this.onExec=function(){i=!0},this.onChange=function(e){i&&(-1==n.indexOf(e.start.row)&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}};(function(){this.processRows=function(e){this.$inChange=!0;for(var t=[],n=0,i=e.length;n-1))for(var r=this.$findCellWidthsForBlock(o),s=this.$setBlockCellWidthsToMax(r.cellWidths),a=r.firstRow,l=0,c=s.length;l=0&&0!=(t=this.$cellWidthsForRow(i)).length;)n.unshift(t),i--;var o=i+1;i=e;for(var r=this.$editor.session.getLength();i0&&(this.$editor.session.getDocument().insertInLine({row:e,column:c+1},Array(h+1).join(" ")+"\t"),this.$editor.session.getDocument().removeInLine(e,c,c+1),i+=h),h<0&&g>=-h&&(this.$editor.session.getDocument().removeInLine(e,c+h,c),i+=h)}}},this.$izip_longest=function(e){if(!e[0])return[];for(var t=e[0].length,n=e.length,i=1;it&&(t=o)}for(var r=[],s=0;s=t.length?t.length:e.length,i=[],o=0;o'+t.command+' : '+t.key+""},"");o.id="kbshortcutmenu",o.innerHTML="

Keyboard Shortcuts

"+r+"",n(t,o)}}var o=e("../editor").Editor;n.exports.init=function(e){o.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e){e.showKeyboardShortcuts()}}])}}),ace.require(["ace/ext/keybinding_menu"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"],function(e,t){"use strict";function n(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=e("./lib/lang"),s=e("./range").Range,a=e("./range_list").RangeList,l=e("./keyboard/hash_handler").HashHandler,c=e("./tokenizer").Tokenizer,h=e("./clipboard"),u={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(){return h.getText&&h.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:n.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:n.bind(null,{year:"2-digit"}),CURRENT_MONTH:n.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:n.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:n.bind(null,{month:"short"}),CURRENT_DATE:n.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:n.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:n.bind(null,{weekday:"short"}),CURRENT_HOUR:n.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:n.bind(null,{minute:"2-digit"}),CURRENT_SECOND:n.bind(null,{second:"2-digit"})};u.SELECTED_TEXT=u.SELECTION;var d=function(){this.snippetMap={},this.snippetNameMap={}};(function(){i.implement(this,o),this.getTokenizer=function(){return d.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function e(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function t(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag="",""},next:"formatString"};return d.$tokenizer=new c({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:e},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(t,n,i){var o=e(t.substr(1));return i.unshift(o[0]),o},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return 2==e.length?e[1]:"\0"}).split("\0");return n[0].choices=i,[i[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:i>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,n){var i=n.shift();return i&&(i.flag=e.slice(1,-1)),this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,n){var i={text:e.slice(2)};return n.unshift(i),[i]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,n){var i=n.shift();return this.next=i&&i.tabstopId?"start":"",[i||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,n){return n[0].formatFunction=e.slice(2,-1),[n.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,n){"+"==e[1]&&(n[0].ifEnd=n[0]),"?"==e[1]&&(n[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),d.$tokenizer},this.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map(function(e){return e.value||e})},this.getVariableValue=function(e,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var i=this.variables[t];return"function"==typeof i&&(i=this.variables[t](e,t,n)),null==i?"":i},this.variables=u,this.tmStrFormat=function(e,t,n){if(!t.fmt)return e;var i=t.flag||"",o=t.guard;o=new RegExp(o,i.replace(/[^gim]/g,""));var r="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,s=this;return e.replace(o,function(){var e=s.variables.__;s.variables.__=[].slice.call(arguments);for(var t=s.resolveVariables(r,n),i="E",o=0;o1?(b=t[t.length-1].length,v+=t.length-1):b+=e.length,w+=e}else e&&(e.start?e.end={row:v,column:b}:e.start={row:v,column:b})});var y=e.getSelectionRange(),x=e.session.replace(y,w),k=new g(e),C=e.inVirtualSelectionMode&&e.selection.index;k.addTabstops(l,y.start,x,C)},this.insertSnippet=function(e,t){var n=this;if(e.inVirtualSelectionMode)return n.insertSnippetForSelection(e,t);e.forEachSelection(function(){n.insertSnippetForSelection(e,t)},null,{keepOrder:!0}),e.tabstopManager&&e.tabstopManager.tabNext()},this.$getScope=function(e){var t=e.session.$mode.$id||"";if("html"===(t=t.split("/").pop())||"php"===t){"php"===t&&!e.session.$mode.inlinePhp&&(t="html");var n=e.getCursorPosition(),i=e.session.getState(n.row);"object"==typeof i&&(i=i[0]),i.substring&&("js-"==i.substring(0,3)?t="javascript":"css-"==i.substring(0,4)?t="css":"php-"==i.substring(0,4)&&(t="php"))}return t},this.getActiveScopes=function(e){var t=this.$getScope(e),n=[t],i=this.snippetMap;return i[t]&&i[t].includeScopes&&n.push.apply(n,i[t].includeScopes),n.push("_"),n},this.expandWithTab=function(e,t){var n=this,i=e.forEachSelection(function(){return n.expandSnippetForSelection(e,t)},null,{keepOrder:!0});return i&&e.tabstopManager&&e.tabstopManager.tabNext(),i},this.expandSnippetForSelection=function(e,t){var n,i=e.getCursorPosition(),o=e.session.getLine(i.row),r=o.substring(0,i.column),s=o.substr(i.column),a=this.snippetMap;return this.getActiveScopes(e).some(function(e){var t=a[e];return t&&(n=this.findMatchingSnippet(t,r,s)),!!n},this),!!n&&(!(!t||!t.dryRun)||(e.session.doc.removeInLine(i.row,i.column-n.replaceBefore.length,i.column+n.replaceAfter.length),this.variables.M__=n.matchBefore,this.variables.T__=n.matchAfter,this.insertSnippetForSelection(e,n.content),this.variables.M__=this.variables.T__=null,!0))},this.findMatchingSnippet=function(e,t,n){for(var i=e.length;i--;){var o=e[i];if((!o.startRe||o.startRe.test(t))&&((!o.endRe||o.endRe.test(n))&&(o.startRe||o.endRe)))return o.matchBefore=o.startRe?o.startRe.exec(t):[""],o.matchAfter=o.endRe?o.endRe.exec(n):[""],o.replaceBefore=o.triggerRe?o.triggerRe.exec(t)[0]:"",o.replaceAfter=o.endTriggerRe?o.endTriggerRe.exec(n)[0]:"",o}},this.snippetMap={},this.snippetNameMap={},this.register=function(e,t){function n(e){return e&&!/^\^?\(.*\)\$?$|^\\b$/.test(e)&&(e="(?:"+e+")"),e||""}function i(e,t,i){return e=n(e),t=n(t),i?(e=t+e)&&"$"!=e[e.length-1]&&(e+="$"):(e+=t)&&"^"!=e[0]&&(e="^"+e),new RegExp(e)}function o(e){e.scope||(e.scope=t||"_"),t=e.scope,s[t]||(s[t]=[],a[t]={});var n=a[t];if(e.name){var o=n[e.name];o&&l.unregister(o),n[e.name]=e}s[t].push(e),e.tabTrigger&&!e.trigger&&(!e.guard&&/^\w/.test(e.tabTrigger)&&(e.guard="\\b"),e.trigger=r.escapeRegExp(e.tabTrigger)),(e.trigger||e.guard||e.endTrigger||e.endGuard)&&(e.startRe=i(e.trigger,e.guard,!0),e.triggerRe=new RegExp(e.trigger),e.endRe=i(e.endTrigger,e.endGuard,!0),e.endTriggerRe=new RegExp(e.endTrigger))}var s=this.snippetMap,a=this.snippetNameMap,l=this;e||(e=[]),e&&e.content?o(e):Array.isArray(e)&&e.forEach(o),this._signal("registerSnippets",{scope:t})},this.unregister=function(e,t){function n(e){var n=o[e.scope||t];if(n&&n[e.name]){delete n[e.name];var r=i[e.scope||t],s=r&&r.indexOf(e);s>=0&&r.splice(s,1)}}var i=this.snippetMap,o=this.snippetNameMap;e.content?n(e):Array.isArray(e)&&e.forEach(n)},this.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,n=[],i={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=o.exec(e);){if(t[1])try{i=JSON.parse(t[1]),n.push(i)}catch(r){}if(t[4])i.content=t[4].replace(/^\t/gm,""),n.push(i),i={};else{var s=t[2],a=t[3];if("regex"==s){var l=/\/((?:[^\/\\]|\\.)*)|$/g;i.guard=l.exec(a)[1],i.trigger=l.exec(a)[1],i.endTrigger=l.exec(a)[1],i.endGuard=l.exec(a)[1]}else"snippet"==s?(i.tabTrigger=a.match(/^\S*/)[0],i.name||(i.name=a)):i[s]=a}}return n},this.getSnippetByName=function(e,t){var n,i=this.snippetNameMap;return this.getActiveScopes(t).some(function(t){var o=i[t];return o&&(n=o[e]),!!n},this),n}}).call(d.prototype);var g=function(e){if(e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this), +this.$onChangeSelection=r.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)};(function(){this.attach=function(e){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(e){for(var t="r"==e.action[0],n=this.selectedTabstop&&this.selectedTabstop.parents||{},i=(this.tabstops||[]).slice(),o=0;o2&&(this.tabstops.length&&r.push(r.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,r))},this.addTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(e){var t=this.editor.session;e.forEach(function(e){t.removeMarker(e.markerId),e.markerId=null})},this.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.editor.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},this.keyboardHandler=new l,this.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||e.tabstopManager.tabNext(1)},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1)},Esc:function(e){e.tabstopManager.detach()},Return:function(){return!1}})}).call(g.prototype);var p=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},f=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};e("./lib/dom").importCssString(".ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute;}"),t.snippetManager=new d;var m=e("./editor").Editor;(function(){this.insertSnippet=function(e,n){return t.snippetManager.insertSnippet(this,e,n)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(m.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(e,t){"use strict";var n=e("../virtual_renderer").VirtualRenderer,i=e("../editor").Editor,o=e("../range").Range,r=e("../lib/event"),s=e("../lib/lang"),a=e("../lib/dom"),l=function(e){var t=new n(e);t.$maxLines=4;var o=new i(t);return o.setHighlightActiveLine(!1),o.setShowPrintMargin(!1),o.renderer.setShowGutter(!1),o.renderer.setHighlightGutterLine(!1),o.$mouseHandler.$focusTimeout=0,o.$highlightTagPending=!0,o},c=function(e){var t=a.createElement("div"),n=new l(t);e&&e.appendChild(t),t.style.display="none",n.renderer.content.style.cursor="default",n.renderer.setStyle("ace_autocomplete"),n.setOption("displayIndentGuides",!1),n.setOption("dragDelay",150);var i=function(){};n.focus=i,n.$isFocused=!0,n.renderer.$cursorLayer.restartTimer=i,n.renderer.$cursorLayer.element.style.opacity=0,n.renderer.$maxLines=8,n.renderer.$keepTextAreaAtCursor=!1,n.setHighlightActiveLine(!1),n.session.highlight(""),n.session.$searchHighlight.clazz="ace_highlight-marker",n.on("mousedown",function(e){var t=e.getDocumentPosition();n.selection.moveToPosition(t),u.start.row=u.end.row=t.row,e.stop()});var c,h=new o(-1,0,-1,Infinity),u=new o(-1,0,-1,Infinity);u.id=n.session.addMarker(u,"ace_active-line","fullLine"),n.setSelectOnHover=function(e){e?h.id&&(n.session.removeMarker(h.id),h.id=null):h.id=n.session.addMarker(h,"ace_line-hover","fullLine")},n.setSelectOnHover(!1),n.on("mousemove",function(e){if(c){if(c.x!=e.x||c.y!=e.y){(c=e).scrollTop=n.renderer.scrollTop;var t=c.getDocumentPosition().row;h.start.row!=t&&(h.id||n.setRow(t),g(t))}}else c=e}),n.renderer.on("beforeRender",function(){if(c&&-1!=h.start.row){c.$pos=null;var e=c.getDocumentPosition().row;h.id||n.setRow(e),g(e,!0)}}),n.renderer.on("afterRender",function(){var e=n.getRow(),t=n.renderer.$textLayer,i=t.element.childNodes[e-t.config.firstRow];i!==t.selectedNode&&t.selectedNode&&a.removeCssClass(t.selectedNode,"ace_selected"),t.selectedNode=i,i&&a.addCssClass(i,"ace_selected")});var d=function(){g(-1)},g=function(e,t){e!==h.start.row&&(h.start.row=h.end.row=e,t||n.session._emit("changeBackMarker"),n._emit("changeHoverMarker"))};n.getHoveredRow=function(){return h.start.row},r.addListener(n.container,"mouseout",d),n.on("hide",d),n.on("changeSelection",d),n.session.doc.getLength=function(){return n.data.length},n.session.doc.getLine=function(e){var t=n.data[e];return"string"==typeof t?t:t&&t.value||""};var p=n.session.bgTokenizer;return p.$tokenizeRow=function(e){function t(e,t){e&&o.push({type:(i.className||"")+(t||""),value:e})}var i=n.data[e],o=[];if(!i)return o;"string"==typeof i&&(i={value:i});for(var r=i.caption||i.value||i.name,s=r.toLowerCase(),a=(n.filterText||"").toLowerCase(),l=0,c=0,h=0;h<=a.length;h++)if(h!=c&&(i.matchMask&1<r/2&&!i&&h+t+l>r?(a.$maxPixelHeight=h-2*this.$borderSize,o.style.top="",o.style.bottom=r-h+"px",n.isTopdown=!1):(h+=t,a.$maxPixelHeight=r-h-.2*t,o.style.top=h+"px",o.style.bottom="",n.isTopdown=!0),o.style.display="";var u=e.left;u+o.offsetWidth>s&&(u=s-o.offsetWidth),o.style.left=u+"px",this._signal("show"),c=null,n.isOpen=!0},n.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=t>=n?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},n.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},n.$imageSize=0,n.$borderSize=1,n};a.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62);}.ace_completion-meta { opacity: 0.5; margin: 0.9em;}.ace_completion-message { color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12;}.ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111;}.ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1;}","autocompletion.css"),t.AcePopup=c,t.$singleLineEditor=l}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t){"use strict";t.parForEach=function(e,t,n){var i=0,o=e.length;0===o&&n();for(var r=0;r=0&&i.test(e[r]);r--)o.push(e[r]);return o.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,i){i=i||n;for(var o=[],r=t;rthis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=r.caption||r.value||r.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var g=a.toLowerCase().indexOf(o);if(g>-1)d=g;else for(var p=0;p=0&&(m<0||f0&&(-1===h&&(d+=10),d+=c,u|=1<",r.escapeHTML(e.caption),"","
",r.escapeHTML(e.snippet)].join(""))}},h=[c,a,l];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=a,t.keyWordCompleter=l,t.snippetCompleter=c;var u={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){g(t.session.$mode)},g=function(e){var t=e.$id;n.files||(n.files={}),p(t),e.modes&&e.modes.forEach(g)},p=function(e){if(e&&!n.files[e]){var t=e.replace("mode","snippets");n.files[e]={},o.loadModule(t,function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach(function(e){p("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!s.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){if(s.getCompletionPrefix(t)&&!n){var o=i["for"](t);o.autoInsert=!1,o.showPopup(t)}}},m=e("../editor").Editor;e("../config").defineOptions(m.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(i.startCommand)):this.commands.removeCommand(i.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",f)):this.commands.removeListener("afterExec",f)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(u),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(u),this.off("changeMode",d))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t){function n(e){var n=e.editor;if(e.getAccelKey()){n=e.editor;var i=e.getDocumentPosition(),o=n.session.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function i(e){var t=e.getAccelKey();if(0==e.getButton()&&t){var n=e.editor,i=e.getDocumentPosition(),o=n.session.getTokenAt(i.row,i.column);n._emit("linkClick",{position:i,token:o})}}var o=e("../editor").Editor;e("../config").defineOptions(o.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",i),this.on("mousemove",n)):(this.off("click",i),this.off("mousemove",n))},value:!1}}),t.previousLinkingHover=!1}),ace.require(["ace/ext/linking"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e){"use strict";function t(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&0===n.column&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function n(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function i(e,t){var n=t.session;if(n.$bidiHandler.currentRow=null,n.$bidiHandler.isRtlLine(e.start.row)&&"insert"===e.action&&e.lines.length>1)for(var i=e.start.row;il))&&(s[0]||(t.lastIndex=a+=1,!(a>=o.length))););}this.searchCounter.textContent=i+" of "+(n>l?l+"+":n)},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var e=!this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked})&&this.searchInput.value;n.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.active=!1,this.setSearchRange(null),this.editor.off("changeSession",this.setSession),this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(e,t){this.active=!0,this.editor.on("changeSession",this.setSession),this.element.style.display="",this.replaceOption.checked=t,e&&(this.searchInput.value=e),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb),this.$syncOptions(!0)},this.isFocused=function(){var e=document.activeElement;return e==this.searchInput||e==this.replaceInput}}).call(c.prototype),t.SearchBox=c,t.Search=function(e,t){(e.searchBox||new c(e)).show(e.session.getTextRange(),t)}}),ace.require(["ace/ext/searchbox"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i="#ace_settingsmenu, #kbshortcutmenu {background-color: #F7F7F7;color: black;box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);padding: 1em 0.5em 2em 1em;overflow: auto;position: absolute;margin: 0;bottom: 0;right: 0;top: 0;z-index: 9991;cursor: default;}.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);background-color: rgba(255, 255, 255, 0.6);color: black;}.ace_optionsMenuEntry:hover {background-color: rgba(100, 100, 100, 0.1);transition: all 0.3s}.ace_closeButton {background: rgba(245, 146, 146, 0.5);border: 1px solid #F48A8A;border-radius: 50%;padding: 7px;position: absolute;right: -8px;top: -8px;z-index: 100000;}.ace_closeButton{background: rgba(245, 146, 146, 0.9);}.ace_optionsMenuKey {color: darkslateblue;font-weight: bold;}.ace_optionsMenuCommand {color: darkcyan;font-weight: normal;}.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {vertical-align: middle;}.ace_optionsMenuEntry button[ace_selected_button=true] {background: #e7e7e7;box-shadow: 1px 0px 2px 0px #adadad inset;border-color: #adadad;}.ace_optionsMenuEntry button {background: white;border: 1px solid lightgray;margin: 0px;}.ace_optionsMenuEntry button:hover{background: #f0f0f0;}";e("../../lib/dom").importCssString(i),n.exports.overlayPage=function(e,t,n){function i(e){27===e.keyCode&&o()}function o(){r&&(document.removeEventListener("keydown",i),r.parentNode.removeChild(r),e.focus(),r=null,n&&n())}var r=document.createElement("div");return r.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; background-color: rgba(0, 0, 0, 0.3);",r.addEventListener("click",function(){o()}),document.addEventListener("keydown",i),t.addEventListener("click",function(e){e.stopPropagation()}),r.appendChild(t),document.body.appendChild(r),e.blur(),{close:o}}}),ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){for(var t=l.text,n=e.split(/[\/\\]/).pop(),i=0;i 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;return n=null==t?this.$cEditor:this.$editors[t],this.$editors.some(function(t){return t.session===e})&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,o=0;o")}return this.textContent&&e.push(this.textContent),"fragment"!=this.type&&e.push(""),e.join("")};var h={createTextNode:function(e){return c(e)},createElement:function(e){return new i(e)},createFragment:function(){return new i("fragment")}},u=function(){this.config={},this.dom=h} +;u.prototype=r.prototype;var d=function(e,t,n){var i=e.className.match(/lang-(\w+)/),o=t.mode||i&&"ace/mode/"+i[1];if(!o)return!1;var r=t.theme||"ace/theme/textmate",s="",a=[];if(e.firstElementChild)for(var c=0,h=0;h"),n)e.push("");e.push("")}else e.push("")}var r=null,s={mode:"Mode:",wrap:"Soft Wrap:",theme:"Theme:",fontSize:"Font Size:",showGutter:"Display Gutter:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},l={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",gob:"Green on Black",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},showGutter:r,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},wrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:r,useSoftTabs:r,showInvisibles:r},c=[];for(var h in c.push("
"),t.defaultOptions)c.push(""),c.push("");c.push("
SettingValue
",s[h],""),o(c,h,l[h],i.getOption(h)),c.push("
"),e.innerHTML=c.join("");for(var u=function(e){var t=e.currentTarget;i.setOption(t.title,t.value)},d=function(e){var t=e.currentTarget;i.setOption(t.title,t.checked)},g=e.getElementsByTagName("select"),p=0;p0&&!(r%h)&&!(c%h)&&(i[h]=(i[h]||0)+1),n[c]=(n[c]||0)+1}r=c}for(;ad.score&&(d={score:p,length:a})}if(d.score&&d.score>1.4)var f=d.length;return o>g+1?((1==f||go+1?{ch:" ",length:f}:void 0},t.detectIndentation=function(e){var n=e.getLines(0,1e3),i=t.$detectIndentation(n)||{};return i.ch&&e.setUseSoftTabs(" "==i.ch),i.length&&e.setTabSize(i.length),i},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),i=n.getAllLines(),o=t&&t.trimEmpty?-1:0,r=[],s=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var i=n[t+1];i&&i.cursor.row==e.cursor.row||r.push(e.cursor)}):r.push(e.selection.getCursor()),s=0);for(var a=r[s]&&r[s].row,l=0,c=i.length;lo&&(u=r[s].column),a=r[++s]?r[s].row:-1),u>o&&n.removeInLine(l,u,h.length)}},t.convertIndentation=function(e,t,i){var o=e.getTabString()[0],r=e.getTabSize();i||(i=r),t||(t=o);for(var s="\t"==t?t:n.stringRepeat(t,i),a=e.doc,l=a.getAllLines(),c={},h={},u=0,d=l.length;u=i&&r[2].charAt(0)==o?(n.splice(0,3),this.next=n.shift(),this.token):(this.next="",this.token)}},{defaultToken:"support.function"}],startCodeBlockMatch=function(e,t,n){var i=new RegExp(this.regex).exec(e);return n.unshift("githubblock",[],[i[2].length,i[2].charAt(0)],t),this.token},GollumCodeStart={token:"support.function",regex:"^( {0,3})(```)[^`]*$",onMatch:startCodeBlockMatch,next:"githubblock"},MarkdownCodeStart={token:"support.function",regex:"^( {0,3})(~~[~]+)[^`~]*$",onMatch:startCodeBlockMatch,next:"githubblock"};ace.define("GollumRstHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/rst_highlight_rules").RSTHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumAsciidocHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/asciidoc_highlight_rules").AsciidocHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumTextileHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/textile_highlight_rules").TextileHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumTextHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/text_highlight_rules").TextHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumRdocHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/rdoc_highlight_rules").RDocHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumMarkdownHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.$rules.start.unshift(MarkdownCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),function(e){var t={asciidoc:{mode:"asciidoc",highlighter:"GollumAsciidocHighlightRules"},creole:{mode:"text",highlighter:"GollumTextHighlightRules"},markdown:{mode:"markdown",highlighter:"GollumMarkdownHighlightRules"},mediawiki:{mode:"text",highlighter:"GollumTextHighlightRules"},bib:{mode:"latex"},org:{mode:"text",highlighter:"GollumTextHighlightRules"},rst:{mode:"rst",highlighter:"GollumRstHighlightRules"},txt:{mode:"text"},pod:{mode:"text",highlighter:"GollumTextHighlightRules"},rdoc:{mode:"rdoc",highlighter:"GollumRdocHighlightRules"},textile:{mode:"textile",highlighter:"GollumTextileHighlightRules"}};e.getEditorMode=function(e){var n=null;if(n=t[e]){var i=n.mode,o=n.highlighter;if(o){var r=new(0,ace.require("ace/mode/"+i).Mode);return r.HighlightRules=ace.require(o).GollumHighlightRules,r}return"ace/mode/"+i}return null}}(jQuery),function(e){function t(e){return new RegExp("^[^"+"A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u2c00-\ufb1c\ufdfe-\ufe6f\ufefd-\uffff"+"]*["+"\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc"+"]").test(e)}function n(e){window.ace_editor.session.$bidiHandler.$isRtl=e,window.ace_editor.session.$bidiHandler.updateBidiMap(),window.ace_editor.renderer.updateFull()}function i(){a&&clearTimeout(a),e("#gollum-saved-msg").text("Saving..."),a=setTimeout(function(){localStorage.setItem(l,window.ace_editor.getSession().getValue()),e("#gollum-editor-header, #gollum-editor-footer, #gollum-editor-sidebar").each(function(e,t){var n=l+t.id.replace("gollum-editor-","_");localStorage.setItem(n,t.value)}),e("#gollum-saved-msg").text("Saved recovery text")},2e3)}function o(e){var t=window.ace_editor;window.localStorage.setItem("gollum-kbm",e),"default"==e?t.setKeyboardHandler():"vim"==e||"emacs"==e?t.setKeyboardHandler("ace/keyboard/"+e):t.setKeyboardHandler(),t.focus()}var r={MarkupType:"markdown",EditorMode:"code",NewFile:!1,HasFunctionBar:!0,Debug:!1,NoDefinitionsFor:[]},s={},a=null,l="gollum_autorecover_"+window.location;e.GollumEditor=function(a){if(s=e.extend(r,a),e('textarea[id="gollum-editor-body"]').each(function(){var r=e(this),a=r.attr("data-markup-lang")?r.attr("data-markup-lang"):"markdown",c=e("
",{position:"absolute",height:r.height(),"class":r.attr("class"),id:"gollum-editor-body-ace"}).insertAfter(r);r.css("display","none");var h=ace.edit(c[0],{rtlText:!0});window.ace_editor=h;var u=localStorage.getItem(l);u&&(e("#gollum-autorecover-button").click(function(t){h.getSession().setValue(u),["header","footer","sidebar"].forEach(function(t){var n=localStorage.getItem(l+"_"+t);n&&e("#gollum-editor-"+t).val(n)}),e("#gollum-autorecover-msg")[0].hidden=!0,t.preventDefault()}),e("#gollum-autorecover-msg")[0].hidden=!1);var d=window.localStorage.getItem("gollum-kbm");d&&(default_keybinding=d);for(var g=document.getElementById("keybinding"),p=0;p-1)var i="[[/"+uploadDest+"/"+n.name+"]]";else i="[["+n.name+"|/"+uploadDest+"/"+n.name+"]]";window.ace_editor.insert(i)},error:function(e,t,n){409==e.status?alert("This file already exists."):alert("Error uploading file: "+t+" "+n),f.removeClass("uploading")}}),!1}}}},e.GollumEditor.defineLanguage=function(e,t){"object"==typeof t?h.define(e,t):c("GollumEditor.defineLanguage: definition for "+e+" is not an object")};var c=function(e){s.Debug&&"undefined"!=typeof console&&console.log(e)},h={_ACTIVE_LANG:"",_LOADED_LANGS:[],_LANG:{},define:function(t,n){if(h._ACTIVE_LANG=t,h._LOADED_LANGS.push(t),"object"==typeof e.GollumEditor.WikiLanguage){var i={};e.extend(i,e.GollumEditor.WikiLanguage,n),h._LANG[t]=i}else h._LANG[t]=n},getActiveLanguage:function(){return h._ACTIVE_LANG},setActiveLanguage:function(e){function t(e){return function(){var t=h.getDefinitionFor(e);"object"==typeof t&&d.executeAction(t)}}null!=h._ACTIVE_LANG&&h._ACTIVE_LANG.length<=0&&g.updateCommitMessage(e),h.getHookFunctionFor("deactivate")&&h.getHookFunctionFor("deactivate")(),h.isLoadedFor(e)?(h._ACTIVE_LANG=e,d.refresh(),h.getHookFunctionFor("activate")&&h.getHookFunctionFor("activate")()):(h._ACTIVE_LANG=null,u.functionBar()&&d.refresh(),h.isValid()&&u.formatSelector()&&g.updateSelected(),h.getHookFunctionFor("activate")&&h.getHookFunctionFor("activate")()),window.ace_editor.commands.addCommand({name:"header-1",bindKey:{win:"Ctrl-1",mac:"Command-1"},exec:t("function-h1")}),window.ace_editor.commands.addCommand({name:"header-2",bindKey:{win:"Ctrl-2",mac:"Command-2"},exec:t("function-h2")}),window.ace_editor.commands.addCommand({name:"header-3",bindKey:{win:"Ctrl-3",mac:"Command-3"},exec:t("function-h3")}),window.ace_editor.commands.addCommand({name:"bold-text",bindKey:{win:"Ctrl-b",mac:"Command-b"},exec:t("function-bold")}),window.ace_editor.commands.addCommand({name:"italic-text",bindKey:{win:"Ctrl-i",mac:"Command-i"},exec:t("function-italic")})},getHookFunctionFor:function(e,t){return t||(t=h._ACTIVE_LANG),h.isLoadedFor(t)&&h._LANG[t][e]&&"function"==typeof h._LANG[t][e]?h._LANG[t][e]:null},getDefinitionFor:function(e,t){return t||(t=h._ACTIVE_LANG),h.isLoadedFor(t)&&h._LANG[t][e]&&"object"==typeof h._LANG[t][e]?h._LANG[t][e]:null},isLoadedFor:function(e){if(0===h._LOADED_LANGS.length)return!1;for(var t=0;t0},help:function(){return e("#gollum-editor #gollum-editor-help").length&&e("#gollum-editor #function-help").length},dir:function(){return e("#gollum-editor #function-text-direction").length},previewButton:function(){return e("#gollum-editor #gollum-editor-preview").length},titleDisplayed:function(){return s.NewFile},dragDropUpload:function(){return e("#gollum-editor.uploads-allowed").length}},d={isActive:!1,activate:function(){c("Activating function bar"),e("#gollum-editor-function-bar button.function-button").each(function(){h.getDefinitionFor(e(this).attr("id"))?(e(this).click(d.evtFunctionButtonClick),e(this).attr("disabled",!1)):["function-help","function-text-direction"].includes(e(this).attr("id"))||e(this).attr("disabled",!0)}),e("#gollum-editor-function-bar").addClass("active"),d.isActive=!0},deactivate:function(){e("#gollum-editor-function-bar button.function-button").not("#function-text-direction").unbind("click"),e("#gollum-editor-function-bar").removeClass("active"),d.isActive=!1},evtFunctionButtonClick:function(t){t.preventDefault();var n=h.getDefinitionFor(e(this).attr("id"));"object"==typeof n&&d.executeAction(n)},executeAction:function(t){var n=window.ace_editor,i=n.getValue(),o=!1,r=!1,s=n.getSelectionRange(),a=n.getSelectedText(),l=a.length,h=!1;if(""==a)if(t.whole_line&&1==t.whole_line){h=!0 +;var u=s.start.row;a=n.session.getLine(u),s=new(0,ace.require("ace/range").Range)(u,0,u,a.length)}else t.break_line&&1==t.break_line&&(o=!0,r=!0);else t.break_line&&1==t.break_line&&(o=!0,r=!0);var d=a;if(t.exec&&"function"==typeof t.exec)t.exec(i,a,e("#gollum-editor-body"),s);else{var g=/([^\n]+)/gi;if(t.search&&"object"==typeof t.search&&(c("Replacing search Regex"),g=null,g=new RegExp(t.search),c(g)),c('repText is "'+d+'"'),t.replace&&"string"==typeof t.replace){c("Running replacement - using "+t.replace);var p=t.replace;d=(d=(d=escape(d)).replace(g,p)).replace(/\$[\d]/g,""),""===(d=unescape(d))&&(c("Search string is empty"),d=p.replace(/\$[\d]/g,""));var f=undefined;if(0==h){repPosition=p.indexOf("$1"),-1==repPosition&&(repPosition=Math.floor(p.length/2));var m=p.substring(0,repPosition),v=m.split("\n").length-1,b=repPosition;v>0&&(b-=m.lastIndexOf("\n")),f=[v,b+=l]}}t.append&&"string"==typeof t.append&&(d+=t.append),d&&e.GollumEditor.replaceSelection(d,o,r,s,f)}},isShown:function(){return e("#gollum-editor-function-bar").is(":visible")},refresh:function(){u.functionBar()&&(c("Refreshing function bar"),h.isValid()?(d.deactivate(),d.activate(),p&&p.setActiveHelp(h.getActiveLanguage())):(c("Language definition is invalid."),d.isShown()&&d.deactivate(),p.isShown()&&p.hide()))}},g={$_SELECTOR:null,evtChangeFormat:function(){var t=e(this).val();g.updateCommitMessage(t),h.setActiveLanguage(t)},updateCommitMessage:function(e){var t=document.getElementById("gollum-editor-message-field"),n=t.value;/^(?:created|updated)/i.test(n)&&(t.value=n.replace(/\([^\)]*\)$/,"("+e+")"))},init:function(e){c("Initializing format selector"),g.$_SELECTOR&&"object"==typeof g.$_SELECTOR&&g.$_SELECTOR.unbind("change"),g.$_SELECTOR=e,g.updateSelected(),g.$_SELECTOR.change(g.evtChangeFormat)},updateSelected:function(){var e=h.getActiveLanguage();g.$_SELECTOR.val(e)}},p={_ACTIVE_HELP:"",_LOADED_HELP_LANGS:[],_HELP:{},define:function(t,n){p.isValidHelpFormat(n)?(c("help is a valid format"),p._ACTIVE_HELP_LANG=t,p._LOADED_HELP_LANGS.push(t),p._HELP[t]=n,e("#function-help").length&&(e("#function-help").attr("disabled")&&e("#function-help").attr("disabled",!1),e("#function-help").unbind("click"),e("#function-help").click(p.evtHelpButtonClick),p.generateHelpMenuFor(t),e("#gollum-editor-help").length&&void 0!==e("#gollum-editor-help").attr("data-autodisplay")&&"true"===e("#gollum-editor-help").attr("data-autodisplay")&&p.show())):e("#function-help").length&&e("#function-help").attr("disabled",!0)},generateHelpMenuFor:function(t){if(!p._HELP[t])return c("Help is not defined for "+t.toString()),!1;var n=p._HELP[t];e("#gollum-editor-help-parent").html(""),e("#gollum-editor-help-list").html(""),e("#gollum-editor-help-content").html("");for(var i=0;i'+n[i].menuName+"");e("#gollum-editor-help-parent").append(o),0===i&&o.children("a").addClass("selected"),o.children("a").click(p.evtParentMenuClick)}p.generateSubMenu(n[0],0),e(e("#gollum-editor-help-list li a").get(0)).click()},generateSubMenu:function(t,n){e("#gollum-editor-help-list").html(""),e("#gollum-editor-help-content").html("");for(var i=0;i'+t.content[i].menuName+"");e("#gollum-editor-help-list").append(o),o.children("a").click(p.evtSubMenuClick)}},hide:function(){e.browser.msie?e("#gollum-editor-help").css("display","none"):e("#gollum-editor-help").animate({opacity:0},200,function(){e("#gollum-editor-help").animate({height:"hide"},200)})},show:function(){e.browser.msie?e("#gollum-editor-help").css("display","block"):e("#gollum-editor-help").animate({height:"show"},200,function(){e("#gollum-editor-help").animate({opacity:1},300)})},showHelpFor:function(t,n){var i=p._HELP[p._ACTIVE_HELP_LANG][t].content[n].data;e("#gollum-editor-help-content").html(i)},isLoadedFor:function(e){for(var t=0;t0?(e="\n\n"+e,s=2):""!=a&&(e="\n"+e,s=1)}if(1==n){var l=r.session.doc.getLine(i.end.row+1);i.end.column $1$2",break_line:!0},"function-h1":{search:/(.+)([\n]?)/g,replace:"# $1$2",break_line:!0,whole_line:!0},"function-h2":{search:/(.+)([\n]?)/g,replace:"## $1$2",break_line:!0,whole_line:!0},"function-h3":{search:/(.+)([\n]?)/g,replace:"### $1$2",break_line:!0,whole_line:!0},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="["+e.text+"]("+e.href+")"),t},exec:function(e,n){t("Insert Link",[{id:"text",name:"Link Text",type:"text",defaultValue:n},{id:"href",name:"URL",type:"text"}],this.replace)}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="!["+e.alt+"]("+e.url+")"),t},exec:function(e,n){t("Insert Image",[{id:"url",name:"Image Url",type:"text",defaultValue:n},{id:"alt",name:"Alt Text",type:"text"}],this.replace)}},"function-critic-accept":{exec:function(t,n){var i=n.replace(/\{\+\+(.*?)\+\+[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"$1").replace(/\{--(.*?)--[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"").replace(/\{~~(.*?)~>(.*?)~~\}/gm,"$2").replace(/\{\=\=(.*?)[ \t]*(\[(.*?)\])?[ \t]*\=\=\}{>>(.*?)<<\}/gm,"$1").replace(/\{>>(.*?)<<\}/gm,"");e.GollumEditor.replaceSelection(i)}},"function-critic-reject":{exec:function(t,n){var i=n.replace(/\{\+\+(.*?)\+\+[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"").replace(/\{--(.*?)--[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"$1").replace(/\{~~(.*?)~>(.*?)~~\}/gm,"$1").replace(/\{\=\=(.*?)[ \t]*(\[(.*?)\])?[ \t]*\=\=\}{>>(.*?)<<\}/gm,"$1").replace(/\{>>(.*?)<<\}/gm,"");e.GollumEditor.replaceSelection(i)}}}}(jQuery),function(e){var t={"function-bold":{replace:"*$1*$2"},"function-hr":undefined,"function-blockquote":{replace:"----\n$1$2\n----"},"function-h1":{replace:"= $1$2"},"function-h2":{replace:"== $1$2"},"function-h3":{replace:"=== $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t=e.href+"["+e.text+"]"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="image::"+e.url+"["+e.alt+"]"),t}}};e.GollumEditor.defineLanguage("asciidoc",e.constructLanguageDefinition(t));var n=[{menuName:"Text Formatting",content:[{menuName:"Headers",data:"

AsciiDoc headers can be written in two ways: with differing underlines or with different indentation using = (equals sign). AsciiDoc supports headings 1-4. The editor will automatically use the = notation. To create a level one header, prefix your line with one =. Level two headers are created with == and so on.

"},{menuName:"Bold / Italic",data:"

To display text as bold, wrap the text in * (asterisks). To display text as italic, wrap the text in _ (underscores). To create monospace text, wrap the text in ` (backtick)."},{menuName:"Scripts",data:"

Superscript and subscript is created the same way as other inline formats. To create superscript text, wrap your text in ^ (carats). To create subscript text, wrap your text in ~ (tildes).

"},{menuName:"Special Characters",data:"

AsciiDoc will automatically convert textual representations of commonly-used special characters. For example, (R) becomes ®, (C) becomes © and (TM) becomes ™.

"}]},{menuName:"Blocks",content:[{menuName:"Paragraphs",data:"

AsciiDoc allows paragraphs to have optional titles or icons to denote special sections. To make a normal paragraph, simply add a line between blocks and a new paragraph will start. If you want to title your paragraphs, adda line prefixed by . (full stop). An example paragraph with optional title is displayed below:

.Optional Title

This is my paragraph. It is two sentences long.

"},{menuName:"Source Blocks",data:"

To create source blocks (long blocks of code), follow the same syntax as above but with an extra line denoting the inline source and lines of four dashes (----) delimiting the source block.. An example of Python source is below:

.python.py
[source,python]
----
# i just wrote a comment in python
# and maybe one more
----

"},{menuName:"Comment Blocks",data:"

Comment blocks are useful if you want to keep notes for yourself inline but do not want them displayed to the public. To create a comment block, simply wrap the paragraph in dividers with four slashes (////). An example comment block is below:

////
My comment block is here now

It can be multiple paragraphs. Really.
////

"},{menuName:"Quote Blocks",data:"

Quote blocks work much like comment blocks — simply create dividers using four underscores (____) around your quote. An example quote block is displayed below:
____
This is my quote block. Quote something nice here, otherwise there is no point in quoting.
____

"}]},{menuName:"Macros",content:[{menuName:"Links",data:'

To create links to external pages, you can simply write the URI if you want the URI to link to itself. (i.e., http://github.com/ will automatically be parsed to http://github.com/. If you want different text to be displayed, simply append it to the end of the URI in between [ (brackets.) For example, http://github.com/[GitHub] will be parsed as GitHub, with the URI pointing to http://github.com.

'},{menuName:"Images",data:"

Images in AsciiDoc work much like hyperlinks, but image URLs are prefixed with image:. For example, to link to an image at images/icons/home.png, write image:images/icons/home.png. Alt text can be added by appending the text to the URI in [ (brackets).

"}]}];e.GollumEditor.defineHelp("asciidoc",n)}(jQuery),jQuery.GollumEditor.defineLanguage("bib",{}),function(e){var t={"function-italic":{replace:"//$1//$2"},"function-code":{replace:"{{{$1}}}$2"},"function-hr":{append:"\n\n----\n\n"},"function-blockquote":undefined,"function-ol":{line:function(e,t){return"# "+t+"\n"}},"function-h1":{replace:"== $1$2"},"function-h2":{replace:"=== $1$2"},"function-h3":{replace:"==== $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="[["+e.href+"|"+e.text+"]]"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="{{"+e.url,""!=e.alt&&(t+="|"+e.alt),t+="}}"),t}}};e.GollumEditor.defineLanguage("creole",e.constructLanguageDefinition(t))}(jQuery),function(e){var t={"gollum-helpers":{"find-header-line":function(e,t){if(t.match(/(^[=]+$)/)||t.match(/(^[-]+$)/)){var n=e-1,i=window.ace_editor.getSession().getLine(n);return n>=0&&!/^\s+$/.test(i)?[i,n]:null}return null}}};e.GollumEditor.defineLanguage("markdown",e.constructLanguageDefinition(t));var n=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

If you want to create a line break, end a line with two or more spaces, then hit Return/Enter.

"},{menuName:"Headers",data:"

Markdown supports two header formats. The wiki editor uses the “atx’-style headers. Simply prefix your header text with the number of # characters to specify heading depth. For example: # Header 1, ## Header 2 and ### Header 3 will be progressively smaller headers. You may end your headers with any number of hashes.

"},{menuName:"Blockquotes",data:"

Markdown creates blockquotes email-style by prefixing each line with the >. This looks best if you decide to hard-wrap text and prefix each line with a > character, but Markdown supports just putting > before your paragraph.

"},{menuName:"Lists",data:"

Markdown supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with *, + or -.

List items can contain multiple paragraphs, however each paragraph must be indented by at least 4 spaces or a tab."},{menuName:"Code Blocks",data:"

Markdown wraps code blocks in pre-formatted tags to preserve indentation in your code blocks. To create a code block, indent the entire block by at least 4 spaces or one tab. Markdown will strip the extra indentation you’ve added to the code block.

"},{menuName:"Horizontal Rules",data:"Horizontal rules are created by placing three or more hyphens, asterisks or underscores on a line by themselves. Spaces are allowed between the hyphens, asterisks or underscores."}]},{menuName:"Span Elements",content:[{menuName:"Links",data:"

Markdown has two types of links: inline and reference. For both types of links, the text you want to display to the user is placed in square brackets. For example, if you want your link to display the text “GitHub”, you write [GitHub].

To create an inline link, create a set of parentheses immediately after the brackets and write your URL within the parentheses. (e.g., [GitHub](http://github.com/)). Relative paths are allowed in inline links.

To create a reference link, use two sets of square brackets. [my internal link][internal-ref] will link to the internal reference internal-ref.

"},{menuName:"Emphasis",data:"

Asterisks (*) and underscores (_) are treated as emphasis and are wrapped with an <em> tag, which usually displays as italics in most browsers. Double asterisks (**) or double underscores (__) are treated as bold using the <strong> tag. To create italic or bold text, simply wrap your words in single/double asterisks/underscores. For example, **My double emphasis text** becomes My double emphasis text, and *My single emphasis text* becomes My single emphasis text.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in backticks (`). Markdown will turn `myFunction` into myFunction.

"},{menuName:"Images",data:"

Markdown image syntax looks a lot like the syntax for links; it is essentially the same syntax preceded by an exclamation point (!). For example, if you want to link to an image at http://github.com/unicorn.png with the alternate text My Unicorn, you would write ![My Unicorn](http://github.com/unicorn.png).

"}]},{menuName:"Miscellaneous",content:[{menuName:"Automatic Links",data:'

If you want to create a link that displays the actual URL, markdown allows you to quickly wrap the URL in < and > to do so. For example, the link http://github.com/ is easily produced by writing <http://github.com/>.

'},{menuName:"Escaping",data:"

If you want to use a special Markdown character in your document (such as displaying literal asterisks), you can escape the character with the backslash (\\). Markdown will ignore the character directly after a backslash."},{menuName:"Emoji",data:'

See the EmojiOne demo for all available emoji. To include one, wrap the emoji name in colons and use underscores instead of spaces (e.g. :heart: or :point_up:).'}]}];e.GollumEditor.defineHelp("markdown",n)}(jQuery),function(e){var t={"function-bold":{replace:"'''$1'''$2"},"function-italic":{replace:"''$1''$2"},"function-hr":{append:"\n---\n"},"function-code":{replace:"$1$2"},"function-ol":{link:function(e,t){return"# "+t+"\n"}},"function-blockquote":{replace:"

\n$1$2\n
"},"function-h1":{replace:"= $1$2 ="},"function-h2":{replace:"== $1$2 =="},"function-h3":{replace:"=== $1$2 ==="},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="["+e.href+" | "+e.text+"]"),t}}};e.GollumEditor.defineLanguage("mediawiki",e.constructLanguageDefinition(t));var n=[{menuName:"Text Formatting",content:[{menuName:"Headers",data:"

MediaWiki headers are written with different indentation using = Title = (equals sign). MediaWiki supports headings 1-6.

"},{menuName:"Bold / Italic",data:"

To display text as bold, wrap the text in '''. To display text as italic, wrap the text in ''. To create monospace text, wrap the text in <code></code>."},{menuName:"Special Characters",data:"

Use HTML special characters, e.g. © or

"}]},{menuName:"Blocks",content:[{menuName:"Paragraphs",data:"

MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag
.

"},{menuName:"Tables",data:'

Tables may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. Wikitable syntax overview:
 {|
table start
 |+
table caption, optional; only between table start and first table row
 |-
table row, optional on first row -- wiki engine assumes the first row
 !
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
 |
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
 |}
table end

'}]},{menuName:"Macros",content:[{menuName:"Links",data:"

To create links to external pages, use single brackets, e.g. [https://mediawiki.org MediaWiki]. Internal links use double brackets: [[Main Page]]. To define the link text, use [[Main Page | this is displayed]] (note: the order of the URL/Page Name and the link text is reversed compared to Gollum pages in other markups).

"},{menuName:"Images",data:"

Use Gollum internal links, e.g. [[sauron.jpg]], to insert images."}]}];e.GollumEditor.defineHelp("mediawiki",n)}(jQuery),function(e){var t={"function-bold":{replace:"*$1*$2"},"function-italic":{replace:"/$1/$2"},"function-code":{replace:"=$1=$2"},"function-hr":undefined,"function-blockquote":{replace:"#+BEGIN_QUOTE\n$1$2\n#+END_QUOTE"},"function-h1":{replace:"* $1$2"},"function-h2":{replace:"** $1$2"},"function-h3":{replace:"*** $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href?t="[["+e.href+"]["+e.text+"]]":e.href&&(t="[["+e.href+"]]"),t}},"function-image":{replace:function(e){var t="";return e.url&&(t="[["+e.url+"]]"),t}}};e.GollumEditor.defineLanguage("org",e.constructLanguageDefinition(t));var n=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

"},{menuName:"Headers",data:"

Simply prefix your header text with the number of * characters to specify heading depth. For example: * Header 1, ** Header 2 and *** Header 3 will be progressively smaller headers.

"},{menuName:"Blockquotes",data:"

To create a blockquote, simple embed the text between #+BEGIN_QUOTE and #+END_QUOTE. An example quote block is displayed below:
#+BEGIN_QUOTE
This is my quote block. Quote something nice here, otherwise there is no point in quoting.
#+END_QUOTE

"},{menuName:"Lists",data:"

Org-mode supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with + or -.

"},{menuName:"Code Blocks",data:"

Code Blocks are similar to blockquote, except that #+BEGIN_EXAMPLE and #+END_EXAMPLE are used.

"},{menuName:"Tables",data:"

Org-mode supports simple tables (tables with equal number of cells in each row). To create a simple table, just separate the contents of each cell with a | character. For example,

|one|two|three|
|four|five|six|


will appear as a table with two rows and three columns. Additionally,

|one|two|three|
|---+---+-----|
|four|five|six|


will also appear as a table, but the first row will be interpreted as a header row and the <th> tag will be used to render it.

"}]},{menuName:"Span Elements",content:[{menuName:"Links",data:'

To create links to external pages, you need to enclose the URI in double square brackets. (i.e., [[http://github.com/]] will automatically be parsed to http://github.com/)If you want to add text, to be displayed to the user, you write the URI and the text next to each other, both enclosed in square brackets and both of them together enclosed in another pair of square brackets. For example, if you want your link to display the text “GitHub”, you write [[http://github.com][GitHub]].

'},{menuName:"Emphasis",data:"

Forward slashes (/) are treated as emphasis and are wrapped with an <i> tag. Asterisks (*) are treated as bold using the <b> tag.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in equal signs (=). Orgmode will turn =myFunction= into myFunction.

"},{menuName:"Images",data:"

Org-mode image syntax is exactly same as the syntax that you would use for a URI to link to itself. The image URI is enclosed in double square brackets. Alt text on images is not currently supported by Gollum's Org-mode parser.

"}]}];e.GollumEditor.defineHelp("org",n)}(jQuery),jQuery.GollumEditor.defineLanguage("txt",{}),function(e){var t={"function-bold":{replace:"B<$1>$2"},"function-italic":{replace:"I<$1>$2"},"function-hr":undefined,"function-code":{replace:"C<$1>$2"},"function-h1":{replace:"=head1 $1$2"},"function-h2":{replace:"=head2 $1$2"},"function-h3":{replace:"=head3 $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="L<"+e.text+"|"+e.href+">"),t}},"function-image":undefined,"function-ul":undefined,"function-ol":undefined,"function-blockquote":undefined};e.GollumEditor.defineLanguage("pod",e.constructLanguageDefinition(t));var n=[{menuName:"Command Paragraphs",content:[{menuName:"Headings",data:"

All command paragraphs start with = (equals sign).

To create headings 1 through 4, begin your command paragraph with =headN, where N is the number of the heading 1 through 4. For example, to make a first-order heading (the largest possible,) write =head1, then on the next line begin your paragraph that you want under the heading.

"},{menuName:"Beginning & Ending",data:"

Perl pod blocks should begin with =pod and end with =cut, signifying to Pod parsers that the pod block has begun and ended. These command paragraphs only signal the beginning and end of a pod block.

"},{menuName:"Other Formats",data:"

pod also allows blocks in other formats, such as HTML or plain text. To create one of these blocks, use the =format SYNTAX command paragraph, where SYNTAX is the syntax of the block (e.g. html or txt). At the end of your block, use the =end SYNTAX block.

"},{menuName:"Encoding",data:"

If you are having encoding troubles, use the =encoding ENC_TYPE command, where ENC_TYPE is the encoding type (e.g. utf8, koi8-r). This will affect the entire document, not just the block below the command.

"}]},{menuName:"Formatting",content:[{menuName:"Text",data:"

Formatting text as bold, italic or code works in the S<word> syntax, where S is an abbreviation for the type of text you are trying to create. For example, B<my bold text> becomes my bold text, I<italic text> becomes italic text and C<code here()> becomes code here().

"},{menuName:"Hyperlinks",data:"

Writing hyperlinks in pod is much like formatting text, using the same S<> syntax. Instead of B, I or C, use L to begin a hyperlink.

pod allows you to hyperlink to a man page, a Perl documentation page, or another web page. To link to a man or Perl documentation page, simply include the page name in the link (e.g. L<perl(1)> or L<Net::Ping>). If you want to link to a web page, separate the URL and the link text with a pipe (e.g. to link to github.com, write L<GitHub|http://github.com/>)."}]}];e.GollumEditor.defineHelp("pod",n)}(jQuery),function(e){var t={"function-code":undefined,"function-h1":undefined,"function-h2":undefined,"function-h3":undefined,"function-link":undefined,"function-image":undefined,"function-hr":undefined,"function-blockquote":undefined};e.GollumEditor.defineLanguage("rdoc",e.constructLanguageDefinition(t))}(jQuery),function(e){var t=function(t,n,i){var o="";o=t.length?t:"Title here",adornment=i.repeat(o.length),o=o+"\n"+adornment+"\n",e.GollumEditor.replaceSelection(o,!1,!1,n)},n={"function-bold":{replace:"**$1**$2"},"function-italic":{replace:"*$1*$2"},"function-code":{replace:"``$1``$2"},"function-hr":{append:"\n\n----\n\n"},"function-blockquote":{exec:function(t,n){for(var i=" ",o=n.split("\n"),r=0;r`_"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t=".. image:: "+e.url+"\n :alt: "+e.alt),t}},"gollum-helpers":{"find-header-line":function(e){var t=e-1,n=window.ace_editor.getSession().getLine(t);return t>=0&&!/^\s+$/.test(n)?[n,t]:null}}};e.GollumEditor.defineLanguage("rst",e.constructLanguageDefinition(n));var i=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

"},{menuName:"Headers",data:"

Rest uses overline/underline adornments to indicate headers. To create a header, underline your header text with adornment characters such as the =, ~, +, ^ characters. Make sure that the adornment is of the same length (or longer) as the header text. Use a different adornment character to specify a different heading depth.

"},{menuName:"Blockquotes",data:"

Rest creates blockquotes using indentation. This looks best if you use four spaces per level of indentation.

"},{menuName:"Lists",data:"

Rest supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number, or use # for auto enumeration. To create an unordered list, you can prefix each line with *, + or -.

"},{menuName:"Code Blocks",data:"

Rest wraps code blocks in pre-formatted tags to preserve indentation in your code blocks. To create a code block, indent the entire block by at least 4 spaces or one tab. Rest will strip the extra indentation you’ve added to the code block.

"},{menuName:"Horizontal Rules",data:"

Horizontal rules are created by placing four or more hyphens, asterisks or underscores on a line by themselves.

"}]},{menuName:"Span Elements",content:[{menuName:"Links",data:"

To create an inline link, create a set of backticks, include the link title first, followed by the url in angled brackets (e.g., `Python `_).

"},{menuName:"Emphasis", +data:"

Asterisks (*) are treated as emphasis and are wrapped with an <em> tag, which usually displays as italics in most browsers. Double asterisks (**) are treated as bold using the <strong> tag. To create italic or bold text, simply wrap your words in single/double asterisks. For example, **My double emphasis text** becomes My double emphasis text, and *My single emphasis text* becomes My single emphasis text.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in backticks (`). Rest will turn `myFunction` into myFunction.

"},{menuName:"Images",data:'

Rest image syntax is two dots, followed by a space, the word "image", two colons, another space, and the url: .. image:: http://image.com/image.png.

'}]},{menuName:"Miscellaneous",content:[{menuName:"Escaping",data:"

If you want to use a special Rest character in your document (such as displaying literal asterisks), you can escape the character with the backslash (\\). Rest will ignore the character directly after a backslash."}]}];e.GollumEditor.defineHelp("rst",i)}(jQuery),function(e){var t={"function-hr":undefined,"function-code":{replace:"bc. $1$2",whole_line:!0},"function-ol":{line:function(e,t){return"# "+t+"\n"}},"function-blockquote":{replace:"bq. $1$2"},"function-h1":{replace:"h1. $1$2"},"function-h2":{replace:"h2. $1$2"},"function-h3":{replace:"h3. $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t='"'+e.text+'":'+e.href),t}},"function-image":{replace:function(e){var t="";if(e.url){t="!"+e.url;return""!=e.alt&&(t+="("+e.alt+")"),t+="!"}}}};e.GollumEditor.defineLanguage("textile",e.constructLanguageDefinition(t));var n=[{menuName:"Phrase Modifiers",content:[{menuName:"Emphasis / Strength",data:"

To place emphasis or strength on inline text, simply place _ (underscores) around the text for emphasis or * (asterisks) around the text for strength. In most browsers, _mytext_ will appear as italics and *mytext* will appear as bold.

To force italics or bold, simply double the characters: __mytext__ will appear italic and **mytext** will appear as bold text.

"},{menuName:"Citations / Editing",data:'

To display citations, wrap your text in ?? (two question marks).

To display edit marks such as deleted text (strikethrough) or inserted text (underlined text), wrap your text in - (minuses) or + (pluses). For example -mytext- will be rendered as mytext and +mytext+ will be rendered as mytext

'},{menuName:"Superscript / Subscript",data:"

To display superscript, wrap your text in ^ (carets). To display subscript, wrap your text in ~ (tildes).

"},{menuName:"Code",data:"

To display monospace code, wrap your text in @ (at symbol). For example, @mytext@ will appear as mytext.

"},{menuName:"Acronyms",data:'

To create an acronym, suffix the acronym with the definition in parentheses. For example, JS(JavaScript) will be displayed as JS.

'}]},{menuName:"Block Modifiers",content:[{menuName:"Headings",data:"

To display a heading in Textile, prefix your line of text with hn., where n equals the heading size you want (1 is largest, 6 is smallest).

"},{menuName:"Paragraphs / Quotes",data:"

To create a new paragraph, prefix your first line of a block of text with p..

To create a blockquote, make sure at least one blank line exists between your text and any surrounding text, and then prefix that block with bq. If you need to extend a blockquote to more than one text block, write bq.. (note the two periods) and prefix your next normal paragraph with p.

"},{menuName:"Code Blocks",data:"

Code blocks in textile are simply prefixed like any other block. To create a code block, place the beginning of the block on a separate line and prefix it with bc.

To display a preformatted block, prefix the block with pre.

"},{menuName:"Lists",data:"

To create ordered lists, prefix each line with #. To create unordered lists, prefix each line with *.

"}]},{menuName:"Links / Images",content:[{menuName:"Links",data:'

To display a link, put the text you want to display in quotes, then a colon (:), then the URL after the colon. For example "GitHub":http://github.com/ will appear as GitHub.

'},{menuName:"Images",data:"

To display an image, simply wrap the image’s URL in ! (exclamation points). If you want to link the image to a URL, you can blend the image and link syntax: place your image URL in the exclamation points and suffix that with a colon and your URL. For example, an image at http://myurl/image.png that should link to http://myurl/ should be written as !http://myurl/image.png!:http://myurl/.

"}]}];e.GollumEditor.defineHelp("textile",n)}(jQuery); \ No newline at end of file diff --git a/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js.gz b/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js.gz new file mode 100644 index 00000000..75e47ed1 Binary files /dev/null and b/lib/gollum/public/assets/editor-dc74774f8906c154167c88ecda9f96b554b6f8a35d13065b4588e33e702c157f.js.gz differ diff --git a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js b/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js deleted file mode 100644 index 9cc89f9d..00000000 --- a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js +++ /dev/null @@ -1,24 +0,0 @@ -(function(){function e(e){var t=n;e&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(r.original=t.define,t.define=r,t.define.packaged=!0),t.require&&t.require.packaged||(l.original=t.require,t.require=l,t.require.packaged=!0)}var t="ace",n=function(){return this}();if(!n&&"undefined"!=typeof window&&(n=window),t||"undefined"==typeof requirejs){var r=function(e,t,n){"string"==typeof e?(2==arguments.length&&(n=t),r.modules[e]||(r.payloads[e]=n,r.modules[e]=null)):r.original?r.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};r.modules={},r.payloads={};var s=function(e,t,n){if("string"==typeof t){var i=c(e,t);if(i!=undefined)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],r=0,s=t.length;ri.index&&this.lastIndex--}return i},c||(RegExp.prototype.test=function(e){var t=a.exec.call(this,e);return t&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function e(){}function t(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function r(e){return(e=+e)!=e?e=0:0!==e&&e!==1/0&&e!==-1/0&&(e=(0>>0;if("[object Function]"!=g(e))throw new TypeError;for(;++r>>0,r=Array(o),s=t;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=[],a=t;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var l=0;l>>0,r=t;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0,r=t;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");for(var s=0;s>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!o&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var r,s=0;if(2<=arguments.length)r=t;else for(;;){if(s in i){r=i[s++];break}if(++s>=o)throw new TypeError("reduce of empty array with no initial value")}for(;s>>0;if("[object Function]"!=g(e))throw new TypeError(e+" is not a function");if(!o&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var r,s=o-1;if(2<=arguments.length)r=t;else for(;;){if(s in i){r=i[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}for(;s in this&&(r=e.call(void 0,r,i[s],s,n)),s--;);return r}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e,t){var n=b&&"[object String]"==g(this)?this.split(""):O(this),i=n.length>>>0;if(!i)return-1;var o=0;for(1>>0;if(!i)return-1;var o=i-1;for(1 ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){return 0==this.compare(e,t)},this.compareRange=function(e){var t,n=e.end,i=e.start;return 1==(t=this.compare(n.row,n.column))?1==(t=this.compare(i.row,i.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(i.row,i.column))?-1:1==t?42:0},this.comparePoint=function(e){return this.compare(e.row,e.column)},this.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},this.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},this.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},this.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},this.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},this.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.rowt)var i={row:t+1,column:0};else if(this.start.row>=1)&&(e+=e);return n};var n=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(e,t){"use strict";var H=e("../lib/event"),N=e("../lib/useragent"),P=e("../lib/dom"),D=e("../lib/lang"),W=e("../clipboard"),z=N.isChrome<18,K=N.isIE,V=63n+1?a.length:o,o+=r.length+1,r=r+"\n"+a}r.length>U&&(i=v.length&&e.value===v&&v&&e.selectionEnd!==w},s=function(){h||(c?c=!1:r(d)&&(u.selectAll(),x()))},a=null;this.setInputHandler=function(e){a=e};var k=!(this.getInputHandler=function(){return a}),C=function(e,t){if(k&&(k=!1),g)return x(),e&&u.onPaste(e),g=!1,"";for(var n=d.selectionStart,i=d.selectionEnd,o=b,r=v.length-w,s=e,a=e.length-n,l=e.length-i,c=0;0b-1&&v[v.length-c]==e[e.length-c];)c++,r--;a-=c-1,l-=c-1;var h=s.length-c+1;return h<0&&(o=-h,h=0),s=s.slice(0,h),t||a!=s.length||o||r||l?(p=!0,s&&!o&&!r&&!a&&!l||m?u.onTextInput(s):u.onTextInput(s,{extendLeft:o,extendRight:r,restoreStart:a,restoreEnd:l}),p=!1,v=e,b=n,w=i,s):""},S=function(e){if(h)return T();if(e&&e.inputType){if("historyUndo"==e.inputType)return u.execCommand("undo");if("historyRedo"==e.inputType)return u.execCommand("redo")}var t=d.value,n=C(t,!0);(t.length>U+100||X.test(n))&&x()},$=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!z){var o=K||n?"Text":"text/plain";try{return t?!1!==i.setData(o,t):i.getData(o)}catch(e){if(!n)return $(e,t,!0)}}},_=function(e,t){var n=u.getCopyText();if(!n)return H.preventDefault(e);$(e,n)?(q&&(x(n),c=n,setTimeout(function(){c=!1},10)),t?u.onCut():u.onCopy(),H.preventDefault(e)):(c=!0,d.value=n,d.select(),setTimeout(function(){c=!1,x(),t?u.onCut():u.onCopy()}))},A=function(e){_(e,!0)},L=function(e){_(e,!1)},M=function(e){var t=$(e);W.pasteCancelled()||("string"==typeof t?(t&&u.onPaste(t,e),N.isIE&&setTimeout(x),H.preventDefault(e)):(d.value="",g=!0))};H.addCommandKeyListener(d,u.onCommandKey.bind(u)),H.addListener(d,"select",s),H.addListener(d,"input",S),H.addListener(d,"cut",A),H.addListener(d,"copy",L),H.addListener(d,"paste",M),(!("oncut"in d)||!("oncopy"in d)||!("onpaste"in d))&&H.addListener(e,"keydown",function(e){if((!N.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:L(e);break;case 86:M(e);break;case 88:A(e)}});var R=function(){if(!h&&u.onCompositionStart&&!u.$readOnly&&(h={},!m)){setTimeout(T,0),u.on("mousedown",t);var e=u.getSelectionRange();e.end.row=e.start.row,e.end.column=e.start.column,h.markerRange=e,h.selectionStart=b,u.onCompositionStart(h),h.useTextareaForIME?(d.value="",v="",w=b=0):(d.msGetInputContext&&(h.context=d.msGetInputContext()),d.getInputContext&&(h.context=d.getInputContext()))}},T=function(){if(h&&u.onCompositionUpdate&&!u.$readOnly){if(m)return t();if(h.useTextareaForIME)u.onCompositionUpdate(d.value);else{var e=d.value;C(e),h.markerRange&&(h.context&&(h.markerRange.start.column=h.selectionStart=h.context.compositionStartOffset),h.markerRange.end.column=h.markerRange.start.column+w-h.selectionStart)}}},E=function(e){u.onCompositionEnd&&!u.$readOnly&&(h=!1,u.onCompositionEnd(),u.off("mousedown",t),e&&S())},O=D.delayedCall(T,50).schedule.bind(null,null);H.addListener(d,"compositionstart",R),H.addListener(d,"compositionupdate",T),H.addListener(d,"keyup",n),H.addListener(d,"keydown",O),H.addListener(d,"compositionend",E),this.getElement=function(){return d},this.setCommandMode=function(e){m=e,d.readOnly=!1},this.setReadOnly=function(e){m||(d.readOnly=e)},this.setCopyWithEmptySelection=function(){},this.onContextMenu=function(e){k=!0,x(),u._emit("nativecontextmenu",{target:u,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,t){f||(f=d.style.cssText),d.style.cssText=(t?"z-index:100000;":"")+(N.isIE?"opacity:0.1;":"")+"text-indent: -"+(b+w)*u.renderer.characterWidth*.5+"px;";var n=u.container.getBoundingClientRect(),i=P.computedStyle(u.container),o=n.top+(parseInt(i.borderTopWidth)||0),r=n.left+(parseInt(n.borderLeftWidth)||0),s=n.bottom-o-d.clientHeight-2,a=function(e){P.translate(d,e.clientX-r-2,Math.min(e.clientY-o-2,s))};a(e),"mousedown"==e.type&&(u.renderer.$isMousePressed=!0,clearTimeout(I),N.isWin&&H.capture(u.container,a,l))},this.onContextMenuClose=l;var I,F=function(e){u.textInput.onContextMenu(e),l()};H.addListener(d,"mouseup",F),H.addListener(d,"mousedown",function(e){e.preventDefault(),l()}),H.addListener(u.renderer.scroller,"contextmenu",F),H.addListener(d,"contextmenu",F),q&&i(e,u,d)};t.TextInput=n}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t){"use strict";function n(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function i(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}function l(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent"),o=0,c=550;(function(){this.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var i=this.editor,o=e.getButton();return 0!==o?((i.getSelectionRange().isEmpty()||1==o)&&i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,1this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(t);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,r=o?e.wheelX/o:n.vx,s=o?e.wheelY/o:n.vy;ou.session.documentToScreenRow(i.row,i.column))return a()}if(h!=t)if(h=t.text.join("
"),g.setHtml(h),g.show(),u._signal("showGutterTooltip",g),u.on("mousewheel",a),s.$tooltipFollowsMouse)l(c);else{var o=c.domEvent.target.getBoundingClientRect(),r=g.getElement().style;r.left=o.right+"px",r.top=o.bottom+"px"}}function a(){i&&(i=clearTimeout(i)),h&&(g.hide(),h=null,u._signal("hideGutterTooltip",g),u.removeEventListener("mousewheel",a))}function l(e){g.setPosition(e.x,e.y)}var i,c,h,u=s.editor,d=u.renderer.$gutterLayer,g=new o(u.container);s.editor.setDefaultHandler("guttermousedown",function(e){if(u.isFocused()&&0==e.getButton()&&"foldWidgets"!=d.getRegion(e)){var t=e.getDocumentPosition().row,n=u.session.selection;if(e.getShiftKey())n.selectTo(t,0);else{if(2==e.domEvent.detail)return u.selectAll(),e.preventDefault();s.$clickSelection=u.selection.getLineRange(t)}return s.setState("selectByLines"),s.captureMouse(e),e.preventDefault()}}),s.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(r.hasCssClass(t,"ace_fold-widget"))return a();h&&s.$tooltipFollowsMouse&&l(e),c=e,i||(i=setTimeout(function(){i=null,c&&!s.isMousePressed?n():a()},50))}),p.addListener(u.renderer.$gutter,"mouseout",function(){c=null,h&&!i&&(i=setTimeout(function(){i=null,a()},50))}),u.on("changeSession",a)}function o(e){s.call(this,e)}var r=e("../lib/dom"),i=e("../lib/oop"),p=e("../lib/event"),s=e("../tooltip").Tooltip;i.inherits(o,s),function(){this.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();n<(e+=15)+o&&(e-=e+o-n),i<(t+=15)+r&&(t-=20+r),s.prototype.setPosition.call(this,e,t)}}.call(o.prototype),t.GutterHandler=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";var n=e("../lib/event"),i=e("../lib/useragent"),o=t.MouseEvent=function(e,t){this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return n.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=i.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(o.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t){"use strict";function n(t){function n(e,t){var n=Date.now(),i=!t||e.row!=t.row,o=!t||e.column!=t.column;if(!y||i||o)g.moveCursorToPosition(e),y=n,x={x:p,y:f};else{var r=$(x.x,x.y,p,f);Tthis.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=L.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(){var e=this.editor.container;L.isIE&&"dragReady"==this.state&&(3<$(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&e.dragDrop());"dragWait"===this.state&&(0<$(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton();if(1===(e.domEvent.detail||1)&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var o=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in o&&(o.unselectable="on"),t.getDragDelay()){if(L.isWebKit)this.cancelDrag=!0,t.container.draggable=!0;this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(n.prototype),t.DragdropHandler=n}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/dom"],function(e,t){"use strict";var E=e("./mouse_event").MouseEvent,a=e("../lib/dom");t.addTouchListeners=function(e,v){function i(){var n=window.navigator&&window.navigator.clipboard,i=!1,o=function(){var e=v.getCopyText(),t=v.session.getUndoManager().hasUndo();s.replaceChild(a.buildDom(i?["span",!e&&["span",{"class":"ace_mobile-button",action:"selectall"},"Select All"],e&&["span",{"class":"ace_mobile-button",action:"copy"},"Copy"],e&&["span",{"class":"ace_mobile-button",action:"cut"},"Cut"],n&&["span",{"class":"ace_mobile-button",action:"paste"},"Paste"],t&&["span",{"class":"ace_mobile-button",action:"undo"},"Undo"],["span",{"class":"ace_mobile-button",action:"find"},"Find"],["span",{"class":"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),s.firstChild)},t=function(e){var t=e.target.getAttribute("action");if("more"==t||!i)return i=!i,o();"paste"==t?n.readText().then(function(e){v.execCommand(t,e)}):t&&("cut"!=t&&"copy"!=t||(n?n.writeText(v.getCopyText()):document.execCommand("copy")),v.execCommand(t)),s.firstChild.style.display="none",i=!1,"openCommandPallete"!=t&&v.focus()};s=a.buildDom(["div",{"class":"ace_mobile-menu",ontouchstart:function(e){A="menu",e.stopPropagation(),e.preventDefault(),v.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),t(e)},onclick:t},["span"],["span",{"class":"ace_mobile-button",action:"more"},"..."]],v.container)}function n(){s||i();var e=v.selection.cursor,t=v.renderer.textToScreenCoordinates(e.row,e.column),n=v.container.getBoundingClientRect();s.style.top=t.pageY-n.top-3+"px",s.style.right="10px",s.style.display="",s.firstChild.style.display="none",v.on("input",o)}function o(){s&&(s.style.display="none"),v.off("input",o)}function b(){S=null,clearTimeout(S);var e=v.selection.getRange(),t=e.contains($.row,$.column);!e.isEmpty()&&t||(v.selection.moveToPosition($),v.selection.selectWord()),A="wait",n()}function w(){S=null,clearTimeout(S),v.selection.moveToPosition($);var e=2<=M?v.selection.getLineRange($.row):v.session.getBracketRange($);e&&!e.isEmpty()?v.selection.setRange(e):v.selection.selectWord(),A="wait"}function t(){L+=60,r=setInterval(function(){L--<=0&&(clearInterval(r),r=null),Math.abs(R)<.01&&(R=0),Math.abs(T)<.01&&(T=0),L<20&&(R*=.9),L<20&&(T*=.9);var e=v.session.getScrollTop();v.renderer.scrollBy(10*R,10*T),e==v.session.getScrollTop()&&(L=0)},10)}var y,x,k,C,S,r,$,_,s,A="scroll",L=0,M=0,R=0,T=0;e.addEventListener("contextmenu",function(){_&&v.textInput.getElement().focus()}),e.addEventListener("touchstart",function(e){var t=e.touches;if(S||1n&&(k=-1),y=e.clientX=s,x=e.clientY=a,R=T=0;var l=new E(e,v);if($=l.getDocumentPosition(),o-k<500&&1==t.length&&!L)M++,e.preventDefault(),e.button=0,w();else{M=0;var c=v.selection.cursor,h=v.selection.isEmpty()?c:v.selection.anchor,u=v.renderer.$cursorLayer.getPixelPosition(c,!0),d=v.renderer.$cursorLayer.getPixelPosition(h,!0),g=v.renderer.scroller.getBoundingClientRect(),p=function(e,t){return(e/=i)*e+(t=t/n-.75)*t};if(e.clientX=e){for(i=l+1;i=e;)i++;for(o=l,r=i-1;o=t.length||(o=n[i-1])!=S&&o!=$||(r=t[i+1])!=S&&r!=$?_:(w&&(r=$),r==o?r:_);case E:return(o=0>8;return 0==n?191M&&t[a]t.row||e.row==t.row&&e.column>t.column},this.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?a.fromPoints(t,t):this.isBackwards()?a.fromPoints(t,e):a.fromPoints(e,t)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(e,t,n,i){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")},this.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},this.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},this.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},this.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},this.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(e,t){if(void 0===t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},this.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new a(i,0,n,this.session.getLine(n).length):new a(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},this.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)0=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(ec){var m=e.substring(c,f-p.length);u.type==d?u.value+=m:(u.type&&l.push(u),u={type:d,value:m})}for(var v=0;vb){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(n!==undefined)return n;for(n=0;0e.length&&(y=e.length)}),l==Infinity&&(l=y,a=s=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),t(a?b:v)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(g=new f(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var c,h;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(o.start))){var u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+p;c=new m(u,d,u,d+o.start.length);break}a=g.stepBackward()}var g;for(a=(g=new f(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var p;if(-1!=(p=a.value.indexOf(o.end))){u=g.getCurrentTokenRow(),d=g.getCurrentTokenColumn()+p;h=new m(u,d,u,d+o.end.length);break}a=g.stepForward()}h&&t.remove(h),c&&(t.remove(c),r=c.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.checkOutdent=function(){return!1},this.autoOutdent=function(){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(){return null},this.createModeDelegates=function(e){for(var i in this.$embeds=[],this.$modes={},e)if(e[i]){var t=e[i],n=t.prototype.$id,o=s.$modes[n];o||(s.$modes[n]=o=new t),s.$modes[i]||(s.$modes[i]=o),this.$embeds.push(i),this.$modes[i]=o}var r=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(i=0;ithis.row)){var t=n(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},this.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(n.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t){"use strict";var n=e("./lib/oop"),i=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,h=e("./range").Range,r=e("./anchor").Anchor,s=function(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){n.implement(this,o),this.setValue=function(e){var t=this.getLength()-1;this.remove(new h(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new r(this,e,t)},0==="aaa".split(/a/).length?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{(t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},this.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},this.clippedPos=function(e,t){var n=this.getLength();e===undefined?e=n:e<0?e=0:n<=e&&(e=n-1,t=undefined);var i=this.getLine(e);return t==undefined&&(t=i.length),{row:e,column:t=Math.min(Math.max(t,0),i.length)}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){var n=0;(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens}}).call(o.prototype),t.BackgroundTokenizer=o}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t){"use strict";var c=e("./lib/lang"),h=(e("./lib/oop"),e("./range").Range),n=function(e,t,n){this.setRegexp(e),this.clazz=t,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,n,i){if(this.regExp)for(var o=i.firstRow,r=i.lastRow,s=o;s<=r;s++){var a=this.cache[s];null==a&&((a=c.getMatchOffsets(n.getLine(s),this.regExp)).length>this.MAX_RANGES&&(a=a.slice(0,this.MAX_RANGES)),a=a.map(function(e){return new h(s,e.offset,s,e.offset+e.length)}),this.cache[s]=a.length?a:"");for(var l=a.length;l--;)t.drawSingleLineMarker(e,a[l].toScreenRange(n),this.clazz,i)}}}).call(n.prototype),t.SearchHighlight=n}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t){"use strict";function c(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}var i=e("../range").Range;(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(e){if(e.sameRow){if(e.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort(function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)}),0=this.start.row&&e<=this.end.row},this.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;lt||n[n.length-1].start.row=i)break}if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;si)break;if(h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column){if(h.end.column==t.column&&this.$bias<0)continue;h.end.column==t.column&&0h.start.column&&h.end.column==r[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l}}else for(l=i-o,c=t.column-n.column;so)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>o&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>o&&(h.start.row+=l)}if(0!=l&&s=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0);i=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;ol)break}while(o&&s.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return a.end.row=i.getCurrentTokenRow(),a.end.column=i.getCurrentTokenColumn()+o.value.length-2,a}},this.foldAll=function(e,t,n){n==undefined&&(n=1e5);var i=this.foldWidgets;if(i){t=t||this.getLength();for(var o=e=e||0;o=e){o=r.end.row;try{var s=this.addFold("...",r);s&&(s.collapseChildren=n)}catch(a){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){"manual"==(this.$foldStyle=e)&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};for(var i,o=e-1;0<=o;){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,n)){var i=t.target||t.srcElement;i&&/ace_fold-widget/.test(i.className)&&(i.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1))&&s.isEqual(r.range))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var t=this.$toggleFoldWidget(e,{});if(!t){var n=this.getParentFoldRangeData(e,!0);if(t=n.range||n.firstRange){e=t.start.row;var i=this.getFoldAt(e,this.getLine(e).length,1);i?this.removeFold(i):this.addFold("...",t)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}var h=e("../range").Range,f=e("./fold_line").FoldLine,m=e("./fold").Fold,u=e("../token_iterator").TokenIterator;t.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t){"use strict";function n(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,o=n.charAt(e.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=n.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),i=!1),!r)return null;if(r[1]){if(!(s=this.$findClosingBracket(r[1],e)))return null;t=a.fromPoints(e,s),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{var s;if(!(s=this.$findOpeningBracket(r[2],e)))return null;t=a.fromPoints(s,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new u(this,t.row,t.column),s=r.getCurrentToken();if(s||(s=r.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var a=t.column-r.getCurrentTokenColumn()-2,l=s.value;;){for(;0<=a;){var c=l.charAt(a);if(c==i){if(0==(o-=1))return{row:r.getCurrentTokenRow(),column:a+r.getCurrentTokenColumn()}}else c==e&&(o+=1);a-=1}for(;(s=r.stepBackward())&&!n.test(s.type););if(null==s)break;a=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new u(this,t.row,t.column),s=r.getCurrentToken();if(s||(s=r.stepForward()),s){n||(n=new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var a=t.column-r.getCurrentTokenColumn();;){for(var l=s.value,c=l.length;a>1,r=e[o];if(rt&&(t=e.screenWidth)}),this.lineWidgetWidth=t},this.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:Infinity,a=t.length,l=0;li&&(i=n[l])}this.screenWidth=i}},this.getLine=function(e){return this.doc.getLine(e)},this.getLines=function(e,t){return this.doc.getLines(e,t)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},this.insert=function(e,t){return this.doc.insert(e,t)},this.remove=function(e){return this.doc.remove(e)},this.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},this.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},this.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(r.start.column+=c),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=c)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var a=e.start,l=r.start,c=(s=l.row-a.row,l.column-a.column);this.addFolds(o.map(function(e){return(e=e.clone()).start.row==a.row&&(e.start.column+=c),e.end.row==a.row&&(e.end.column+=c),e.start.row+=s,e.end.row+=s,e}))}return r},this.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;sthis.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var r=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),a=0==n?this.doc.getLines(e,t -):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,a),s.length&&this.addFolds(s),i},this.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},this.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},this.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},this.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},this.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},this.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)t=e=0;else{var n=this.doc.getLength();n<=e?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},this.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&1=o.row&&f.shiftRow(-a)}s=r}else{var d=Array(a);d.unshift(r,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);c=this.$foldData,h=0;if(f=this.getFoldLine(r)){var p=f.range.compareInside(i.row,i.column);0==p?(f=f.split(i.row,i.column))&&(f.shiftRow(a),f.addRemoveChars(s,0,o.column-i.column)):-1==p&&(f.addRemoveChars(r,0,o.column-i.column),f.shiftRow(a)),h=c.indexOf(f)+1}for(;h=r&&f.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(f=this.getFoldLine(r))&&f.addRemoveChars(r,i.column,a);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},this.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(e,t){var s,n,a=this.doc.getAllLines(),i=this.getTabSize(),o=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(n=this.getFoldLine(l,n))?(s=[],n.walk(function(e,t,n,i){var o;if(null!=e){(o=this.$getDisplayTokens(e,s.length))[0]=m;for(var r=1;r=w&&o[g]>=w)t(g);else if(o[g]!=m&&o[g]!=v){for(var p=Math.max(g-(e-(e>>2)),a-1);pc[u-1]}else d=!u;for(var g=this.getLength()-1,p=this.getNextFoldLine(r),f=p?p.start.row:Infinity;a<=e&&!(el[h-1]}else u=!h;for(var d=this.getNextFoldLine(a),g=d?d.start.row:Infinity;a=m[v];)i++,v++;p=p.substring(m[v-1]||0,p.length),f=0g||(o.push(s=new x(c,g,c+a-1,p)),2w&&o[h].end.row==n.end.row;)h--;for(o=o.slice(f,h+1),f=0,h=o.length;f=o.length)break;u.lastIndex=s+=1}if(i.index+a>t)break;r.push(i.index,a)}for(var l=r.length-1;0<=l;l-=2){var c=r[l-1];if(n(e,c,e,c+(a=r[l])))return!0}};else a=function(e,t,n){var i,o,r=h.getLine(e);for(u.lastIndex=t;o=u.exec(r);){var s=o[0].length;if(n(e,i=o.index,e,i+s))return!0;if(!s&&(u.lastIndex=i+=1,i>=r.length))return!1}};return{forEach:s}}}).call(s.prototype),t.Search=s}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t){"use strict";function n(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function i(e,t){n.call(this,e,t),this.$singleCommand=!1}var a=e("../lib/keys"),o=e("../lib/useragent"),l=a.KEY_MODS;i.prototype=n.prototype,function(){function s(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,t){var n=e&&("string"==typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},this.bindKey=function(e,r,s){if("object"==typeof e&&e&&(s==undefined&&(s=e.position),e=e[this.platform]),e)return"function"==typeof r?this.addCommand({exec:r,bindKey:e,name:r.name||e}):void e.split("|").forEach(function(e){var i="";if(-1!=e.indexOf(" ")){var t=e.split(/\s+/);e=t.pop(),t.forEach(function(e){var t=this.parseKeys(e),n=l[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")},this),i+=" "}var n=this.parseKeys(e),o=l[n.hashId]+n.key;this._addCommandToBinding(i+o,r,s)},this)},this._addCommandToBinding=function(e,t,n){var i,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(i=o[e].indexOf(t))&&o[e].splice(i,1):o[e]=[o[e]],"number"!=typeof n&&(n=s(t));var r=o[e];for(i=0;io?o+1:o,e.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:n(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var r=0;r=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;this.mergeNextCommand===undefined&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&2e3a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,h=n.getState(o.row),u=(a=n.getLine(o.row),i.checkOutdent(h,a,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new f(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new f(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},d)}u&&i.autoOutdent(h,n,o.row)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).start.column-=t.extendLeft,n.end.column+=t.extendRight,this.selection.setRange(n),!e&&!n.isEmpty()&&this.remove());((e||!this.selection.isEmpty())&&this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},this.setOverwrite=function(e){this.session.setOverwrite(e)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(e){this.setOption("dragDelay",e)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(e){this.setOption("readOnly",e)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},this.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);tt.toLowerCase()?1:0});var o=new f(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},this.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},this.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},this.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(e);n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=0<=r.value.indexOf(".")?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&ng+1)break;g=p.last}for(h--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},this.onCompositionStart=function(e){this.renderer.showComposition(e)},this.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},this.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(e){this.renderer.scrollToRow(e)},this.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},this.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},this.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},this.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new v(this.session,n.row,n.column),o=i.getCurrentToken(),r=o||i.stepForward();if(r){var s,a,l=!1,c={},h=n.column-r.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(r.value.match(/[{}()\[\]]/g)){for(;hwindow.innerHeight)&&null)&&(a.style.top=i+"px",a.style.left=t.left+"px",a.style.height=n.lineHeight+"px",a.scrollIntoView(s)),s=o=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",i),this.renderer.off("beforeRender",n))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,n.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(t,n,i){var o=this;p.loadModule("./ext/prompt",function(e){e.prompt(o,t,n,i)})}}.call(w.prototype),p.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?y.attach(this):y.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?y.attach(this):y.detach(this)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var y={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"\xb7":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t){"use strict";function r(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n"+e.end.row+":"+e.end.column}function o(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=v(t.start,e.end))h(t,e,-1);else{if(!(v(t.start,e.start)<=0))return null;h(e,t,1)}else if(n&&!i)if(0<=v(t.start,e.end))h(t,e,-1);else{if(!(v(t.end,e.start)<=0))return null;h(e,t,-1)}else if(!n&&i)if(0<=v(t.start,e.start))h(t,e,1);else{if(!(v(t.start,e.start)<=0))return null;h(e,t,1)}else if(!n&&!i)if(0<=v(t.start,e.start))h(t,e,1);else{if(!(v(t.end,e.start)<=0))return null;h(e,t,-1)}return[t,e]}function l(e,t){for(var n=e.length;n--;)for(var i=0;ia+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();(r+=s.left+s.right)!==this.gutterWidth&&!isNaN(r)&&(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(0n.right-t.right?"foldWidgets":void 0}}).call(r.prototype),t.Gutter=r}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t){"use strict";var p=e("../range").Range,n=e("../lib/dom"),i=function(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){function g(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setMarkers=function(e){this.markers=e},this.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},this.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,s,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ie.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:Infinity;s=r;)s=this.$renderToken(a,s,c,h.substring(0,r-i)),h=h.substring(r-i),i=r,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(b.stringRepeat("\xa0",n.indent),this.element)),s=0,r=n[++o]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,s=this.$renderToken(a,s,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,s,null,"",!0)},this.$renderSimpleLine=function(e,t){var n=0,i=t[0],o=i.value;this.displayIndentGuides&&(o=this.renderIndentGuide(e,o)),o&&(n=this.$renderToken(e,n,i,o));for(var r=1;rthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,i,o);n=this.$renderToken(e,n,i,o)}},this.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"":"",e.appendChild(r)},this.$renderLine=function(e,t,n){if(!n&&0!=n&&(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);if(r&&r.length){this.$renderWrappedLine(e,i,r);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showInvisibles&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},this.$getFoldLineTokens=function(e,t){function r(e,t,n){for(var i=0,o=0;o+e[i].value.lengthn-t&&(r=r.substring(0,n-t)),a.push({type:e[i].type,value:r}),o=t+r.length,i+=1);for(;on?a.push({type:e[i].type,value:r.substring(0,n-o)}):a.push(e[i]),o+=r.length,i+=1}}var s=this.session,a=[],l=s.getTokens(e);return t.walk(function(e,t,n,i,o){null!=e?a.push({type:"fold",value:e}):(o&&(l=s.getTokens(t)),l.length&&r(l,i,n))},t.end.row,this.session.getLine(t.end.row).length),a},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(r.prototype),t.Text=r}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";var c=e("../lib/dom"),n=function(e){this.element=c.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),c.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)c.setStyle(t[n].style,"opacity",e?"":"0")},this.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";setTimeout(function(){c.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){c.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(e){this.$padding=e},this.setSession=function(e){this.session=e},this.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},this.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},this.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,c.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var e=c.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},this.removeCursor=function(){if(1e.height+e.offset||r.top<0)&&1i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=r,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(n.prototype),t.Cursor=n}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t){"use strict";var n=e("./lib/oop"),i=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,s=32768,a=function(e){this.element=i.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=i.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,o.addListener(this.element,"scroll",this.onScroll.bind(this)),o.addListener(this.element,"mousedown",o.preventDefault)};(function(){n.implement(this,r),this.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1}}).call(a.prototype);var l=function(e,t){a.call(this,e),this.scrollTop=0,this.scrollHeight=0,t.$scrollbarWidth=this.width=i.scrollbarWidth(e.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};n.inherits(l,a),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(e){this.element.style.height=e+"px"},this.setInnerHeight=this.setScrollHeight=function(e){this.scrollHeight=e,s .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}',f=e("./lib/useragent"),m=f.isIE;h.importCssString(p,"ace_editor.css");var v=function(e,t){var n=this;this.container=e||h.createElement("div"),h.addCssClass(this.container,"ace_editor"),h.HI_DPI&&h.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=h.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=h.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=h.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var i=this.$textLayer=new a(this.content);this.canvas=i.element,this.$markerFront=new s(this.content),this.$cursorLayer=new l(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new u(this.container,this),this.scrollBarH=new c(this.container,this),this.scrollBarV.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new g(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!f.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),r.resetOptions(this),r._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,n.implement(this,i),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),h.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=e)&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(e,t,n){if(t===undefined&&(t=Infinity),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(e,t,n,i){if(!(2i.height-s)h.translate(this.textarea,0,0);else{var a=1,l=this.$size.height-s;if(t)if(t.useTextareaForIME){var c=this.textarea.value;a=this.characterWidth*this.session.$getStringScreenWidth(c)[0],s+=2}else o+=this.lineHeight+2;else o+=this.lineHeight;(r-=this.scrollLeft)>this.$size.scrollerWidth-a&&(r=this.$size.scrollerWidth-a),r+=this.gutterWidth+this.margin.left,h.setStyle(e,"height",s+"px"),h.setStyle(e,"width",a+"px"),h.translate(this.textarea,Math.min(r,this.$size.scrollerWidth-a),Math.min(o,l))}}}else h.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},this.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},this.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender"),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;0this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&th.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g,p,f=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),b=v+m,w=this.lineHeight;v=e.screenToDocumentRow(v,0);var y=e.getFoldLine(v);y&&(v=y.start.row),g=e.documentToScreenRow(v,0),p=e.getRowLength(v)*w,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(b)*w+p,f=this.scrollTop-g*w;var x=0;return(this.layerConfig.width!=o||s)&&(x=this.CHANGE_H_SCROLL),(s||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(o=this.$getLongestLine())),this.layerConfig={width:o,padding:this.$padding,firstRow:v,firstRowScreen:g,lastRow:b,lineHeight:w,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:f,gutterOffset:w?Math.max(0,Math.ceil((f+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(o-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},this.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},this.updateBreakpoints=function(){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},this.scrollCursorIntoView=function(e,t,n){if( -0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,s=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;rr+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-a=1-this.scrollMargin.top||(0=1-this.scrollMargin.left||(0this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(u.prototype);var n=function(e,t,n){var i=null,o=!1,r=Object.create(c),s=[],a=new u({messageBuffer:s,terminate:function(){},postMessage:function(e){s.push(e),i&&(o?setTimeout(l):l())}});a.setEmitSync=function(e){o=e};var l=function(){var e=s.shift();e.command?i[e.command].apply(i,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){a.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},h.loadModule(["worker",t],function(e){for(i=new e[n](r);s.length;)l()}),a};e.UIWorkerClient=n,e.WorkerClient=u,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t){"use strict";var l=e("./range").Range,n=e("./lib/event_emitter").EventEmitter,i=e("./lib/oop"),o=function(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)};(function(){i.implement(this,n),this.setup=function(){var n=this,i=this.doc,e=this.session;this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=e.addMarker(new l(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var t=i.createAnchor(e.row,e.column);t.$insertRight=!0,t.detach(),n.others.push(t)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,n=this;this.othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+n.length),n.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;0<=r;r--){var s={row:(a=this.others[r]).row,column:a.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;0<=r;r--){var a;s={row:(a=this.others[r]).row,column:a.column+o};this.doc.remove(new l(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,e=function(e,t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new l(e.row,e.column,e.row,e.column+n.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},this.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;ns&&(s=t.column),nt[1].length&&(s=t[1].length),at[3].length&&(l=t[3].length)),t):[e]}).map(t?i:c?h?o:i:r)}}).call(u.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=n,e("./config").defineOptions(u.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",r)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",r))},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t){"use strict";var g=e("../../range").Range,n=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),r=o.search(i);if(-1!=r){for(var s=n||o.length,a=e.getLength(),l=t,c=t;++tr.row&&(s.row--,s.column=e.getLine(s.row).length),g.fromPoints(r,s)}},this.closingBracketBlock=function(e,t,n,i){var o={row:n,column:i},r=e.$findOpeningBracket(t,o);if(r)return r.column++,o.column--,g.fromPoints(r,o)}}).call(n.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',t.$id="ace/theme/textmate",e("../lib/dom").importCssString(t.cssText,t.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(e,n){"use strict";function t(e){this.session=e,(this.session.widgetManager=this).session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}e("./lib/oop");var r=e("./lib/dom");e("./range").Range;(function(){this.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(e){this.attach(e.editor)},this.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),(this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var t=this.session.lineWidgets;t&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,o=i.start.row,r=i.end.row,s="add"==e.action,a=o+1;a>1,s=n(t,e[r]);if(0=i.length?o=0"),h.appendChild(m.createElement("div"));var g=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return c.destroy(),{command:"null"}};c.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(g),n.widgetManager.removeLineWidget(c),e.off("changeSelection",c.destroy),e.off("changeSession",c.destroy),e.off("mouseup",c.destroy),e.off("change",c.destroy))},e.keyBinding.addKeyboardHandler(g),e.on("changeSelection",c.destroy),e.on("changeSession",c.destroy),e.on("mouseup",c.destroy),e.on("change",c.destroy),e.session.widgetManager.addLineWidget(c),c.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:c.el.offsetHeight})},m.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(e,l){"use strict";e("./lib/fixoldbrowsers");var c=e("./lib/dom"),h=e("./lib/event"),t=e("./range").Range,u=e("./editor").Editor,i=e("./edit_session").EditSession,o=e("./undomanager").UndoManager,d=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),l.config=e("./config"),l.require=e,"function"==typeof define&&(l.define=define),l.edit=function(e,t){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof u)return e.env.editor;var i="";if(e&&/input|textarea/i.test(e.tagName)){var o=e;i=o.value,e=c.createElement("pre"),o.parentNode.replaceChild(e,o)}else e&&(i=e.textContent,e.innerHTML="");var r=l.createEditSession(i),s=new u(new d(e),r,t),a={document:r,editor:s,onResize:s.resize.bind(s,null)};return o&&(a.textarea=o),h.addListener(window,"resize",a.onResize),s.on("destroy",function(){h.removeListener(window,"resize",a.onResize),a.editor.container.env=null}),s.container.env=s.env=a,s},l.createEditSession=function(e,t){var n=new i(e,t);return n.setUndoManager(new o),n},l.Range=t,l.Editor=u,l.EditSession=i,l.UndoManager=o,l.VirtualRenderer=d,l.version=l.config.version}),ace.require(["ace/ace"],function(e){for(var t in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(t)&&(window.ace[t]=e[t]);window.ace["default"]=window.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=window.ace)}),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};n.inherits(o,i),o.getTagRule=function(){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},o.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t){"use strict";function o(){var e=a.replace("\\d","\\d\\-"),t={onMatch:function(e,t,n){var i="/"==e.charAt(1)?2:1;return 1==i?(t!=this.nextState?n.unshift(this.next,this.nextState,0):n.unshift(this.next),n[2]++):2==i&&t==this.nextState&&(n[1]--,(!n[1]||n[1]<0)&&(n.shift(),n.shift())),[{type:"meta.tag.punctuation."+(1==i?"":"end-")+"tag-open.xml",value:e.slice(0,i)},{type:"meta.tag.tag-name.xml",value:e.substr(i)}]},regex:"",onMatch:function(e,t,n){return t==n[0]&&n.shift(),2==e.length&&(n[0]==this.nextState&&n[1]--,(!n[1]||n[1]<0)&&n.splice(0,2)),this.next=n[0]||"start",[{type:this.token,value:e}]},nextState:"jsx"},n,r("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},t],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function r(e){return[{token:"comment",regex:/\/\*/,next:[s.getTagRule(),{token:"comment",regex:"\\*\\/",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[s.getTagRule(),{token:"comment",regex:"$|^",next:e||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}var n=e("../lib/oop"),s=e("./doc_comment_highlight_rules").DocCommentHighlightRules,i=e("./text_highlight_rules").TextHighlightRules,a="[a-zA-Z\\$_\xa1-\uffff][a-zA-Z\\d\\$_\xa1-\uffff]*",l=function(e){var t=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),n="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",i="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[s.getStartRule("doc-start"),r("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+a+")(\\.)(prototype)(\\.)("+a+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+a+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+a+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:"from(?=\\s*('|\"))"},{token:"keyword",regex:"(?:"+n+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:t,regex:a},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+a+")(\\.)("+a+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:a},{regex:"",token:"empty",next:"no_regex"}],start:[s.getStartRule("doc-start"),r("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:a},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:i},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},e&&e.noES6||(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(e,t,n){if(this.next="{"==e?this.nextState:"","{"==e&&n.length)n.unshift("start",t);else if("}"==e&&n.length&&(n.shift(),this.next=n.shift(),-1!=this.next.indexOf("string")||-1!=this.next.indexOf("jsx")))return"paren.quasi.end";return"{"==e?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{ -token:"constant.language.escape",regex:i},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!e||0!=e.jsx)&&o.call(this)),this.embedRules(s,"doc-",[s.getEndRule("no_regex")]),this.normalizeRules()};n.inherits(l,i),t.JavaScriptHighlightRules=l}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t){"use strict";var s=e("../range").Range,n=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var i=n[1].length,o=e.findMatchingBracket({row:t,column:i});if(!o||o.row==t)return 0;var r=this.$getIndent(e.getLine(o.row));e.replace(new s(t,0,t,i-1),r)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(n.prototype),t.MatchingBraceOutdent=n}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(e,t){"use strict";var n=e("../../lib/oop"),h=e("../../range").Range,i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(o,i),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var o=this._getFoldWidgetBase(e,t,n);return!o&&this.startRegionRe.test(i)?"start":o},this.getFoldWidgetRange=function(e,t,n,i){var o,r=e.getLine(n);if(this.startRegionRe.test(r))return this.getCommentRegionBlock(e,r,n);if(o=r.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],n,s);var a=e.getCommentFoldRange(n,s+o[0].length,1);return a&&!a.isMultiLine()&&(i?a=this.getSectionRange(e,n):"all"!=t&&(a=null)),a}if("markbegin"!==t&&(o=r.match(this.foldingStopMarker))){s=o.index+o[0].length;return o[1]?this.closingBracketBlock(e,o[1],n,s):e.getCommentFoldRange(n,s,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),i=n.search(/\S/),o=t,r=n.length,s=t+=1,a=e.getLength();++t",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+e+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:e},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===o&&this.normalizeRules()};(function(){this.embedTagRules=function(e,t,n){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(<)("+n+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:t+"start"}]}),this.$rules[n+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,t,n){return n.splice(0),this.token}}],this.embedRules(e,t,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+n+".tag-name.xml"],regex:"(|$))",next:n+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(i.prototype),n.inherits(o,i),t.XmlHighlightRules=o}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t){"use strict";function g(e,t){return e&&-1"==l)||g(h,"decl-attribute-equals")&&(u||"?"==l))return{text:r+r,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&('"'==r||"'"==r)&&i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==r)return o.end.column++,o}),this.add("autoclosing","insertion",function(e,t,n,i,o){if(">"==o){var r=n.getSelectionRange().start,s=new p(i,r.row,r.column),a=s.getCurrentToken()||s.stepBackward();if(!a||!(g(a,"tag-name")||g(a,"tag-whitespace")||g(a,"attribute-name")||g(a,"attribute-equals")||g(a,"attribute-value")))return;if(g(a,"reference.attribute-value"))return;if(g(a,"attribute-value")){var l=s.getCurrentTokenColumn()+a.value.length;if(r.column/.test(i.getLine(r.row).slice(r.column)))return;for(;!g(a,"tag-name");)if("<"==(a=s.stepBackward()).value){a=s.stepForward();break}var h=s.getCurrentTokenRow(),u=s.getCurrentTokenColumn();if(g(s.stepBackward(),"end-tag-open"))return;var d=a.value;if(h==r.row&&(d=d.substring(0,r.column-u)),this.voidElements.hasOwnProperty(d.toLowerCase()))return;return{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(e,t,n,i,o){if("\n"==o){var r=n.getCursorPosition(),s=i.getLine(r.row),a=new p(i,r.row,r.column),l=a.getCurrentToken();if(l&&-1!==l.type.indexOf("tag-close")){if("/>"==l.value)return;for(;l&&-1===l.type.indexOf("tag-name");)l=a.stepBackward();if(!l)return;var c=l.value,h=a.getCurrentTokenRow();if(!(l=a.stepBackward())||-1!==l.type.indexOf("end-tag"))return;if(this.voidElements&&!this.voidElements[c]){var u=i.getTokenAt(r.row,r.column+1),d=(s=i.getLine(h),this.$getIndent(s)),g=d+i.getTabString();return u&&""==r.value;break}return i}if(l(r,"tag-close"))return i.selfClosing="/>"==r.value,i;i.start.column+=r.value.length}return null},this._findEndTagInLine=function(e,t,n,i){for(var o=e.getTokens(t),r=0,s=0;s"==t.value,n.end.row=e.getCurrentTokenRow(),n.end.column=e.getCurrentTokenColumn()+t.value.length)}while(t=e.stepBackward());return null},this._pop=function(e,t){for(;e.length;){var n=e[e.length-1];if(!t||n.tagName==t.tagName)return e.pop();if(!this.optionalEndTags.hasOwnProperty(n.tagName))return null;e.pop()}},this.getFoldWidgetRange=function(e,t,n){var i=this._getFirstTagInLine(e,n);if(!i)return this.getCommentFoldWidget(e,n)&&e.getCommentFoldRange(n,e.getLine(n).length);var o,r=[];if(i.closing||i.selfClosing){a=new h(e,n,i.end.column);for(var s={row:n,column:i.start.column};o=this._readTagBackward(a);)if(o.selfClosing){if(!r.length)return o.start.column+=o.tagName.length+2,o.end.column-=2,c.fromPoints(o.start,o.end)}else if(o.closing)r.push(o);else if(this._pop(r,o),0==r.length)return o.start.column+=o.tagName.length+2,o.start.row==o.end.row&&o.start.column"},this.createWorker=function(t){var e=new l(["ace"],"ace/mode/xml_worker","Worker");return e.attachToDocument(t.getDocument()),e.on("error",function(e){t.setAnnotations(e.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/xml"}.call(c.prototype),t.Mode=c}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|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-shadow|box-sizing|caption-side|clear|clip|color|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|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",r=t.supportFunction="rgb|rgba|url|attr|counter|counters",s=t.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",a=t.supportConstantColor="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|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|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|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",l=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",c=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",u=t.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",d=function(){var e=this.createKeywordMapper({"support.function":r,"support.constant":s,"support.type":o,"support.constant.color":a,"support.constant.fonts":l},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:c},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+c+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:c},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:u},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};n.inherits(d,i),t.CssHighlightRules=d}),ace.define("ace/mode/css_completions",["require","exports","module"],function(e,t){"use strict";var s={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,"double":2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{"default":1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},"float":{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,"static":1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},n=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var n=t.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()});s.hasOwnProperty(n)||(s[n]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,n,i){if(this.completionsDefined||this.defineCompletions(),"ruleset"!==e&&"ace/mode/scss"!=t.$mode.$id)return[];var o=t.getLine(n.row).substr(0,n.column);return/:[^;]+$/.test(o)?(/([\w\-]+):[^:]*$/.test(o),this.getPropertyValueCompletions(e,t,n,i)):this.getPropertyCompletions(e,t,n,i)},this.getPropertyCompletions=function(){return Object.keys(s).map(function(e){return{caption:e,snippet:e+": $0;",meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(e,t,n){var i=t.getLine(n.row).substr(0,n.column),o=(/([\w\-]+):[^:]*$/.exec(i)||{})[1];if(!o)return[];var r=[];return o in s&&"object"==typeof s[o]&&(r=Object.keys(s[o])),r.map(function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}})}}).call(n.prototype),t.CssCompletions=n}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(e,t){"use strict";var n=e("../../lib/oop"),i=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),c=e("../../token_iterator").TokenIterator,o=function(){this.inherit(i),this.add("colon","insertion",function(e,t,n,i,o){if(":"===o&&n.selection.isEmpty()){var r=n.getCursorPosition(),s=new c(i,r.row,r.column),a=s.getCurrentToken();if(a&&a.value.match(/\s+/)&&(a=s.stepBackward()),a&&"support.type"===a.type){var l=i.doc.getLine(r.row);if(":"===l.substring(r.column,r.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(l.substring(r.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&":"===r){var s=n.getCursorPosition(),a=new c(i,s.row,s.column),l=a.getCurrentToken();if(l&&l.value.match(/\s+/)&&(l=a.stepBackward()),l&&"support.type"===l.type)if(";"===i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o}}),this.add("semicolon","insertion",function(e,t,n,i,o){if(";"===o&&n.selection.isEmpty()){var r=n.getCursorPosition();if(";"===i.doc.getLine(r.row).substring(r.column,r.column+1))return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(e,t,n,i,o){if("!"===o&&n.selection.isEmpty()){var r=n.getCursorPosition(),s=i.doc.getLine(r.row);if(/^\s*(;|}|$)/.test(s.substring(r.column)))return{text:"!important",selection:[10,10]}}})};n.inherits(o,i),t.CssBehaviour=o}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client", -"ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,r=e("./matching_brace_outdent").MatchingBraceOutdent,s=e("../worker/worker_client").WorkerClient,a=e("./css_completions").CssCompletions,l=e("./behaviour/css").CssBehaviour,c=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=o,this.$outdent=new r,this.$behaviour=new l,this.$completer=new a,this.foldingRules=new c};n.inherits(h,i),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;return o.length&&"comment"==o[o.length-1].type||t.match(/^.*\{\s*$/)&&(i+=n),i},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(t){var e=new s(["ace"],"ace/mode/css_worker","Worker");return e.attachToDocument(t.getDocument()),e.on("annotate",function(e){t.setAnnotations(e.data)}),e.on("terminate",function(){t.clearAnnotations()}),e},this.$id="ace/mode/css"}.call(h.prototype),t.Mode=h}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("../lib/lang"),o=e("./css_highlight_rules").CssHighlightRules,r=e("./javascript_highlight_rules").JavaScriptHighlightRules,s=e("./xml_highlight_rules").XmlHighlightRules,a=i.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),l=function(){s.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(e,t){var n=a[t];return["meta.tag.punctuation."+("<"==e?"":"end-")+"tag-open.xml","meta.tag"+(n?"."+n:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(o,"css-","style"),this.embedTagRules(new r({jsx:!1}).getRules(),"js-","script"),this.constructor===l&&this.normalizeRules()};n.inherits(l,s),t.HtmlHighlightRules=l}),ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,o=t.FoldMode=function(e,t){this.defaultMode=e,this.subModes=t};n.inherits(o,i),function(){this.$getMode=function(e){for(var t in"string"!=typeof e&&(e=e[0]),this.subModes)if(0===e.indexOf(t))return this.subModes[t];return null},this.$tryMode=function(e,t,n,i){var o=this.$getMode(e);return o?o.getFoldWidget(t,n,i):""},this.getFoldWidget=function(e,t,n){return this.$tryMode(e.getState(n-1),e,t,n)||this.$tryMode(e.getState(n),e,t,n)||this.defaultMode.getFoldWidget(e,t,n)},this.getFoldWidgetRange=function(e,t,n){var i=this.$getMode(e.getState(n-1));return i&&i.getFoldWidget(e,t,n)||(i=this.$getMode(e.getState(n))),i&&i.getFoldWidget(e,t,n)||(i=this.defaultMode),i.getFoldWidgetRange(e,t,n)}}.call(o.prototype)}),ace.define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./mixed").FoldMode,o=e("./xml").FoldMode,r=e("./cstyle").FoldMode,s=t.FoldMode=function(e,t){i.call(this,new o(e,t),{"js-":new r,"css-":new r})};n.inherits(s,i)}),ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"],function(e,t){"use strict";function s(e,t){return-1"},this.voidElements=i.arrayToMap(d),this.getNextLineIndent=function(e,t){return this.$getIndent(t)},this.checkOutdent=function(){return!1},this.getCompletions=function(e,t,n,i){return this.$completer.getCompletions(e,t,n,i)},this.createWorker=function(t){if(this.constructor==p){var e=new u(["ace"],"ace/mode/html_worker","Worker");return e.attachToDocument(t.getDocument()),this.fragmentContext&&e.call("setOptions",[{context:this.fragmentContext}]),e.on("error",function(e){t.setAnnotations(e.data)}),e.on("terminate",function(){t.clearAnnotations()}),e}},this.$id="ace/mode/html"}.call(p.prototype),t.Mode=p}),ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"],function(e,t){"use strict";var c=e("../config").$modes,n=e("../lib/oop"),i=e("../lib/lang"),o=e("./text_highlight_rules").TextHighlightRules,r=e("./html_highlight_rules").HtmlHighlightRules,s=function(e){return"(?:[^"+i.escapeRegExp(e)+"\\\\]|\\\\.)*"},a=function(){r.call(this);var e={token:"support.function",regex:/^\s*(```+[^`]*|~~~+[^~]*)$/,onMatch:function(e,t,n){var i=e.match(/^(\s*)([`~]+)(.*)/),o=/[\w-]+|$/.exec(i[3])[0];return c[o]||(o=""),n.unshift("githubblock",[],[i[1],i[2],o],t),this.token},next:"githubblock"},t=[{token:"support.function",regex:".*",onMatch:function(e,t,n){var i=n[1],o=n[2][0],r=n[2][1],s=n[2][2],a=/^(\s*)(`+|~+)\s*$/.exec(e);if(a&&a[1].length=r.length&&a[2][0]==r[0])return n.splice(0,3),this.next=n.shift(),this.token;if(this.next="",s&&c[s]){var l=c[s].getTokenizer().getLineTokens(e,i.slice(0));return n[1]=l.state,l.tokens}return this.token}}];this.$rules.start.unshift({token:"empty_line",regex:"^$",next:"allowBlock"},{token:"markup.heading.1",regex:"^=+(?=\\s*$)"},{token:"markup.heading.2",regex:"^\\-+(?=\\s*$)"},{token:function(e){return"markup.heading."+e.length},regex:/^#{1,6}(?=\s|$)/,next:"header"},e,{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{token:"constant",regex:"^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",next:"allowBlock"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic"}),this.addRules({basic:[{token:"constant.language.escape",regex:/\\[\\`*_{}\[\]()#+\-.!]/},{token:"support.function",regex:"(`+)(.*?[^`])(\\1)"},{token:["text","constant","text","url","string","text"],regex:'^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:["][^"]+["])?(\\s*))$'},{token:["text","string","text","constant","text"],regex:"(\\[)("+s("]")+")(\\]\\s*\\[)("+s("]")+")(\\])"},{token:["text","string","text","markup.underline","string","text"],regex:"(\\!?\\[)("+s("]")+')(\\]\\()((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)(\\s*"'+s('"')+'"\\s*)?(\\))'},{token:"string.strong",regex:"([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"},{token:"string.emphasis",regex:"([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"},{token:["text","url","text"],regex:"(<)((?:https?|ftp|dict):[^'\">\\s]+|(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+)(>)"}],allowBlock:[{token:"support.function",regex:"^ {4}.+",next:"allowBlock"},{token:"empty_line",regex:"^$",next:"allowBlock"},{token:"empty",regex:"",next:"start"}],header:[{regex:"$",next:"start"},{include:"basic"},{defaultToken:"heading"}],"listblock-start":[{token:"support.variable",regex:/(?:\[[ x]\])?/,next:"listblock"}],listblock:[{token:"empty_line",regex:"^$",next:"start"},{token:"markup.list",regex:"^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",next:"listblock-start"},{include:"basic",noEscape:!0},e,{defaultToken:"list"}],blockquote:[{token:"empty_line",regex:"^\\s*$",next:"start"},{token:"string.blockquote",regex:"^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",next:"blockquote"},{include:"basic",noEscape:!0},{defaultToken:"string.blockquote"}],githubblock:t}),this.normalizeRules()};n.inherits(a,o),t.MarkdownHighlightRules=a}),ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,p=e("../../range").Range,o=t.FoldMode=function(){};n.inherits(o,i),function(){this.foldingStartMarker=/^(?:[=-]+\s*$|#{1,6} |`{3})/,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"`"==i[0]&&"start"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(t,e,n){function i(e){return(h=t.getTokens(e)[0])&&0===h.type.lastIndexOf(u,0)}function o(){var e=h.value[0];return"="==e?6:"-"==e?5:7-h.value.search(/[^#]|$/)}var r=t.getLine(n),s=r.length,a=t.getLength(),l=n,c=n;if(r.match(this.foldingStartMarker)){if("`"==r[0]){if("start"!==t.bgTokenizer.getState(n)){for(;++n|<=|=>|=|!=|[%&|`]"},{token:"punctuation.operator",regex:";"},{token:"paren.lparen",regex:"[\\[\\(\\{]"},{token:"paren.rparen",regex:"[\\]]"},{token:"paren.rparen",regex:"[\\)\\}]",next:"pop"}],variables:[{token:"variable",regex:/(\$)(\w+)/},{token:["variable","paren.lparen"],regex:/(\$)(\()/,push:"start"},{token:["variable","paren.lparen","keyword.operator","variable","keyword.operator"],regex:/(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,push:"start"},{token:"variable",regex:/\$[*@#?\-$!0_]/},{token:["variable","paren.lparen"],regex:/(\$)(\{)/,push:"start"}]},this.normalizeRules()};n.inherits(o,i),t.ShHighlightRules=o}),ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./sh_highlight_rules").ShHighlightRules,s=e("../range").Range,r=e("./folding/cstyle").FoldMode,a=e("./behaviour/cstyle").CstyleBehaviour,l=function(){this.HighlightRules=o,this.foldingRules=new r,this.$behaviour=new a};n.inherits(l,i),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e).tokens;if(o.length&&"comment"==o[o.length-1].type)return i;"start"==e&&(t.match(/^.*[\{\(\[:]\s*$/)&&(i+=n));return i};var r={pass:1,"return":1,raise:1,"break":1,"continue":1};this.checkOutdent=function(e,t,n){if("\r\n"!==n&&"\r"!==n&&"\n"!==n)return!1;var i=this.getTokenizer().getLineTokens(t.trim(),e).tokens;if(!i)return!1;do{var o=i.pop()}while(o&&("comment"==o.type||"text"==o.type&&o.value.match(/^\s+$/)));return!!o&&("keyword"==o.type&&r[o.value])},this.autoOutdent=function(e,t,n){n+=1;var i=this.$getIndent(t.getLine(n)),o=t.getTabString();i.slice(-o.length)==o&&t.remove(new s(n,i.length-o.length,n,i.length))},this.$id="ace/mode/sh"}.call(l.prototype),t.Mode=l}),ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=(e("./javascript").Mode,e("./xml").Mode,e("./html").Mode,e("./markdown_highlight_rules").MarkdownHighlightRules),r=e("./folding/markdown").FoldMode,s=function(){this.HighlightRules=o,this.createModeDelegates({javascript:e("./javascript").Mode,html:e("./html").Mode,bash:e("./sh").Mode,sh:e("./sh").Mode,xml:e("./xml").Mode,css:e("./css").Mode}),this.foldingRules=new r,this.$behaviour=this.$defaultBehaviour};n.inherits(s,i),function(){this.type="text",this.blockComment={start:""},this.$quotes={'"':'"',"`":"`"},this.getNextLineIndent=function(e,t){if("listblock"!=e)return this.$getIndent(t);var n=/^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(t);if(!n)return"";var i=n[2];return i||(i=parseInt(n[3],10)+1+"."),n[1]+i+n[4]},this.$id="ace/mode/markdown"}.call(s.prototype),t.Mode=s}),ace.require(["ace/mode/markdown"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){function e(e){return(/\w/.test(e)?"\\b":"(?:\\B|^)")+e+"[^"+e+"].*?"+e+"(?![\\w*])"}var t="[a-zA-Z\xa1-\uffff]+\\b";this.$rules={start:[{token:"empty",regex:/$/},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"literal",regex:/^-{4,}\s*$/,next:"literalBlock"},{token:"string",regex:/^\+{4,}\s*$/,next:"passthroughBlock"},{token:"keyword",regex:/^={4,}\s*$/},{token:"text",regex:/^\s*$/},{token:"empty",regex:"",next:"dissallowDelimitedBlock"}],dissallowDelimitedBlock:[{include:"paragraphEnd"},{token:"comment",regex:"^//.+$"},{token:"keyword",regex:"^(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION):"},{include:"listStart"},{token:"literal",regex:/^\s+.+$/,next:"indentedBlock"},{token:"empty",regex:"",next:"text"}],paragraphEnd:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"commentBlock"},{token:"tableBlock",regex:/^\s*[|!]=+\s*$/,next:"tableBlock"},{token:"keyword",regex:/^(?:--|''')\s*$/,next:"start"},{token:"option",regex:/^\[.*\]\s*$/,next:"start"},{token:"pageBreak",regex:/^>{3,}$/,next:"start"},{token:"literal",regex:/^\.{4,}\s*$/,next:"listingBlock"},{token:"titleUnderline",regex:/^(?:={2,}|-{2,}|~{2,}|\^{2,}|\+{2,})\s*$/,next:"start"},{token:"singleLineTitle",regex:/^={1,5}\s+\S.*$/,next:"start"},{token:"otherBlock",regex:/^(?:\*{2,}|_{2,})\s*$/,next:"start"},{token:"optionalTitle",regex:/^\.[^.\s].+$/,next:"start"}],listStart:[{token:"keyword",regex:/^\s*(?:\d+\.|[a-zA-Z]\.|[ixvmIXVM]+\)|\*{1,5}|-|\.{1,5})\s/,next:"listText"},{token:"meta.tag",regex:/^.+(?::{2,4}|;;)(?: |$)/,next:"listText"},{token:"support.function.list.callout",regex:/^(?:<\d+>|\d+>|>) /,next:"text"},{token:"keyword",regex:/^\+\s*$/,next:"start"}],text:[{token:["link","variable.language"],regex:/((?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+)(\[.*?\])/},{token:"link",regex:/(?:https?:\/\/|ftp:\/\/|file:\/\/|mailto:|callto:)[^\s\[]+/},{token:"link",regex:/\b[\w\.\/\-]+@[\w\.\/\-]+\b/},{include:"macros"},{include:"paragraphEnd"},{token:"literal",regex:/\+{3,}/,next:"smallPassthrough"},{token:"escape",regex:/\((?:C|TM|R)\)|\.{3}|->|<-|=>|<=|&#(?:\d+|x[a-fA-F\d]+);|(?: |^)--(?=\s+\S)/},{token:"escape",regex:/\\[_*'`+#]|\\{2}[_*'`+#]{2}/},{token:"keyword",regex:/\s\+$/},{token:"text",regex:t},{token:["keyword","string","keyword"],regex:/(<<[\w\d\-$]+,)(.*?)(>>|$)/},{token:"keyword",regex:/<<[\w\d\-$]+,?|>>/},{token:"constant.character",regex:/\({2,3}.*?\){2,3}/},{token:"keyword",regex:/\[\[.+?\]\]/},{token:"support",regex:/^\[{3}[\w\d =\-]+\]{3}/},{include:"quotes"},{token:"empty",regex:/^\s*$/,next:"start"}],listText:[{include:"listStart"},{include:"text"}],indentedBlock:[{token:"literal",regex:/^[\s\w].+$/,next:"indentedBlock"},{token:"literal",regex:"",next:"start"}],listingBlock:[{token:"literal",regex:/^\.{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],literalBlock:[{token:"literal",regex:/^-{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"constant.numeric",regex:"<\\d+>"},{token:"literal",regex:"[^<]+"},{token:"literal",regex:"<"}],passthroughBlock:[{token:"literal",regex:/^\+{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"},{token:"literal",regex:"."}],smallPassthrough:[{token:"literal",regex:/[+]{3,}/,next:"dissallowDelimitedBlock"},{token:"literal",regex:/^\s*$/,next:"dissallowDelimitedBlock"},{token:"literal",regex:t+"|\\d+"},{include:"macros"}],commentBlock:[{token:"doc.comment",regex:/^\/{4,}\s*$/,next:"dissallowDelimitedBlock"},{token:"doc.comment",regex:"^.*$"}],tableBlock:[{token:"tableBlock",regex:/^\s*\|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"innerTableBlock"},{token:"tableBlock",regex:/\|/},{include:"text",noEscape:!0}],innerTableBlock:[{token:"tableBlock",regex:/^\s*!={3,}\s*$/,next:"tableBlock"},{token:"tableBlock",regex:/^\s*|={3,}\s*$/,next:"dissallowDelimitedBlock"},{token:"tableBlock",regex:/!/}],macros:[{token:"macro",regex:/{[\w\-$]+}/},{token:["text","string","text","constant.character","text"],regex:/({)([\w\-$]+)(:)?(.+)?(})/},{token:["text","markup.list.macro","keyword","string"],regex:/(\w+)(footnote(?:ref)?::?)([^\s\[]+)?(\[.*?\])?/},{token:["markup.list.macro","keyword","string"],regex:/([a-zA-Z\-][\w\.\/\-]*::?)([^\s\[]+)(\[.*?\])?/},{token:["markup.list.macro","keyword"],regex:/([a-zA-Z\-][\w\.\/\-]+::?)(\[.*?\])/},{token:"keyword",regex:/^:.+?:(?= |$)/}],quotes:[{token:"string.italic",regex:/__[^_\s].*?__/},{token:"string.italic",regex:e("_")},{token:"keyword.bold",regex:/\*\*[^*\s].*?\*\*/},{token:"keyword.bold",regex:e("\\*")},{token:"literal",regex:e("\\+")},{token:"literal",regex:/\+\+[^+\s].*?\+\+/},{token:"literal",regex:/\$\$.+?\$\$/},{token:"literal",regex:e("`")},{token:"keyword",regex:e("^")},{token:"keyword",regex:e("~")},{token:"keyword",regex:/##?/},{token:"keyword",regex:/(?:\B|^)``|\b''/}]};var n={macro:"constant.character",tableBlock:"doc.comment",titleUnderline:"markup.heading",singleLineTitle:"markup.heading",pageBreak:"string",option:"string.regexp",otherBlock:"markup.list",literal:"support.function",optionalTitle:"constant.numeric",escape:"constant.language.escape",link:"markup.underline.list"};for(var i in this.$rules)for(var o=this.$rules[i],r=o.length;r--;){var s=o[r];if(s.include||"string"==typeof s){var a=[r,1].concat(this.$rules[s.include||s]);s.noEscape&&(a=a.filter(function(e){return!e.next})),o.splice.apply(o,a)}else s.token in n&&(s.token=n[s.token])}};n.inherits(o,i),t.AsciidocHighlightRules=o}),ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,m=e("../../range").Range,o=t.FoldMode=function(){};n.inherits(o,i),function(){this.foldingStartMarker=/^(?:\|={10,}|[\.\/=\-~^+]{4,}\s*$|={1,5} )/,this.singleLineHeadingRe=/^={1,5}(?=\s+\S)/,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"="==i[0]?this.singleLineHeadingRe.test(i)?"start":e.getLine(n-1).length!=e.getLine(n).length?"":"start":"dissallowDelimitedBlock"==e.bgTokenizer.getState(n)?"end":"start":""},this.getFoldWidgetRange=function(n,e,i){function t(e){return(h=n.getTokens(e)[0])&&h.type}function o(){var e=h.value.match(g);if(e)return e[0].length;var t=u.indexOf(h.value[0])+1;return 1==t&&n.getLine(i-1).length!=n.getLine(i).length?Infinity:t}var r=n.getLine(i),s=r.length,a=n.getLength(),l=i,c=i;if(r.match(this.foldingStartMarker)){var h,u=["=","-","~","^","+"],d="markup.heading",g=this.singleLineHeadingRe;if(t(i)==d){for(var p=o();++i\\]}]))";this.$rules={start:[{token:e.title,regex:"(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"},{token:["text",e.directive,e.literal],regex:"(^\\s*\\.\\. )([^: ]+::)(.*$)",next:"codeblock"},{token:e.directive,regex:"::$",next:"codeblock"},{token:[e.entity,e.link],regex:"(^\\.\\. _[^:]+:)(.*$)"},{token:[e.entity,e.link],regex:"(^__ )(https?://.*$)"},{token:e.entity,regex:"^\\.\\. \\[[^\\]]+\\] "},{token:e.comment,regex:"^\\.\\. .*$",next:"comment"},{token:e.list,regex:"^\\s*[\\*\\+-] "},{token:e.list,regex:"^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "},{token:e.list,regex:"^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "},{token:e.table,regex:"^={2,}(?: +={2,})+$"},{token:e.table,regex:"^\\+-{2,}(?:\\+-{2,})+\\+$"},{token:e.table,regex:"^\\+={2,}(?:\\+={2,})+\\+$"},{token:["text",e.literal],regex:t+"(``)(?=\\S)",next:"code"},{token:["text",e.bold],regex:t+"(\\*\\*)(?=\\S)",next:"bold"},{token:["text",e.italic],regex:t+"(\\*)(?=\\S)",next:"italic"},{token:e.entity,regex:"\\|[\\w\\-]+?\\|"},{token:e.entity,regex:":[\\w-:]+:`\\S",next:"entity"},{token:["text",e.entity],regex:t+"(_`)(?=\\S)",next:"entity"},{token:e.entity,regex:"_[A-Za-z0-9\\-]+?"},{token:["text",e.link],regex:t+"(`)(?=\\S)",next:"link"},{token:e.link,regex:"[A-Za-z0-9\\-]+?__?"},{token:e.link,regex:"\\[[^\\]]+?\\]_"},{token:e.link,regex:"https?://\\S+"},{token:e.table,regex:"\\|"}],codeblock:[{token:e.literal,regex:"^ +.+$",next:"codeblock"},{token:e.literal,regex:"^$",next:"codeblock"},{token:"empty",regex:"",next:"start"}],code:[{token:e.literal,regex:"\\S``"+n,next:"start"},{defaultToken:e.literal}],bold:[{token:e.bold,regex:"\\S\\*\\*"+n,next:"start"},{defaultToken:e.bold}],italic:[{token:e.italic,regex:"\\S\\*"+n,next:"start"},{defaultToken:e.italic}],entity:[{token:e.entity,regex:"\\S`"+n,next:"start"},{defaultToken:e.entity}],link:[{token:e.link,regex:"\\S`__?"+n,next:"start"},{defaultToken:e.link}],comment:[{token:e.comment,regex:"^ +.+$",next:"comment"},{token:e.comment,regex:"^$",next:"comment"},{token:"empty",regex:"",next:"start"}]}};n.inherits(o,i),t.RSTHighlightRules=o}),ace.define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text").Mode,o=e("./rst_highlight_rules").RSTHighlightRules,r=function(){this.HighlightRules=o};n.inherits(r,i),function(){this.type="text",this.$id="ace/mode/rst"}.call(r.prototype),t.Mode=r}),ace.require(["ace/mode/rst"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t){"use strict";var n=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(verbatim)(})",next:"verbatim"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\begin)({)(lstlisting)(})",next:"lstlisting"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)([\\w*]*)(})"},{token:"storage.type",regex:/\\verb\b\*?/,next:[{token:["keyword.operator","string","keyword.operator"],regex:"(.)(.*?)(\\1|$)|",next:"start"}]},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}],verbatim:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(verbatim)(})",next:"start"},{defaultToken:"text"}],lstlisting:[{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\end)({)(lstlisting)(})",next:"start"},{defaultToken:"text"}]},this.normalizeRules()};n.inherits(o,i),t.LatexHighlightRules=o}),ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],function(e,t){"use strict";var n=e("../../lib/oop"),i=e("./fold_mode").FoldMode,p=e("../../range").Range,f=e("../../token_iterator").TokenIterator,c={"\\subparagraph":1,"\\paragraph":2,"\\subsubsubsection":3,"\\subsubsection":4,"\\subsection":5,"\\section":6,"\\chapter":7,"\\part":8,"\\begin":9,"\\end":10},o=t.FoldMode=function(){};n.inherits(o,i),function(){this.foldingStartMarker=/^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/,this.foldingStopMarker=/^\s*\\(end)\b|^\s*}/,this.getFoldWidgetRange=function(e,t,n){var i,o=e.doc.getLine(n);return(i=this.foldingStartMarker.exec(o))?i[1]?this.latexBlock(e,n,i[0].length-1):i[2]?this.latexSection(e,n,i[0].length-1):this.openingBracketBlock(e,"{",n,i.index):(i=this.foldingStopMarker.exec(o))?i[1]?this.latexBlock(e,n,i[0].length-1):this.closingBracketBlock(e,"}",n,i.index+i[0].length):void 0},this.latexBlock=function(e,t,n,i){var o={"\\begin":1,"\\end":-1},r=new f(e,t,n),s=r.getCurrentToken();if(s&&("storage.type"==s.type||"constant.character.escape"==s.type)){var a=o[s.value],l=function(){var e="lparen"==r.stepForward().type?r.stepForward().value:"";return-1===a&&(r.stepBackward(),e&&r.stepBackward()),e},c=[l()],h=-1===a?r.getCurrentTokenColumn():e.getLine(t).length,u=t;for(r.step=-1===a?r.stepBackward:r.stepForward;s=r.step();)if(s&&("storage.type"==s.type||"constant.character.escape"==s.type)){var d=o[s.value];if(d){var g=l();if(d===a)c.unshift(g);else if(c.shift()!==g||!c.length)break}}if(!c.length){if(1==a&&(r.stepBackward(),r.stepBackward()),i)return r.getCurrentTokenRange();t=r.getCurrentTokenRow();return-1===a?new p(t,e.getLine(t).length,u,h):new p(u,h,t,r.getCurrentTokenColumn())}}},this.latexSection=function(e,t,n){var i=new f(e,t,n),o=i.getCurrentToken();if(o&&"storage.type"==o.type){for(var r=c[o.value]||0,s=0,a=t;o=i.stepForward();)if("storage.type"===o.type){var l=c[o.value]||0;if(9<=l){if(s||(a=i.getCurrentTokenRow()-1),(s+=9==l?1:-1)<0)break}else if(r<=l)break}for(s||(a=i.getCurrentTokenRow()-1);t")}function h(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(N(e.getCursor(),0,1)),Yt.enterInsertMode(e,{},t))}),t.onPasteFn}function u(e,t){for(var n=[],i=e;i=e.firstLine()&&t<=e.lastLine()}function d(e){return/^[a-z]$/.test(e)}function g(e){return-1!="()[]{}".indexOf(e)}function p(e){return It.test(e)}function m(e){return/^[A-Z]$/.test(e)}function v(e){return/^\s*$/.test(e)}function b(e){return-1!=".?!".indexOf(e)}function w(e,t){for(var n=0;n"!=t.slice(-11))return e==t?"full":0==t.indexOf(e)&&"partial";var n=t.length-11,i=e.slice(0,n),o=t.slice(0,n);return i==o&&e.length>n?"full":0==o.indexOf(i)&&"partial"}function W(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(1":n="\n";break;case"":n=" ";break;default:n=""}return n}function z(t,n,i){return function(){for(var e=0;el&&(o.line=l),o.ch=X(e,o.line)}return{ranges:[{anchor:r,head:o}],primary:0}}if("block"==n){for(var c=Math.min(r.line,o.line),h=Math.min(r.ch,o.ch),u=Math.max(r.line,o.line),d=Math.max(r.ch,o.ch)+1,g=u-c+1,p=o.line==c?0:g-1,f=[],m=0;m=s.length)return null;i?l=Bt[0]:(l=Ft[0])(s.charAt(a))||(l=Ft[1]);for(var c=a,h=a;l(s.charAt(c))&&ct.start.row&&e+i=t.line.length){if(t.ln+=t.dir,!f(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=0]/,">":/[<>]/}[n],l={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],c=e.getLine(s.line).charAt(s.ch)===l?1:0;if(o=e.scanForBracket(Rt(s.line,s.ch+c),-1,undefined,{bracketRegex:a}),r=e.scanForBracket(Rt(s.line,s.ch+c),1,undefined,{bracketRegex:a}),!o||!r)return{start:s,end:s};if(o=o.pos,r=r.pos,o.line==r.line&&o.ch>r.ch||o.line>r.line){var h=o;o=r,r=h}return i?r.ch+=1:o.ch+=1,{start:o,end:r}}function $e(e,t,n,i){var o,r,s,a,l=K(t),c=e.getLine(l.line).split(""),h=c.indexOf(n);if(l.ch'+t+"",{bottom:!0,duration:5e3}):alert(t)}function Ne(e,t){var n=''+(e||"")+'';return t&&(n+=' '+t+""),n}function Pe(e,t){var n=(t.prefix||"")+" "+(t.desc||"");Le(e,Ne(t.prefix,t.desc),n,t.onClose,t)}function De(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],i=0;i"+a+" (y/n/a/q/l)",onKeyDown:g}):(c(),void(l&&l()));He(o,"No matches for "+s.source)}function Qe(e){var t=e.state.vim,n=Kt.macroModeState,i=Kt.registerController.getRegister("."),o=n.isPlaying,r=n.lastInsertModeChanges;o||(e.off("change",it),_t.off(e.getInputField(),"keydown",lt)),!o&&1|<\w+>|./.exec(h))[0],h=h.substring(l.index+c.length),_t.Vim.handleKey(e,c,"macro"),t.insertMode){var u=o.insertModeChanges[s++].changes;ht(e,Kt.macroModeState.lastInsertModeChanges.changes=u,1),Qe(e)}n.isPlaying=!1}function et(e,t){if(!e.isPlaying){var n=e.latestRegister,i=Kt.registerController.getRegister(n);i&&i.pushText(t)}}function tt(e){if(!e.isPlaying){var t=e.latestRegister,n=Kt.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}}function nt(e,t){if(!e.isPlaying){var n=e.latestRegister,i=Kt.registerController.getRegister(n);i&&i.pushSearchQuery&&i.pushSearchQuery(t)}}function it(e,t){var n=Kt.macroModeState,i=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(i.expectCursorActivityForChange=!0,1",j(o,i))}else!t.insertMode&&!n&&(t.lastHPos=e.getCursor().ch)}function at(e){this.keyName=e}function lt(e){function t(){return n.maybeReset&&(n.changes=[],n.maybeReset=!1),n.changes.push(new at(i)),!0}var n=Kt.macroModeState.lastInsertModeChanges,i=_t.keyName(e);i&&(-1!=i.indexOf("Delete")||-1!=i.indexOf("Backspace"))&&_t.lookupKey(i,"vim-insert",t)}function ct(n,i,e,t){function o(){a?qt.processAction(n,i,i.lastEditActionCommand):qt.evalInput(n,i)}function r(e){if(0"),i}function dt(n){var i=new n.constructor;return Object.keys(n).forEach(function(e){var t=n[e];Array.isArray(t)?t=t.slice():t&&"object"==typeof t&&t.constructor!=Object&&(t=dt(t)),i[e]=t}),n.sel&&(i.sel={head:n.sel.head&&K(n.sel.head),anchor:n.sel.anchor&&K(n.sel.anchor)}),i}function gt(r,s,a){var l=!1,e=Tt.maybeInitVimState_(r),t=e.visualBlock||e.wasInVisualBlock,n=r.ace.inMultiSelectMode;if(e.wasInVisualBlock&&!n?e.wasInVisualBlock=!1:n&&e.visualBlock&&(e.wasInVisualBlock=!0),""!=s||e.insertMode||e.visualMode||!n)if(t||!n||r.ace.inVirtualSelectionMode)l=Tt.handleKey(r,s,a);else{var c=dt(e);r.operation(function(){r.ace.forEachSelection(function(){var e=r.ace.selection;r.state.vim.lastHPos=null==e.$desiredColumn?e.lead.column:e.$desiredColumn;var t=r.getCursor("head"),n=r.getCursor("anchor"),i=U(t,n)?0:-1,o=U(t,n)?-1:0;t=N(t,0,i),n=N(n,0,o),r.state.vim.sel.head=t,r.state.vim.sel.anchor=n,l=ln(r,s,a),e.$desiredColumn=-1==r.state.vim.lastHPos?null:r.state.vim.lastHPos,r.virtualSelectionMode()&&(r.state.vim=dt(c))}),r.curOp.cursorActivity&&!l&&(r.curOp.cursorActivity=!1)},!0)}else r.ace.exitMultiSelectMode();return l&&!e.visualMode&&!e.insert&&e.visualMode!=r.somethingSelected()&&st(r,e,!0),l}function pt(e,t){t.off("beforeEndOperation",pt);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}var ft=e("../range").Range,mt=e("../lib/event_emitter").EventEmitter,vt=e("../lib/dom"),bt=e("../lib/oop"),wt=e("../lib/keys"),yt=e("../lib/event"),xt=e("../search").Search,kt=e("../lib/useragent"),Ct=e("../search_highlight").SearchHighlight,St=e("../commands/multi_select_commands"),$t=e("../mode/text").Mode.prototype.tokenRe;e("../multi_select");var _t=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};_t.Pos=function(e,t){if(!(this instanceof Rt))return new Rt(e,t);this.line=e,this.ch=t},_t.defineOption=function(){},_t.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},_t.keyMap={},_t.addClass=_t.rmClass=function(){},_t.e_stop=_t.e_preventDefault=yt.stopEvent,_t.keyName=function(e){var t=wt[e.keyCode]||e.key||"";return 1==t.length&&(t=t.toUpperCase()),t=yt.getModifierString(e).replace(/(^|-)\w/g,function(e){return e.toUpperCase()})+t},_t.keyMap["default"]=function(n){return function(e){var t=e.ace.commands.commandKeyBinding[n.toLowerCase()];return t&&!1!==e.ace.execCommand(t)}},_t.lookupKey=function hn(e,t,n){t||(t="default"),"string"==typeof t&&(t=_t.keyMap[t]);var i="function"==typeof t?t(e):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if(!Array.isArray(t.fallthrough))return hn(e,t.fallthrough,n);for(var o=0;o=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.post},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(-1",type:"keyToKey",toKeys:"h"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"l"},{keys:"",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"",type:"keyToKey",toKeys:"W"},{keys:"",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"",type:"keyToKey",toKeys:"w"},{keys:"",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"",type:"keyToKey",toKeys:"j"},{keys:"",type:"keyToKey",toKeys:"k"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"",type:"keyToKey",toKeys:"",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"",type:"keyToKey",toKeys:"0"},{keys:"",type:"keyToKey",toKeys:"$"},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:""},{keys:"",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{ -keys:"T",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"",type:"idle",context:"normal"},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r",type:"action",action:"replace",isEdit:!0},{keys:"@",type:"action",action:"replayMacro"},{keys:"q",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"",type:"action",action:"redo"},{keys:"m",type:"action",action:"setMark"},{keys:'"',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a",type:"motion",motion:"textObjectManipulation"},{keys:"i",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],Lt=At.length,Mt=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"global",shortName:"g"}],Rt=_t.Pos,Tt=function(){return jt};_t.defineOption("vimMode",!1,function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=_t.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")});var Et={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A"},Ot={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"},It=/[\d]/,Ft=[_t.isWordChar,function(e){return e&&!_t.isWordChar(e)&&!/\s/.test(e)}],Bt=[function(e){return/\S/.test(e)}],Ht=u(65,26),Nt=u(97,26),Pt=u(48,10),Dt=[].concat(Ht,Nt,Pt,["<",">"]),Wt=[].concat(Ht,Nt,Pt,["-",'"',".",":","/"]),zt={};y("filetype",undefined,"string",["ft"],function(e,t){if(t!==undefined){if(e===undefined)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}});var Kt,Vt,Ut=function(){function e(i,e,t){function n(e){var t=++a%s,n=h[t];n&&n.clear(),h[t]=i.setBookmark(e)}var o=h[a%s];if(o){var r=o.find();r&&!V(r,e)&&n(e)}else n(e);n(t),(c=(l=a)-s+1)<0&&(c=0)}function t(e,t){l<(a+=t)?a=l:a"==l)return T(a),h.visualMode?le(a):h.insertMode&&Qe(a),!0}function e(e){for(var t;e;)t=/<\w+-.+?>|<\w+>|./.exec(e),l=t[0],e=e.substring(t.index+l.length),_t.Vim.handleKey(a,l,"mapping")}function n(){if(c())return!0;for(var e=h.inputState.keyBuffer=h.inputState.keyBuffer+l,t=1==l.length,n=qt.matchCommand(e,At,h.inputState,"insert");1=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);-1"==o.keys.slice(-11)){var l=W(e);if(//.test(l)||!l)return{type:"none"};n.selectedCharacter=l}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=H(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var i=t.inputState;if(i.operator){if(i.operator==n.operator)return i.motion="expandToLine",i.motionArgs={linewise:!0},void this.evalInput(e,t);T(e)}i.operator=n.operator,i.operatorArgs=H(n.operatorArgs),n.exitVisualBlock&&(t.visualBlock=!1,re(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var i=t.visualMode,o=H(n.operatorMotionArgs);o&&i&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),i||this.processMotion(e,t,n)},processAction:function(e,t,n){var i=t.inputState,o=i.getRepeat(),r=!!o,s=H(n.actionArgs)||{};i.selectedCharacter&&(s.selectedCharacter=i.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),s.repeat=o||1,s.repeatIsExplicit=r,s.registerName=i.registerName,T(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,i,n),Yt[n.action](e,s,t)},processSearch:function(a,i,o){function n(e,t,n){Kt.searchHistoryController.pushInput(e),Kt.searchHistoryController.reset();try{We(a,e,t,n)}catch(h){return He(a,"Invalid regex: "+e),void T(a)}qt.processMotion(a,i,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:o.searchArgs.toJumplist}})}function e(e){n(e,!0,!0);var t=Kt.macroModeState;t.isRecording&&nt(t,e)}function t(e,t,n){var i,o,r,s=_t.keyName(e);"Up"==s||"Down"==s?(i="Up"==s,o=e.target?e.target.selectionEnd:0,n(t=Kt.searchHistoryController.nextMatch(t,i)||""),o&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(o,e.target.value.length))):"Left"!=s&&"Right"!=s&&"Ctrl"!=s&&"Alt"!=s&&"Shift"!=s&&Kt.searchHistoryController.reset();try{r=We(a,t,!0,!0)}catch(e){}r?a.scrollIntoView(Ve(a,!l,r),30):(Ue(a),a.scrollTo(u.left,u.top))}function r(e,t,n){var i=_t.keyName(e);"Esc"==i||"Ctrl-C"==i||"Ctrl-["==i||"Backspace"==i&&""==t?(Kt.searchHistoryController.pushInput(t),Kt.searchHistoryController.reset(),We(a,h),Ue(a),a.scrollTo(u.left,u.top),_t.e_stop(e),T(a),n(),a.focus()):"Up"==i||"Down"==i?_t.e_stop(e):"Ctrl-U"==i&&(_t.e_stop(e),n(""))}if(a.getSearchCursor){var l=o.searchArgs.forward,s=o.searchArgs.wholeWordOnly;Ae(a).setReversed(!l);var c=l?"/":"?",h=Ae(a).getQuery(),u=a.getScrollInfo();switch(o.searchArgs.querySrc){case"prompt":var d=Kt.macroModeState;if(d.isPlaying)n(f=d.replaySearchQueries.shift(),!0,!1);else Pe(a,{onClose:e,prefix:c,desc:nn,onKeyUp:t,onKeyDown:r});break;case"wordUnderCursor":var g=de(a,!1,!0,!1,!0),p=!0;if(g||(g=de(a,!1,!0,!1,!1),p=!1),!g)return;var f=a.getLine(g.start.line).substring(g.start.ch,g.end.ch);f=p&&s?"\\b"+f+"\\b":Y(f),Kt.jumpList.cachedCursor=a.getCursor(),a.setCursor(g.start),n(f,!0,!1)}}},processEx:function(s,e,t){function n(e){Kt.exCommandHistoryController.pushInput(e),Kt.exCommandHistoryController.reset(),sn.processCommand(s,e)}function i(e,t,n){var i,o,r=_t.keyName(e);("Esc"==r||"Ctrl-C"==r||"Ctrl-["==r||"Backspace"==r&&""==t)&&(Kt.exCommandHistoryController.pushInput(t),Kt.exCommandHistoryController.reset(),_t.e_stop(e),T(s),n(),s.focus()),"Up"==r||"Down"==r?(_t.e_stop(e),i="Up"==r,o=e.target?e.target.selectionEnd:0,n(t=Kt.exCommandHistoryController.nextMatch(t,i)||""),o&&e.target&&(e.target.selectionEnd=e.target.selectionStart=Math.min(o,e.target.value.length))):"Ctrl-U"==r?(_t.e_stop(e),n("")):"Left"!=r&&"Right"!=r&&"Ctrl"!=r&&"Alt"!=r&&"Shift"!=r&&Kt.exCommandHistoryController.reset()}"keyToEx"==t.type?sn.processCommand(s,t.exArgs.input):e.visualMode?Pe(s,{onClose:n,prefix:":",value:"'<,'>",onKeyDown:i,selectValueOnOpen:!1}):Pe(s,{onClose:n,prefix:":",onKeyDown:i})},evalInput:function(e,t){var n,i,o,r=t.inputState,s=r.motion,a=r.motionArgs||{},l=r.operator,c=r.operatorArgs||{},h=r.registerName,u=t.sel,d=K(t.visualMode?B(e,u.head):e.getCursor("head")),g=K(t.visualMode?B(e,u.anchor):e.getCursor("anchor")),p=K(d),f=K(g);if(l&&this.recordLastEdit(t,r),0<(o=r.repeatOverride!==undefined?r.repeatOverride:r.getRepeat())&&a.explicitRepeat?a.repeatIsExplicit=!0:(a.noRepeat||!a.explicitRepeat&&0===o)&&(o=1,a.repeatIsExplicit=!1),r.selectedCharacter&&(a.selectedCharacter=c.selectedCharacter=r.selectedCharacter),a.repeat=o,T(e),s){var m=Xt[s](e,d,a,t);if(t.lastMotion=Xt[s],!m)return;if(a.toJumplist){!l&&null!=e.ace.curOp&&(e.ace.curOp.command.scrollIntoView="center-animate");var v=Kt.jumpList,b=v.cachedCursor;b?(ge(e,b,m),delete v.cachedCursor):ge(e,d,m)}m instanceof Array?(i=m[0],n=m[1]):n=m,n||(n=K(d)),t.visualMode?(t.visualBlock&&n.ch===Infinity||(n=B(e,n,t.visualBlock)),i&&(i=B(e,i,!0)),i=i||f,u.anchor=i,u.head=n,re(e),ye(e,t,"<",U(i,n)?i:n),ye(e,t,">",U(i,n)?n:i)):l||(n=B(e,n),e.setCursor(n.line,n.ch))}if(l){if(c.lastSel){i=f;var w=c.lastSel,y=Math.abs(w.head.line-w.anchor.line),x=Math.abs(w.head.ch-w.anchor.ch);n=w.visualLine?Rt(f.line+y,f.ch):w.visualBlock?Rt(f.line+y,f.ch+x):w.head.line==w.anchor.line?Rt(f.line,f.ch+x):Rt(f.line+y,f.ch),t.visualMode=!0,t.visualLine=w.visualLine,t.visualBlock=w.visualBlock,u=t.sel={anchor:i,head:n},re(e)}else t.visualMode&&(c.lastSel={anchor:K(u.anchor),head:K(u.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var k,C,S,$,_;if(t.visualMode){if(k=G(u.head,u.anchor),C=j(u.head,u.anchor),S=t.visualLine||c.linewise,_=se(e,{anchor:k,head:C},$=t.visualBlock?"block":S?"line":"char"),S){var A=_.ranges;if("block"==$)for(var L=0;Lh.start.row&&(a=h.end.row+1):a=h.start.row),n.toFirstChar&&(r=ue(e.getLine(a)),i.lastHPos=r),i.lastHSPos=e.charCoords(Rt(a,r),"div").left,Rt(a,r)},moveByDisplayLines:function(e,t,n,i){var o=t;switch(i.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:i.lastHSPos=e.charCoords(o,"div").left}var r=n.repeat;if((a=e.findPosV(o,n.forward?r:-r,"line",i.lastHSPos)).hitSide)if(n.forward)var s={top:e.charCoords(a,"div").top+8,left:i.lastHSPos},a=e.coordsChar(s,"div");else{var l=e.charCoords(Rt(e.firstLine(),0),"div");l.left=i.lastHSPos,a=e.coordsChar(l,"div")}return i.lastHPos=a.ch,a},moveByPage:function(e,t,n){var i=t,o=n.repeat;return e.findPosV(i,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var i=n.forward?1:-1;return ke(e,t,n.repeat,i)},moveBySentence:function(e,t,n){var i=n.forward?1:-1;return Ce(e,t,n.repeat,i)},moveByScroll:function(e,t,n,i){var o=e.getScrollInfo(),r=null,s=n.repeat;s||(s=o.clientHeight/(2*e.defaultTextHeight()));var a=e.charCoords(t,"local");if(n.repeat=s,!(r=Xt.moveByDisplayLines(e,t,n,i)))return null;var l=e.charCoords(r,"local");return e.scrollTo(null,o.top+l.top-a.top),r},moveByWords:function(e,t,n){return ve(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var i=be(e,n.repeat,n.forward,n.selectedCharacter),o=n.forward?-1:1;return pe(o,n),i?(i.ch+=o,i):null},moveToCharacter:function(e,t,n){var i=n.repeat;return pe(0,n),be(e,i,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return fe(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,i){var o=n.repeat;return i.lastHPos=o-1,i.lastHSPos=e.charCoords(t,"div").left,we(e,o)},moveToEol:function(e,t,n,i,o){var r=Rt(t.line+n.repeat-1,Infinity),s=e.clipPos(r);return s.ch--,o||(i.lastHPos=Infinity,i.lastHSPos=e.charCoords(s,"div").left),r},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return Rt(n.line,ue(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,i=t,o=i.line,r=i.ch,s=e.getLine(o);r]/.test(s[r])?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(Rt(o,r+1),{bracketRegex:l}).to}return i},moveToStartOfLine:function(e,t){return Rt(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var i=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(i=n.repeat-e.getOption("firstLineNumber")),Rt(i,ue(e.getLine(i)))},textObjectManipulation:function(e,t,n,i){var o={"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"},r={"'":!0,'"':!0,"`":!0},s=n.selectedCharacter;"b"==s?s="(":"B"==s&&(s="{");var a,l=!n.textObjectInner;if(o[s])a=Se(e,t,s,l);else if(r[s])a=$e(e,t,s,l);else if("W"===s)a=de(e,l,!0,!0);else if("w"===s)a=de(e,l,!0,!1);else{if("p"!==s)return null;if(a=ke(e,t,n.repeat,0,l),n.linewise=!0,i.visualMode)i.visualLine||(i.visualLine=!0);else{var c=i.inputState.operatorArgs;c&&(c.linewise=!0),a.end.line--}}return e.state.vim.visualMode?oe(e,a.start,a.end):[a.start,a.end]},repeatLastCharacterSearch:function(e,t,n){var i=Kt.lastCharacterSearch,o=n.repeat,r=n.forward===i.forward,s=(i.increment?1:0)*(r?-1:1);e.moveH(-s,"char"),n.inclusive=!!r;var a=be(e,o,r,i.selectedCharacter);return a?(a.ch+=s,a):(e.moveH(s,"char"),t)}},Qt={change:function(e,t,n){var i,o,r=e.state.vim,s=n[0].anchor,a=n[0].head;if(r.visualMode)if(t.fullLine)a.ch=Number.MAX_VALUE,a.line--,e.setSelection(s,a),o=e.getSelection(),e.replaceSelections(""),i=s;else{o=e.getSelection();var l=O("",n.length);e.replaceSelections(l),i=G(n[0].head,n[0].anchor)}else{o=e.getRange(s,a);var c=r.lastEditInputState||{};if("moveByWords"==c.motion&&!v(o)){var h=/\s+$/.exec(o);h&&c.motionArgs&&c.motionArgs.forward&&(a=N(a,0,-h[0].length),o=o.slice(0,-h[0].length))}var u=new Rt(s.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();a.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",u,a):e.replaceRange("",s,a),t.linewise&&(d||(e.setCursor(u),_t.commands.newlineAndIndent(e)),s.ch=Number.MAX_VALUE),i=s}Kt.registerController.pushText(t.registerName,"change",o,t.linewise,1c.top?(l.line+=(a-c.top)/o,l.line=Math.ceil(l.line),e.setCursor(l),c=e.charCoords(l,"local"),e.scrollTo(null,c.top)):e.scrollTo(null,a);else{var h=a+e.getScrollInfo().clientHeight;h=o.anchor.line?N(o.head,0,1):Rt(o.anchor.line,0)}else if("inplace"==i&&n.visualMode)return;e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption( -"keyMap","vim-replace"),_t.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),_t.signal(e,"vim-mode-change",{mode:"insert"})),Kt.macroModeState.isPlaying||(e.on("change",it),_t.on(e.getInputField(),"keydown",lt)),n.visualMode&&le(e),ee(e,r,s)}},toggleVisualMode:function(e,t,n){var i,o=t.repeat,r=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),re(e)):le(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,i=B(e,Rt(r.line,r.ch+o-1),!0),n.sel={anchor:r,head:i},_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),re(e),ye(e,n,"<",G(r,i)),ye(e,n,">",j(r,i)))},reselectLastSelection:function(e,t,n){var i=n.lastSelection;if(n.visualMode&&ie(e,n),i){var o=i.anchorMark.find(),r=i.headMark.find();if(!o||!r)return;n.sel={anchor:o,head:r},n.visualMode=!0,n.visualLine=i.visualLine,n.visualBlock=i.visualBlock,re(e),ye(e,n,"<",G(o,r)),ye(e,n,">",j(o,r)),_t.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var i,o;if(n.visualMode){if(i=e.getCursor("anchor"),U(o=e.getCursor("head"),i)){var r=o;o=i,i=r}o.ch=X(e,o.line)-1}else{var s=Math.max(t.repeat,2);i=e.getCursor(),o=B(e,Rt(i.line+s-1,Infinity))}for(var a=0,l=i.line;li.lastLine()&&i.replaceRange("\n",Rt($,0)),X(i,$)l.length&&(i=l.length),o=Rt(s.line,i)}if("\n"==r)n.visualMode||e.replaceRange("",s,o),(_t.commands.newlineAndIndentContinueComment||_t.commands.newlineAndIndent)(e);else{var c=e.getRange(s,o);if(c=c.replace(/[^\n]/g,r),n.visualBlock){var h=new Array(e.getOption("tabSize")+1).join(" ");c=(c=e.getSelection()).replace(/\t/g,h).replace(/[^\n]/g,r).split("\n"),e.replaceSelections(c)}else e.replaceRange(c,s,o);n.visualMode?(s=U(a[0].anchor,a[0].head)?a[0].anchor:a[0].head,e.setCursor(s),le(e,!1)):e.setCursor(N(o,0,-1))}},incrementNumberToken:function(e,t){for(var n,i,o,r,s=e.getCursor(),a=e.getLine(s.line),l=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=l.exec(a))&&(o=(i=n.index)+n[0].length,!(s.ch
";if(n){n=n.join("");for(var r=0;r"}}else for(var s in i){var a=i[s].toString();a.length&&(o+='"'+s+" "+a+"
")}He(e,o)},sort:function(e,r){function t(){if(r.argString){var e=new _t.StringStream(r.argString);if(e.eat("!")&&(s=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var t=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!t&&!e.eol())return"Invalid arguments";if(t[1]){a=-1!=t[1].indexOf("i"),l=-1!=t[1].indexOf("u");var n=-1!=t[1].indexOf("d")||-1!=t[1].indexOf("n")&&1,i=-1!=t[1].indexOf("x")&&1,o=-1!=t[1].indexOf("o")&&1;if(1")}if(i){var d=0,g=function(){if(d",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),Yt.aceCommand=function(e,t){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",pt):pt(null,e.ace)},Yt.fold=function(e,t){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=At,t.handler.actions=Yt,t.Vim=Tt}),ace.require(["ace/keyboard/vim"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"],function(e,t){"use strict";function n(){}var i=e("./lib/oop"),r=(e("./range").Range,e("./search").Search),s=e("./edit_session").EditSession,o=e("./search_highlight").SearchHighlight;i.inherits(n,r),function(){this.enter=function(e,t){if(!t.needle)return!1;var n=e.getCursorPosition();this.displayOccurContent(e,t);var i=this.originalToOccurPosition(e.session,n);return e.moveCursorToPosition(i),!0},this.exit=function(e,t){var n=t.translatePosition&&e.getCursorPosition(),i=n&&this.occurToOriginalPosition(e.session,n);return this.displayOriginalContent(e),i&&e.moveCursorToPosition(i),!0},this.highlight=function(e,t){(e.$occurHighlight=e.$occurHighlight||e.addDynamicMarker(new o(null,"ace_occur-highlight","text"))).setRegexp(t),e._emit("changeBackMarker")},this.displayOccurContent=function(e,t){this.$originalSession=e.session;var n=this.matchingLines(e.session,t),i=n.map(function(e){return e.content}),o=new s(i.join("\n"));o.$occur=this,o.$occurMatchingLines=n,e.setSession(o),this.$useEmacsStyleLineStart=this.$originalSession.$useEmacsStyleLineStart,o.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart,this.highlight(o,t.re),o._emit("changeBackMarker")},this.displayOriginalContent=function(e){e.setSession(this.$originalSession),this.$originalSession.$useEmacsStyleLineStart=this.$useEmacsStyleLineStart},this.originalToOccurPosition=function(e,t){var n=e.$occurMatchingLines,i={row:0,column:0};if(!n)return i;for(var o=0;o=t.length?t.length:e.length,i=[],o=0;o'+t.command+' : '+t.key+"
"},"");i.id="kbshortcutmenu",i.innerHTML="

Keyboard Shortcuts

"+o+"",t(e,i)}}var i=r("../editor").Editor;t.exports.init=function(e){i.prototype.showKeyboardShortcuts=function(){n(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e){e.showKeyboardShortcuts()}}])}}),ace.require(["ace/ext/keybinding_menu"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"],function(e,a){"use strict";function t(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}var n=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,c=e("./lib/lang"),h=e("./range").Range,u=e("./range_list").RangeList,o=e("./keyboard/hash_handler").HashHandler,r=e("./tokenizer").Tokenizer,s=e("./clipboard"),l={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){var i=e.session.getTextRange();return n?i.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):i},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(){return s.getText&&s.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:t.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:t.bind(null,{year:"2-digit"}),CURRENT_MONTH:t.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:t.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:t.bind(null,{month:"short"}),CURRENT_DATE:t.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:t.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:t.bind(null,{weekday:"short"}),CURRENT_HOUR:t.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:t.bind(null,{minute:"2-digit"}),CURRENT_SECOND:t.bind(null,{second:"2-digit"})};l.SELECTED_TEXT=l.SELECTION;var d=function(){this.snippetMap={},this.snippetNameMap={}};(function(){n.implement(this,i),this.getTokenizer=function(){return d.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function o(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function e(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var t={regex:"/("+e("/")+"+)/",onMatch:function(e,t,n){var i=n[0];return i.fmtString=!0,i.guard=e.slice(1,-1),i.flag=""},next:"formatString"};return d.$tokenizer=new r({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)&&(e=i),[e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:o},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,t,n){var i=o(e.substr(1));return n.unshift(i[0]),i},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(e,t,n){var i=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return 2==e.length?e[1]:"\0"}).split("\0");return[(n[0].choices=i)[0]]},next:"start"},t,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length?e=i:-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:"a"r&&(c=r-i.offsetWidth),i.style.left=c+"px",this._signal("show"),h=null,d.isOpen=!0},d.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=n<=t?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},d.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},d.$imageSize=0,d.$borderSize=1,d};g.importCssString(".ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1;}.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e;}.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2;}.ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62);}.ace_completion-meta { opacity: 0.5; margin: 0.9em;}.ace_completion-message { color: blue;}.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7;}.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12;}.ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111;}.ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1;}","autocompletion.css"),t.AcePopup=n,t.$singleLineEditor=p}),ace.define("ace/autocomplete/util",["require","exports","module"],function(e,t){"use strict";t.parForEach=function(e,t,n){var i=0,o=e.length;0===o&&n();for(var r=0;rthis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort(function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)});var n=null;t=t.filter(function(e){var t=e.snippet||e.caption||e.value;return t!==n&&(n=t,!0)}),this.filtered=t},this.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=r.caption||r.value||r.snippet;if(a){var l,c,h=-1,u=0,d=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue e}else{var g=a.toLowerCase().indexOf(o);if(-1",i.escapeHTML(e.caption),"","
",i.escapeHTML(e.snippet)].join(""))}},h=[l,s,a];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=s,t.keyWordCompleter=a,t.snippetCompleter=l;var u={name:"expandSnippet",exec:function(e){return c.expandWithTab(e)},bindKey:"Tab"},d=function(e,t){g(t.session.$mode)},g=function(e){var t=e.$id;c.files||(c.files={}),p(t),e.modes&&e.modes.forEach(g)},p=function(t){if(t&&!c.files[t]){var e=t.replace("mode","snippets");c.files[t]={},n.loadModule(e,function(e){e&&(!(c.files[t]=e).snippets&&e.snippetText&&(e.snippets=c.parseSnippetFile(e.snippetText)),c.register(e.snippets||[],e.scope),e.includeScopes&&(c.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach(function(e){p("ace/mode/"+e)})))})}},f=function(e){var t=e.editor,n=t.completer&&t.completer.activated;if("backspace"===e.command.name)n&&!r.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name){if(r.getCompletionPrefix(t)&&!n){var i=o["for"](t);i.autoInsert=!1,i.showPopup(t)}}},m=e("../editor").Editor;e("../config").defineOptions(m.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(o.startCommand)):this.commands.removeCommand(o.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",f)):this.commands.removeListener("afterExec",f)},value:!1},enableSnippets:{set:function(e){e?(this.commands.addCommand(u),this.on("changeMode",d),d(null,this)):(this.commands.removeCommand(u),this.off("changeMode",d))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,o){function t(e){var t=e.editor;if(e.getAccelKey()){t=e.editor;var n=e.getDocumentPosition(),i=t.session.getTokenAt(n.row,n.column);o.previousLinkingHover&&o.previousLinkingHover!=i&&t._emit("linkHoverOut"),t._emit("linkHover",{position:n,token:i}),o.previousLinkingHover=i}else o.previousLinkingHover&&(t._emit("linkHoverOut"),o.previousLinkingHover=!1)}function n(e){var t=e.getAccelKey();if(0==e.getButton()&&t){var n=e.editor,i=e.getDocumentPosition(),o=n.session.getTokenAt(i.row,i.column);n._emit("linkClick",{position:i,token:o})}}var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",n),this.on("mousemove",t)):(this.off("click",n),this.off("mousemove",t))},value:!1}}),o.previousLinkingHover=!1}),ace.require(["ace/ext/linking"],function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}),ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e){"use strict";function t(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&0===n.column&&(t.session.$bidiHandler.isMoveLeftOperation&&0=o.length))););}this.searchCounter.textContent=i+" of "+(l 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(t){this.$editors.forEach(function(e){e.setTheme(t)})},this.setKeyboardHandler=function(t){this.$editors.forEach(function(e){e.setKeyboardHandler(t)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(t){this.$fontSize=t,this.forEach(function(e){e.setFontSize(t)})},this.$cloneSession=function(e){var t=new s(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(t,e){var n;return n=null==e?this.$cEditor:this.$editors[e],this.$editors.some(function(e){return e.session===t})&&(t=this.$cloneSession(t)),n.setSession(t),t},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e,t=this.$container.clientWidth,n=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var i=t/this.$splits,o=0;o")}return this.textContent&&e.push(this.textContent),"fragment"!=this.type&&e.push(""),e.join("")};var f={createTextNode:function(e){return r(e)},createElement:function(e){return new i(e)},createFragment:function(){return new i("fragment")}},m=function(){this.config={},this.dom=f};m.prototype=o.prototype;var v=function(s,e,a){var t=s.className.match(/lang-(\w+)/),n=e.mode||t&&"ace/mode/"+t[1];if(!n)return!1;var i=e.theme||"ace/theme/textmate",o="",l=[];if(s.firstElementChild)for(var r=0,c=0;c"),n)e.push("");e.push("")}else e.push("")}var o=null,r={mode:"Mode:",wrap:"Soft Wrap:",theme:"Theme:",fontSize:"Font Size:",showGutter:"Display Gutter:",keybindings:"Keyboard",showPrintMargin:"Show Print Margin:",useSoftTabs:"Use Soft Tabs:",showInvisibles:"Show Invisibles"},s={mode:{text:"Plain",javascript:"JavaScript",xml:"XML",html:"HTML",css:"CSS",scss:"SCSS",python:"Python",php:"PHP",java:"Java",ruby:"Ruby",c_cpp:"C/C++",coffee:"CoffeeScript",json:"json",perl:"Perl",clojure:"Clojure",ocaml:"OCaml",csharp:"C#",haxe:"haXe",svg:"SVG",textile:"Textile",groovy:"Groovy",liquid:"Liquid",Scala:"Scala"},theme:{clouds:"Clouds",clouds_midnight:"Clouds Midnight",cobalt:"Cobalt",crimson_editor:"Crimson Editor",dawn:"Dawn",gob:"Green on Black",eclipse:"Eclipse",idle_fingers:"Idle Fingers",kr_theme:"Kr Theme",merbivore:"Merbivore",merbivore_soft:"Merbivore Soft",mono_industrial:"Mono Industrial",monokai:"Monokai",pastel_on_dark:"Pastel On Dark",solarized_dark:"Solarized Dark",solarized_light:"Solarized Light",textmate:"Textmate",twilight:"Twilight",vibrant_ink:"Vibrant Ink"},showGutter:o,fontSize:{"10px":"10px","11px":"11px","12px":"12px","14px":"14px","16px":"16px"},wrap:{off:"Off",40:"40",80:"80",free:"Free"},keybindings:{ace:"ace",vim:"vim",emacs:"emacs"},showPrintMargin:o,useSoftTabs:o,showInvisibles:o},a=[];for(var l in a.push(""),f.defaultOptions)a.push(""),a.push("");a.push("
SettingValue
",r[l],""),i(a,l,s[l],n.getOption(l)),a.push("
"),e.innerHTML=a.join("");for(var c=function(e){var t=e.currentTarget;n.setOption(t.title,t.value)},h=function(e){var t=e.currentTarget;n.setOption(t.title,t.checked)},u=e.getElementsByTagName("select"),d=0;dd.score&&(d={score:p,length:a})}if(d.score&&1.4=i&&r[2].charAt(0)==o?(n.splice(0,3),this.next=n.shift()):this.next="",this.token}},{defaultToken:"support.function"}],startCodeBlockMatch=function(e,t,n){var i=new RegExp(this.regex).exec(e);return n.unshift("githubblock",[],[i[2].length,i[2].charAt(0)],t),this.token},GollumCodeStart={token:"support.function",regex:"^( {0,3})(```)[^`]*$",onMatch:startCodeBlockMatch,next:"githubblock"},MarkdownCodeStart={token:"support.function",regex:"^( {0,3})(~~[~]+)[^`~]*$",onMatch:startCodeBlockMatch,next:"githubblock"};ace.define("GollumRstHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/rst_highlight_rules").RSTHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumAsciidocHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/asciidoc_highlight_rules").AsciidocHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumTextileHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/textile_highlight_rules").TextileHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumTextHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/text_highlight_rules").TextHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumRdocHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/rdoc_highlight_rules").RDocHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),ace.define("GollumMarkdownHighlightRules",[],function(e,t){"use strict";var n=e("ace/lib/oop"),i=e("ace/mode/markdown_highlight_rules").MarkdownHighlightRules,o=function(){var e=new i;this.$rules=e.getRules(),this.$rules.start=this.$rules.start.filter(function(e){return!("githubblock"==e.next)}),this.$rules.start.unshift(GollumTagStart),this.$rules.start.unshift(UMLStart),this.$rules.start.unshift(GollumCodeStart),this.$rules.start.unshift(MarkdownCodeStart),this.addRules({githubblock:GithubCodeBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.addRules({umlblock:UMLBlock}),null!=this.$rules.listblock&&this.$rules.listblock.unshift(GollumTagStart),this.normalizeRules()};n.inherits(o,i),t.GollumHighlightRules=o}),function(e){var r={asciidoc:{mode:"asciidoc",highlighter:"GollumAsciidocHighlightRules"},creole:{mode:"text",highlighter:"GollumTextHighlightRules"},markdown:{mode:"markdown",highlighter:"GollumMarkdownHighlightRules"},mediawiki:{mode:"text",highlighter:"GollumTextHighlightRules"},bib:{mode:"latex"},org:{mode:"text",highlighter:"GollumTextHighlightRules"},rst:{mode:"rst",highlighter:"GollumRstHighlightRules"},txt:{mode:"text"},pod:{mode:"text",highlighter:"GollumTextHighlightRules"},rdoc:{mode:"rdoc",highlighter:"GollumRdocHighlightRules"},textile:{mode:"textile",highlighter:"GollumTextileHighlightRules"}};e.getEditorMode=function(e){var t=null;if(t=r[e]){var n=t.mode,i=t.highlighter;if(i){var o=new(ace.require("ace/mode/"+n).Mode);return o.HighlightRules=ace.require(i).GollumHighlightRules,o}return"ace/mode/"+n}return null}}(jQuery),function(v){function l(e){return new RegExp("^[^"+"A-Za-z\xc0-\xd6\xd8-\xf6\xf8-\u02b8\u0300-\u0590\u0800-\u1fff\u2c00-\ufb1c\ufdfe-\ufe6f\ufefd-\uffff"+"]*["+"\u0591-\u07ff\ufb1d-\ufdfd\ufe70-\ufefc"+"]").test(e)}function c(e){window.ace_editor.session.$bidiHandler.$isRtl=e,window.ace_editor.session.$bidiHandler.updateBidiMap(),window.ace_editor.renderer.updateFull()}function h(){e&&clearTimeout(e),v("#gollum-saved-msg").text("Saving..."),e=setTimeout(function(){localStorage.setItem(g,window.ace_editor.getSession().getValue()),v("#gollum-editor-header, #gollum-editor-footer, #gollum-editor-sidebar").each(function(e,t){var n=g+t.id.replace("gollum-editor-","_");localStorage.setItem(n,t.value)}),v("#gollum-saved-msg").text("Saved recovery text")},2e3)}function u(e){var t=window.ace_editor;window.localStorage.setItem("gollum-kbm",e),"default"==e?t.setKeyboardHandler():"vim"==e||"emacs"==e?t.setKeyboardHandler("ace/keyboard/"+e):t.setKeyboardHandler(),t.focus()}var r={MarkupType:"markdown",EditorMode:"code",NewFile:!1,HasFunctionBar:!0,Debug:!1,NoDefinitionsFor:[]},d={},e=null,g="gollum_autorecover_"+window.location;v.GollumEditor=function(e){if(d=v.extend(r,e),v('textarea[id="gollum-editor-body"]').each(function(){var e=v(this),t=e.attr("data-markup-lang")?e.attr("data-markup-lang"):"markdown",n=v("
",{position:"absolute",height:e.height(),"class":e.attr("class"),id:"gollum-editor-body-ace"}).insertAfter(e);e.css("display","none");var i=ace.edit(n[0],{rtlText:!0});window.ace_editor=i;var o=localStorage.getItem(g);o&&(v("#gollum-autorecover-button").click(function(e){i.getSession().setValue(o),["header","footer","sidebar"].forEach(function(e){var t=localStorage.getItem(g+"_"+e);t&&v("#gollum-editor-"+e).val(t)}),v("#gollum-autorecover-msg")[0].hidden=!0,e.preventDefault()}),v("#gollum-autorecover-msg")[0].hidden=!1);var r=window.localStorage.getItem("gollum-kbm");r&&(default_keybinding=r);for(var s=document.getElementById("keybinding"),a=0;a'+t[n].menuName+"");v("#gollum-editor-help-parent").append(i),0===n&&i.children("a").addClass("selected"),i.children("a").click(o.evtParentMenuClick)}o.generateSubMenu(t[0],0),v(v("#gollum-editor-help-list li a").get(0)).click()},generateSubMenu:function(e,t){v("#gollum-editor-help-list").html(""),v("#gollum-editor-help-content").html("");for(var n=0;n'+e.content[n].menuName+"");v("#gollum-editor-help-list").append(i),i.children("a").click(o.evtSubMenuClick)}},hide:function(){v.browser.msie?v("#gollum-editor-help").css("display","none"):v("#gollum-editor-help").animate({opacity:0},200,function(){v("#gollum-editor-help").animate({height:"hide"},200)})},show:function(){v.browser.msie?v("#gollum-editor-help").css("display","block"):v("#gollum-editor-help").animate({height:"show"},200,function(){v("#gollum-editor-help").animate({opacity:1},300)})},showHelpFor:function(e,t){var n=o._HELP[o._ACTIVE_HELP_LANG][e].content[t].data;v("#gollum-editor-help-content").html(n)},isLoadedFor:function(e){for(var t=0;t $1$2",break_line:!0},"function-h1":{search:/(.+)([\n]?)/g,replace:"# $1$2",break_line:!0,whole_line:!0},"function-h2":{search:/(.+)([\n]?)/g,replace:"## $1$2",break_line:!0,whole_line:!0},"function-h3":{search:/(.+)([\n]?)/g,replace:"### $1$2",break_line:!0,whole_line:!0},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="["+e.text+"]("+e.href+")"),t},exec:function(e,t){n("Insert Link",[{id:"text",name:"Link Text",type:"text",defaultValue:t},{id:"href",name:"URL",type:"text"}],this.replace)}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="!["+e.alt+"]("+e.url+")"),t},exec:function(e,t){n("Insert Image",[{id:"url",name:"Image Url",type:"text",defaultValue:t},{id:"alt",name:"Alt Text",type:"text"}],this.replace)}},"function-critic-accept":{exec:function(e,t){var n=t.replace(/\{\+\+(.*?)\+\+[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"$1").replace(/\{--(.*?)--[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"").replace(/\{~~(.*?)~>(.*?)~~\}/gm,"$2").replace(/\{\=\=(.*?)[ \t]*(\[(.*?)\])?[ \t]*\=\=\}{>>(.*?)<<\}/gm,"$1").replace(/\{>>(.*?)<<\}/gm,"");r.GollumEditor.replaceSelection(n)}},"function-critic-reject":{exec:function(e,t){var n=t.replace(/\{\+\+(.*?)\+\+[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"").replace(/\{--(.*?)--[ \t]*(\[(.*?)\])?[ \t]*\}/gm,"$1").replace(/\{~~(.*?)~>(.*?)~~\}/gm,"$1").replace(/\{\=\=(.*?)[ \t]*(\[(.*?)\])?[ \t]*\=\=\}{>>(.*?)<<\}/gm,"$1").replace(/\{>>(.*?)<<\}/gm,"");r.GollumEditor.replaceSelection(n)}}}}(jQuery),function(e){var t={"function-bold":{replace:"*$1*$2"},"function-hr":undefined,"function-blockquote":{replace:"----\n$1$2\n----"},"function-h1":{replace:"= $1$2"},"function-h2":{replace:"== $1$2"},"function-h3":{replace:"=== $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t=e.href+"["+e.text+"]"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="image::"+e.url+"["+e.alt+"]"),t}}};e.GollumEditor.defineLanguage("asciidoc",e.constructLanguageDefinition(t));var n=[{menuName:"Text Formatting",content:[{menuName:"Headers",data:"

AsciiDoc headers can be written in two ways: with differing underlines or with different indentation using = (equals sign). AsciiDoc supports headings 1-4. The editor will automatically use the = notation. To create a level one header, prefix your line with one =. Level two headers are created with == and so on.

"},{menuName:"Bold / Italic",data:"

To display text as bold, wrap the text in * (asterisks). To display text as italic, wrap the text in _ (underscores). To create monospace text, wrap the text in ` (backtick)."},{menuName:"Scripts",data:"

Superscript and subscript is created the same way as other inline formats. To create superscript text, wrap your text in ^ (carats). To create subscript text, wrap your text in ~ (tildes).

"},{menuName:"Special Characters",data:"

AsciiDoc will automatically convert textual representations of commonly-used special characters. For example, (R) becomes ®, (C) becomes © and (TM) becomes ™.

"}]},{menuName:"Blocks",content:[{menuName:"Paragraphs",data:"

AsciiDoc allows paragraphs to have optional titles or icons to denote special sections. To make a normal paragraph, simply add a line between blocks and a new paragraph will start. If you want to title your paragraphs, adda line prefixed by . (full stop). An example paragraph with optional title is displayed below:

.Optional Title

This is my paragraph. It is two sentences long.

"},{menuName:"Source Blocks",data:"

To create source blocks (long blocks of code), follow the same syntax as above but with an extra line denoting the inline source and lines of four dashes (----) delimiting the source block.. An example of Python source is below:

.python.py
[source,python]
----
# i just wrote a comment in python
# and maybe one more
----

"},{menuName:"Comment Blocks",data:"

Comment blocks are useful if you want to keep notes for yourself inline but do not want them displayed to the public. To create a comment block, simply wrap the paragraph in dividers with four slashes (////). An example comment block is below:

////
My comment block is here now

It can be multiple paragraphs. Really.
////

"},{menuName:"Quote Blocks",data:"

Quote blocks work much like comment blocks — simply create dividers using four underscores (____) around your quote. An example quote block is displayed below:
____
This is my quote block. Quote something nice here, otherwise there is no point in quoting.
____

"}]},{menuName:"Macros",content:[{menuName:"Links",data:'

To create links to external pages, you can simply write the URI if you want the URI to link to itself. (i.e., http://github.com/ will automatically be parsed to http://github.com/. If you want different text to be displayed, simply append it to the end of the URI in between [ (brackets.) For example, http://github.com/[GitHub] will be parsed as GitHub, with the URI pointing to http://github.com.

'},{menuName:"Images",data:"

Images in AsciiDoc work much like hyperlinks, but image URLs are prefixed with image:. For example, to link to an image at images/icons/home.png, write image:images/icons/home.png. Alt text can be added by appending the text to the URI in [ (brackets).

"}]}];e.GollumEditor.defineHelp("asciidoc",n)}(jQuery),jQuery.GollumEditor.defineLanguage("bib",{}),function(e){var t={"function-italic":{replace:"//$1//$2"},"function-code":{replace:"{{{$1}}}$2"},"function-hr":{append:"\n\n----\n\n"},"function-blockquote":undefined,"function-ol":{line:function(e,t){return"# "+t+"\n"}},"function-h1":{replace:"== $1$2"},"function-h2":{replace:"=== $1$2"},"function-h3":{replace:"==== $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="[["+e.href+"|"+e.text+"]]"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t="{{"+e.url,""!=e.alt&&(t+="|"+e.alt),t+="}}"),t}}};e.GollumEditor.defineLanguage("creole",e.constructLanguageDefinition(t))}(jQuery),function(e){var t={"gollum-helpers":{"find-header-line":function(e,t){if(t.match(/(^[=]+$)/)||t.match(/(^[-]+$)/)){var n=e-1,i=window.ace_editor.getSession().getLine(n);return 0<=n&&!/^\s+$/.test(i)?[i,n]:null}return null}}};e.GollumEditor.defineLanguage("markdown",e.constructLanguageDefinition(t));var n=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

If you want to create a line break, end a line with two or more spaces, then hit Return/Enter.

"},{menuName:"Headers",data:"

Markdown supports two header formats. The wiki editor uses the “atx’-style headers. Simply prefix your header text with the number of # characters to specify heading depth. For example: # Header 1, ## Header 2 and ### Header 3 will be progressively smaller headers. You may end your headers with any number of hashes.

"},{menuName:"Blockquotes",data:"

Markdown creates blockquotes email-style by prefixing each line with the >. This looks best if you decide to hard-wrap text and prefix each line with a > character, but Markdown supports just putting > before your paragraph.

"},{menuName:"Lists",data:"

Markdown supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with *, + or -.

List items can contain multiple paragraphs, however each paragraph must be indented by at least 4 spaces or a tab."},{menuName:"Code Blocks",data:"

Markdown wraps code blocks in pre-formatted tags to preserve indentation in your code blocks. To create a code block, indent the entire block by at least 4 spaces or one tab. Markdown will strip the extra indentation you’ve added to the code block.

"},{menuName:"Horizontal Rules",data:"Horizontal rules are created by placing three or more hyphens, asterisks or underscores on a line by themselves. Spaces are allowed between the hyphens, asterisks or underscores."}]},{menuName:"Span Elements",content:[{menuName:"Links",data:"

Markdown has two types of links: inline and reference. For both types of links, the text you want to display to the user is placed in square brackets. For example, if you want your link to display the text “GitHub”, you write [GitHub].

To create an inline link, create a set of parentheses immediately after the brackets and write your URL within the parentheses. (e.g., [GitHub](http://github.com/)). Relative paths are allowed in inline links.

To create a reference link, use two sets of square brackets. [my internal link][internal-ref] will link to the internal reference internal-ref.

"},{menuName:"Emphasis",data:"

Asterisks (*) and underscores (_) are treated as emphasis and are wrapped with an <em> tag, which usually displays as italics in most browsers. Double asterisks (**) or double underscores (__) are treated as bold using the <strong> tag. To create italic or bold text, simply wrap your words in single/double asterisks/underscores. For example, **My double emphasis text** becomes My double emphasis text, and *My single emphasis text* becomes My single emphasis text.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in backticks (`). Markdown will turn `myFunction` into myFunction.

"},{menuName:"Images",data:"

Markdown image syntax looks a lot like the syntax for links; it is essentially the same syntax preceded by an exclamation point (!). For example, if you want to link to an image at http://github.com/unicorn.png with the alternate text My Unicorn, you would write ![My Unicorn](http://github.com/unicorn.png).

"}]},{menuName:"Miscellaneous",content:[{menuName:"Automatic Links",data:'

If you want to create a link that displays the actual URL, markdown allows you to quickly wrap the URL in < and > to do so. For example, the link http://github.com/ is easily produced by writing <http://github.com/>.

'},{menuName:"Escaping",data:"

If you want to use a special Markdown character in your document (such as displaying literal asterisks), you can escape the character with the backslash (\\). Markdown will ignore the character directly after a backslash."},{menuName:"Emoji",data:'

See the EmojiOne demo for all available emoji. To include one, wrap the emoji name in colons and use underscores instead of spaces (e.g. :heart: or :point_up:).'}]}];e.GollumEditor.defineHelp("markdown",n)}(jQuery),function(e){var t={"function-bold":{replace:"'''$1'''$2"},"function-italic":{replace:"''$1''$2"},"function-hr":{append:"\n---\n"},"function-code":{replace:"$1$2"},"function-ol":{link:function(e,t){return"# "+t+"\n"}},"function-blockquote":{replace:"

\n$1$2\n
"},"function-h1":{replace:"= $1$2 ="},"function-h2":{replace:"== $1$2 =="},"function-h3":{replace:"=== $1$2 ==="},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="["+e.href+" | "+e.text+"]"),t}}};e.GollumEditor.defineLanguage("mediawiki",e.constructLanguageDefinition(t));var n=[{menuName:"Text Formatting",content:[{menuName:"Headers",data:"

MediaWiki headers are written with different indentation using = Title = (equals sign). MediaWiki supports headings 1-6.

"},{menuName:"Bold / Italic",data:"

To display text as bold, wrap the text in '''. To display text as italic, wrap the text in ''. To create monospace text, wrap the text in <code></code>."},{menuName:"Special Characters",data:"

Use HTML special characters, e.g. © or

"}]},{menuName:"Blocks",content:[{menuName:"Paragraphs",data:"

MediaWiki ignores single line breaks. To start a new paragraph, leave an empty line. You can force a line break within a paragraph with the HTML tag
.

"},{menuName:"Tables",data:'

Tables may be authored in wiki pages using either XHTML table elements directly, or using wikicode formatting to define the table. Wikitable syntax overview:
 {|
table start
 |+
table caption, optional; only between table start and first table row
 |-
table row, optional on first row -- wiki engine assumes the first row
 !
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
 |
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
 |}
table end

'}]},{menuName:"Macros",content:[{menuName:"Links",data:"

To create links to external pages, use single brackets, e.g. [https://mediawiki.org MediaWiki]. Internal links use double brackets: [[Main Page]]. To define the link text, use [[Main Page | this is displayed]] (note: the order of the URL/Page Name and the link text is reversed compared to Gollum pages in other markups).

"},{menuName:"Images",data:"

Use Gollum internal links, e.g. [[sauron.jpg]], to insert images."}]}];e.GollumEditor.defineHelp("mediawiki",n)}(jQuery),function(e){var t={"function-bold":{replace:"*$1*$2"},"function-italic":{replace:"/$1/$2"},"function-code":{replace:"=$1=$2"},"function-hr":undefined,"function-blockquote":{replace:"#+BEGIN_QUOTE\n$1$2\n#+END_QUOTE"},"function-h1":{replace:"* $1$2"},"function-h2":{replace:"** $1$2"},"function-h3":{replace:"*** $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href?t="[["+e.href+"]["+e.text+"]]":e.href&&(t="[["+e.href+"]]"),t}},"function-image":{replace:function(e){var t="";return e.url&&(t="[["+e.url+"]]"),t}}};e.GollumEditor.defineLanguage("org",e.constructLanguageDefinition(t));var n=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

"},{menuName:"Headers",data:"

Simply prefix your header text with the number of * characters to specify heading depth. For example: * Header 1, ** Header 2 and *** Header 3 will be progressively smaller headers.

"},{menuName:"Blockquotes",data:"

To create a blockquote, simple embed the text between #+BEGIN_QUOTE and #+END_QUOTE. An example quote block is displayed below:
#+BEGIN_QUOTE
This is my quote block. Quote something nice here, otherwise there is no point in quoting.
#+END_QUOTE

"},{menuName:"Lists",data:"

Org-mode supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number (any number will do — this is why the editor only uses one number.) To create an unordered list, you can prefix each line with + or -.

"},{menuName:"Code Blocks",data:"

Code Blocks are similar to blockquote, except that #+BEGIN_EXAMPLE and #+END_EXAMPLE are used.

"},{menuName:"Tables",data:"

Org-mode supports simple tables (tables with equal number of cells in each row). To create a simple table, just separate the contents of each cell with a | character. For example,

|one|two|three|
|four|five|six|


will appear as a table with two rows and three columns. Additionally,

|one|two|three|
|---+---+-----|
|four|five|six|


will also appear as a table, but the first row will be interpreted as a header row and the <th> tag will be used to render it.

"}]},{menuName:"Span Elements",content:[{menuName:"Links",data:'

To create links to external pages, you need to enclose the URI in double square brackets. (i.e., [[http://github.com/]] will automatically be parsed to http://github.com/)If you want to add text, to be displayed to the user, you write the URI and the text next to each other, both enclosed in square brackets and both of them together enclosed in another pair of square brackets. For example, if you want your link to display the text “GitHub”, you write [[http://github.com][GitHub]].

'},{menuName:"Emphasis",data:"

Forward slashes (/) are treated as emphasis and are wrapped with an <i> tag. Asterisks (*) are treated as bold using the <b> tag.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in equal signs (=). Orgmode will turn =myFunction= into myFunction.

"},{menuName:"Images",data:"

Org-mode image syntax is exactly same as the syntax that you would use for a URI to link to itself. The image URI is enclosed in double square brackets. Alt text on images is not currently supported by Gollum's Org-mode parser.

"}]}];e.GollumEditor.defineHelp("org",n)}(jQuery),jQuery.GollumEditor.defineLanguage("txt",{}),function(e){var t={"function-bold":{replace:"B<$1>$2"},"function-italic":{replace:"I<$1>$2"},"function-hr":undefined,"function-code":{replace:"C<$1>$2"},"function-h1":{replace:"=head1 $1$2"},"function-h2":{replace:"=head2 $1$2"},"function-h3":{replace:"=head3 $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t="L<"+e.text+"|"+e.href+">"),t}},"function-image":undefined,"function-ul":undefined,"function-ol":undefined,"function-blockquote":undefined};e.GollumEditor.defineLanguage("pod",e.constructLanguageDefinition(t));var n=[{menuName:"Command Paragraphs",content:[{menuName:"Headings",data:"

All command paragraphs start with = (equals sign).

To create headings 1 through 4, begin your command paragraph with =headN, where N is the number of the heading 1 through 4. For example, to make a first-order heading (the largest possible,) write =head1, then on the next line begin your paragraph that you want under the heading.

"},{menuName:"Beginning & Ending",data:"

Perl pod blocks should begin with =pod and end with =cut, signifying to Pod parsers that the pod block has begun and ended. These command paragraphs only signal the beginning and end of a pod block.

"},{menuName:"Other Formats",data:"

pod also allows blocks in other formats, such as HTML or plain text. To create one of these blocks, use the =format SYNTAX command paragraph, where SYNTAX is the syntax of the block (e.g. html or txt). At the end of your block, use the =end SYNTAX block.

"},{menuName:"Encoding",data:"

If you are having encoding troubles, use the =encoding ENC_TYPE command, where ENC_TYPE is the encoding type (e.g. utf8, koi8-r). This will affect the entire document, not just the block below the command.

"}]},{menuName:"Formatting",content:[{menuName:"Text",data:"

Formatting text as bold, italic or code works in the S<word> syntax, where S is an abbreviation for the type of text you are trying to create. For example, B<my bold text> becomes my bold text, I<italic text> becomes italic text and C<code here()> becomes code here().

"},{menuName:"Hyperlinks",data:"

Writing hyperlinks in pod is much like formatting text, using the same S<> syntax. Instead of B, I or C, use L to begin a hyperlink.

pod allows you to hyperlink to a man page, a Perl documentation page, or another web page. To link to a man or Perl documentation page, simply include the page name in the link (e.g. L<perl(1)> or L<Net::Ping>). If you want to link to a web page, separate the URL and the link text with a pipe (e.g. to link to github.com, write L<GitHub|http://github.com/>)."}]}];e.GollumEditor.defineHelp("pod",n)}(jQuery),function(e){var t={"function-code":undefined,"function-h1":undefined,"function-h2":undefined,"function-h3":undefined,"function-link":undefined,"function-image":undefined,"function-hr":undefined,"function-blockquote":undefined};e.GollumEditor.defineLanguage("rdoc",e.constructLanguageDefinition(t))}(jQuery),function(s){var o=function(e,t,n){var i="";i=e.length?e:"Title here",adornment=n.repeat(i.length),i=i+"\n"+adornment+"\n",s.GollumEditor.replaceSelection(i,!1,!1,t)},e={"function-bold":{replace:"**$1**$2"},"function-italic":{replace:"*$1*$2"},"function-code":{replace:"``$1``$2"},"function-hr":{append:"\n\n----\n\n"},"function-blockquote":{exec:function(e,t){for(var n=" ",i=t.split("\n"),o=0;o`_"),t}},"function-image":{replace:function(e){var t="";return e.url&&e.alt&&(t=".. image:: "+e.url+"\n :alt: "+e.alt),t}},"gollum-helpers":{"find-header-line":function(e){var t=e-1,n=window.ace_editor.getSession().getLine(t);return 0<=t&&!/^\s+$/.test(n)?[n,t]:null}}};s.GollumEditor.defineLanguage("rst",s.constructLanguageDefinition(e));var t=[{menuName:"Block Elements",content:[{menuName:"Paragraphs & Breaks",data:"

To create a paragraph, simply create a block of text that is not separated by one or more blank lines. Blocks of text separated by one or more blank lines will be parsed as paragraphs.

"},{menuName:"Headers",data:"

Rest uses overline/underline adornments to indicate headers. To create a header, underline your header text with adornment characters such as the =, ~, +, ^ characters. Make sure that the adornment is of the same length (or longer) as the header text. Use a different adornment character to specify a different heading depth.

"},{menuName:"Blockquotes",data:"

Rest creates blockquotes using indentation. This looks best if you use four spaces per level of indentation.

"},{menuName:"Lists",data:"

Rest supports both ordered and unordered lists. To create an ordered list, simply prefix each line with a number, or use # for auto enumeration. To create an unordered list, you can prefix each line with *, + or -.

"},{menuName:"Code Blocks",data:"

Rest wraps code blocks in pre-formatted tags to preserve indentation in your code blocks. To create a code block, indent the entire block by at least 4 spaces or one tab. Rest will strip the extra indentation you’ve added to the code block.

"},{menuName:"Horizontal Rules",data:"

Horizontal rules are created by placing four or more hyphens, asterisks or underscores on a line by themselves.

"}]},{menuName:"Span Elements",content:[{menuName:"Links",data:"

To create an inline link, create a set of backticks, include the link title first, followed by the url in angled brackets (e.g., `Python `_).

"},{menuName:"Emphasis",data:"

Asterisks (*) are treated as emphasis and are wrapped with an <em> tag, which usually displays as italics in most browsers. Double asterisks (**) are treated as bold using the <strong> tag. To create italic or bold text, simply wrap your words in single/double asterisks. For example, **My double emphasis text** becomes My double emphasis text, and *My single emphasis text* becomes My single emphasis text.

"},{menuName:"Code",data:"

To create inline spans of code, simply wrap the code in backticks (`). Rest will turn `myFunction` into myFunction.

"},{menuName:"Images",data:'

Rest image syntax is two dots, followed by a space, the word "image", two colons, another space, and the url: .. image:: http://image.com/image.png.

'}]},{menuName:"Miscellaneous",content:[{menuName:"Escaping",data:"

If you want to use a special Rest character in your document (such as displaying literal asterisks), you can escape the character with the backslash (\\). Rest will ignore the character directly after a backslash."}]}];s.GollumEditor.defineHelp("rst",t)}(jQuery),function(e){var t={"function-hr":undefined,"function-code":{replace:"bc. $1$2",whole_line:!0},"function-ol":{line:function(e,t){return"# "+t+"\n"}},"function-blockquote":{replace:"bq. $1$2"},"function-h1":{replace:"h1. $1$2"},"function-h2":{replace:"h2. $1$2"},"function-h3":{replace:"h3. $1$2"},"function-link":{replace:function(e){var t="";return e.text&&e.href&&(t='"'+e.text+'":'+e.href),t}},"function-image":{replace:function(e){var t="";if(e.url){t="!"+e.url;return""!=e.alt&&(t+="("+e.alt+")"),t+="!"}}}};e.GollumEditor.defineLanguage("textile",e.constructLanguageDefinition(t));var n=[{menuName:"Phrase Modifiers",content:[{menuName:"Emphasis / Strength",data:"

To place emphasis or strength on inline text, simply place _ (underscores) around the text for emphasis or * (asterisks) around the text for strength. In most browsers, _mytext_ will appear as italics and *mytext* will appear as bold.

To force italics or bold, simply double the characters: __mytext__ will appear italic and **mytext** will appear as bold text.

"},{menuName:"Citations / Editing",data:'

To display citations, wrap your text in ?? (two question marks).

To display edit marks such as deleted text (strikethrough) or inserted text (underlined text), wrap your text in - (minuses) or + (pluses). For example -mytext- will be rendered as mytext and +mytext+ will be rendered as mytext

'},{menuName:"Superscript / Subscript",data:"

To display superscript, wrap your text in ^ (carets). To display subscript, wrap your text in ~ (tildes).

"},{menuName:"Code",data:"

To display monospace code, wrap your text in @ (at symbol). For example, @mytext@ will appear as mytext.

"},{menuName:"Acronyms", -data:'

To create an acronym, suffix the acronym with the definition in parentheses. For example, JS(JavaScript) will be displayed as JS.

'}]},{menuName:"Block Modifiers",content:[{menuName:"Headings",data:"

To display a heading in Textile, prefix your line of text with hn., where n equals the heading size you want (1 is largest, 6 is smallest).

"},{menuName:"Paragraphs / Quotes",data:"

To create a new paragraph, prefix your first line of a block of text with p..

To create a blockquote, make sure at least one blank line exists between your text and any surrounding text, and then prefix that block with bq. If you need to extend a blockquote to more than one text block, write bq.. (note the two periods) and prefix your next normal paragraph with p.

"},{menuName:"Code Blocks",data:"

Code blocks in textile are simply prefixed like any other block. To create a code block, place the beginning of the block on a separate line and prefix it with bc.

To display a preformatted block, prefix the block with pre.

"},{menuName:"Lists",data:"

To create ordered lists, prefix each line with #. To create unordered lists, prefix each line with *.

"}]},{menuName:"Links / Images",content:[{menuName:"Links",data:'

To display a link, put the text you want to display in quotes, then a colon (:), then the URL after the colon. For example "GitHub":http://github.com/ will appear as GitHub.

'},{menuName:"Images",data:"

To display an image, simply wrap the image’s URL in ! (exclamation points). If you want to link the image to a URL, you can blend the image and link syntax: place your image URL in the exclamation points and suffix that with a colon and your URL. For example, an image at http://myurl/image.png that should link to http://myurl/ should be written as !http://myurl/image.png!:http://myurl/.

"}]}];e.GollumEditor.defineHelp("textile",n)}(jQuery); \ No newline at end of file diff --git a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz b/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz deleted file mode 100644 index e0ec9c80..00000000 Binary files a/lib/gollum/public/assets/editor-ebdf534a0063fe3b05a7e7daaf7aa40b78fab9863142b161d88f32a3f035378a.js.gz and /dev/null differ diff --git a/lib/gollum/public/assets/mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js b/lib/gollum/public/assets/mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js new file mode 100644 index 00000000..8e09ca5f --- /dev/null +++ b/lib/gollum/public/assets/mermaid-7337d5e50560e612b3e207c40c302ed40674e13abf2b4b7d5476ce569cc5445a.js @@ -0,0 +1,39 @@ +/*! For license information please see mermaid.min.js.LICENSE.txt */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,()=>(()=>{function t(r){var i=n[r];if(void 0!==i)return i.exports;var a=n[r]={id:r,loaded:!1,exports:{}};return e[r].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var e={2536:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,6],r=[1,7],i=[1,8],a=[1,9],o=[1,16],s=[1,11],l=[1,12],u=[1,13],h=[1,14],f=[1,15],d=[1,27],p=[1,33],g=[1,34],y=[1,66],m=[1,67],v=[1,68],b=[1,69],_=[1,70],x=[1,71],w=[1,72],k=[1,35],T=[1,36],E=[1,37],C=[1,38],S=[1,39],A=[1,40],M=[1,41],N=[1,42],D=[1,43],O=[1,44],B=[1,45],L=[1,46],I=[1,47],F=[1,48],R=[1,49],P=[1,50],Y=[1,51],z=[1,52],U=[1,53],j=[1,54],q=[1,56],$=[1,57],W=[1,58],H=[1,59],V=[1,60],G=[1,61],X=[1,62],Z=[1,63],Q=[24,47],J=[24,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],K=[15,24,39,41,42,43,44,45,46,47,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],tt=[1,86],et=[1,87],nt=[1,88],rt=[15,24,47],it=[7,8,9,10,18,22,25,26,27,28],at=[15,24,38,47],ot=[15,24,38,47,78,79,80],st=[15,38],ct=[39,41,42,43,44,45,46,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76],lt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,boundaryStatement:34,boundaryStartStatement:35,boundaryStopStatement:36,boundaryStart:37,LBRACE:38,ENTERPRISE_BOUNDARY:39,attributes:40,SYSTEM_BOUNDARY:41,BOUNDARY:42,CONTAINER_BOUNDARY:43,NODE:44,NODE_L:45,NODE_R:46,RBRACE:47,diagramStatement:48,PERSON:49,PERSON_EXT:50,SYSTEM:51,SYSTEM_DB:52,SYSTEM_QUEUE:53,SYSTEM_EXT:54,SYSTEM_EXT_DB:55,SYSTEM_EXT_QUEUE:56,CONTAINER:57,CONTAINER_DB:58,CONTAINER_QUEUE:59,CONTAINER_EXT:60,CONTAINER_EXT_DB:61,CONTAINER_EXT_QUEUE:62,COMPONENT:63,COMPONENT_DB:64,COMPONENT_QUEUE:65,COMPONENT_EXT:66,COMPONENT_EXT_DB:67,COMPONENT_EXT_QUEUE:68,REL:69,BIREL:70,REL_U:71,REL_D:72,REL_L:73,REL_R:74,REL_B:75,REL_INDEX:76,attribute:77,STR:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",38:"LBRACE",39:"ENTERPRISE_BOUNDARY",41:"SYSTEM_BOUNDARY",42:"BOUNDARY",43:"CONTAINER_BOUNDARY",44:"NODE",45:"NODE_L",46:"NODE_R",47:"RBRACE",49:"PERSON",50:"PERSON_EXT",51:"SYSTEM",52:"SYSTEM_DB",53:"SYSTEM_QUEUE",54:"SYSTEM_EXT",55:"SYSTEM_EXT_DB",56:"SYSTEM_EXT_QUEUE",57:"CONTAINER",58:"CONTAINER_DB",59:"CONTAINER_QUEUE",60:"CONTAINER_EXT",61:"CONTAINER_EXT_DB",62:"CONTAINER_EXT_QUEUE",63:"COMPONENT",64:"COMPONENT_DB",65:"COMPONENT_QUEUE",66:"COMPONENT_EXT",67:"COMPONENT_EXT_DB",68:"COMPONENT_EXT_QUEUE",69:"REL",70:"BIREL",71:"REL_U",72:"REL_D",73:"REL_L",74:"REL_R",75:"REL_B",76:"REL_INDEX",78:"STR",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[34,3],[35,3],[35,3],[35,4],[37,2],[37,2],[37,2],[37,2],[37,2],[37,2],[37,2],[36,1],[30,1],[30,2],[30,3],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,1],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[48,2],[40,1],[40,2],[77,1],[77,1],[77,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 4:r.setDirection("TB");break;case 5:r.setDirection("BT");break;case 6:r.setDirection("RL");break;case 7:r.setDirection("LR");break;case 11:console.log("open_directive: ",a[o]),r.parseDirective("%%{","open_directive");break;case 12:break;case 13:a[o]=a[o].trim().replace(/'/g,'"'),console.log("arg_directive: ",a[o]),r.parseDirective(a[o],"arg_directive");break;case 14:console.log("close_directive: ",a[o]),r.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:r.setC4Type(a[o-3]);break;case 26:r.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 27:r.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 32:case 33:console.log(a[o-1],JSON.stringify(a[o])),a[o].splice(2,0,"ENTERPRISE"),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 34:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 35:console.log(a[o-1],JSON.stringify(a[o])),a[o].splice(2,0,"CONTAINER"),r.addContainerBoundary(...a[o]),this.$=a[o];break;case 36:console.log(a[o-1],JSON.stringify(a[o])),r.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 37:console.log(a[o-1],JSON.stringify(a[o])),r.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 38:console.log(a[o-1],JSON.stringify(a[o])),r.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 39:r.popBoundaryParseStack();break;case 43:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 44:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 45:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 46:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 47:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 48:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 49:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 50:console.log(a[o-1],JSON.stringify(a[o])),r.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 51:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("container",...a[o]),this.$=a[o];break;case 52:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("container_db",...a[o]),this.$=a[o];break;case 53:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("container_queue",...a[o]),this.$=a[o];break;case 54:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("external_container",...a[o]),this.$=a[o];break;case 55:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 56:console.log(a[o-1],JSON.stringify(a[o])),r.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 57:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("component",...a[o]),this.$=a[o];break;case 58:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("component_db",...a[o]),this.$=a[o];break;case 59:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("component_queue",...a[o]),this.$=a[o];break;case 60:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("external_component",...a[o]),this.$=a[o];break;case 61:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 62:console.log(a[o-1],JSON.stringify(a[o])),r.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 64:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel",...a[o]),this.$=a[o];break;case 65:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("birel",...a[o]),this.$=a[o];break;case 66:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel_u",...a[o]),this.$=a[o];break;case 67:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel_d",...a[o]),this.$=a[o];break;case 68:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel_l",...a[o]),this.$=a[o];break;case 69:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel_r",...a[o]),this.$=a[o];break;case 70:console.log(a[o-1],JSON.stringify(a[o])),r.addRel("rel_b",...a[o]),this.$=a[o];break;case 71:console.log(a[o-1],JSON.stringify(a[o])),a[o].splice(0,1),r.addRel("rel",...a[o]),this.$=a[o];break;case 72:console.log("PUSH ATTRIBUTE: ",a[o]),this.$=[a[o]];break;case 73:console.log("PUSH ATTRIBUTE: ",a[o-1]),a[o].unshift(a[o-1]),this.$=a[o];break;case 74:case 75:this.$=a[o].trim();break;case 76:this.$=""}},table:[{3:1,4:2,5:3,6:4,7:n,8:r,9:i,10:a,11:5,12:10,18:o,22:s,25:l,26:u,27:h,28:f},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:n,8:r,9:i,10:a,11:5,12:10,18:o,22:s,25:l,26:u,27:h,28:f},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},e([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:p,33:g,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{23:73,29:29,30:30,31:31,32:p,33:g,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{23:74,29:29,30:30,31:31,32:p,33:g,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{23:75,29:29,30:30,31:31,32:p,33:g,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{23:76,29:29,30:30,31:31,32:p,33:g,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{15:[1,77]},{17:78,20:[1,79]},{15:[2,14]},{24:[1,80]},e(Q,[2,20],{48:32,34:55,35:64,37:65,30:81,39:y,41:m,42:v,43:b,44:_,45:x,46:w,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z}),e(Q,[2,21]),e(J,[2,23],{15:[1,82]}),e(Q,[2,40],{15:[1,83]}),e(K,[2,26]),e(K,[2,27]),{40:84,77:85,78:tt,79:et,80:nt},{40:89,77:85,78:tt,79:et,80:nt},{40:90,77:85,78:tt,79:et,80:nt},{40:91,77:85,78:tt,79:et,80:nt},{40:92,77:85,78:tt,79:et,80:nt},{40:93,77:85,78:tt,79:et,80:nt},{40:94,77:85,78:tt,79:et,80:nt},{40:95,77:85,78:tt,79:et,80:nt},{40:96,77:85,78:tt,79:et,80:nt},{40:97,77:85,78:tt,79:et,80:nt},{40:98,77:85,78:tt,79:et,80:nt},{40:99,77:85,78:tt,79:et,80:nt},{40:100,77:85,78:tt,79:et,80:nt},{40:101,77:85,78:tt,79:et,80:nt},{40:102,77:85,78:tt,79:et,80:nt},{40:103,77:85,78:tt,79:et,80:nt},{40:104,77:85,78:tt,79:et,80:nt},{40:105,77:85,78:tt,79:et,80:nt},{40:106,77:85,78:tt,79:et,80:nt},{40:107,77:85,78:tt,79:et,80:nt},e(rt,[2,63]),{40:108,77:85,78:tt,79:et,80:nt},{40:109,77:85,78:tt,79:et,80:nt},{40:110,77:85,78:tt,79:et,80:nt},{40:111,77:85,78:tt,79:et,80:nt},{40:112,77:85,78:tt,79:et,80:nt},{40:113,77:85,78:tt,79:et,80:nt},{40:114,77:85,78:tt,79:et,80:nt},{40:115,77:85,78:tt,79:et,80:nt},{30:116,34:55,35:64,37:65,39:y,41:m,42:v,43:b,44:_,45:x,46:w,48:32,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z},{15:[1,118],38:[1,117]},{40:119,77:85,78:tt,79:et,80:nt},{40:120,77:85,78:tt,79:et,80:nt},{40:121,77:85,78:tt,79:et,80:nt},{40:122,77:85,78:tt,79:et,80:nt},{40:123,77:85,78:tt,79:et,80:nt},{40:124,77:85,78:tt,79:et,80:nt},{40:125,77:85,78:tt,79:et,80:nt},{24:[1,126]},{24:[1,127]},{24:[1,128]},{24:[1,129]},e(it,[2,9]),{14:130,21:d},{21:[2,13]},{1:[2,15]},e(Q,[2,22]),e(J,[2,24],{31:31,29:131,32:p,33:g}),e(Q,[2,41],{29:29,30:30,31:31,48:32,34:55,35:64,37:65,23:132,32:p,33:g,39:y,41:m,42:v,43:b,44:_,45:x,46:w,49:k,50:T,51:E,52:C,53:S,54:A,55:M,56:N,57:D,58:O,59:B,60:L,61:I,62:F,63:R,64:P,65:Y,66:z,67:U,68:j,69:q,70:$,71:W,72:H,73:V,74:G,75:X,76:Z}),e(rt,[2,43]),e(at,[2,72],{77:85,40:133,78:tt,79:et,80:nt}),e(ot,[2,74]),e(ot,[2,75]),e(ot,[2,76]),e(rt,[2,44]),e(rt,[2,45]),e(rt,[2,46]),e(rt,[2,47]),e(rt,[2,48]),e(rt,[2,49]),e(rt,[2,50]),e(rt,[2,51]),e(rt,[2,52]),e(rt,[2,53]),e(rt,[2,54]),e(rt,[2,55]),e(rt,[2,56]),e(rt,[2,57]),e(rt,[2,58]),e(rt,[2,59]),e(rt,[2,60]),e(rt,[2,61]),e(rt,[2,62]),e(rt,[2,64]),e(rt,[2,65]),e(rt,[2,66]),e(rt,[2,67]),e(rt,[2,68]),e(rt,[2,69]),e(rt,[2,70]),e(rt,[2,71]),{36:134,47:[1,135]},{15:[1,136]},{38:[1,137]},e(st,[2,32]),e(st,[2,33]),e(st,[2,34]),e(st,[2,35]),e(st,[2,36]),e(st,[2,37]),e(st,[2,38]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,138]},e(J,[2,25]),e(Q,[2,42]),e(at,[2,73]),e(rt,[2,28]),e(rt,[2,39]),e(ct,[2,29]),e(ct,[2,30],{15:[1,139]}),e(it,[2,10]),e(ct,[2,31])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],79:[2,13],80:[2,15],126:[2,16],127:[2,17],128:[2,18],129:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},ut={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:case 14:break;case 10:c;break;case 11:return 32;case 12:return 33;case 13:return 15;case 15:return 22;case 16:return 25;case 17:return 26;case 18:return 27;case 19:return 28;case 20:return this.begin("person_ext"),console.log("begin person_ext"),50;case 21:return this.begin("person"),console.log("begin person"),49;case 22:return this.begin("system_ext_queue"),console.log("begin system_ext_queue"),56;case 23:return this.begin("system_ext_db"),console.log("begin system_ext_db"),55;case 24:return this.begin("system_ext"),console.log("begin system_ext"),54;case 25:return this.begin("system_queue"),console.log("begin system_queue"),53;case 26:return this.begin("system_db"),console.log("begin system_db"),52;case 27:return this.begin("system"),console.log("begin system"),51;case 28:return this.begin("boundary"),console.log("begin boundary"),42;case 29:return this.begin("enterprise_boundary"),console.log("begin enterprise_boundary"),39;case 30:return this.begin("system_boundary"),console.log("begin system_boundary"),41;case 31:return this.begin("container_ext_queue"),console.log("begin container_ext_queue"),62;case 32:return this.begin("container_ext_db"),console.log("begin container_ext_db"),61;case 33:return this.begin("container_ext"),console.log("begin container_ext"),60;case 34:return this.begin("container_queue"),console.log("begin container_queue"),59;case 35:return this.begin("container_db"),console.log("begin container_db"),58;case 36:return this.begin("container"),console.log("begin container"),57;case 37:return this.begin("container_boundary"),console.log("begin container_boundary"),43;case 38:return this.begin("component_ext_queue"),console.log("begin component_ext_queue"),68;case 39:return this.begin("component_ext_db"),console.log("begin component_ext_db"),67;case 40:return this.begin("component_ext"),console.log("begin component_ext"),66;case 41:return this.begin("component_queue"),console.log("begin component_queue"),65;case 42:return this.begin("component_db"),console.log("begin component_db"),64;case 43:return this.begin("component"),console.log("begin component"),63;case 44:case 45:return this.begin("node"),console.log("begin node"),44;case 46:return this.begin("node_l"),console.log("begin node_l"),45;case 47:return this.begin("node_r"),console.log("begin node_r"),46;case 48:return this.begin("rel"),console.log("begin rel"),69;case 49:return this.begin("birel"),console.log("begin birel"),70;case 50:case 51:return this.begin("rel_u"),console.log("begin rel_u"),71;case 52:case 53:return this.begin("rel_d"),console.log("begin rel_d"),72;case 54:case 55:return this.begin("rel_l"),console.log("begin rel_l"),73;case 56:case 57:return this.begin("rel_r"),console.log("begin rel_r"),74;case 58:return this.begin("rel_b"),console.log("begin rel_b"),75;case 59:return this.begin("rel_index"),console.log("begin rel_index"),76;case 60:return"EOF_IN_STRUCT";case 61:return console.log("begin attribute with ATTRIBUTE_EMPTY"),this.begin("attribute"),"ATTRIBUTE_EMPTY";case 62:console.log("begin attribute"),this.begin("attribute");break;case 63:console.log("STOP attribute"),this.popState(),console.log("STOP diagram"),this.popState();break;case 64:return console.log(",,"),80;case 65:console.log(",");break;case 66:return console.log("ATTRIBUTE_EMPTY"),80;case 67:console.log("begin string"),this.begin("string");break;case 68:console.log("STOP string"),this.popState();break;case 69:return console.log("STR"),"STR";case 70:return console.log("not STR"),"STR";case 71:return console.log("begin boundary block"),"LBRACE";case 72:return console.log("STOP boundary block"),"RBRACE";case 73:return"SPACE";case 74:return"EOL";case 75:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string:{rules:[68,69],inclusive:!1},attribute:{rules:[63,64,65,66,67,70],inclusive:!1},rel_b:{rules:[60,61,62,63],inclusive:!1},rel_r:{rules:[60,61,62,63],inclusive:!1},rel_l:{rules:[60,61,62,63],inclusive:!1},rel_d:{rules:[60,61,62,63],inclusive:!1},rel_u:{rules:[60,61,62,63],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[60,61,62,63],inclusive:!1},node_r:{rules:[60,61,62,63],inclusive:!1},node_l:{rules:[60,61,62,63],inclusive:!1},node:{rules:[60,61,62,63],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[60,61,62,63],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[60,61,62,63],inclusive:!1},component_ext:{rules:[60,61,62,63],inclusive:!1},component_queue:{rules:[60,61,62,63],inclusive:!1},component_db:{rules:[60,61,62,63],inclusive:!1},component:{rules:[60,61,62,63],inclusive:!1},container_boundary:{rules:[60,61,62,63],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[60,61,62,63],inclusive:!1},container_ext:{rules:[60,61,62,63],inclusive:!1},container_queue:{rules:[60,61,62,63],inclusive:!1},container_db:{rules:[60,61,62,63],inclusive:!1},container:{rules:[60,61,62,63],inclusive:!1},birel:{rules:[60,61,62,63],inclusive:!1},system_boundary:{rules:[60,61,62,63],inclusive:!1},enterprise_boundary:{rules:[60,61,62,63],inclusive:!1},boundary:{rules:[60,61,62,63],inclusive:!1},system_ext_queue:{rules:[60,61,62,63],inclusive:!1},system_ext_db:{rules:[60,61,62,63],inclusive:!1},system_ext:{rules:[60,61,62,63],inclusive:!1},system_queue:{rules:[60,61,62,63],inclusive:!1},system_db:{rules:[60,61,62,63],inclusive:!1},system:{rules:[60,61,62,63],inclusive:!1},person_ext:{rules:[60,61,62,63],inclusive:!1},person:{rules:[60,61,62,63],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,71,72,73,74,75],inclusive:!0}}};return lt.lexer=ut,t.prototype=lt,lt.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(555).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},1362:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,7],i=[1,8],a=[1,9],o=[1,10],s=[1,13],c=[1,12],l=[1,16,25],u=[1,20],h=[1,31],f=[1,32],d=[1,33],p=[1,35],g=[1,38],y=[1,36],m=[1,37],v=[1,39],b=[1,40],_=[1,41],x=[1,42],w=[1,45],k=[1,46],T=[1,47],E=[1,48],C=[16,25],S=[1,62],A=[1,63],M=[1,64],N=[1,65],D=[1,66],O=[1,67],B=[16,25,32,44,45,53,56,57,58,59,60,61,66,68],L=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,66,68,83,84,85,86],I=[5,8,9,10,11,16,19,23,25],F=[53,83,84,85,86],R=[53,60,61,83,84,85,86],P=[53,56,57,58,59,83,84,85,86],Y=[16,25,32],z=[1,99],U={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LINE:60,DOTTED_LINE:61,CALLBACK:62,LINK:63,LINK_TARGET:64,CLICK:65,CALLBACK_NAME:66,CALLBACK_ARGS:67,HREF:68,CSSCLASS:69,commentToken:70,textToken:71,graphCodeTokens:72,textNoTagsToken:73,TAGSTART:74,TAGEND:75,"==":76,"--":77,PCT:78,DEFAULT:79,SPACE:80,MINUS:81,keywords:82,UNICODE_TEXT:83,NUM:84,ALPHA:85,BQUOTE_STR:86,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LINE",61:"DOTTED_LINE",62:"CALLBACK",63:"LINK",64:"LINK_TARGET",65:"CLICK",66:"CALLBACK_NAME",67:"CALLBACK_ARGS",68:"HREF",69:"CSSCLASS",72:"graphCodeTokens",74:"TAGSTART",75:"TAGEND",76:"==",77:"--",78:"PCT",79:"DEFAULT",80:"SPACE",81:"MINUS",82:"keywords",83:"UNICODE_TEXT",84:"NUM",85:"ALPHA",86:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[70,1],[70,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[73,1],[73,1],[73,1],[73,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(a[o],"type_directive");break;case 14:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[o];break;case 22:this.$=a[o-1]+a[o];break;case 23:case 24:this.$=a[o-1]+"~"+a[o];break;case 25:r.addRelation(a[o]);break;case 26:a[o-1].title=r.cleanupLabel(a[o]),r.addRelation(a[o-1]);break;case 34:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 35:case 36:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[o]);break;case 38:r.addClass(a[o-2]), +r.setCssClass(a[o-2],a[o]);break;case 39:r.addClass(a[o-3]),r.addMembers(a[o-3],a[o-1]);break;case 40:r.addClass(a[o-5]),r.setCssClass(a[o-5],a[o-3]),r.addMembers(a[o-5],a[o-1]);break;case 41:r.addAnnotation(a[o],a[o-2]);break;case 42:this.$=[a[o]];break;case 43:a[o].push(a[o-1]),this.$=a[o];break;case 44:case 46:case 47:break;case 45:r.addMember(a[o-1],r.cleanupLabel(a[o]));break;case 48:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 50:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 51:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 52:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 53:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 54:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 55:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.lineType.LINE;break;case 61:this.$=r.lineType.DOTTED_LINE;break;case 62:case 68:this.$=a[o-2],r.setClickEvent(a[o-1],a[o]);break;case 63:case 69:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 64:case 72:this.$=a[o-2],r.setLink(a[o-1],a[o]);break;case 65:case 73:this.$=a[o-3],r.setLink(a[o-2],a[o-1],a[o]);break;case 66:case 74:this.$=a[o-3],r.setLink(a[o-2],a[o-1]),r.setTooltip(a[o-2],a[o]);break;case 67:case 75:this.$=a[o-4],r.setLink(a[o-3],a[o-2],a[o]),r.setTooltip(a[o-3],a[o-1]);break;case 70:this.$=a[o-3],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 71:this.$=a[o-4],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setTooltip(a[o-3],a[o]);break;case 76:r.setCssClass(a[o-1],a[o])}},table:[{3:1,4:2,5:n,6:4,7:5,8:r,9:i,10:a,11:o,12:6,13:11,19:s,23:c},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:n,6:4,7:5,8:r,9:i,10:a,11:o,12:6,13:11,19:s,23:c},{1:[2,9]},e(l,[2,5]),e(l,[2,6]),e(l,[2,7]),e(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},e([17,22],[2,13]),{6:30,7:29,8:r,9:i,10:a,11:o,13:11,19:s,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:f,42:d,43:p,48:g,50:y,51:m,62:v,63:b,65:_,69:x,83:w,84:k,85:T,86:E},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},e(C,[2,25],{32:[1,54]}),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),e(C,[2,33]),{39:[1,55]},{41:[1,56]},e(C,[2,36]),e(C,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:S,57:A,58:M,59:N,60:D,61:O}),{27:68,28:43,29:44,83:w,84:k,85:T,86:E},e(C,[2,46]),e(C,[2,47]),{28:69,83:w,84:k,85:T},{27:70,28:43,29:44,83:w,84:k,85:T,86:E},{27:71,28:43,29:44,83:w,84:k,85:T,86:E},{27:72,28:43,29:44,83:w,84:k,85:T,86:E},{53:[1,73]},e(B,[2,20],{28:43,29:44,27:74,30:[1,75],83:w,84:k,85:T,86:E}),e(B,[2,21],{30:[1,76]}),e(L,[2,90]),e(L,[2,91]),e(L,[2,92]),e([16,25,30,32,44,45,53,56,57,58,59,60,61,66,68],[2,93]),e(I,[2,10]),{15:77,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:r,9:i,10:a,11:o,13:11,19:s,24:78,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:f,42:d,43:p,48:g,50:y,51:m,62:v,63:b,65:_,69:x,83:w,84:k,85:T,86:E},e(C,[2,26]),e(C,[2,34]),e(C,[2,35]),{27:79,28:43,29:44,53:[1,80],83:w,84:k,85:T,86:E},{52:81,54:60,55:61,56:S,57:A,58:M,59:N,60:D,61:O},e(C,[2,45]),{55:82,60:D,61:O},e(F,[2,55],{54:83,56:S,57:A,58:M,59:N}),e(R,[2,56]),e(R,[2,57]),e(R,[2,58]),e(R,[2,59]),e(P,[2,60]),e(P,[2,61]),e(C,[2,37],{44:[1,84],45:[1,85]}),{49:[1,86]},{53:[1,87]},{53:[1,88]},{66:[1,89],68:[1,90]},{28:91,83:w,84:k,85:T},e(B,[2,22]),e(B,[2,23]),e(B,[2,24]),{16:[1,92]},{25:[2,19]},e(Y,[2,48]),{27:93,28:43,29:44,83:w,84:k,85:T,86:E},{27:94,28:43,29:44,53:[1,95],83:w,84:k,85:T,86:E},e(F,[2,54],{54:96,56:S,57:A,58:M,59:N}),e(F,[2,53]),{28:97,83:w,84:k,85:T},{46:98,50:z},{27:100,28:43,29:44,83:w,84:k,85:T,86:E},e(C,[2,62],{53:[1,101]}),e(C,[2,64],{53:[1,103],64:[1,102]}),e(C,[2,68],{53:[1,104],67:[1,105]}),e(C,[2,72],{53:[1,107],64:[1,106]}),e(C,[2,76]),e(I,[2,11]),e(Y,[2,50]),e(Y,[2,49]),{27:108,28:43,29:44,83:w,84:k,85:T,86:E},e(F,[2,52]),e(C,[2,38],{45:[1,109]}),{47:[1,110]},{46:111,47:[2,42],50:z},e(C,[2,41]),e(C,[2,63]),e(C,[2,65]),e(C,[2,66],{64:[1,112]}),e(C,[2,69]),e(C,[2,70],{53:[1,113]}),e(C,[2,73]),e(C,[2,74],{64:[1,114]}),e(Y,[2,51]),{46:115,50:z},e(C,[2,39]),{47:[2,43]},e(C,[2,67]),e(C,[2,71]),e(C,[2,75]),{47:[1,116]},e(C,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],78:[2,19],111:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},j={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 26:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 36:case 39:case 42:case 45:case 48:case 51:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EOF_IN_STRUCT";case 24:return"OPEN_IN_STRUCT";case 25:return this.popState(),47;case 27:return"MEMBER";case 28:return 43;case 29:return 69;case 30:return 62;case 31:return 63;case 32:return 65;case 33:return 48;case 34:return 49;case 35:this.begin("generic");break;case 37:return"GENERICTYPE";case 38:this.begin("string");break;case 40:return"STR";case 41:this.begin("bqstring");break;case 43:return"BQUOTE_STR";case 44:this.begin("href");break;case 46:return 68;case 47:this.begin("callback_name");break;case 49:this.popState(),this.begin("callback_args");break;case 50:return 66;case 52:return 67;case 53:case 54:case 55:case 56:return 64;case 57:case 58:return 57;case 59:case 60:return 59;case 61:return 58;case 62:return 56;case 63:return 60;case 64:return 61;case 65:return 32;case 66:return 44;case 67:return 81;case 68:return"DOT";case 69:return"PLUS";case 70:return 78;case 71:case 72:return"EQUALS";case 73:return 85;case 74:return"PUNCTUATION";case 75:return 84;case 76:return 83;case 77:return 80;case 78:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[51,52],inclusive:!1},callback_name:{rules:[48,49,50],inclusive:!1},href:{rules:[45,46],inclusive:!1},struct:{rules:[23,24,25,26,27],inclusive:!1},generic:{rules:[36,37],inclusive:!1},bqstring:{rules:[42,43],inclusive:!1},string:{rules:[39,40],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,28,29,30,31,32,33,34,35,38,41,44,47,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78],inclusive:!0}}};return U.lexer=j,t.prototype=U,U.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},5890:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,49],a=[1,17],o=[1,18],s=[1,19],c=[1,20],l=[1,21],u=[1,24],h=[1,29],f=[1,30],d=[1,31],p=[1,32],g=[6,9,11,15,20,23,25,27,29,30,42,43,44,45,49],y=[1,45],m=[30,46,47],v=[4,6,9,11,23,25,27,29,30,49],b=[42,43,44,45],_=[22,37],x=[1,64],w={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,".":31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:".",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,3],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[o-1].push(a[o]),this.$=a[o-1];break;case 5:case 6:case 20:case 28:case 29:case 30:case 40:this.$=a[o];break;case 12:r.addEntity(a[o-4]),r.addEntity(a[o-2]),r.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 13:r.addEntity(a[o-3]),r.addAttributes(a[o-3],a[o-1]);break;case 14:r.addEntity(a[o-2]);break;case 15:r.addEntity(a[o]);break;case 16:case 17:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 21:this.$=a[o-2]+a[o-1]+a[o];break;case 22:this.$=[a[o]];break;case 23:a[o].push(a[o-1]),this.$=a[o];break;case 24:this.$={attributeType:a[o-1],attributeName:a[o]};break;case 25:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeKeyType:a[o]};break;case 26:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeComment:a[o]};break;case 27:this.$={attributeType:a[o-3],attributeName:a[o-2],attributeKeyType:a[o-1],attributeComment:a[o]};break;case 31:case 39:this.$=a[o].replace(/"/g,"");break;case 32:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 33:this.$=r.Cardinality.ZERO_OR_ONE;break;case 34:this.$=r.Cardinality.ZERO_OR_MORE;break;case 35:this.$=r.Cardinality.ONE_OR_MORE;break;case 36:this.$=r.Cardinality.ONLY_ONE;break;case 37:this.$=r.Identification.NON_IDENTIFYING;break;case 38:this.$=r.Identification.IDENTIFYING;break;case 41:r.parseDirective("%%{","open_directive");break;case 42:r.parseDirective(a[o],"type_directive");break;case 43:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 44:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:n,7:3,12:4,49:r},{1:[3]},e(i,[2,3],{5:6}),{3:7,4:n,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,41]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:a,25:o,27:s,29:c,30:l,49:r},{1:[2,2]},{14:22,15:[1,23],52:u},e([15,52],[2,42]),e(i,[2,8],{1:[2,1]}),e(i,[2,4]),{7:15,10:25,12:4,17:16,23:a,25:o,27:s,29:c,30:l,49:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,11]),e(i,[2,15],{18:26,40:28,20:[1,27],42:h,43:f,44:d,45:p}),{24:[1,33]},{26:[1,34]},{28:[1,35]},e(i,[2,19]),e(g,[2,20],{31:[1,36]}),{11:[1,37]},{16:38,51:[1,39]},{11:[2,44]},e(i,[2,5]),{17:40,30:l},{21:41,22:[1,42],32:43,33:44,37:y},{41:46,46:[1,47],47:[1,48]},e(m,[2,33]),e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),e(i,[2,16]),e(i,[2,17]),e(i,[2,18]),{17:49,30:l},e(v,[2,9]),{14:50,52:u},{52:[2,43]},{15:[1,51]},{22:[1,52]},e(i,[2,14]),{21:53,22:[2,22],32:43,33:44,37:y},{34:54,37:[1,55]},{37:[2,28]},{40:56,42:h,43:f,44:d,45:p},e(b,[2,37]),e(b,[2,38]),e(g,[2,21]),{11:[1,57]},{19:58,30:[1,60],48:[1,59]},e(i,[2,13]),{22:[2,23]},e(_,[2,24],{35:61,36:62,38:[1,63],39:x}),e([22,37,38,39],[2,29]),{30:[2,32]},e(v,[2,10]),e(i,[2,12]),e(i,[2,39]),e(i,[2,40]),e(_,[2,25],{36:65,39:x}),e(_,[2,26]),e([22,37,39],[2,30]),e(_,[2,31]),e(_,[2,27])],defaultActions:{5:[2,41],7:[2,2],24:[2,44],39:[2,43],45:[2,28],53:[2,23],56:[2,32]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9: +return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:case 13:case 15:case 20:case 24:break;case 14:return 11;case 16:return 9;case 17:return 48;case 18:return 4;case 19:return this.begin("block"),20;case 21:return 38;case 22:return 37;case 23:return 39;case 25:return this.popState(),22;case 26:case 39:return e.yytext[0];case 27:case 31:return 42;case 28:case 32:return 43;case 29:case 33:return 44;case 30:return 45;case 34:case 36:case 37:return 46;case 35:return 47;case 38:return 30;case 40:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[20,21,22,23,24,25,26],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};return w.lexer=k,t.prototype=w,w.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3602:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,9],r=[1,7],i=[1,6],a=[1,8],o=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],s=[2,10],c=[1,20],l=[1,21],u=[1,22],h=[1,23],f=[1,30],d=[1,32],p=[1,33],g=[1,34],y=[1,62],m=[1,48],v=[1,52],b=[1,36],_=[1,37],x=[1,38],w=[1,39],k=[1,40],T=[1,56],E=[1,63],C=[1,51],S=[1,53],A=[1,55],M=[1,59],N=[1,60],D=[1,41],O=[1,42],B=[1,43],L=[1,44],I=[1,61],F=[1,50],R=[1,54],P=[1,57],Y=[1,58],z=[1,49],U=[1,66],j=[1,71],q=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$=[1,75],W=[1,74],H=[1,76],V=[20,21,23,81,82],G=[1,99],X=[1,104],Z=[1,107],Q=[1,108],J=[1,101],K=[1,106],tt=[1,109],et=[1,102],nt=[1,114],rt=[1,113],it=[1,103],at=[1,105],ot=[1,110],st=[1,111],ct=[1,112],lt=[1,115],ut=[20,21,22,23,81,82],ht=[20,21,22,23,53,81,82],ft=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],dt=[20,21,23],pt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],gt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],yt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],mt=[1,149],vt=[1,157],bt=[1,158],_t=[1,159],xt=[1,160],wt=[1,144],kt=[1,145],Tt=[1,141],Et=[1,152],Ct=[1,153],St=[1,154],At=[1,155],Mt=[1,156],Nt=[1,161],Dt=[1,162],Ot=[1,147],Bt=[1,150],Lt=[1,146],It=[1,143],Ft=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Rt=[1,165],Pt=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Yt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],zt=[12,21,22,24],Ut=[22,106],jt=[1,250],qt=[1,245],$t=[1,246],Wt=[1,254],Ht=[1,251],Vt=[1,248],Gt=[1,247],Xt=[1,249],Zt=[1,252],Qt=[1,253],Jt=[1,255],Kt=[1,273],te=[20,21,23,106],ee=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ne={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[o],"type_directive");break;case 7:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[o];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[o-1]),this.$=a[o-1];break;case 35:this.$=a[o-1].nodes;break;case 41:this.$=r.addSubGraph(a[o-6],a[o-1],a[o-4]);break;case 42:this.$=r.addSubGraph(a[o-3],a[o-1],a[o-3]);break;case 43:this.$=r.addSubGraph(void 0,a[o-1],void 0);break;case 45:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 46:case 47:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[o-2].stmt,a[o],a[o-1]),this.$={stmt:a[o],nodes:a[o].concat(a[o-2].nodes)};break;case 52:r.addLink(a[o-3].stmt,a[o-1],a[o-2]),this.$={stmt:a[o-1],nodes:a[o-1].concat(a[o-3].nodes)};break;case 53:this.$={stmt:a[o-1],nodes:a[o-1]};break;case 54:this.$={stmt:a[o],nodes:a[o]};break;case 55:case 123:case 125:this.$=[a[o]];break;case 56:this.$=a[o-4].concat(a[o]);break;case 57:this.$=[a[o-2]],r.setClass(a[o-2],a[o]);break;case 58:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 59:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"doublecircle");break;case 60:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 61:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"ellipse");break;case 62:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"stadium");break;case 63:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"subroutine");break;case 64:this.$=a[o-7],r.addVertex(a[o-7],a[o-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[o-5],a[o-3]]]));break;case 65:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"cylinder");break;case 66:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 67:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 68:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"hexagon");break;case 69:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 70:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"trapezoid");break;case 71:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"inv_trapezoid");break;case 72:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_right");break;case 73:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"lean_left");break;case 74:this.$=a[o],r.addVertex(a[o]);break;case 75:a[o-1].text=a[o],this.$=a[o-1];break;case 76:case 77:a[o-2].text=a[o-1],this.$=a[o-2];break;case 79:var s=r.destructLink(a[o],a[o-2]);this.$={type:s.type,stroke:s.stroke,length:s.length,text:a[o-1]};break;case 80:s=r.destructLink(a[o]),this.$={type:s.type,stroke:s.stroke,length:s.length};break;case 81:this.$=a[o-1];break;case 83:case 97:case 153:case 151:this.$=a[o-1]+""+a[o];break;case 98:case 99:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 100:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 101:case 109:this.$=a[o-1],r.setClickEvent(a[o-1],a[o]);break;case 102:case 110:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 103:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 104:this.$=a[o-4],r.setClickEvent(a[o-4],a[o-3],a[o-2]),r.setTooltip(a[o-4],a[o]);break;case 105:case 111:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 106:case 112:this.$=a[o-3],r.setLink(a[o-3],a[o-2]),r.setTooltip(a[o-3],a[o]);break;case 107:case 113:this.$=a[o-3],r.setLink(a[o-3],a[o-2],a[o]);break;case 108:case 114:this.$=a[o-5],r.setLink(a[o-5],a[o-4],a[o]),r.setTooltip(a[o-5],a[o-2]);break;case 115:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 116:case 118:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 117:this.$=a[o-4],r.updateLink([a[o-2]],a[o]);break;case 119:this.$=a[o-8],r.updateLinkInterpolate([a[o-6]],a[o-2]),r.updateLink([a[o-6]],a[o]);break;case 120:this.$=a[o-8],r.updateLinkInterpolate(a[o-6],a[o-2]),r.updateLink(a[o-6],a[o]);break;case 121:this.$=a[o-6],r.updateLinkInterpolate([a[o-4]],a[o]);break;case 122:this.$=a[o-6],r.updateLinkInterpolate(a[o-4],a[o]);break;case 124:case 126:a[o-2].push(a[o]),this.$=a[o-2];break;case 128:this.$=a[o-1]+a[o];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:n,16:4,21:r,22:i,24:a},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:n,16:4,21:r,22:i,24:a},e(o,s,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:a},{16:15,21:r,22:i,24:a},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:v,86:b,87:_,88:x,89:w,90:k,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:O,120:B,121:L,122:I,123:F,124:R,125:P,126:Y,127:z},{8:64,10:[1,65],15:U},e([10,15],[2,6]),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),{20:[1,68],21:[1,69],22:j,27:67,30:70},e(q,[2,11]),e(q,[2,12]),e(q,[2,13]),e(q,[2,14]),e(q,[2,15]),e(q,[2,16]),{9:72,20:$,21:W,23:H,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:$,21:W,23:H},{9:81,20:$,21:W,23:H},{9:82,20:$,21:W,23:H},{9:83,20:$,21:W,23:H},{9:84,20:$,21:W,23:H},{9:86,20:$,21:W,22:[1,85],23:H},e(q,[2,44]),{45:[1,87]},{47:[1,88]},e(q,[2,47]),e(V,[2,54],{30:89,22:j}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:G,52:X,66:Z,67:Q,84:[1,97],91:J,97:96,98:[1,94],100:[1,95],105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(q,[2,158]),e(q,[2,159]),e(q,[2,160]),e(q,[2,161]),e(ut,[2,55],{53:[1,116]}),e(ht,[2,74],{116:129,40:[1,117],52:y,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:m,67:v,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:T,95:E,105:C,106:S,109:A,111:M,112:N,122:I,123:F,124:R,125:P,126:Y,127:z}),e(ft,[2,150]),e(ft,[2,175]),e(ft,[2,176]),e(ft,[2,177]),e(ft,[2,178]),e(ft,[2,179]),e(ft,[2,180]),e(ft,[2,181]),e(ft,[2,182]),e(ft,[2,183]),e(ft,[2,184]),e(ft,[2,185]),e(ft,[2,186]),e(ft,[2,187]),e(ft,[2,188]),e(ft,[2,189]),e(ft,[2,190]),{9:130,20:$,21:W,23:H},{11:131,14:[1,132]},e(dt,[2,8]),e(o,[2,20]),e(o,[2,26]),e(o,[2,27]),{21:[1,133]},e(pt,[2,34],{30:134,22:j}),e(q,[2,35]),{50:135,51:45,52:y,54:46,66:m,67:v,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:Y,127:z},e(gt,[2,48]),e(gt,[2,49]),e(gt,[2,50]),e(yt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:mt,24:vt,26:bt,38:_t,39:139,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),e(q,[2,36]),e(q,[2,37]),e(q,[2,38]),e(q,[2,39]),e(q,[2,40]),{22:mt,24:vt,26:bt,38:_t,39:163,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(Ft,s,{17:164}),e(q,[2,45]),e(q,[2,46]),e(V,[2,53],{52:Rt}),{26:G,52:X,66:Z,67:Q,91:J,97:166,102:[1,167],105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{95:[1,168],103:169,105:[1,170]},{26:G,52:X,66:Z,67:Q,91:J,95:[1,171],97:172,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{26:G,52:X,66:Z,67:Q,91:J,97:173,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,101],{22:[1,174],99:[1,175]}),e(dt,[2,105],{22:[1,176]}),e(dt,[2,109],{115:100,117:178,22:[1,177],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,111],{22:[1,179]}),e(Pt,[2,152]),e(Pt,[2,154]),e(Pt,[2,155]),e(Pt,[2,156]),e(Pt,[2,157]),e(Yt,[2,162]),e(Yt,[2,163]),e(Yt,[2,164]),e(Yt,[2,165]),e(Yt,[2,166]),e(Yt,[2,167]),e(Yt,[2,168]),e(Yt,[2,169]),e(Yt,[2,170]),e(Yt,[2,171]),e(Yt,[2,172]),e(Yt,[2,173]),e(Yt,[2,174]),{52:y,54:180,66:m,67:v,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:Y,127:z},{22:mt,24:vt,26:bt,38:_t,39:181,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:182,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:184,42:xt,52:X,57:[1,183],66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:185,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:186,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:187,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{66:[1,188]},{22:mt,24:vt,26:bt,38:_t,39:189,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:190,42:xt,52:X,66:Z,67:Q,71:[1,191],73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:192,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:193,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:194,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ft,[2,151]),e(zt,[2,3]),{8:195,15:U},{15:[2,7]},e(o,[2,28]),e(pt,[2,33]),e(V,[2,51],{30:196,22:j}),e(yt,[2,75],{22:[1,197]}),{22:[1,198]},{22:mt,24:vt,26:bt,38:_t,39:199,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,82:[1,200],83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(Yt,[2,82]),e(Yt,[2,84]),e(Yt,[2,140]),e(Yt,[2,141]),e(Yt,[2,142]),e(Yt,[2,143]),e(Yt,[2,144]),e(Yt,[2,145]),e(Yt,[2,146]),e(Yt,[2,147]),e(Yt,[2,148]),e(Yt,[2,149]),e(Yt,[2,85]),e(Yt,[2,86]),e(Yt,[2,87]),e(Yt,[2,88]),e(Yt,[2,89]),e(Yt,[2,90]),e(Yt,[2,91]),e(Yt,[2,92]),e(Yt,[2,93]),e(Yt,[2,94]),e(Yt,[2,95]),{9:203,20:$,21:W,22:mt,23:H,24:vt,26:bt,38:_t,40:[1,202],42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:v,86:b,87:_,88:x,89:w,90:k,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:O,120:B,121:L,122:I,123:F,124:R,125:P,126:Y,127:z},{22:j,30:205},{22:[1,206],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},e(Ut,[2,123]),{22:[1,211]},{22:[1,212],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:[1,213],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:178,122:it,123:at,124:ot,125:st,126:ct,127:lt},{84:[1,214]},e(dt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},e(Pt,[2,153]),{84:[1,219],101:[1,220]},e(ut,[2,57],{116:129,52:y,66:m,67:v,91:T,95:E,105:C,106:S,109:A,111:M,112:N,122:I,123:F,124:R,125:P,126:Y,127:z}),{22:mt,24:vt,26:bt,38:_t,41:[1,221],42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,56:[1,222],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:223,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,58:[1,224],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,60:[1,225],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,62:[1,226],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,64:[1,227],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{67:[1,228]},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,70:[1,229],73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,72:[1,230],73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,39:231,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,41:[1,232],42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,73:wt,75:[1,233],77:[1,234],81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,73:wt,75:[1,236],77:[1,235],81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{9:237,20:$,21:W,23:H},e(V,[2,52],{52:Rt}),e(yt,[2,77]),e(yt,[2,76]),{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,68:[1,238],73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(yt,[2,79]),e(Yt,[2,83]),{22:mt,24:vt,26:bt,38:_t,39:239,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(Ft,s,{17:240}),e(q,[2,43]),{51:241,52:y,54:46,66:m,67:v,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,122:I,123:F,124:R,125:P,126:Y,127:z},{22:jt,66:qt,67:$t,86:Wt,96:242,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{22:jt,66:qt,67:$t,86:Wt,96:256,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{22:jt,66:qt,67:$t,86:Wt,96:257,102:Ht,104:[1,258],105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{22:jt,66:qt,67:$t,86:Wt,96:259,102:Ht,104:[1,260],105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{105:[1,261]},{22:jt,66:qt,67:$t,86:Wt,96:262,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{22:jt,66:qt,67:$t,86:Wt,96:263,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{26:G,52:X,66:Z,67:Q,91:J,97:264,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,102]),{84:[1,265]},e(dt,[2,106],{22:[1,266]}),e(dt,[2,107]),e(dt,[2,110]),e(dt,[2,112],{22:[1,267]}),e(dt,[2,113]),e(ht,[2,58]),e(ht,[2,59]),{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,58:[1,268],66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,66]),e(ht,[2,61]),e(ht,[2,62]),e(ht,[2,63]),{66:[1,269]},e(ht,[2,65]),e(ht,[2,67]),{22:mt,24:vt,26:bt,38:_t,42:xt,52:X,66:Z,67:Q,72:[1,270],73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,69]),e(ht,[2,70]),e(ht,[2,72]),e(ht,[2,71]),e(ht,[2,73]),e(zt,[2,4]),e([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:mt,24:vt,26:bt,38:_t,41:[1,271],42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:v,86:b,87:_,88:x,89:w,90:k,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:O,120:B,121:L,122:I,123:F,124:R,125:P,126:Y,127:z},e(ut,[2,56]),e(dt,[2,115],{106:Kt}),e(te,[2,125],{108:274,22:jt,66:qt,67:$t,86:Wt,102:Ht,105:Vt,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt}),e(ee,[2,127]),e(ee,[2,129]),e(ee,[2,130]),e(ee,[2,131]),e(ee,[2,132]),e(ee,[2,133]),e(ee,[2,134]),e(ee,[2,135]),e(ee,[2,136]),e(ee,[2,137]),e(ee,[2,138]),e(ee,[2,139]),e(dt,[2,116],{106:Kt}),e(dt,[2,117],{106:Kt}),{22:[1,275]},e(dt,[2,118],{106:Kt}),{22:[1,276]},e(Ut,[2,124]),e(dt,[2,98],{106:Kt}),e(dt,[2,99],{106:Kt}),e(dt,[2,100],{115:100,117:178,26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:$,21:W,23:H},e(q,[2,42]),{22:jt,66:qt,67:$t,86:Wt,102:Ht,105:Vt,107:283,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},e(ee,[2,128]),{26:G,52:X,66:Z,67:Q,91:J,97:284,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},{26:G,52:X,66:Z,67:Q,91:J,97:285,105:K,106:tt,109:et,111:nt,112:rt,115:100,117:98,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(dt,[2,108]),e(dt,[2,114]),e(ht,[2,60]),{22:mt,24:vt,26:bt,38:_t,39:286,42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:140,84:Tt,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},e(ht,[2,68]),e(Ft,s,{17:287}),e(te,[2,126],{108:274,22:jt,66:qt,67:$t,86:Wt,102:Ht,105:Vt,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt}),e(dt,[2,121],{115:100,117:178,22:[1,288],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),e(dt,[2,122],{115:100,117:178,22:[1,289],26:G,52:X,66:Z,67:Q,91:J,105:K,106:tt,109:et,111:nt,112:rt,122:it,123:at,124:ot,125:st,126:ct,127:lt}),{22:mt,24:vt,26:bt,38:_t,41:[1,290],42:xt,52:X,66:Z,67:Q,73:wt,81:kt,83:201,85:151,86:Et,87:Ct,88:St,89:At,90:Mt,91:Nt,92:Dt,94:142,95:Ot,105:K,106:tt,109:Bt,111:nt,112:rt,113:Lt,114:It,115:148,122:it,123:at,124:ot,125:st,126:ct,127:lt},{18:18,19:19,20:c,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:d,46:p,48:g,50:35,51:45,52:y,54:46,66:m,67:v,86:b,87:_,88:x,89:w,90:k,91:T,95:E,105:C,106:S,109:A,111:M,112:N,116:47,118:D,119:O,120:B,121:L,122:I,123:F,124:R,125:P,126:Y,127:z},{22:jt,66:qt,67:$t,86:Wt,96:292,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},{22:jt,66:qt,67:$t,86:Wt,96:293,102:Ht,105:Vt,107:243,108:244,109:Gt,110:Xt,111:Zt,112:Qt,113:Jt},e(ht,[2,64]),e(q,[2,41]),e(dt,[2,119],{106:Kt}),e(dt,[2,120],{106:Kt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3: +return!0}}return!0}},re={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};return ne.lexer=re,t.prototype=ne,ne.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9959:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,5],i=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],a=[1,15],o=[1,16],s=[1,17],c=[1,18],l=[1,19],u=[1,20],h=[1,21],f=[1,22],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,28],v=[1,30],b=[1,33],_=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],x={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:return a[o-1];case 3:case 7:case 8:this.$=[];break;case 4:a[o-1].push(a[o]),this.$=a[o-1];break;case 5:case 6:this.$=a[o];break;case 9:r.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 11:r.TopAxis(),this.$=a[o].substr(8);break;case 12:r.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 13:r.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 14:r.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 15:r.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 16:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 17:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 22:r.addTask(a[o-1],a[o]),this.$="task";break;case 26:this.$=a[o-1],r.setClickEvent(a[o-1],a[o],null);break;case 27:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],a[o]);break;case 28:this.$=a[o-2],r.setClickEvent(a[o-2],a[o-1],null),r.setLink(a[o-2],a[o]);break;case 29:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-2],a[o-1]),r.setLink(a[o-3],a[o]);break;case 30:this.$=a[o-2],r.setClickEvent(a[o-2],a[o],null),r.setLink(a[o-2],a[o-1]);break;case 31:this.$=a[o-3],r.setClickEvent(a[o-3],a[o-1],a[o]),r.setLink(a[o-3],a[o-2]);break;case 32:this.$=a[o-1],r.setLink(a[o-1],a[o]);break;case 33:case 39:this.$=a[o-1]+" "+a[o];break;case 34:case 35:case 37:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 36:case 38:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[o],"type_directive");break;case 42:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:n,29:4,39:r},{1:[3]},{3:6,4:2,5:n,29:4,39:r},e(i,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:a,13:o,14:s,15:c,16:l,17:u,18:h,19:f,20:d,22:p,24:g,25:y,26:27,27:m,29:4,34:v,39:r},{31:31,32:[1,32],42:b},e([32,42],[2,41]),e(i,[2,8],{1:[2,2]}),e(i,[2,4]),{4:29,10:34,12:a,13:o,14:s,15:c,16:l,17:u,18:h,19:f,20:d,22:p,24:g,25:y,26:27,27:m,29:4,34:v,39:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),e(i,[2,12]),e(i,[2,13]),e(i,[2,14]),e(i,[2,15]),e(i,[2,16]),{21:[1,35]},{23:[1,36]},e(i,[2,19]),e(i,[2,20]),e(i,[2,21]),{28:[1,37]},e(i,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},e(i,[2,5]),e(i,[2,17]),e(i,[2,18]),e(i,[2,22]),e(i,[2,26],{36:[1,43],37:[1,44]}),e(i,[2,32],{35:[1,45]}),e(_,[2,24]),{31:46,42:b},{42:[2,42]},e(i,[2,27],{37:[1,47]}),e(i,[2,28]),e(i,[2,30],{36:[1,48]}),{11:[1,49]},e(i,[2,29]),e(i,[2,31]),e(_,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},w={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 37;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 27:return 36;case 28:this.begin("click");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};return x.lexer=w,t.prototype=x,x.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},2553:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,7],i=[1,5],a=[1,9],o=[1,6],s=[2,6],c=[1,16],l=[6,8,14,20,22,24,25,27,29,32,35,37,49,53],u=[8,14,20,22,24,25,27,29,32,35,37],h=[8,13,14,20,22,24,25,27,29,32,35,37],f=[1,26],d=[6,8,14,49,53],p=[8,14,53],g=[1,64],y=[1,65],m=[1,66],v=[8,14,33,36,41,53],b={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,MERGE:35,COMMIT_TAG:36,COMMIT:37,commit_arg:38,COMMIT_TYPE:39,commitType:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,openDirective:45,typeDirective:46,closeDirective:47,argDirective:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,";":53,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",28:"ID",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"MERGE",36:"COMMIT_TAG",37:"COMMIT",39:"COMMIT_TYPE",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive",53:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[18,2],[18,4],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[38,0],[38,1],[40,1],[40,1],[40,1],[5,3],[5,5],[45,1],[46,1],[48,1],[47,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 3:return a[o];case 4:return a[o-1];case 5:return r.setDirection(a[o-3]),a[o-1];case 7:r.setOptions(a[o-1]),this.$=a[o];break;case 8:a[o-1]+=a[o],this.$=a[o-1];break;case 10:this.$=[];break;case 11:a[o-1].push(a[o]),this.$=a[o-1];break;case 12:this.$=a[o-1];break;case 17:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 18:case 19:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 22:r.checkout(a[o]);break;case 23:r.branch(a[o]);break;case 24:r.branch(a[o-2],a[o]);break;case 25:r.cherryPick(a[o]);break;case 26:r.merge(a[o]);break;case 27:r.merge(a[o-2],a[o]);break;case 28:r.commit(a[o]);break;case 29:r.commit("","",r.commitType.NORMAL,a[o]);break;case 30:r.commit("","",a[o],"");break;case 31:r.commit("","",a[o],a[o-2]);break;case 32:r.commit("","",a[o-2],a[o]);break;case 33:r.commit("",a[o],r.commitType.NORMAL,"");break;case 34:r.commit("",a[o-2],r.commitType.NORMAL,a[o]);break;case 35: +r.commit("",a[o],r.commitType.NORMAL,a[o-2]);break;case 36:r.commit("",a[o-2],a[o],"");break;case 37:r.commit("",a[o],a[o-2],"");break;case 38:r.commit("",a[o-4],a[o-2],a[o]);break;case 39:r.commit("",a[o-4],a[o],a[o-2]);break;case 40:r.commit("",a[o-2],a[o-4],a[o]);break;case 41:r.commit("",a[o],a[o-4],a[o-2]);break;case 42:r.commit("",a[o],a[o-2],a[o-4]);break;case 43:r.commit("",a[o-2],a[o],a[o-4]);break;case 44:r.commit(a[o],"",r.commitType.NORMAL,"");break;case 45:r.commit(a[o],"",r.commitType.NORMAL,a[o-2]);break;case 46:r.commit(a[o-2],"",r.commitType.NORMAL,a[o]);break;case 47:r.commit(a[o-2],"",a[o],"");break;case 48:r.commit(a[o],"",a[o-2],"");break;case 49:r.commit(a[o],a[o-2],r.commitType.NORMAL,"");break;case 50:r.commit(a[o-2],a[o],r.commitType.NORMAL,"");break;case 51:r.commit(a[o-4],"",a[o-2],a[o]);break;case 52:r.commit(a[o-4],"",a[o],a[o-2]);break;case 53:r.commit(a[o-2],"",a[o-4],a[o]);break;case 54:r.commit(a[o],"",a[o-4],a[o-2]);break;case 55:r.commit(a[o],"",a[o-2],a[o-4]);break;case 56:r.commit(a[o-2],"",a[o],a[o-4]);break;case 57:r.commit(a[o-4],a[o],a[o-2],"");break;case 58:r.commit(a[o-4],a[o-2],a[o],"");break;case 59:r.commit(a[o-2],a[o],a[o-4],"");break;case 60:r.commit(a[o],a[o-2],a[o-4],"");break;case 61:r.commit(a[o],a[o-4],a[o-2],"");break;case 62:r.commit(a[o-2],a[o-4],a[o],"");break;case 63:r.commit(a[o-4],a[o],r.commitType.NORMAL,a[o-2]);break;case 64:r.commit(a[o-4],a[o-2],r.commitType.NORMAL,a[o]);break;case 65:r.commit(a[o-2],a[o],r.commitType.NORMAL,a[o-4]);break;case 66:r.commit(a[o],a[o-2],r.commitType.NORMAL,a[o-4]);break;case 67:r.commit(a[o],a[o-4],r.commitType.NORMAL,a[o-2]);break;case 68:r.commit(a[o-2],a[o-4],r.commitType.NORMAL,a[o]);break;case 69:r.commit(a[o-6],a[o-4],a[o-2],a[o]);break;case 70:r.commit(a[o-6],a[o-4],a[o],a[o-2]);break;case 71:r.commit(a[o-6],a[o-2],a[o-4],a[o]);break;case 72:r.commit(a[o-6],a[o],a[o-4],a[o-2]);break;case 73:r.commit(a[o-6],a[o-2],a[o],a[o-4]);break;case 74:r.commit(a[o-6],a[o],a[o-2],a[o-4]);break;case 75:r.commit(a[o-4],a[o-6],a[o-2],a[o]);break;case 76:r.commit(a[o-4],a[o-6],a[o],a[o-2]);break;case 77:r.commit(a[o-2],a[o-6],a[o-4],a[o]);break;case 78:r.commit(a[o],a[o-6],a[o-4],a[o-2]);break;case 79:r.commit(a[o-2],a[o-6],a[o],a[o-4]);break;case 80:r.commit(a[o],a[o-6],a[o-2],a[o-4]);break;case 81:r.commit(a[o],a[o-4],a[o-2],a[o-6]);break;case 82:r.commit(a[o-2],a[o-4],a[o],a[o-6]);break;case 83:r.commit(a[o],a[o-2],a[o-4],a[o-6]);break;case 84:r.commit(a[o-2],a[o],a[o-4],a[o-6]);break;case 85:r.commit(a[o-4],a[o-2],a[o],a[o-6]);break;case 86:r.commit(a[o-4],a[o],a[o-2],a[o-6]);break;case 87:r.commit(a[o-2],a[o-4],a[o-6],a[o]);break;case 88:r.commit(a[o],a[o-4],a[o-6],a[o-2]);break;case 89:r.commit(a[o-2],a[o],a[o-6],a[o-4]);break;case 90:r.commit(a[o],a[o-2],a[o-6],a[o-4]);break;case 91:r.commit(a[o-4],a[o-2],a[o-6],a[o]);break;case 92:r.commit(a[o-4],a[o],a[o-6],a[o-2]);break;case 93:this.$="";break;case 94:this.$=a[o];break;case 95:this.$=r.commitType.NORMAL;break;case 96:this.$=r.commitType.REVERSE;break;case 97:this.$=r.commitType.HIGHLIGHT;break;case 100:r.parseDirective("%%{","open_directive");break;case 101:r.parseDirective(a[o],"type_directive");break;case 102:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 103:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:n,8:r,14:i,45:8,49:a,53:o},{1:[3]},{3:10,4:2,5:3,6:n,8:r,14:i,45:8,49:a,53:o},{3:11,4:2,5:3,6:n,8:r,14:i,45:8,49:a,53:o},{7:12,8:s,9:[1,13],10:[1,14],11:15,14:c},e(l,[2,104]),e(l,[2,105]),e(l,[2,106]),{46:17,50:[1,18]},{50:[2,100]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:s,11:15,14:c},{9:[1,21]},e(u,[2,10],{12:22,13:[1,23]}),e(h,[2,9]),{9:[1,25],47:24,52:f},e([9,52],[2,101]),{1:[2,3]},{8:[1,27]},{7:28,8:s,11:15,14:c},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],35:[1,42],37:[1,41]},e(h,[2,8]),e(d,[2,98]),{48:45,51:[1,46]},e(d,[2,103]),{1:[2,4]},{8:[1,47]},e(u,[2,11]),{4:48,8:r,14:i,53:o},e(u,[2,13]),e(p,[2,14]),e(p,[2,15]),e(p,[2,16]),{21:[1,49]},{23:[1,50]},e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),{28:[1,51]},e(p,[2,93],{38:52,33:[1,55],34:[1,57],36:[1,53],39:[1,54],41:[1,56]}),{28:[1,58]},{33:[1,59]},{28:[1,60]},{47:61,52:f},{52:[2,102]},{1:[2,5]},e(u,[2,12]),e(p,[2,17]),e(p,[2,18]),e(p,[2,22]),e(p,[2,28]),{34:[1,62]},{40:63,42:g,43:y,44:m},{34:[1,67]},{34:[1,68]},e(p,[2,94]),e(p,[2,26],{36:[1,69]}),{34:[1,70]},e(p,[2,23],{30:[1,71]}),e(d,[2,99]),e(p,[2,29],{33:[1,73],39:[1,72],41:[1,74]}),e(p,[2,30],{33:[1,76],36:[1,75],41:[1,77]}),e(v,[2,95]),e(v,[2,96]),e(v,[2,97]),e(p,[2,33],{36:[1,78],39:[1,79],41:[1,80]}),e(p,[2,44],{33:[1,83],36:[1,81],39:[1,82]}),{34:[1,84]},e(p,[2,25]),{31:[1,85]},{40:86,42:g,43:y,44:m},{34:[1,87]},{34:[1,88]},{34:[1,89]},{34:[1,90]},{34:[1,91]},{34:[1,92]},{40:93,42:g,43:y,44:m},{34:[1,94]},{34:[1,95]},{40:96,42:g,43:y,44:m},{34:[1,97]},e(p,[2,27]),e(p,[2,24]),e(p,[2,31],{33:[1,98],41:[1,99]}),e(p,[2,35],{39:[1,100],41:[1,101]}),e(p,[2,45],{33:[1,103],39:[1,102]}),e(p,[2,32],{33:[1,104],41:[1,105]}),e(p,[2,37],{36:[1,106],41:[1,107]}),e(p,[2,48],{33:[1,109],36:[1,108]}),e(p,[2,34],{39:[1,110],41:[1,111]}),e(p,[2,36],{36:[1,112],41:[1,113]}),e(p,[2,49],{36:[1,115],39:[1,114]}),e(p,[2,46],{33:[1,117],39:[1,116]}),e(p,[2,47],{33:[1,119],36:[1,118]}),e(p,[2,50],{36:[1,121],39:[1,120]}),{34:[1,122]},{34:[1,123]},{40:124,42:g,43:y,44:m},{34:[1,125]},{40:126,42:g,43:y,44:m},{34:[1,127]},{34:[1,128]},{34:[1,129]},{34:[1,130]},{34:[1,131]},{34:[1,132]},{34:[1,133]},{40:134,42:g,43:y,44:m},{34:[1,135]},{34:[1,136]},{34:[1,137]},{40:138,42:g,43:y,44:m},{34:[1,139]},{40:140,42:g,43:y,44:m},{34:[1,141]},{34:[1,142]},{34:[1,143]},{40:144,42:g,43:y,44:m},{34:[1,145]},e(p,[2,42],{41:[1,146]}),e(p,[2,55],{33:[1,147]}),e(p,[2,43],{41:[1,148]}),e(p,[2,66],{39:[1,149]}),e(p,[2,56],{33:[1,150]}),e(p,[2,65],{39:[1,151]}),e(p,[2,41],{41:[1,152]}),e(p,[2,54],{33:[1,153]}),e(p,[2,40],{41:[1,154]}),e(p,[2,60],{36:[1,155]}),e(p,[2,53],{33:[1,156]}),e(p,[2,59],{36:[1,157]}),e(p,[2,39],{41:[1,158]}),e(p,[2,67],{39:[1,159]}),e(p,[2,38],{41:[1,160]}),e(p,[2,61],{36:[1,161]}),e(p,[2,62],{36:[1,162]}),e(p,[2,68],{39:[1,163]}),e(p,[2,52],{33:[1,164]}),e(p,[2,63],{39:[1,165]}),e(p,[2,51],{33:[1,166]}),e(p,[2,57],{36:[1,167]}),e(p,[2,58],{36:[1,168]}),e(p,[2,64],{39:[1,169]}),{34:[1,170]},{34:[1,171]},{34:[1,172]},{40:173,42:g,43:y,44:m},{34:[1,174]},{40:175,42:g,43:y,44:m},{34:[1,176]},{34:[1,177]},{34:[1,178]},{34:[1,179]},{34:[1,180]},{34:[1,181]},{34:[1,182]},{40:183,42:g,43:y,44:m},{34:[1,184]},{34:[1,185]},{34:[1,186]},{40:187,42:g,43:y,44:m},{34:[1,188]},{40:189,42:g,43:y,44:m},{34:[1,190]},{34:[1,191]},{34:[1,192]},{40:193,42:g,43:y,44:m},e(p,[2,83]),e(p,[2,84]),e(p,[2,81]),e(p,[2,82]),e(p,[2,86]),e(p,[2,85]),e(p,[2,90]),e(p,[2,89]),e(p,[2,88]),e(p,[2,87]),e(p,[2,92]),e(p,[2,91]),e(p,[2,80]),e(p,[2,79]),e(p,[2,78]),e(p,[2,77]),e(p,[2,75]),e(p,[2,76]),e(p,[2,74]),e(p,[2,73]),e(p,[2,72]),e(p,[2,71]),e(p,[2,69]),e(p,[2,70])],defaultActions:{9:[2,100],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,102],47:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),49;case 1:return this.begin("type_directive"),50;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),52;case 4:return 51;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 35:case 38:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:case 15:break;case 16:return 6;case 17:return 37;case 18:return 33;case 19:return 39;case 20:return 41;case 21:return 42;case 22:return 43;case 23:return 44;case 24:return 36;case 25:return 29;case 26:return 30;case 27:return 35;case 28:return 32;case 29:return 27;case 30:case 31:return 10;case 32:return 9;case 33:return"CARET";case 34:this.begin("options");break;case 36:return 13;case 37:this.begin("string");break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch\b)/i,/^(?:order:)/i,/^(?:merge\b)/i,/^(?:cherry-pick\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+)/i,/^(?:[a-zA-Z][-_\./a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[35,36],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,37,40,41,42],inclusive:!0}}};return b.lexer=_,t.prototype=b,b.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6765:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},i={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return r.lexer=i,t.prototype=r,r.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7062:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,5],i=[1,6],a=[1,7],o=[1,9],s=[1,11,13,15,17,19,20,26,27,28,29],c=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],h=[2,8],f=[1,18],d=[1,19],p=[1,20],g=[1,21],y=[1,22],m=[1,23],v=[1,28],b=[6,26,27,28,29],_={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[o-1];break;case 9:r.addSection(a[o-1],r.cleanupValue(a[o]));break;case 10:this.$=a[o].trim(),r.setDiagramTitle(this.$);break;case 11:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 12:case 13:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(a[o],"type_directive");break;case 23:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},{1:[3]},{3:10,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},{3:11,4:2,5:3,6:n,21:8,26:r,27:i,28:a,29:o},e(s,c,{7:12,8:[1,13]}),e(l,[2,18]),e(l,[2,19]),e(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},e(u,h,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:d,15:p,17:g,19:y,20:m,29:o}),e(s,c,{7:25}),{23:26,24:[1,27],32:v},e([24,32],[2,22]),e(s,[2,6]),{4:29,26:r,27:i,28:a},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},e(u,[2,13]),e(u,[2,14]),e(u,[2,15]),e(u,h,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:d,15:p,17:g,19:y,20:m,29:o}),e(b,[2,16]),{25:34,31:[1,35]},e(b,[2,24]),e(s,[2,7]),e(u,[2,9]),e(u,[2,10]),e(u,[2,11]),e(u,[2,12]),{23:36,32:v},{32:[2,23]},e(b,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match, +matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return _.lexer=x,t.prototype=_,_.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3176:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,3],r=[1,5],i=[1,6],a=[1,7],o=[1,8],s=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],c=[1,22],l=[2,13],u=[1,26],h=[1,27],f=[1,28],d=[1,29],p=[1,30],g=[1,31],y=[1,24],m=[1,32],v=[1,33],b=[1,36],_=[71,72],x=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],w=[1,56],k=[1,57],T=[1,58],E=[1,59],C=[1,60],S=[1,61],A=[1,62],M=[62,63],N=[1,74],D=[1,70],O=[1,71],B=[1,72],L=[1,73],I=[1,75],F=[1,79],R=[1,80],P=[1,77],Y=[1,78],z=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],U={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 6:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 7:case 8:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(a[o],"type_directive");break;case 11:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(a[o-3],a[o-4]);break;case 20:r.setNewReqId(a[o-2]);break;case 21:r.setNewReqText(a[o-2]);break;case 22:r.setNewReqRisk(a[o-2]);break;case 23:r.setNewReqVerifyMethod(a[o-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[o-3]);break;case 40:r.setNewElementType(a[o-2]);break;case 41:r.setNewElementDocRef(a[o-2]);break;case 44:r.addRelationship(a[o-2],a[o],a[o-4]);break;case 45:r.addRelationship(a[o-2],a[o-4],a[o]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:n,9:4,14:r,16:i,18:a,19:o},{1:[3]},{3:10,4:2,5:[1,9],6:n,9:4,14:r,16:i,18:a,19:o},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},e(s,[2,8]),{20:[2,9]},{3:16,4:2,6:n,9:4,14:r,16:i,18:a,19:o},{1:[2,2]},{4:21,5:c,7:17,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{11:34,12:[1,35],22:b},e([12,22],[2,10]),e(s,[2,6]),e(s,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:c,7:38,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{4:21,5:c,7:39,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{4:21,5:c,7:40,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{4:21,5:c,7:41,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{4:21,5:c,7:42,8:l,9:4,14:r,16:i,18:a,19:o,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:f,43:d,44:p,45:g,53:y,71:m,72:v},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},e(_,[2,26]),e(_,[2,27]),e(_,[2,28]),e(_,[2,29]),e(_,[2,30]),e(_,[2,31]),e(x,[2,55]),e(x,[2,56]),e(s,[2,4]),{13:51,21:[1,52]},e(s,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:w,65:k,66:T,67:E,68:C,69:S,70:A},{61:63,64:w,65:k,66:T,67:E,68:C,69:S,70:A},{11:64,22:b},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},e(M,[2,46]),e(M,[2,47]),e(M,[2,48]),e(M,[2,49]),e(M,[2,50]),e(M,[2,51]),e(M,[2,52]),{63:[1,68]},e(s,[2,5]),{5:N,29:69,30:D,33:O,35:B,37:L,39:I},{5:F,39:R,55:76,56:P,58:Y},{32:81,71:m,72:v},{32:82,71:m,72:v},e(z,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:N,29:87,30:D,33:O,35:B,37:L,39:I},e(z,[2,25]),e(z,[2,39]),{31:[1,88]},{31:[1,89]},{5:F,39:R,55:90,56:P,58:Y},e(z,[2,43]),e(z,[2,44]),e(z,[2,45]),{32:91,71:m,72:v},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},e(z,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},e(z,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:N,29:116,30:D,33:O,35:B,37:L,39:I},{5:N,29:117,30:D,33:O,35:B,37:L,39:I},{5:N,29:118,30:D,33:O,35:B,37:L,39:I},{5:N,29:119,30:D,33:O,35:B,37:L,39:I},{5:F,39:R,55:120,56:P,58:Y},{5:F,39:R,55:121,56:P,58:Y},e(z,[2,20]),e(z,[2,21]),e(z,[2,22]),e(z,[2,23]),e(z,[2,40]),e(z,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},j={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return U.lexer=j,t.prototype=U,U.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6876:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,3],i=[1,5],a=[1,7],o=[2,5],s=[1,15],c=[1,17],l=[1,18],u=[1,19],h=[1,21],f=[1,22],d=[1,23],p=[1,29],g=[1,30],y=[1,31],m=[1,32],v=[1,33],b=[1,34],_=[1,35],x=[1,36],w=[1,37],k=[1,38],T=[1,39],E=[1,40],C=[1,43],S=[1,44],A=[1,45],M=[1,46],N=[1,47],D=[1,48],O=[1,51],B=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],L=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],I=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],F=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],R=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],P=[67,68,69],Y=[1,121],z=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],U={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,"break":49,option:50,and:51,"else":52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 4:return r.apply(a[o]),a[o];case 5:case 9:this.$=[];break;case 6:a[o-1].push(a[o]),this.$=a[o-1];break;case 7:case 8:case 56:this.$=a[o];break;case 12:a[o-3].type="addParticipant",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 13:a[o-1].type="addParticipant",this.$=a[o-1];break;case 14:a[o-3].type="addActor",a[o-3].description=r.parseMessage(a[o-1]),this.$=a[o-3];break;case 15:a[o-1].type="addActor",this.$=a[o-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-1]};break;case 28:r.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 29:r.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 30:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 33:a[o-1].unshift({type:"loopStart",loopText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 34:a[o-1].unshift({type:"rectStart",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:r.parseMessage(a[o-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"optStart",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"altStart",altText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"parStart",parText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"criticalStart",criticalText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:r.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"breakStart",breakText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:r.parseMessage(a[o-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 42:this.$=a[o-3].concat([{type:"option",optionText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 44:this.$=a[o-3].concat([{type:"and",parText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.PAR_AND},a[o]]);break;case 46:this.$=a[o-3].concat([{type:"else",altText:r.parseMessage(a[o-1]),signalType:r.LINETYPE.ALT_ELSE},a[o]]);break;case 47:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 48:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 49:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 50:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 51:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 52:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 55:this.$=[a[o-2],a[o]];break;case 57:this.$=r.PLACEMENT.LEFTOF;break;case 58:this.$=r.PLACEMENT.RIGHTOF;break;case 59:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[o-1]}];break;case 60:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[o-4]}];break;case 61:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 62:this.$={type:"addParticipant",actor:a[o]};break;case 63:this.$=r.LINETYPE.SOLID_OPEN;break;case 64:this.$=r.LINETYPE.DOTTED_OPEN;break;case 65:this.$=r.LINETYPE.SOLID;break;case 66:this.$=r.LINETYPE.DOTTED;break;case 67:this.$=r.LINETYPE.SOLID_CROSS;break;case 68:this.$=r.LINETYPE.DOTTED_CROSS;break;case 69:this.$=r.LINETYPE.SOLID_POINT;break;case 70:this.$=r.LINETYPE.DOTTED_POINT;break;case 71:this.$=r.parseMessage(a[o].trim().substring(1));break;case 72:r.parseDirective("%%{","open_directive");break;case 73:r.parseDirective(a[o],"type_directive");break;case 74:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 75:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:n,5:r,6:4,7:i,11:6,79:a},{1:[3]},{3:8,4:n,5:r,6:4,7:i,11:6,79:a},{3:9,4:n,5:r,6:4,7:i,11:6,79:a},{3:10,4:n,5:r,6:4,7:i,11:6,79:a},e([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],o,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{13:49,14:[1,50],82:O},e([14,82],[2,73]),e(B,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},e(B,[2,8]),e(B,[2,9]),{17:53,69:D},{17:54,69:D},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:D},{17:60,69:D},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},e(B,[2,28]),e(B,[2,29]),{35:[1,66]},{37:[1,67]},e(B,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},e(B,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:D},{17:89,69:D},{17:90,69:D},{17:91,69:D},e([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},e(B,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},e(B,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},e(B,[2,20]),{5:[1,102]},{5:[1,103]},e(B,[2,23]),e(B,[2,24]),e(B,[2,25]),e(B,[2,26]),e(B,[2,27]),e(B,[2,30]),e(B,[2,31]),e(L,o,{8:104}),e(L,o,{8:105}),e(L,o,{8:106}),e(I,o,{44:107,8:108}),e(F,o,{46:109,8:110}),e(R,o,{ +48:111,8:112}),e(L,o,{8:113}),{17:116,67:[1,114],68:[1,115],69:D},e(P,[2,63]),e(P,[2,64]),e(P,[2,65]),e(P,[2,66]),e(P,[2,67]),e(P,[2,68]),e(P,[2,69]),e(P,[2,70]),{17:117,69:D},{17:119,57:118,69:D},{69:[2,57]},{69:[2,58]},{55:120,78:Y},{55:122,78:Y},{55:123,78:Y},{55:124,78:Y},e(z,[2,10]),{13:125,82:O},{82:[2,74]},{19:[1,126]},e(B,[2,13]),{19:[1,127]},e(B,[2,15]),{5:[1,128]},e(B,[2,18]),e(B,[2,19]),e(B,[2,21]),e(B,[2,22]),{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[1,129],41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[1,130],41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[1,131],41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,132]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[2,45],41:_,42:x,43:w,45:k,47:T,49:E,52:[1,133],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,134]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[2,43],41:_,42:x,43:w,45:k,47:T,49:E,51:[1,135],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{40:[1,136]},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[2,41],41:_,42:x,43:w,45:k,47:T,49:E,50:[1,137],53:C,58:S,59:A,60:M,61:N,69:D,79:a},{4:s,5:c,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:f,26:d,27:24,28:25,29:26,30:27,31:28,32:p,33:g,34:y,36:m,38:v,39:b,40:[1,138],41:_,42:x,43:w,45:k,47:T,49:E,53:C,58:S,59:A,60:M,61:N,69:D,79:a},{17:139,69:D},{17:140,69:D},{55:141,78:Y},{55:142,78:Y},{55:143,78:Y},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},e(B,[2,17]),e(B,[2,33]),e(B,[2,34]),e(B,[2,35]),e(B,[2,36]),{19:[1,148]},e(B,[2,37]),{19:[1,149]},e(B,[2,38]),{19:[1,150]},e(B,[2,39]),{55:151,78:Y},{55:152,78:Y},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:D},e(z,[2,11]),e(B,[2,12]),e(B,[2,14]),e(I,o,{8:108,44:154}),e(F,o,{8:110,46:155}),e(R,o,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},j={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:case 52:case 65:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 53:return e.yytext=e.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return U.lexer=j,t.prototype=U,U.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3584:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,3],i=[1,5],a=[1,7],o=[2,5],s=[1,15],c=[1,17],l=[1,19],u=[1,20],h=[1,21],f=[1,22],d=[1,33],p=[1,23],g=[1,24],y=[1,25],m=[1,26],v=[1,27],b=[1,30],_=[1,31],x=[1,32],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,34],S=[1,41],A=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],O={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"-->":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"-->",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 4:return r.setRootDoc(a[o]),a[o];case 5:this.$=[];break;case 6:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 7:case 8:case 39:case 40:this.$=a[o];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[o],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[o-1],type:"default",description:r.trimColon(a[o])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[o-2],type:"default",description:""},state2:{stmt:"state",id:a[o],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[o-3],type:"default",description:""},state2:{stmt:"state",id:a[o-1],type:"default",description:""},description:a[o].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 18:var s=a[o],c=a[o-2].trim();if(a[o].match(":")){var l=a[o].split(":");s=l[0],c=[c,l[1]]}this.$={stmt:"state",id:s,type:"default",description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 20:this.$={stmt:"state",id:a[o],type:"fork"};break;case 21:this.$={stmt:"state",id:a[o],type:"join"};break;case 22:this.$={stmt:"state",id:a[o],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 28:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 43:r.parseDirective("%%{","open_directive");break;case 44:r.parseDirective(a[o],"type_directive");break;case 45:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 46:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:n,5:r,6:4,7:i,36:6,50:a},{1:[3]},{3:8,4:n,5:r,6:4,7:i,36:6,50:a},{3:9,4:n,5:r,6:4,7:i,36:6,50:a},{3:10,4:n,5:r,6:4,7:i,36:6,50:a},e([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],o,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,20:f,22:d,23:p,24:g,25:y,26:m,27:v,30:29,31:b,33:_,35:x,36:6,41:w,42:k,43:T,44:E,47:C,50:a},{38:39,39:[1,40],53:S},e([39,53],[2,44]),e(A,[2,6]),{6:28,10:42,11:18,14:l,15:u,17:h,20:f,22:d,23:p,24:g,25:y,26:m,27:v,30:29,31:b,33:_,35:x,36:6,41:w,42:k,43:T,44:E,47:C,50:a},e(A,[2,8]),e(A,[2,9]),e(A,[2,10],{12:[1,43],13:[1,44]}),e(A,[2,14]),{16:[1,45]},e(A,[2,16],{18:[1,46]}),{21:[1,47]},e(A,[2,20]),e(A,[2,21]),e(A,[2,22]),e(A,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},e(A,[2,26]),e(A,[2,27]),{32:[1,52]},{34:[1,53]},e(A,[2,30]),e(M,[2,39]),e(M,[2,40]),e(A,[2,33]),e(A,[2,34]),e(A,[2,35]),e(A,[2,36]),e(N,[2,31]),{40:54,52:[1,55]},e(N,[2,46]),e(A,[2,7]),e(A,[2,11]),{11:56,22:d,47:C},e(A,[2,15]),e(D,o,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},e(A,[2,28]),e(A,[2,29]),{38:61,53:S},{53:[2,45]},e(A,[2,12],{12:[1,62]}),{4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,63],20:f,22:d,23:p,24:g,25:y,26:m,27:v,30:29,31:b,33:_,35:x,36:6,41:w,42:k,43:T,44:E,47:C,50:a},e(A,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},e(N,[2,32]),e(A,[2,13]),e(A,[2,17]),e(D,o,{8:67}),e(A,[2,24]),e(A,[2,25]),{4:s,5:c,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,68],20:f,22:d,23:p,24:g,25:y,26:m,27:v,30:29,31:b,33:_,35:x,36:6,41:w,42:k,43:T,44:E,47:C,50:a},e(A,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},B={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:case 54:return this.popState(),"ID";case 41:return"STATE_DESCR";case 42:return 17;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 53:return"NOTE_TEXT";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};return O.lexer=B,t.prototype=O,O.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9763:(t,e,n)=>{t=n.nmd(t);var r=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],a=[1,15],o=[1,16],s=[1,17],c=[1,18],l=[1,19],u=[1,20],h=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive", +28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return a[o-1];case 3:case 7:case 8:this.$=[];break;case 4:a[o-1].push(a[o]),this.$=a[o-1];break;case 5:case 6:this.$=a[o];break;case 11:r.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 12:this.$=a[o].trim(),r.setAccTitle(this.$);break;case 13:case 14:this.$=a[o].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 16:r.addTask(a[o-1],a[o]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(a[o],"type_directive");break;case 20:a[o]=a[o].trim().replace(/'/g,'"'),r.parseDirective(a[o],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:n,7:3,12:4,26:r},{1:[3]},e(i,[2,3],{5:6}),{3:7,4:n,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:a,18:o,20:s,22:c,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:h},e([15,29],[2,19]),e(i,[2,8],{1:[2,1]}),e(i,[2,4]),{7:21,10:25,12:4,17:a,18:o,20:s,22:c,23:l,24:u,26:r},e(i,[2,6]),e(i,[2,7]),e(i,[2,11]),{19:[1,26]},{21:[1,27]},e(i,[2,14]),e(i,[2,15]),{25:[1,28]},e(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},e(i,[2,5]),e(i,[2,12]),e(i,[2,13]),e(i,[2,16]),e(f,[2,9]),{14:32,29:h},{29:[2,20]},{11:[1,33]},e(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){function e(){var t;return"number"!=typeof(t=i.pop()||g.lex()||d)&&(t instanceof Array&&(t=(i=t).pop()),t=n.symbols_[t]||t),t}var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c="",l=0,u=0,h=0,f=2,d=1,p=o.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(y.yy[m]=this.yy[m]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var v=g.yylloc;o.push(v);var b=g.options&&g.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,E,C,S,A,M={};;){if(w=r[r.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=e()),k=s[w]&&s[w][_]),void 0===k||!k.length||!k[0]){var N="";for(E in A=[],s[w])this.terminals_[E]&&E>f&&A.push("'"+this.terminals_[E]+"'");N=g.showPosition?"Parse error on line "+(l+1)+":\n"+g.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(l+1)+": Unexpected "+(_==d?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:g.match,token:this.terminals_[_]||_,line:g.yylineno,loc:v,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:r.push(_),a.push(g.yytext),o.push(g.yylloc),r.push(k[1]),_=null,x?(_=x,x=null):(u=g.yyleng,c=g.yytext,l=g.yylineno,v=g.yylloc,h>0&&h--);break;case 2:if(C=this.productions_[k[1]][1],M.$=a[a.length-C],M._$={first_line:o[o.length-(C||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(C||1)].first_column,last_column:o[o.length-1].last_column},b&&(M._$.range=[o[o.length-(C||1)].range[0],o[o.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[c,u,l,y.yy,k[1],a,o].concat(p))))return T;C&&(r=r.slice(0,-1*C*2),a=a.slice(0,-1*C),o=o.slice(0,-1*C)),r.push(this.productions_[k[1]][0]),a.push(M.$),o.push(M._$),S=s[r[r.length-2]][r[r.length-1]],r.push(S);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return d.lexer=p,t.prototype=d,d.Parser=t,new t}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^([^:]+):/gm,o=[".","/"];e.N=function(t){var e,s=(e=t||"",e.replace(r,function(t,e){return String.fromCharCode(e)})).replace(i,"").trim();if(!s)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var l=c[0];return n.test(l)?"about:blank":s}},3841:t=>{t.exports=function(t,e){return t.intersect(e)}},1689:(t,e,n)=>{"use strict";function r(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n=i)&&(n=i)}return n}function i(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function a(t){return t}function o(t){return"translate("+t+",0)"}function s(t){return"translate(0,"+t+")"}function c(t){return e=>+t(e)}function l(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function u(){return!this.__axis}function h(t,e){function n(n){var o=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,s=null==h?e.tickFormat?e.tickFormat.apply(e,r):a:h,b=Math.max(f,0)+p,_=e.range(),x=+_[0]+g,w=+_[_.length-1]+g,k=(e.bandwidth?l:c)(e.copy(),g),T=n.selection?n.selection():n,E=T.selectAll(".domain").data([null]),C=T.selectAll(".tick").data(o,e).order(),S=C.exit(),A=C.enter().append("g").attr("class","tick"),M=C.select("line"),N=C.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(A),M=M.merge(A.append("line").attr("stroke","currentColor").attr(m+"2",y*f)),N=N.merge(A.append("text").attr("fill","currentColor").attr(m,y*b).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),n!==T&&(E=E.transition(n),C=C.transition(n),M=M.transition(n),N=N.transition(n),S=S.transition(n).attr("opacity",gd).attr("transform",function(t){return isFinite(t=k(t))?v(t+g):this.getAttribute("transform")}),A.attr("opacity",gd).attr("transform",function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:k(t))+g)})),S.remove(),E.attr("d",4===t||2===t?d?"M"+y*d+","+x+"H"+g+"V"+w+"H"+y*d:"M"+g+","+x+"V"+w:d?"M"+x+","+y*d+"V"+g+"H"+w+"V"+y*d:"M"+x+","+g+"H"+w),C.attr("opacity",1).attr("transform",function(t){return v(k(t)+g)}),M.attr(m+"2",y*f),N.attr(m,y*b).text(s),T.filter(u).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),T.each(function(){this.__axis=k})}var r=[],i=null,h=null,f=6,d=6,p=3,g="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,y=1===t||4===t?-1:1,m=4===t||2===t?"x":"y",v=1===t||3===t?o:s;return n.scale=function(t){return arguments.length?(e=t,n):e},n.ticks=function(){return r=Array.from(arguments),n},n.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),n):r.slice()},n.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),n):i&&i.slice()},n.tickFormat=function(t){return arguments.length?(h=t,n):h},n.tickSize=function(t){return arguments.length?(f=d=+t,n):f},n.tickSizeInner=function(t){return arguments.length?(f=+t,n):f},n.tickSizeOuter=function(t){return arguments.length?(d=+t,n):d},n.tickPadding=function(t){return arguments.length?(p=+t,n):p},n.offset=function(t){return arguments.length?(g=+t,n):g},n}function f(){}function d(t){return null==t?f:function(){return this.querySelector(t)}}function p(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function g(){return[]}function y(t){return null==t?g:function(){return this.querySelectorAll(t)}}function m(t){return function(){return this.matches(t)}}function v(t){return function(e){return e.matches(t)}}function b(){return this.firstElementChild}function _(){return Array.from(this.children)}function x(t){return new Array(t.length)}function w(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function k(t){return function(){return t}}function T(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;se?1:t>=e?0:NaN}function M(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),bd.hasOwnProperty(e)?{space:bd[e],local:t}:t}function N(t){return function(){this.removeAttribute(t)}}function D(t){return function(){this.removeAttributeNS(t.space,t.local)}}function O(t,e){return function(){this.setAttribute(t,e)}}function B(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function L(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function I(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function F(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function P(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Y(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function z(t,e){return t.style.getPropertyValue(e)||F(t).getComputedStyle(t,null).getPropertyValue(e)}function U(t){return function(){delete this[t]}}function j(t,e){return function(){this[t]=e}}function q(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function $(t){return t.trim().split(/^|\s+/)}function W(t){return t.classList||new H(t)}function H(t){this._node=t,this._names=$(t.getAttribute("class")||"")}function V(t,e){for(var n=W(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function pt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function Tt(t,e){for(var n,r=0,i=t.length;r=0&&e._call.call(void 0,t),e=e._next;--Cd}()}finally{Cd=0,function(){for(var t,e,n=Td,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Td=e);Ed=t,Ot(r)}(),Nd=0}}function Dt(){var t=Od.now(),e=t-Md;e>1e3&&(Dd-=e,Md=t)}function Ot(t){Cd||(Sd&&(Sd=clearTimeout(Sd)),t-Nd>24?(t<1/0&&(Sd=setTimeout(Nt,t-Od.now()-Dd)),Ad&&(Ad=clearInterval(Ad))):(Ad||(Md=Od.now(),Ad=setInterval(Dt,1e3)),Cd=1,Bd(Nt)))}function Bt(t,e,n){var r=new At;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}function Lt(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function r(c){var l,u,h,f;if(1!==n.state)return a();for(l in s)if((f=s[l]).name===n.name){if(3===f.state)return Bt(r);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[l]):+l0)throw new Error("too late; already scheduled");return n}function Ft(t,e){var n=Rt(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Rt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Pt(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Yt(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r180?e+=360:e-t>180&&(t+=360),c.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Pt(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s),function(t,e,n){t!==e?c.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Pt(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Pt(t,n)},{i:s-2,x:Pt(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Qt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Qt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Vd.exec(t))?new te(e[1],e[2],e[3],1):(e=Gd.exec(t))?new te(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Xd.exec(t))?Qt(e[1],e[2],e[3],e[4]):(e=Zd.exec(t))?Qt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Qd.exec(t))?ie(e[1],e[2]/100,e[3]/100,1):(e=Jd.exec(t))?ie(e[1],e[2]/100,e[3]/100,e[4]):Kd.hasOwnProperty(t)?Zt(Kd[t]):"transparent"===t?new te(NaN,NaN,NaN,0):null}function Zt(t){return new te(t>>16&255,t>>8&255,255&t,1)}function Qt(t,e,n,r){return r<=0&&(t=e=n=NaN),new te(t,e,n,r)}function Jt(t){return t instanceof Ht||(t=Xt(t)),t?new te((t=t.rgb()).r,t.g,t.b,t.opacity):new te}function Kt(t,e,n,r){return 1===arguments.length?Jt(t):new te(t,e,n,null==r?1:r)}function te(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ee(){return"#"+re(this.r)+re(this.g)+re(this.b)}function ne(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function re(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ie(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new oe(t,e,n,r)}function ae(t){if(t instanceof oe)return new oe(t.h,t.s,t.l,t.opacity);if(t instanceof Ht||(t=Xt(t)),!t)return new oe;if(t instanceof oe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new oe(o,s,c,t.opacity)}function oe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function se(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function ce(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function le(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):tp(isNaN(t)?e:t)}function ue(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Pt(n,r)})),a=rp.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t})?It:Ft;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}function Me(t){return function(){this.style.removeProperty(t)}}function Ne(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function De(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&Ne(t,r,n)),i}var i,a;return r._value=e,r}function Oe(t){return function(e){this.textContent=t.call(this,e)}}function Be(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&Oe(e)),n}var n,r;return e._value=t,e}function Le(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ie(){return++ap}function Fe(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Re(t){return{type:t}}function Pe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ye(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ze(){}function Ue(){return this.rgb().formatHex()}function je(){return this.rgb().formatRgb()}function qe(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=yp.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?$e(e):3===n?new Ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?We(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?We(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=mp.exec(t))?new Ge(e[1],e[2],e[3],1):(e=vp.exec(t))?new Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=bp.exec(t))?We(e[1],e[2],e[3],e[4]):(e=_p.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=xp.exec(t))?Je(e[1],e[2]/100,e[3]/100,1):(e=wp.exec(t))?Je(e[1],e[2]/100,e[3]/100,e[4]):kp.hasOwnProperty(t)?$e(kp[t]):"transparent"===t?new Ge(NaN,NaN,NaN,0):null}function $e(t){return new Ge(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ge(t,e,n,r)}function He(t){return t instanceof ze||(t=qe(t)),t?new Ge((t=t.rgb()).r,t.g,t.b,t.opacity):new Ge}function Ve(t,e,n,r){return 1===arguments.length?He(t):new Ge(t,e,n,null==r?1:r)}function Ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Qe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Je(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new tn(t,e,n,r)}function Ke(t){if(t instanceof tn)return new tn(t.h,t.s,t.l,t.opacity);if(t instanceof ze||(t=qe(t)),!t)return new tn;if(t instanceof tn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new tn(o,s,c,t.opacity)}function tn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function en(t,e,n){ +return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function nn(t){if(t instanceof rn)return new rn(t.l,t.a,t.b,t.opacity);if(t instanceof hn)return fn(t);t instanceof Ge||(t=He(t));var e,n,r=cn(t.r),i=cn(t.g),a=cn(t.b),o=an((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=an((.4360747*r+.3850649*i+.1430804*a)/Cp),n=an((.0139322*r+.0971045*i+.7141733*a)/Sp)),new rn(116*o-16,500*(e-o),200*(o-n),t.opacity)}function rn(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function an(t){return t>.008856451679035631?Math.pow(t,1/3):t/Np+Ap}function on(t){return t>Mp?t*t*t:Np*(t-Ap)}function sn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function cn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ln(t){if(t instanceof hn)return new hn(t.h,t.c,t.l,t.opacity);if(t instanceof rn||(t=nn(t)),0===t.a&&0===t.b)return new hn(NaN,0=0?(a>=Bp?10:a>=Lp?5:a>=Ip?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Bp?10:a>=Lp?5:a>=Ip?2:1)}function mn(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Bp?i*=10:a>=Lp?i*=5:a>=Ip&&(i*=2),ee?1:t>=e?0:NaN}function bn(t){function e(t,e,n=0,a=t.length){if(n>>1;i(t[r],e)<0?n=r+1:a=r}while(nt(e)-n),r=vn,i=((e,n)=>vn(t(e),n))),{left:e,center:function(t,r,i=0,a=t.length){const o=e(t,r,i,a-1);return o>i&&n(t[o-1],r)>-n(t[o],r)?o-1:o},right:function(t,e,n=0,a=t.length){if(n>>1;i(t[r],e)<=0?n=r+1:a=r}while(n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Sn(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Sn(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Wp.exec(t))?new Nn(e[1],e[2],e[3],1):(e=Hp.exec(t))?new Nn(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Vp.exec(t))?Sn(e[1],e[2],e[3],e[4]):(e=Gp.exec(t))?Sn(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xp.exec(t))?Ln(e[1],e[2]/100,e[3]/100,1):(e=Zp.exec(t))?Ln(e[1],e[2]/100,e[3]/100,e[4]):Qp.hasOwnProperty(t)?Cn(Qp[t]):"transparent"===t?new Nn(NaN,NaN,NaN,0):null}function Cn(t){return new Nn(t>>16&255,t>>8&255,255&t,1)}function Sn(t,e,n,r){return r<=0&&(t=e=n=NaN),new Nn(t,e,n,r)}function An(t){return t instanceof wn||(t=En(t)),t?new Nn((t=t.rgb()).r,t.g,t.b,t.opacity):new Nn}function Mn(t,e,n,r){return 1===arguments.length?An(t):new Nn(t,e,n,null==r?1:r)}function Nn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Dn(){return"#"+Bn(this.r)+Bn(this.g)+Bn(this.b)}function On(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Bn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ln(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Fn(t,e,n,r)}function In(t){if(t instanceof Fn)return new Fn(t.h,t.s,t.l,t.opacity);if(t instanceof wn||(t=En(t)),!t)return new Fn;if(t instanceof Fn)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new Fn(o,s,c,t.opacity)}function Fn(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Rn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Pn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Yn(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Jp(isNaN(t)?e:t)}function zn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:qn(n,r)})),a=ng.lastIndex;return an&&(r=t,t=n,n=r),h=function(e){return Math.max(t,Math.min(n,e))}),a=i>2?Kn:Jn,o=s=null,e}function e(t){return null==t||isNaN(t=+t)?i:(o||(o=a(c.map(n),l,u)))(n(h(t)))}var n,r,i,a,o,s,c=rg,l=rg,u=Vn,h=Zn;return e.invert=function(t){return h(r((s||(s=a(l,c.map(n),qn)))(t)))},e.domain=function(e){return arguments.length?(c=Array.from(e,Xn),t()):c.slice()},e.range=function(e){return arguments.length?(l=Array.from(e),t()):l.slice()},e.rangeRound=function(e){return l=Array.from(e),u=Gn,t()},e.clamp=function(e){return arguments.length?(h=!!e||Zn,t()):h!==Zn},e.interpolate=function(e){return arguments.length?(u=e,t()):u},e.unknown=function(t){return arguments.length?(i=t,e):i},function(e,i){return n=e,r=i,t()}}()(Zn,Zn)}function nr(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function rr(t){if(!(e=ig.exec(t)))throw new Error("invalid format: "+t);var e;return new ir({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ir(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ar(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function or(t){return(t=ar(Math.abs(t)))?t[1]:NaN}function sr(t,e){var n=ar(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function cr(t){return t}function lr(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e0){let n=Math.round(t/o),r=Math.round(e/o);for(n*oe&&--r,a=new Array(i=r-n+1);++se&&--r,a=new Array(i=r-n+1);++s0;){if((i=yn(c,l,n))===r)return a[o]=c,a[s]=l,e(a);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function ur(){var t=er();return t.copy=function(){return tr(t,ur())},nr.apply(t,arguments),lr(t)}function hr({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function fr(t){return null!==t&&"object"==typeof t?t.valueOf():t}function dr(){function t(t){let a=e.get(t);if(void 0===a){if(i!==fg)return i;e.set(t,a=n.push(t)-1)}return r[a%r.length]}var e=new hg,n=[],r=[],i=fg;return t.domain=function(r){if(!arguments.length)return n.slice();n=[],e=new hg;for(const t of r)e.has(t)||e.set(t,n.push(t)-1);return t},t.range=function(e){return arguments.length?(r=Array.from(e),t):r.slice()},t.unknown=function(e){return arguments.length?(i=e,t):i},t.copy=function(){return dr(n,r).unknown(i)},nr.apply(t,arguments),t}function pr(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return bg.setTime(+e),_g.setTime(+r),t(bg),t(_g),Math.floor(n(bg,_g))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}function gr(t){return pr(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pg)/mg})}function yr(t){return pr(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/mg})}function mr(t,e,n,r,i,a){function o(e,n,r){const i=Math.abs(n-e)/r,a=bn(([,,t])=>t).right(s,i);if(a===s.length)return t.every(mn(e/vg,n/vg,r));if(0===a)return wg.every(Math.max(mn(e,n,r),1));const[o,c]=s[i/s[a-1][2][t.toLowerCase(),e]))}function Er(t,e,n){var r=fy.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Cr(t,e,n){var r=fy.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Sr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Mr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=fy.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Dr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Br(t,e,n){var r=fy.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Lr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ir(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Fr(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Yr(t,e,n){var r=fy.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=fy.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ur(t,e,n){var r=fy.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function jr(t,e,n){var r=dy.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qr(t,e,n){var r=fy.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function $r(t,e,n){var r=fy.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Wr(t,e){return xr(t.getDate(),e,2)}function Hr(t,e){return xr(t.getHours(),e,2)}function Vr(t,e){return xr(t.getHours()%12||12,e,2)}function Gr(t,e){return xr(1+Ng.count(Ug(t),t),e,3)}function Xr(t,e){return xr(t.getMilliseconds(),e,3)}function Zr(t,e){return Xr(t,e)+"000"}function Qr(t,e){return xr(t.getMonth()+1,e,2)}function Jr(t,e){return xr(t.getMinutes(),e,2)}function Kr(t,e){return xr(t.getSeconds(),e,2)}function ti(t){var e=t.getDay();return 0===e?7:e}function ei(t,e){return xr(Dg.count(Ug(t)-1,t),e,2)}function ni(t){var e=t.getDay();return e>=4||0===e?Ig(t):Ig.ceil(t)}function ri(t,e){return t=ni(t),xr(Ig.count(Ug(t),t)+(4===Ug(t).getDay()),e,2)}function ii(t){return t.getDay()}function ai(t,e){return xr(Og.count(Ug(t)-1,t),e,2)}function oi(t,e){return xr(t.getFullYear()%100,e,2)}function si(t,e){return xr((t=ni(t)).getFullYear()%100,e,2)}function ci(t,e){return xr(t.getFullYear()%1e4,e,4)}function li(t,e){var n=t.getDay();return xr((t=n>=4||0===n?Ig(t):Ig.ceil(t)).getFullYear()%1e4,e,4)}function ui(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+xr(e/60|0,"0",2)+xr(e%60,"0",2)}function hi(t,e){return xr(t.getUTCDate(),e,2)}function fi(t,e){return xr(t.getUTCHours(),e,2)}function di(t,e){return xr(t.getUTCHours()%12||12,e,2)}function pi(t,e){return xr(1+Vg.count(iy(t),t),e,3)}function gi(t,e){return xr(t.getUTCMilliseconds(),e,3)}function yi(t,e){return gi(t,e)+"000"}function mi(t,e){return xr(t.getUTCMonth()+1,e,2)}function vi(t,e){return xr(t.getUTCMinutes(),e,2)}function bi(t,e){return xr(t.getUTCSeconds(),e,2)}function _i(t){var e=t.getUTCDay();return 0===e?7:e}function xi(t,e){return xr(Gg.count(iy(t)-1,t),e,2)}function wi(t){var e=t.getUTCDay();return e>=4||0===e?Jg(t):Jg.ceil(t)}function ki(t,e){return t=wi(t),xr(Jg.count(iy(t),t)+(4===iy(t).getUTCDay()),e,2)}function Ti(t){return t.getUTCDay()}function Ei(t,e){return xr(Xg.count(iy(t)-1,t),e,2)}function Ci(t,e){return xr(t.getUTCFullYear()%100,e,2)}function Si(t,e){return xr((t=wi(t)).getUTCFullYear()%100,e,2)}function Ai(t,e){return xr(t.getUTCFullYear()%1e4,e,4)}function Mi(t,e){var n=t.getUTCDay();return xr((t=n>=4||0===n?Jg(t):Jg.ceil(t)).getUTCFullYear()%1e4,e,4)}function Ni(){return"+0000"}function Di(){return"%"}function Oi(t){return+t}function Bi(t){return Math.floor(+t/1e3)}function Li(t){return new Date(t)}function Ii(t){return t instanceof Date?+t:+new Date(+t)}function Fi(t,e,n,r,i,a,o,s,c,l){function u(t){return(c(t)e?1:t>=e?0:NaN}function ta(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),vy.hasOwnProperty(e)?{space:vy[e],local:t}:t}function ea(t){return function(){this.removeAttribute(t)}}function na(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ra(t,e){return function(){this.setAttribute(t,e)}}function ia(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function aa(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function oa(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function sa(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ca(t){return function(){this.style.removeProperty(t)}}function la(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ua(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ha(t,e){return t.style.getPropertyValue(e)||sa(t).getComputedStyle(t,null).getPropertyValue(e)}function fa(t){return function(){delete this[t]}}function da(t,e){return function(){this[t]=e}}function pa(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ga(t){return t.trim().split(/^|\s+/)}function ya(t){return t.classList||new ma(t)}function ma(t){this._node=t,this._names=ga(t.getAttribute("class")||"")}function va(t,e){for(var n=ya(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function Ya(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r1?0:t<-1?Ly:Math.acos(t)}function Ja(t){return t>=1?Iy:t<=-1?-Iy:Math.asin(t)}function Ka(t){return t.innerRadius}function to(t){return t.outerRadius}function eo(t){return t.startAngle}function no(t){return t.endAngle}function ro(t){return t&&t.padAngle}function io(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,f=h*c-u*l;if(!(f*fN*N+D*D&&(T=C,E=S),{cx:T,cy:E,x01:-u,y01:-h,x11:T*(i/x-1),y11:E*(i/x-1)}}function oo(){function t(){var t,l,u=+e.apply(this,arguments),h=+n.apply(this,arguments),f=a.apply(this,arguments)-Iy,d=o.apply(this,arguments)-Iy,p=Cy(d-f),g=d>f;if(c||(c=t=Ey()),hBy)if(p>Fy-By)c.moveTo(h*Ay(f),h*Dy(f)),c.arc(0,0,h,f,d,!g),u>By&&(c.moveTo(u*Ay(d),u*Dy(d)),c.arc(0,0,u,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=s.apply(this,arguments)/2,E=T>By&&(i?+i.apply(this,arguments):Oy(u*u+h*h)),C=Ny(Cy(h-u)/2,+r.apply(this,arguments)),S=C,A=C;if(E>By){var M=Ja(E/u*Dy(T)),N=Ja(E/h*Dy(T));(w-=2*M)>By?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>By?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*Ay(v),O=h*Dy(v),B=u*Ay(x),L=u*Dy(x);if(C>By){var I,F=h*Ay(b),R=h*Dy(b),P=u*Ay(_),Y=u*Dy(_);if(pBy?A>By?(y=ao(P,Y,D,O,h,A,g),m=ao(F,R,B,L,h,A,g),c.moveTo(y.cx+y.x01,y.cy+y.y01),ABy&&w>By?S>By?(y=ao(B,L,F,R,u,-S,g),m=ao(D,O,P,Y,u,-S,g),c.lineTo(y.cx+y.x01,y.cy+y.y01),St?1:e>=t?0:NaN}function go(t){return t}function yo(){}function mo(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function vo(t){this._context=t}function bo(t){return new vo(t)}function _o(t){this._context=t}function xo(t){this._context=t}function wo(t){this._context=t}function ko(t){return t<0?-1:1}function To(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ko(a)+ko(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Eo(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Co(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function So(t){this._context=t}function Ao(t){this._context=new Mo(t)}function Mo(t){this._context=t}function No(t){this._context=t}function Do(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return Ry.setTime(+e),Py.setTime(+r),t(Ry),t(Py),Math.floor(n(Ry,Py))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}function Lo(t){return Bo(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/zy})}function Io(t){return Bo(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/zy})}function Fo(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)} +function Ro(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Po(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yo(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a[t.toLowerCase(),e]))}function qo(t,e,n){var r=fm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function $o(t,e,n){var r=fm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Wo(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ho(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Vo(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Go(t,e,n){var r=fm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Xo(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Zo(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Qo(t,e,n){var r=fm.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Jo(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ko(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ts(t,e,n){var r=fm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function es(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ns(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function rs(t,e,n){var r=fm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function is(t,e,n){var r=fm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function as(t,e,n){var r=fm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function os(t,e,n){var r=dm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ss(t,e,n){var r=fm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function cs(t,e,n){var r=fm.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ls(t,e){return Yo(t.getDate(),e,2)}function us(t,e){return Yo(t.getHours(),e,2)}function hs(t,e){return Yo(t.getHours()%12||12,e,2)}function fs(t,e){return Yo(1+im.count(om(t),t),e,3)}function ds(t,e){return Yo(t.getMilliseconds(),e,3)}function ps(t,e){return ds(t,e)+"000"}function gs(t,e){return Yo(t.getMonth()+1,e,2)}function ys(t,e){return Yo(t.getMinutes(),e,2)}function ms(t,e){return Yo(t.getSeconds(),e,2)}function vs(t){var e=t.getDay();return 0===e?7:e}function bs(t,e){return Yo(Zy.count(om(t)-1,t),e,2)}function _s(t){var e=t.getDay();return e>=4||0===e?tm(t):tm.ceil(t)}function xs(t,e){return t=_s(t),Yo(tm.count(om(t),t)+(4===om(t).getDay()),e,2)}function ws(t){return t.getDay()}function ks(t,e){return Yo(Qy.count(om(t)-1,t),e,2)}function Ts(t,e){return Yo(t.getFullYear()%100,e,2)}function Es(t,e){return Yo((t=_s(t)).getFullYear()%100,e,2)}function Cs(t,e){return Yo(t.getFullYear()%1e4,e,4)}function Ss(t,e){var n=t.getDay();return Yo((t=n>=4||0===n?tm(t):tm.ceil(t)).getFullYear()%1e4,e,4)}function As(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Yo(e/60|0,"0",2)+Yo(e%60,"0",2)}function Ms(t,e){return Yo(t.getUTCDate(),e,2)}function Ns(t,e){return Yo(t.getUTCHours(),e,2)}function Ds(t,e){return Yo(t.getUTCHours()%12||12,e,2)}function Os(t,e){return Yo(1+Xy.count(cm(t),t),e,3)}function Bs(t,e){return Yo(t.getUTCMilliseconds(),e,3)}function Ls(t,e){return Bs(t,e)+"000"}function Is(t,e){return Yo(t.getUTCMonth()+1,e,2)}function Fs(t,e){return Yo(t.getUTCMinutes(),e,2)}function Rs(t,e){return Yo(t.getUTCSeconds(),e,2)}function Ps(t){var e=t.getUTCDay();return 0===e?7:e}function Ys(t,e){return Yo(Uy.count(cm(t)-1,t),e,2)}function zs(t){var e=t.getUTCDay();return e>=4||0===e?Wy(t):Wy.ceil(t)}function Us(t,e){return t=zs(t),Yo(Wy.count(cm(t),t)+(4===cm(t).getUTCDay()),e,2)}function js(t){return t.getUTCDay()}function qs(t,e){return Yo(jy.count(cm(t)-1,t),e,2)}function $s(t,e){return Yo(t.getUTCFullYear()%100,e,2)}function Ws(t,e){return Yo((t=zs(t)).getUTCFullYear()%100,e,2)}function Hs(t,e){return Yo(t.getUTCFullYear()%1e4,e,4)}function Vs(t,e){var n=t.getUTCDay();return Yo((t=n>=4||0===n?Wy(t):Wy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Gs(){return"+0000"}function Xs(){return"%"}function Zs(t){return+t}function Qs(t){return Math.floor(+t/1e3)}function Js(){for(var t,e=0,n=arguments.length,r={};e=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function ec(t,e){for(var n,r=0,i=t.length;r=0&&e._call.call(void 0,t),e=e._next;--bm}()}finally{bm=0,function(){for(var t,e,n=mm,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:mm=e);vm=t,lc(r)}(),km=0}}function cc(){var t=Em.now(),e=t-wm;e>1e3&&(Tm-=e,wm=t)}function lc(t){bm||(_m&&(_m=clearTimeout(_m)),t-km>24?(t<1/0&&(_m=setTimeout(sc,t-Em.now()-Tm)),xm&&(xm=clearInterval(xm))):(xm||(wm=Em.now(),xm=setInterval(cc,1e3)),bm=1,Cm(sc)))}function uc(t,e,n){var r=new ac;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}function hc(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function r(c){var l,u,h,f;if(1!==n.state)return a();for(l in s)if((f=s[l]).name===n.name){if(3===f.state)return uc(r);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[l]):+l0)throw new Error("too late; already scheduled");return n}function dc(t,e){var n=pc(t,e);if(n.state>3)throw new Error("too late; already running");return n}function pc(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gc(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function yc(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r180?e+=360:e-t>180&&(t+=360),c.push({i:n.push(i(n)+"rotate(",null,r)-2,x:gc(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s),function(t,e,n){t!==e?c.push({i:n.push(i(n)+"skewX(",null,r)-2,x:gc(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:gc(t,n)},{i:s-2,x:gc(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:gc(n,r)})),a=Fm.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t})?fc:dc;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}function Uc(t){return function(){this.style.removeProperty(t)}}function jc(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function qc(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&jc(t,r,n)),i}var i,a;return r._value=e,r}function $c(t){return function(e){this.textContent=t.call(this,e)}}function Wc(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&$c(e)),n}var n,r;return e._value=t,e}function Hc(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Vc(){return++Pm}function Gc(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Xc(){}function Zc(t){return null==t?Xc:function(){return this.querySelector(t)}}function Qc(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Jc(){return[]}function Kc(t){return null==t?Jc:function(){return this.querySelectorAll(t)}}function tl(t){return function(){return this.matches(t)}}function el(t){return function(e){return e.matches(t)}}function nl(){return this.firstElementChild}function rl(){return Array.from(this.children)}function il(t){return new Array(t.length)}function al(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function ol(t){return function(){return t}}function sl(t,e,n,r,i,a){for(var o,s=0,c=e.length,l=a.length;se?1:t>=e?0:NaN}function fl(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),$m.hasOwnProperty(e)?{space:$m[e],local:t}:t}function dl(t){return function(){this.removeAttribute(t)}}function pl(t){return function(){this.removeAttributeNS(t.space,t.local)}}function gl(t,e){return function(){this.setAttribute(t,e)}}function yl(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ml(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function vl(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function bl(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function _l(t){return function(){this.style.removeProperty(t)}}function xl(t,e,n){return function(){this.style.setProperty(t,e,n)}}function wl(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function kl(t,e){return t.style.getPropertyValue(e)||bl(t).getComputedStyle(t,null).getPropertyValue(e)}function Tl(t){return function(){delete this[t]}}function El(t,e){return function(){this[t]=e}}function Cl(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Sl(t){return t.trim().split(/^|\s+/)}function Al(t){return t.classList||new Ml(t)}function Ml(t){this._node=t,this._names=Sl(t.getAttribute("class")||"")}function Nl(t,e){for(var n=Al(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function Ql(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function su(t,e){for(var n,r=0,i=t.length;r=0&&e._call.call(void 0,t),e=e._next;--Qm}()}finally{Qm=0,function(){for(var t,e,n=Xm,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Xm=e);Zm=t,gu(r)}(),ev=0}}function pu(){var t=rv.now(),e=t-tv;e>1e3&&(nv-=e,tv=t)}function gu(t){Qm||(Jm&&(Jm=clearTimeout(Jm)),t-ev>24?(t<1/0&&(Jm=setTimeout(du,t-rv.now()-nv)),Km&&(Km=clearInterval(Km))):(Km||(tv=rv.now(),Km=setInterval(pu,1e3)),Qm=1,iv(du)))}function yu(t,e,n){var r=new hu;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}function mu(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function r(c){var l,u,h,f;if(1!==n.state)return a();for(l in s)if((f=s[l]).name===n.name){if(3===f.state)return yu(r);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[l]):+l0)throw new Error("too late; already scheduled");return n}function bu(t,e){var n=_u(t,e);if(n.state>3)throw new Error("too late; already running");return n}function _u(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function xu(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function wu(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r180?e+=360:e-t>180&&(t+=360),c.push({i:n.push(i(n)+"rotate(",null,r)-2,x:xu(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s),function(t,e,n){t!==e?c.push({i:n.push(i(n)+"skewX(",null,r)-2,x:xu(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:xu(t,n)},{i:s-2,x:xu(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Lu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Lu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=vv.exec(t))?new Ru(e[1],e[2],e[3],1):(e=bv.exec(t))?new Ru(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=_v.exec(t))?Lu(e[1],e[2],e[3],e[4]):(e=xv.exec(t))?Lu(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=wv.exec(t))?Uu(e[1],e[2]/100,e[3]/100,1):(e=kv.exec(t))?Uu(e[1],e[2]/100,e[3]/100,e[4]):Tv.hasOwnProperty(t)?Bu(Tv[t]):"transparent"===t?new Ru(NaN,NaN,NaN,0):null}function Bu(t){return new Ru(t>>16&255,t>>8&255,255&t,1)}function Lu(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ru(t,e,n,r)}function Iu(t){return t instanceof Mu||(t=Ou(t)),t?new Ru((t=t.rgb()).r,t.g,t.b,t.opacity):new Ru}function Fu(t,e,n,r){return 1===arguments.length?Iu(t):new Ru(t,e,n,null==r?1:r)}function Ru(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Pu(){return"#"+zu(this.r)+zu(this.g)+zu(this.b)}function Yu(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function zu(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Uu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new qu(t,e,n,r)}function ju(t){if(t instanceof qu)return new qu(t.h,t.s,t.l,t.opacity);if(t instanceof Mu||(t=Ou(t)),!t)return new qu;if(t instanceof qu)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new qu(o,s,c,t.opacity)}function qu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $u(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Wu(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Hu(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ev(isNaN(t)?e:t)}function Vu(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:xu(n,r)})),a=Av.lastIndex;return a=0&&(t=t.slice(0,e)),!t||"start"===t})?vu:bu;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}function fh(t){return function(){this.style.removeProperty(t)}}function dh(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ph(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&dh(t,r,n)),i}var i,a;return r._value=e,r}function gh(t){return function(e){this.textContent=t.call(this,e)}}function yh(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&gh(e)),n}var n,r;return e._value=t,e}function mh(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function vh(){return++Nv}function bh(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function _h(t,e,n){this.k=t,this.x=e,this.y=n}function xh(t){return t.trim()}function wh(t,e,n){return t.replace(e,n)}function kh(t,e){return t.indexOf(e)}function Th(t,e){return 0|t.charCodeAt(e)}function Eh(t,e,n){return t.slice(e,n)}function Ch(t){return t.length}function Sh(t){return t.length}function Ah(t,e){return e.push(t),t}function Mh(t,e){for(var n="",r=Sh(t),i=0;i0?Th(qv,--Uv):0,Yv--,10===jv&&(Yv=1,Pv--),jv}function Bh(){return jv=Uv2||Rh(jv)>3?"":" "}function zh(t,e){for(;--e&&Bh()&&!(jv<48||jv>102||jv>57&&jv<65||jv>70&&jv<97););return Fh(t,Ih()+(e<6&&32==Lh()&&32==Bh()))}function Uh(t){for(;Bh();)switch(jv){case t:return Uv;case 34:case 39:34!==t&&39!==t&&Uh(jv);break;case 40:41===t&&Uh(t);break;case 92:Bh()}return Uv}function jh(t,e){for(;Bh()&&t+jv!==57&&(t+jv!==84||47!==Lh()););return"/*"+Fh(e,Uv-1)+"*"+Rv(47===t?t:Bh())}function qh(t){for(;!Rh(Lh());)Bh();return Fh(t,Uv)}function $h(t){return function(t){return qv="",t}(Wh("",null,null,null,[""],t=function(t){return Pv=Yv=1,zv=Ch(qv=t),Uv=0,[]}(t),0,[0],t))}function Wh(t,e,n,r,i,a,o,s,c){for(var l=0,u=0,h=o,f=0,d=0,p=0,g=1,y=1,m=1,v=0,b="",_=i,x=a,w=r,k=b;y;)switch(p=v,v=Bh()){case 40:if(108!=p&&58==k.charCodeAt(h-1)){-1!=kh(k+=wh(Ph(v),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:k+=Ph(v);break;case 9:case 10:case 13:case 32:k+=Yh(p);break;case 92:k+=zh(Ih()-1,7);continue;case 47:switch(Lh()){case 42:case 47:Ah(Vh(jh(Bh(),Ih()),e,n),c);break;default:k+="/"}break;case 123*g:s[l++]=Ch(k)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+u:d>0&&Ch(k)-h&&Ah(d>32?Gh(k+";",r,n,h-1):Gh(wh(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(Ah(w=Hh(k,e,n,l,u,i,s,b,_=[],x=[],h),a),123===v)if(0===u)Wh(k,e,w,w,_,a,h,s,x);else switch(f){case 100:case 109:case 115:Wh(t,w,w,r&&Ah(Hh(t,w,w,0,0,i,s,b,i,_=[],h),x),i,x,h,s,r?_:x);break;default:Wh(k,w,w,w,[""],x,0,s,x)}}l=u=d=0,g=m=1,b=k="",h=o;break;case 58:h=1+Ch(k),d=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==Oh())continue;switch(k+=Rv(v),v*g){case 38:m=u>0?1:(k+="\f",-1);break;case 44:s[l++]=(Ch(k)-1)*m,m=1;break;case 64:45===Lh()&&(k+=Ph(Bh())),f=Lh(),u=h=Ch(b=k+=qh(Ih())),v++;break;case 45:45===p&&2==Ch(k)&&(g=0)}}return a}function Hh(t,e,n,r,i,a,o,s,c,l,u){ +for(var h=i-1,f=0===i?a:[""],d=Sh(f),p=0,g=0,y=0;p0?f[m]+" "+v:wh(v,/&\f/g,f[m])))&&(c[y++]=b);return Dh(t,e,n,0===i?Lv:s,c,l,u)}function Vh(t,e,n){return Dh(t,e,n,Bv,Rv(jv),Eh(t,2,-2),0)}function Gh(t,e,n,r){return Dh(t,e,n,Iv,Eh(t,0,r),Eh(t,r+1,-1),r)}function Xh(t){return(Xh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Zh(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n["return"]||n["return"]()}finally{if(s)throw a}}}}function hf(t){return(hf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ff(t){return function(t){if(Array.isArray(t))return pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||df(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function df(t,e){if(t){if("string"==typeof t)return pf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pf(t,e):void 0}}function pf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&ex(i,t,g,y),e=o.alias;var m=W_.parser.yy.getBoundarys(e);m.length>0&&kf(t,e,i,m),"global"!==o.alias&&tx(t,o,i),n.data.stopy=Math.max(i.data.stopy+X_.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(i.data.stopx+X_.c4ShapeMargin,n.data.stopx),V_=Math.max(V_,n.data.stopx),G_=Math.max(G_,n.data.stopy)}}function Tf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0}function Af(t){return(Af="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mf(t,e,n,r){var i=[],a=function(t){i.push(t),i.push(0)},o=function(t){i.push(0),i.push(t)};e.includes("t")?(fd.debug("add top border"),a(n)):o(n),e.includes("r")?(fd.debug("add right border"),a(r)):o(r),e.includes("b")?(fd.debug("add bottom border"),a(n)):o(n),e.includes("l")?(fd.debug("add left border"),a(r)):o(r),t.attr("stroke-dasharray",i.join(" "))}function Nf(t,e){g_().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function Df(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}function Of(t){return(Of="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Bf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nn.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function Wf(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}function Hf(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);ne.seq?t:e},t[0]),n="";t.forEach(function(t){n+=t===e?"\t*":"\t|"});var r,i,a,o=[n,e.id,e.seq];for(var s in hT)hT[s]===e.id&&o.push(s);if(fd.debug(o.join(" ")),e.parents&&2==e.parents.length){var c=cT[e.parents[0]];Jf(t,e,c),t.push(cT[e.parents[1]])}else{if(0==e.parents.length)return;var l=cT[e.parents];Jf(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),Kf(t=r.reduce(function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t},[]))}function td(t,e){if(null==t.links)t.links=e;else for(var n in e)t.links[n]=e[n]}function ed(t,e){if(null==t.properties)t.properties=e;else for(var n in e)t.properties[n]=e[n]}function nd(t,e,n,r,i){oC.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var o=t[e.id].width,s=sC(aC);e.message=o_.wrapLabel("[".concat(e.message,"]"),o-2*aC.wrapPadding,s),e.width=o,e.wrap=!0;var c=o_.calculateTextDimensions(e.message,s),l=Math.max(c.height,aC.labelBoxHeight);a=r+l,fd.debug("".concat(l," - ").concat(e.message))}i(e),oC.bumpVerticalPos(a)}function rd(t){return(rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function id(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nDS});var ld=n(1941),ud=n.n(ld),hd={debug:1,info:2,warn:3,error:4,fatal:5},fd={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},dd=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==hd[t]&&(t=hd[t])),fd.trace=function(){},fd.debug=function(){},fd.info=function(){},fd.warn=function(){},fd.error=function(){},fd.fatal=function(){},t<=hd.fatal&&(fd.fatal=console.error?console.error.bind(console,pd("FATAL"),"color: orange"):console.log.bind(console,"\x1b[35m",pd("FATAL"))),t<=hd.error&&(fd.error=console.error?console.error.bind(console,pd("ERROR"),"color: orange"):console.log.bind(console,"\x1b[31m",pd("ERROR"))),t<=hd.warn&&(fd.warn=console.warn?console.warn.bind(console,pd("WARN"),"color: orange"):console.log.bind(console,"\x1b[33m",pd("WARN"))),t<=hd.info&&(fd.info=console.info?console.info.bind(console,pd("INFO"),"color: lightblue"):console.log.bind(console,"\x1b[34m",pd("INFO"))),t<=hd.debug&&(fd.debug=console.debug?console.debug.bind(console,pd("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1b[32m",pd("DEBUG")))},pd=function(t){var e=ud()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},gd=1e-6,yd=Array.prototype.find,md=Array.prototype.filter;w.prototype={constructor:w,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var vd="http://www.w3.org/1999/xhtml";const bd={svg:"http://www.w3.org/2000/svg",xhtml:vd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};H.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var _d=[null];bt.prototype=_t.prototype={constructor:bt,select:function(t){"function"!=typeof t&&(t=d(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=_&&(_=b+1);!(v=y[_])&&++_=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=A);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?R:"function"==typeof e?Y:P)(t,e,null==n?"":n)):z(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?U:"function"==typeof e?q:j)(t,e)):this.node()[t]},classed:function(t,e){var n=$(t+"");if(arguments.length<2){for(var r=W(this.node()),i=-1,a=n.length;++i{}};wt.prototype=xt.prototype={constructor:wt,on:function(t,e){var n,r=this._,i=kt(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),a=0;a=240?t-240:t+120,i,r),se(t,i,r),se(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const tp=t=>()=>t,ep=function OS(t){function e(t,e){var r=n((t=Kt(t)).r,(e=Kt(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=le(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}var n=function(t){return 1==(t=+t)?le:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):tp(isNaN(e)?n:e)}}(t);return e.gamma=OS,e}(1);ue(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)})},xd.prototype.transition=function(t){var e,n;t instanceof Le?(e=t._id,t=t._name):(e=Ie(),(n=sp).time=Ct(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a=240?t-240:t+120,i,r),en(t,i,r),en(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Tp=Math.PI/180,Ep=180/Math.PI,Cp=.96422,Sp=.82521,Ap=4/29,Mp=6/29,Np=3*Mp*Mp;Pe(rn,function(t,e,n,r){return 1===arguments.length?nn(t):new rn(t,e,n,null==r?1:r)},Ye(ze,{brighter:function(t){return new rn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new rn(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ge(sn(3.1338561*(e=Cp*on(e))-1.6168667*(t=1*on(t))-.4906146*(n=Sp*on(n))),sn(-.9787684*e+1.9161415*t+.033454*n),sn(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Pe(hn,un,Ye(ze,{brighter:function(t){return new hn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new hn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return fn(this).rgb()}}));const Dp=t=>()=>t,Op=gn(function(t,e){var n=e-t;return n?dn(t,n>180||n<-180?n-360*Math.round(n/360):n):Dp(isNaN(t)?e:t)});gn(pn);var Bp=Math.sqrt(50),Lp=Math.sqrt(10),Ip=Math.sqrt(2);const Fp=bn(vn),Rp=Fp.right,Pp=(Fp.left,bn(function(t){return null===t?NaN:+t}).center,Rp);var Yp=.7,zp=1.4285714285714286,Up="\\s*([+-]?\\d+)\\s*",jp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",qp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$p=/^#([0-9a-f]{3,8})$/,Wp=new RegExp("^rgb\\("+[Up,Up,Up]+"\\)$"),Hp=new RegExp("^rgb\\("+[qp,qp,qp]+"\\)$"),Vp=new RegExp("^rgba\\("+[Up,Up,Up,jp]+"\\)$"),Gp=new RegExp("^rgba\\("+[qp,qp,qp,jp]+"\\)$"),Xp=new RegExp("^hsl\\("+[jp,qp,qp]+"\\)$"),Zp=new RegExp("^hsla\\("+[jp,qp,qp,jp]+"\\)$"),Qp={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};_n(wn,En,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:kn,formatHex:kn,formatHsl:function(){return In(this).formatHsl()},formatRgb:Tn,toString:Tn}),_n(Nn,Mn,xn(wn,{brighter:function(t){return t=null==t?zp:Math.pow(zp,t),new Nn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Yp:Math.pow(Yp,t),new Nn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dn,formatHex:Dn,formatRgb:On,toString:On})),_n(Fn,function(t,e,n,r){return 1===arguments.length?In(t):new Fn(t,e,n,null==r?1:r)},xn(wn,{brighter:function(t){return t=null==t?zp:Math.pow(zp,t),new Fn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Yp:Math.pow(Yp,t),new Fn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Nn(Rn(t>=240?t-240:t+120,i,r),Rn(t,i,r),Rn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Jp=t=>()=>t,Kp=function BS(t){function e(t,e){var r=n((t=Mn(t)).r,(e=Mn(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Yn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}var n=function(t){return 1==(t=+t)?Yn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Jp(isNaN(e)?n:e)}}(t);return e.gamma=BS,e}(1);zn(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;rr.prototype=ir.prototype,ir.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ag={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>sr(100*t,e),r:sr,s:function(t,e){var n=ar(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(tg=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ar(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};var og,sg,cg,lg=Array.prototype.map,ug=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];og=function(t){function e(t){function e(t){var e,a,o,l=_,d=x;if("c"===b)d=w(t)+d,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:w(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),l=(T?"("===f?f:u:"-"===f||"("===f?"":f)+l,d=("s"===b?ug[8+tg/3]:"")+d+(T&&"("===f?")":""),k)for(e=-1,a=t.length;++e(o=t.charCodeAt(e))||o>57){d=(46===o?s+t.slice(e+1):t.slice(e))+d,t=t.slice(0,e);break}}y&&!p&&(t=i(t,1/0));var E=l.length+t.length+d.length,C=E>1)+l+t+d+C.slice(E);break;default:t=C+l+t+d}return c(t)}var n=(t=rr(t)).fill,r=t.align,f=t.sign,d=t.symbol,p=t.zero,g=t.width,y=t.comma,m=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):ag[b]||(void 0===m&&(m=12),v=!0,b="g"),(p||"0"===n&&"="===r)&&(p=!0,n="0",r="=");var _="$"===d?a:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",w=ag[b],k=/[defgprs%]/.test(b);return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),e.toString=function(){return t+""},e}var n,r,i=void 0===t.grouping||void 0===t.thousands?cr:(n=lg.call(t.grouping,Number),r=t.thousands+"",function(t,e){for(var i=t.length,a=[],o=0,s=n[0],c=0;i>0&&s>0&&(c+s+1>e&&(s=Math.max(1,e-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",c=void 0===t.numerals?cr:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(lg.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"\u2212":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";return{format:e,formatPrefix:function(t,n){var r=e(((t=rr(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(or(n)/3))),a=Math.pow(10,-i),o=ug[8+i/3];return function(t){return r(a*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]}),sg=og.format,cg=og.formatPrefix;class hg extends Map{constructor(t,e=fr){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(hr(this,t))}has(t){return super.has(hr(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}"delete"(t){return super["delete"](function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t["delete"](r)),n}(this,t))}}Set;const fg=Symbol("implicit"),dg=1e3,pg=6e4,gg=36e5,yg=864e5,mg=6048e5,vg=31536e6;var bg=new Date,_g=new Date,xg=pr(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});xg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?pr(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):xg:null};const wg=xg;xg.range;var kg=pr(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*dg)},function(t,e){return(e-t)/dg},function(t){return t.getUTCSeconds()});const Tg=kg;kg.range;var Eg=pr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*dg)},function(t,e){t.setTime(+t+e*pg)},function(t,e){return(e-t)/pg},function(t){return t.getMinutes()});const Cg=Eg;Eg.range;var Sg=pr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*dg-t.getMinutes()*pg)},function(t,e){t.setTime(+t+e*gg)},function(t,e){return(e-t)/gg},function(t){return t.getHours()});const Ag=Sg;Sg.range;var Mg=pr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*pg)/yg,t=>t.getDate()-1);const Ng=Mg;Mg.range;var Dg=gr(0),Og=gr(1),Bg=gr(2),Lg=gr(3),Ig=gr(4),Fg=gr(5),Rg=gr(6),Pg=(Dg.range,Og.range,Bg.range,Lg.range,Ig.range,Fg.range,Rg.range,pr(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}));const Yg=Pg;Pg.range;var zg=pr(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});zg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pr(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};const Ug=zg;zg.range;var jg=pr(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*pg)},function(t,e){return(e-t)/pg},function(t){return t.getUTCMinutes()});const qg=jg;jg.range;var $g=pr(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*gg)},function(t,e){return(e-t)/gg},function(t){return t.getUTCHours()});const Wg=$g;$g.range;var Hg=pr(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/yg},function(t){return t.getUTCDate()-1});const Vg=Hg;Hg.range;var Gg=yr(0),Xg=yr(1),Zg=yr(2),Qg=yr(3),Jg=yr(4),Kg=yr(5),ty=yr(6),ey=(Gg.range,Xg.range,Zg.range,Qg.range,Jg.range,Kg.range,ty.range,pr(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}));const ny=ey;ey.range;var ry=pr(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});ry.every=function(t){return isFinite(t=Math.floor(t))&&t>0?pr(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};const iy=ry;ry.range;const[ay,oy]=mr(iy,ny,Gg,Vg,Wg,qg),[sy,cy]=mr(Ug,Yg,Dg,Ng,Ag,Cg);var ly,uy,hy={"-":"",_:" ",0:"0"},fy=/^\s*\d+/,dy=/^%/,py=/[\\^$*+?|[\]().{}]/g;ly=function(t){function e(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(a=(i=br(_r(o.y,0,1))).getUTCDay(),i=a>4||0===a?Xg.ceil(i):Xg(i),i=Vg.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=vr(_r(o.y,0,1))).getDay(),i=a>4||0===a?Og.ceil(i):Og(i),i=Ng.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?br(_r(o.y,0,1)).getUTCDay():vr(_r(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,br(o)):vr(o)}}function r(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=T[i in hy?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var i=t.dateTime,a=t.date,o=t.time,s=t.periods,c=t.days,l=t.shortDays,u=t.months,h=t.shortMonths,f=kr(s),d=Tr(s),p=kr(c),g=Tr(c),y=kr(l),m=Tr(l),v=kr(u),b=Tr(u),_=kr(h),x=Tr(h),w={a:function(t){return l[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return h[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Wr,e:Wr,f:Zr,g:si,G:li,H:Hr,I:Vr,j:Gr,L:Xr,m:Qr,M:Jr,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Oi,s:Bi,S:Kr,u:ti,U:ei,V:ri,w:ii,W:ai,x:null,X:null,y:oi,Y:ci,Z:ui,"%":Di},k={a:function(t){return l[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return h[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:hi,e:hi,f:yi,g:Si,G:Mi,H:fi,I:di,j:pi,L:gi,m:mi,M:vi,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Oi,s:Bi,S:bi,u:_i,U:xi,V:ki,w:Ti,W:Ei,x:null,X:null,y:Ci,Y:Ai,Z:Ni,"%":Di},T={a:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return r(t,i,e,n)},d:Ir,e:Ir,f:Ur,g:Dr,G:Nr,H:Rr,I:Rr,j:Fr,L:zr,m:Lr,M:Pr,p:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.p=d.get(r[0].toLowerCase()),n+r[0].length):-1},q:Br,Q:qr,s:$r,S:Yr,u:Cr,U:Sr,V:Ar,w:Er,W:Mr,x:function(t,e,n){return r(t,a,e,n)},X:function(t,e,n){return r(t,o,e,n)},y:Dr,Y:Nr,Z:Or,"%":jr};return w.x=e(a,w),w.X=e(o,w),w.c=e(i,w),k.x=e(a,k),k.X=e(o,k),k.c=e(i,k),{format:function(t){var n=e(t+="",w);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",k);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),uy=ly.format,ly.parse,ly.utcFormat,ly.utcParse;var gy=Array.prototype.find,yy=Array.prototype.filter;Vi.prototype={constructor:Vi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var my="http://www.w3.org/1999/xhtml";const vy={svg:"http://www.w3.org/2000/svg",xhtml:my,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ma.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var by=[null];$a.prototype=Wa.prototype={constructor:$a,select:function(t){"function"!=typeof t&&(t=Pi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=_&&(_=b+1);!(v=y[_])&&++_=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Ki);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?ca:"function"==typeof e?ua:la)(t,e,null==n?"":n)):ha(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?fa:"function"==typeof e?pa:da)(t,e)):this.node()[t]},classed:function(t,e){var n=ga(t+"");if(arguments.length<2){for(var r=ya(this.node()),i=-1,a=n.length;++iky)if(Math.abs(u*s-c*l)>ky&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((xy-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>ky&&(this._+="L"+(t+b*l)+","+(e+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>l*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>ky||Math.abs(this._y1-l)>ky)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%wy+wy),h>Ty?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>ky&&(this._+="A"+n+","+n+",0,"+ +(h>=xy)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Ey=Xa;var Cy=Math.abs,Sy=Math.atan2,Ay=Math.cos,My=Math.max,Ny=Math.min,Dy=Math.sin,Oy=Math.sqrt,By=1e-12,Ly=Math.PI,Iy=Ly/2,Fy=2*Ly;Array.prototype.slice,co.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},vo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mo(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},_o.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xo.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mo(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},wo.prototype={areaStart:yo,areaEnd:yo,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},So.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Co(this,this._t0,Eo(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Co(this,Eo(this,n=To(this,t,e)),n);break;default:Co(this,this._t0,n=To(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Ao.prototype=Object.create(So.prototype)).point=function(t,e){So.prototype.point.call(this,e,t)},Mo.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},No.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Do(t),i=Do(e),a=0,o=1;o=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Ry=new Date,Py=new Date;const Yy=864e5,zy=6048e5;var Uy=Lo(0),jy=Lo(1),qy=Lo(2),$y=Lo(3),Wy=Lo(4),Hy=Lo(5),Vy=Lo(6),Gy=(Uy.range,jy.range,qy.range,$y.range,Wy.range,Hy.range,Vy.range,Bo(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Yy},function(t){return t.getUTCDate()-1}));const Xy=Gy;Gy.range;var Zy=Io(0),Qy=Io(1),Jy=Io(2),Ky=Io(3),tm=Io(4),em=Io(5),nm=Io(6),rm=(Zy.range,Qy.range,Jy.range,Ky.range,tm.range,em.range,nm.range,Bo(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/Yy,t=>t.getDate()-1));const im=rm;rm.range;var am=Bo(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});am.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Bo(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};const om=am;am.range;var sm=Bo(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});sm.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Bo(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};const cm=sm;sm.range;var lm,um,hm={"-":"",_:" ",0:"0"},fm=/^\s*\d+/,dm=/^%/,pm=/[\\^$*+?|[\]().{}]/g;lm=function(t){function e(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(a=(i=Ro(Po(o.y,0,1))).getUTCDay(),i=a>4||0===a?jy.ceil(i):jy(i),i=Xy.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=Fo(Po(o.y,0,1))).getDay(),i=a>4||0===a?Qy.ceil(i):Qy(i),i=im.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?Ro(Po(o.y,0,1)).getUTCDay():Fo(Po(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Ro(o)):Fo(o)}}function r(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=T[i in hm?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var i=t.dateTime,a=t.date,o=t.time,s=t.periods,c=t.days,l=t.shortDays,u=t.months,h=t.shortMonths,f=Uo(s),d=jo(s),p=Uo(c),g=jo(c),y=Uo(l),m=jo(l),v=Uo(u),b=jo(u),_=Uo(h),x=jo(h),w={a:function(t){return l[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return h[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:ls,e:ls,f:ps,g:Es,G:Ss,H:us,I:hs,j:fs,L:ds,m:gs,M:ys,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Zs,s:Qs,S:ms,u:vs,U:bs,V:xs,w:ws,W:ks,x:null,X:null,y:Ts,Y:Cs,Z:As,"%":Xs},k={a:function(t){return l[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return h[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Ms,e:Ms,f:Ls,g:Ws,G:Vs,H:Ns,I:Ds,j:Os,L:Bs,m:Is,M:Fs,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Zs,s:Qs,S:Rs,u:Ps,U:Ys,V:Us,w:js,W:qs,x:null,X:null,y:$s,Y:Hs,Z:Gs,"%":Xs},T={a:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.w=m.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=b.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,e,n){return r(t,i,e,n)},d:Ko,e:Ko,f:as,g:Xo,G:Go,H:es,I:es,j:ts,L:is,m:Jo,M:ns,p:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.p=d.get(r[0].toLowerCase()),n+r[0].length):-1},q:Qo,Q:ss,s:cs,S:rs,u:$o,U:Wo,V:Ho,w:qo,W:Vo,x:function(t,e,n){return r(t,a,e,n)},X:function(t,e,n){return r(t,o,e,n)},y:Xo,Y:Go,Z:Zo,"%":os};return w.x=e(a,w),w.X=e(o,w),w.c=e(i,w),k.x=e(a,k),k.X=e(o,k),k.c=e(i,k),{format:function(t){var n=e(t+="",w);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",k);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),um=lm.format,lm.parse,lm.utcFormat,lm.utcParse;var gm={value:()=>{}};Ks.prototype=Js.prototype={constructor:Ks,on:function(t,e){var n,r=this._,i=tc(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),a=0;a=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)})},_y.prototype.transition=function(t){var e,n;t instanceof Hc?(e=t._id,t=t._name):(e=Vc(),(n=zm).time=rc(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Wm=[null];nu.prototype=ru.prototype={constructor:nu,select:function(t){"function"!=typeof t&&(t=Zc(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=_&&(_=b+1);!(v=y[_])&&++_=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=hl);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?_l:"function"==typeof e?wl:xl)(t,e,null==n?"":n)):kl(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Tl:"function"==typeof e?Cl:El)(t,e)):this.node()[t]},classed:function(t,e){var n=Sl(t+"");if(arguments.length<2){for(var r=Al(this.node()),i=-1,a=n.length;++i{}};au.prototype=iu.prototype={constructor:au,on:function(t,e){var n,r=this._,i=ou(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),a=0;a=240?t-240:t+120,i,r),$u(t,i,r),$u(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Ev=t=>()=>t,Cv=function IS(t){function e(t,e){var r=n((t=Fu(t)).r,(e=Fu(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Hu(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}var n=function(t){return 1==(t=+t)?Hu:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ev(isNaN(e)?n:e)}}(t);return e.gamma=IS,e}(1);Vu(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)})},Hm.prototype.transition=function(t){var e,n;t instanceof mh?(e=t._id,t=t._name):(e=vh(),(n=Ov).time=lu(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a=0;){if(!((n=t.indexOf("=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf(""))>=0&&(n+=9,t=t.substr(n))}var r=Gv(e);return(r=(r=(r=(r=r.replaceAll(/script>/gi,"#")).replaceAll(/javascript:/gi,"#")).replaceAll(/javascript&colon/gi,"#")).replaceAll(/onerror=/gi,"onerror:")).replaceAll(/')}else"loose"!==o.securityLevel&&(_=Vv().sanitize(_,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(h){case"flowchart":case"flowchart-v2":n(_,uk.bindFunctions);break;case"gantt":n(_,tT.bindFunctions);break;case"class":case"classDiagram":n(_,xx.bindFunctions);break;default:n(_)}else fd.debug("CB = undefined!");AE.forEach(function(t){t()}),AE=[];var k="sandbox"===o.securityLevel?"#i"+t:"#d"+t,T=Ha(k).node();return null!==T&&"function"==typeof T.remove&&Ha(k).node().remove(),_},parse:function(t){var e=!1;try{t+="\n";var n=g_(),r=o_.detectInit(t,n);r&&fd.info("reinit ",r);var i,a=o_.detectType(t,n);switch(fd.debug("Type "+a),a){case"c4":z_.clear(),(i=H_()).parser.yy=H_();break;case"gitGraph":bT.clear(),(i=xT()).parser.yy=bT;break;case"flowchart":case"flowchart-v2":uk.clear(),(i=fk()).parser.yy=uk;break;case"sequence":SE.clear(),(i=uE()).parser.yy=SE;break;case"gantt":(i=rT()).parser.yy=tT;break;case"class":case"classDiagram":(i=Sx()).parser.yy=xx;break;case"state":case"stateDiagram":(i=vC()).parser.yy=OC;break;case"info":fd.debug("info info info"),(i=LT()).parser.yy=OT;break;case"pie":fd.debug("pie"),(i=PT()).parser.yy=UT;break;case"er":fd.debug("er"),(i=Dw()).parser.yy=Mw;break;case"journey":fd.debug("Journey"),(i=nS()).parser.yy=tS;break;case"requirement":case"requirementDiagram":fd.debug("RequirementDiagram"),(i=HT()).parser.yy=JT}i.parser.yy.graphType=a,i.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},i.parse(t)}catch(t){if(e=!0,!DS.parseError)throw t;null!=t.str?DS.parseError(t.str,t.hash):DS.parseError(t)}return!e},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":ES={};break;case"type_directive":ES.type=e.toLowerCase();break;case"arg_directive":ES.args=JSON.parse(e);break;case"close_directive":(function(t,e,n){switch(fd.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach(function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])}),fd.debug("sanitize in handleDirective",e.args),i_(e.args),fd.debug("sanitize in handleDirective (done)",e.args),e.args,m_(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":fd.warn("themeCss encountered");break;default:fd.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}})(t,ES,r),ES=null}}catch(t){fd.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),fd.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),function(t){s_=Gb({},t)}(t),t&&t.theme&&Mb[t.theme]?t.themeVariables=Mb[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Mb["default"].getThemeVariables(t.themeVariables));var e="object"===sd(t)?function(t){return u_=Gb({},l_),u_=Gb(u_,t),t.theme&&Mb[t.theme]&&(u_.themeVariables=Mb[t.theme].getThemeVariables(t.themeVariables)),f_=d_(u_,h_),u_}(t):p_();cd(e),dd(e.logLevel)},reinitialize:function(){},getConfig:g_,setConfig:function(t){return Gb(f_,t),g_()},getSiteConfig:p_,updateSiteConfig:function(t){return u_=Gb(u_,t),d_(u_,h_),u_},reset:function(){v_()},globalReset:function(){v_(),cd(g_())},defaultConfig:l_});dd(g_().logLevel),v_(g_());const SS=CS;var AS=function(){var t,e,n=SS.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(NS.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],fd.debug("Callback function found")):void 0!==n.mermaid&&("function"==typeof n.mermaid.callback?(e=n.mermaid.callback,fd.debug("Callback function found")):fd.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,fd.debug("Start On Load before: "+NS.startOnLoad),void 0!==NS.startOnLoad&&(fd.debug("Start On Load inner: "+NS.startOnLoad),SS.updateSiteConfig({startOnLoad:NS.startOnLoad})),void 0!==NS.ganttConfig&&SS.updateSiteConfig({gantt:NS.ganttConfig});for(var r,i=new o_.initIdGeneratior(n.deterministicIds,n.deterministicIDSeed),a=function(n){var a=t[n];if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var o="mermaid-".concat(i.next());r=a.innerHTML,r=o_.entityDecode(r).trim().replace(//gi,"
");var s=o_.detectInit(r);s&&fd.debug("Detected early reinit: ",s),SS.render(o,r,function(t,n){a.innerHTML=t,void 0!==e&&e(o),n&&n(a)},a)},o=0;o{t.exports={graphlib:n(6614),dagre:n(1463),intersect:n(8114),render:n(5787),util:n(8355),version:n(5689)}},9144:(t,e,n)=>{function r(t,e,n,r){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");i.applyStyle(a,n[r+"Style"]),n[r+"Class"]&&a.attr("class",n[r+"Class"])}var i=n(8355);t.exports={"default":r,normal:r,vee:function(t,e,n,r){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");i.applyStyle(a,n[r+"Style"]),n[r+"Class"]&&a.attr("class",n[r+"Class"])},undirected:function(t,e,n,r){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");i.applyStyle(a,n[r+"Style"]),n[r+"Class"]&&a.attr("class",n[r+"Class"])}}},5632:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1322);t.exports=function(t,e){var n,o=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),s=t.selectAll("g.cluster").data(o,function(t){return t});return s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",function(t){return e.node(t).id}).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each(function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)}),s.selectAll("rect").each(function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)}),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style("opacity",0).remove(),s}},6315:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each(function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)}),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style("opacity",0).remove(),s}},940:(t,e,n)=>{"use strict";function r(t,e){var n=(s.line||s.svg.line)().x(function(t){return t.x}).y(function(t){return t.y});return(n.curve||n.interpolate)(t.curve),n(e)}var i=n(1034),a=n(3042),o=n(8355),s=n(4322);t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),function(t){return o.edgeToId(t)}).classed("update",!0),l=function(t,e){var n=c.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),a=e.node(t.v).elem;return r(n,i.range(n.points.length).map(function(){return e=(t=a).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n}))}),n.append("defs"),n}(0,e);!function(t,e){var n=c.exit();o.applyTransition(n,e).style("opacity",0).remove()}(0,e);var u=void 0!==c.merge?c.merge(l):c;return o.applyTransition(u,e).style("opacity",1),u.each(function(t){var n=s.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),o.applyClass(n,r["class"],(n.classed("update")?"update ":"")+"edgePath")}),u.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=i.uniqueId("arrowhead");var c=s.select(this).attr("marker-end",function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e}).style("fill","none");o.applyTransition(c,e).attr("d",function(t){return function(t,e){var n=t.edge(e),i=t.node(e.v),o=t.node(e.w),s=n.points.slice(1,n.points.length-1);return s.unshift(a(i,s[0])),s.push(a(o,s[s.length-1])),r(n,s)}(e,t)}),o.applyStyle(c,n.style)}),u.selectAll("defs *").remove(),u.selectAll("defs").each(function(t){var r=e.edge(t);(0,n[r.arrowhead])(s.select(this),r.arrowheadId,r,"arrowhead")}),u}},607:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e,n){var s,c=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),l=t.selectAll("g.node").data(c,function(t){return t}).classed("update",!0);return l.exit().remove(),l.enter().append("g").attr("class","node").style("opacity",0),(l=t.selectAll("g.node")).each(function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s["class"],(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var l=c.append("g").attr("class","label"),u=i(l,s),h=n[s.shape],f=r.pick(u.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&l.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,l.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height}),s=l.exit?l.exit():l.selectAll(null),a.applyTransition(s,e).style("opacity",0).remove(),l}},4322:(t,e,n)=>{var r;if(!r)try{r=n(7188)}catch(t){}r||(r=window.d3),t.exports=r},1463:(t,e,n)=>{var r;try{r=n(681)}catch(t){}r||(r=window.dagre),t.exports=r},6614:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},8114:(t,e,n)=>{t.exports={node:n(3042),circle:n(6587),ellipse:n(3260),polygon:n(5337),rect:n(8049)}},6587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)}},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),l=Math.abs(e*n*o/c);r.x{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,l,u,h,f,d,p,g,y,m;if(a=n.y-t.y,s=t.x-n.x,l=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+l,p=a*i.x+s*i.y+l,!(0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,u=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+u,f=o*n.x+c*n.y+u,0!==h&&0!==f&&e(h,f)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*u-c*l)<0?(m-y)/g:(m+y)/g,y:(m=o*l-a*u)<0?(m-y)/g:(m+y)/g}}},3042:t=>{t.exports=function(t,e){return t.intersect(e)}},5337:(t,e,n)=>{var r=n(6808);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach(function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)});for(var l=i-t.width/2-s,u=a-t.height/2-c,h=0;h1&&o.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a{t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=0===s?0:l*o/s,r=l):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},8284:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},1322:(t,e,n)=>{var r=n(7318),i=n(8284),a=n(8287);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,l=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-l.height;break;default:c=-l.height/2}return s.attr("transform","translate("+-l.width/2+","+c+")"),s}},8287:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},7318:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i{var r;try{r={defaults:n(1747),each:n(6073),isFunction:n(3560),isPlainObject:n(8630),pick:n(9722),has:n(8721),range:n(6026),uniqueId:n(3955)}}catch(t){}r||(r=window._),t.exports=r},6381:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}var a=t.filter(function(){return!i.select(this).classed("update")});a.attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n),r.applyTransition(a.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){return-e.node(t).width/2}).attr("y",function(t){return-e.node(t).height/2})}},4577:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322),a=n(1034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter(function(){return!i.select(this).classed("update")}).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},4849:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter(function(){return!i.select(this).classed("update")}).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},5787:(t,e,n)=>{function r(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}var i=n(1034),a=n(4322),o=n(1463).layout;t.exports=function(){var t=n(607),e=n(5632),a=n(6315),l=n(940),u=n(4849),h=n(4577),f=n(6381),d=n(4418),p=n(9144),g=function(n,g){!function(t){t.nodes().forEach(function(e){var n=t.node(e);i.has(n,"label")||t.children(e).length||(n.label=e),i.has(n,"paddingX")&&i.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),i.has(n,"paddingY")&&i.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),i.has(n,"padding")&&i.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),i.defaults(n,s),i.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){n[t]=Number(n[t])}),i.has(n,"width")&&(n._prevWidth=n.width),i.has(n,"height")&&(n._prevHeight=n.height)}),t.edges().forEach(function(e){var n=t.edge(e);i.has(n,"label")||(n.label=""),i.defaults(n,c)})}(g);var y=r(n,"output"),m=r(y,"clusters"),v=r(y,"edgePaths"),b=a(r(y,"edgeLabels"),g),_=t(r(y,"nodes"),g,d);o(g),u(_,g),h(b,g),l(v,g,p);var x=e(m,g);f(x,g),function(t){i.each(t.nodes(),function(e){var n=t.node(e);i.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,i.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight})}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(a=t,g):a},g.createEdgePaths=function(t){return arguments.length?(l=t,g):l},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var s={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},c={arrowhead:"normal",curve:a.curveLinear}},4418:(t,e,n)=>{"use strict";var r=n(8049),i=n(3260),a=n(6587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},8355:(t,e,n)=>{function r(t){return t?String(t).replace(a,"\\:"):""}var i=n(1034);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return r(t.v)+":"+r(t.w)+":"+r(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(i.isPlainObject(n)){var r=n.transition;if(i.isFunction(r))return r(t)}return t}};var a=/:/g},5689:t=>{t.exports="0.6.4"},7188:(t,e,n)=>{"use strict";function r(t,e){return te?1:t>=e?0:NaN}function i(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t,e){null==e&&(e=o);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);nt?1:e>=t?0:NaN}function l(t){return null===t?NaN:+t}function u(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o1)return c/(a-1)}function h(t,e){var n=u(t,e);return n?Math.sqrt(n):n}function f(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o=n)for(r=i=n;++on&&(r=n),i=n)for(r=i=n;++on&&(r=n),i0)return[t];if((r=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s=0?(a>=Zp?10:a>=Qp?5:a>=Jp?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Zp?10:a>=Qp?5:a>=Jp?2:1)}function v(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Zp?i*=10:a>=Qp?i*=5:a>=Jp&&(i*=2),eu;)h.pop(),--f;var d,p=new Array(f+1);for(i=0;i<=f;++i)(d=p[i]=[]).x0=i>0?h[i-1]:l,d.x1=i=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function w(t,e,n){return t=Xp.call(t,l).sort(r),Math.ceil((n-e)/(2*(x(t,.75)-x(t,.25))*Math.pow(t.length,-1/3)))}function k(t,e,n){return Math.ceil((n-e)/(3.5*h(t)*Math.pow(t.length,-1/3)))}function T(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++ar&&(r=n)}else for(;++a=n)for(r=n;++ar&&(r=n);return r}function E(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function A(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a=n)for(r=n;++an&&(r=n)}else for(;++a=n)for(r=n;++an&&(r=n);return r}function M(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function N(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function Z(t,e){for(var n,r=0,i=t.length;re?1:t>=e?0:NaN}function ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ig.hasOwnProperty(e)?{space:ig[e],local:t}:t}function lt(t){return function(){this.removeAttribute(t)}}function ut(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ht(t,e){return function(){this.setAttribute(t,e)}}function ft(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function pt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function gt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function yt(t){return function(){this.style.removeProperty(t)}}function mt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function vt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function bt(t,e){return t.style.getPropertyValue(e)||gt(t).getComputedStyle(t,null).getPropertyValue(e)}function _t(t){return function(){delete this[t]}}function xt(t,e){return function(){this[t]=e}}function wt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function kt(t){return t.trim().split(/^|\s+/)}function Tt(t){return t.classList||new Et(t)}function Et(t){this._node=t,this._names=kt(t.getAttribute("class")||"")}function Ct(t,e){for(var n=Tt(t),r=-1,i=e.length;++r=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ge(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ge(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=gg.exec(t))?new ve(e[1],e[2],e[3],1):(e=yg.exec(t))?new ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mg.exec(t))?ge(e[1],e[2],e[3],e[4]):(e=vg.exec(t))?ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=bg.exec(t))?we(e[1],e[2]/100,e[3]/100,1):(e=_g.exec(t))?we(e[1],e[2]/100,e[3]/100,e[4]):xg.hasOwnProperty(t)?pe(xg[t]):"transparent"===t?new ve(NaN,NaN,NaN,0):null}function pe(t){return new ve(t>>16&255,t>>8&255,255&t,1)}function ge(t,e,n,r){return r<=0&&(t=e=n=NaN),new ve(t,e,n,r)}function ye(t){return t instanceof ue||(t=de(t)),t?new ve((t=t.rgb()).r,t.g,t.b,t.opacity):new ve}function me(t,e,n,r){return 1===arguments.length?ye(t):new ve(t,e,n,null==r?1:r)}function ve(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function be(){return"#"+xe(this.r)+xe(this.g)+xe(this.b)}function _e(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function xe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function we(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ee(t,e,n,r)}function ke(t){if(t instanceof Ee)return new Ee(t.h,t.s,t.l,t.opacity);if(t instanceof ue||(t=de(t)),!t)return new Ee;if(t instanceof Ee)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n0&&c<1?0:o,new Ee(o,s,c,t.opacity)}function Te(t,e,n,r){return 1===arguments.length?ke(t):new Ee(t,e,n,null==r?1:r)}function Ee(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ce(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Se(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Ae(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r180||n<-180?n-360*Math.round(n/360):n):Ne(isNaN(t)?e:t)}function Be(t,e){var n=e-t;return n?De(t,n):Ne(isNaN(t)?e:t)}function Le(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;na&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:ze(n,r)})),a=Ag.lastIndex;return a=0&&e._call.call(null,t),e=e._next;--Mg}function Ke(){Bg=(Og=Ig.now())+Lg,Mg=Ng=0;try{Je()}finally{Mg=0,function(){for(var t,e,n=kg,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:kg=e);Tg=t,en(r)}(),Bg=0}}function tn(){var t=Ig.now(),e=t-Og;e>1e3&&(Lg-=e,Og=t)}function en(t){Mg||(Ng&&(Ng=clearTimeout(Ng)),t-Bg>24?(t<1/0&&(Ng=setTimeout(Ke,t-Ig.now()-Lg)),Dg&&(Dg=clearInterval(Dg))):(Dg||(Og=Ig.now(),Dg=setInterval(tn,1e3)),Mg=1,Fg(Ke)))}function nn(t,e,n){var r=new Ze;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r}function rn(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){function r(c){var l,u,h,f;if(1!==n.state)return a();for(l in s)if((f=s[l]).name===n.name){if(3===f.state)return nn(r);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete s[l]):+l0)throw new Error("too late; already scheduled");return n}function on(t,e){var n=sn(t,e);if(n.state>3)throw new Error("too late; already running");return n}function sn(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function cn(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}function ln(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r180?e+=360:e-t>180&&(t+=360),c.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ze(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s),function(t,e,n){t!==e?c.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ze(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ze(t,n)},{i:s-2,x:ze(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t})?an:on;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}function Dn(t){return function(){this.style.removeProperty(t)}}function On(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Bn(t,e,n){function r(){var r=e.apply(this,arguments);return r!==a&&(i=(a=r)&&On(t,r,n)),i}var i,a;return r._value=e,r}function Ln(t){return function(e){this.textContent=t.call(this,e)}}function In(t){function e(){var e=t.apply(this,arguments);return e!==r&&(n=(r=e)&&Ln(e)),n}var n,r;return e._value=t,e}function Fn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Rn(t){return cg().transition(t)}function Pn(){return++Gg}function Yn(t){return t*t*t}function zn(t){return--t*t*t+1}function Un(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function jn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zg.time=Ge(),Zg;return n}function qn(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Fn([[t]],Qg,e,+r);return null}function $n(t){return function(){return t}}function Wn(t,e,n){this.target=t,this.type=e,this.selection=n}function Hn(){og.stopImmediatePropagation()}function Vn(){og.preventDefault(),og.stopImmediatePropagation()}function Gn(t){return[+t[0],+t[1]]}function Xn(t){return[Gn(t[0]),Gn(t[1])]}function Zn(t){return function(e){return He(e,og.touches,t)}}function Qn(t){return{type:t}}function Jn(){return!og.ctrlKey&&!og.button}function Kn(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function tr(){return navigator.maxTouchPoints||"ontouchstart"in this}function er(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function nr(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function rr(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function ir(){return sr(ny)}function ar(){return sr(ry)}function or(){return sr(iy)}function sr(t){function e(e){var r=e.property("__brush",c).selectAll(".overlay").data([Qn("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ay.overlay).merge(r).each(function(){var t=er(this).extent;re(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([Qn("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ay.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return ay[t.type]}),e.each(n).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",a).filter(f).on("touchstart.brush",a).on("touchmove.brush",o).on("touchend.brush touchcancel.brush",s).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function n(){var t=re(this),e=er(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-g/2:e[0][0]-g/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-g/2:e[0][1]-g/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+g:g}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+g:g})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function r(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new i(t,e,n):r}function i(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function a(){function e(){var t=R(w);!F||_||x||(Math.abs(t[0]-Y[0])>Math.abs(t[1]-Y[1])?x=!0:_=!0),Y=t,b=!0,Vn(),i()}function i(){var t;switch(L=Y[0]-P[0],I=Y[1]-P[1],T){case Kg:case Jg:E&&(L=Math.max(N-c,Math.min(O-g,L)),u=c+L,y=g+L),C&&(I=Math.max(D-f,Math.min(B-m,I)),p=f+I,v=m+I);break;case ty:E<0?(L=Math.max(N-c,Math.min(O-c,L)),u=c+L,y=g):E>0&&(L=Math.max(N-g,Math.min(O-g,L)),u=c,y=g+L),C<0?(I=Math.max(D-f,Math.min(B-f,I)),p=f+I,v=m):C>0&&(I=Math.max(D-m,Math.min(B-m,I)),p=f,v=m+I);break;case ey:E&&(u=Math.max(N,Math.min(O,c-L*E)),y=Math.max(N,Math.min(O,g+L*E))),C&&(p=Math.max(D,Math.min(B,f-I*C)),v=Math.max(D,Math.min(B,m+I*C)))}y0&&(c=u-L),C<0?m=v-I:C>0&&(f=p-I),T=Kg,j.attr("cursor",ay.selection),i());break;default:return}Vn()}function s(){switch(og.keyCode){case 16:F&&(_=x=F=!1,i());break;case 18:T===ey&&(E<0?g=y:E>0&&(c=u),C<0?m=v:C>0&&(f=p),T=ty,i());break;case 32:T===Kg&&(og.altKey?(E&&(g=y-L*E,c=u+L*E),C&&(m=v-I*C,f=p+I*C),T=ey):(E<0?g=y:E>0&&(c=u),C<0?m=v:C>0&&(f=p),T=ty),j.attr("cursor",ay[k]),i());break;default:return}Vn()}if((!l||og.touches)&&h.apply(this,arguments)){var c,u,f,p,g,y,m,v,b,_,x,w=this,k=og.target.__data__.type,T="selection"===(d&&og.metaKey?k="overlay":k)?Jg:d&&og.altKey?ey:ty,E=t===ry?null:cy[k],C=t===ny?null:ly[k],S=er(w),A=S.extent,M=S.selection,N=A[0][0],D=A[0][1],O=A[1][0],B=A[1][1],L=0,I=0,F=E&&C&&d&&og.shiftKey,R=og.touches?Zn(og.changedTouches[0].identifier):Ve,P=R(w),Y=P,z=r(w,arguments,!0).beforestart();"overlay"===k?(M&&(b=!0),S.selection=M=[[c=t===ry?N:P[0],f=t===ny?D:P[1]],[g=t===ry?O:c,m=t===ny?B:f]]):(c=M[0][0],f=M[0][1],g=M[1][0],m=M[1][1]),u=c,p=f,y=g,v=m;var U=re(w).attr("pointer-events","none"),j=U.selectAll(".overlay").attr("cursor",ay[k]);if(og.touches)z.moved=e,z.ended=a;else{var q=re(og.view).on("mousemove.brush",e,!0).on("mouseup.brush",a,!0);d&&q.on("keydown.brush",o,!0).on("keyup.brush",s,!0),oe(og.view)}Hn(),cn(w),n.call(w),z.start()}}function o(){r(this,arguments).moved()}function s(){r(this,arguments).ended()}function c(){var e=this.__brush||{selection:null};return e.extent=Xn(u.apply(this,arguments)),e.dim=t,e}var l,u=Kn,h=Jn,f=tr,d=!0,p=ng("start","brush","end"),g=6;return e.move=function(e,i){e.selection?e.on("start.brush",function(){r(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){r(this,arguments).end()}).tween("brush",function(){function e(t){o.selection=1===t&&null===l?null:u(t),n.call(a),s.brush()}var a=this,o=a.__brush,s=r(a,arguments),c=o.selection,l=t.input("function"==typeof i?i.apply(this,arguments):i,o.extent),u=qe(c,l);return null!==c&&null!==l?e:e(1)}):e.each(function(){var e=this,a=arguments,o=e.__brush,s=t.input("function"==typeof i?i.apply(e,a):i,o.extent),c=r(e,a).beforestart();cn(e),o.selection=null===s?null:s,n.call(e),c.start().brush().end()})},e.clear=function(t){e.move(t,null)},i.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(n){Qt(new Wn(e,n,t.output(this.state.selection)),p.apply,p,[n,this.that,this.args])}},e.extent=function(t){return arguments.length?(u="function"==typeof t?t:$n(Xn(t)),e):u},e.filter=function(t){return arguments.length?(h="function"==typeof t?t:$n(!!t),e):h},e.touchable=function(t){return arguments.length?(f="function"==typeof t?t:$n(!!t),e):f},e.handleSize=function(t){return arguments.length?(g=+t,e):g},e.keyModifiers=function(t){return arguments.length?(d=!!t,e):d},e.on=function(){var t=p.on.apply(p,arguments);return t===p?e:t},e}function cr(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function lr(){function t(t){var a,o,s,c,l,u,h=t.length,f=[],d=g(h),p=[],y=[],m=y.groups=new Array(h),v=new Array(h*h);for(a=0,l=-1;++l=a.length)return null!=n&&e.sort(n),null!=r?r(e):e;for(var c,l,u,h=-1,f=e.length,d=a[i++],p=ky(),g=o();++ha.length)return t;var i,s=o[n-1];return null!=r&&n>=a.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:e(t,n)})})),null!=s?i.sort(function(t,e){return s(t.key,e.key)}):i}var n,r,i,a=[],o=[];return i={object:function(e){return t(e,0,wr,kr)},map:function(e){return t(e,0,Tr,Er)},entries:function(n){return e(t(n,0,Tr,Er),0)},key:function(t){return a.push(t),i},sortKeys:function(t){return o[a.length-1]=t,i},sortValues:function(t){return n=t,i},rollup:function(t){return r=t,i}}}function wr(){return{}}function kr(t,e,n){t[e]=n}function Tr(){return ky()}function Er(t,e,n){t.set(e,n)}function Cr(){}function Sr(t,e){var n=new Cr;if(t instanceof Cr)t.each(function(t){n.add(t)});else if(t){var r=-1,i=t.length;if(null==e)for(;++r.008856451679035631?Math.pow(t,1/3):t/Oy+Ny}function Fr(t){return t>Dy?t*t*t:Oy*(t-Ny)}function Rr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Pr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Yr(t){if(t instanceof jr)return new jr(t.h,t.c,t.l,t.opacity);if(t instanceof Lr||(t=Dr(t)),0===t.a&&0===t.b)return new jr(NaN,0r!=d>r&&n<(f-l)*(r-u)/(d-u)+l&&(i=-i)}return i}function Qr(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Jr(){}function Kr(){function t(t){var n=o(t);if(Array.isArray(n))n=n.slice().sort(Vr);else{var r=f(t),i=r[0],a=r[1];n=v(i,a,n),n=g(Math.floor(i/n)*n,Math.floor(a/n)*n,n)}return n.map(function(n){return e(t,n)})}function e(t,e){var r=[],o=[];return function(t,e,r){function o(t){var e,i,a=[t[0][0]+s,t[0][1]+c],o=[t[1][0]+s,t[1][1]+c],l=n(a),u=n(o);(e=p[l])?(i=d[u])?(delete p[e.end],delete d[i.start],e===i?(e.ring.push(o),r(e.ring)):d[e.start]=p[i.end]={start:e.start,end:i.end,ring:e.ring.concat(i.ring)}):(delete p[e.end],e.ring.push(o),p[e.end=u]=e):(e=d[u])?(i=p[l])?(delete d[e.start],delete p[i.end],e===i?(e.ring.push(o),r(e.ring)):d[i.start]=p[e.end]={start:i.start,end:e.end,ring:i.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(a),d[e.start=l]=e):d[l]=p[u]={start:l,end:u,ring:[a,o]}}var s,c,l,u,h,f,d=new Array,p=new Array;for(s=c=-1,u=t[0]>=e,jy[u<<1].forEach(o);++s=e,jy[l|u<<1].forEach(o);for(jy[u<<0].forEach(o);++c=e,h=t[c*i]>=e,jy[u<<1|h<<2].forEach(o);++s=e,f=h,h=t[c*i+s+1]>=e,jy[l|u<<1|h<<2|f<<3].forEach(o);jy[u|h<<3].forEach(o)}for(s=-1,h=t[c*i]>=e,jy[h<<2].forEach(o);++s=e,jy[h<<2|f<<3].forEach(o);jy[h<<3].forEach(o)}(t,e,function(n){s(n,t,e),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e0?r.push([n]):o.push(n)}),o.forEach(function(t){for(var e,n=0,i=r.length;n0&&o0&&s0&&r>0))throw new Error("invalid size");return i=n,a=r,t},t.thresholds=function(e){return arguments.length?(o="function"==typeof e?e:Array.isArray(e)?Gr(Uy.call(e)):Gr(e),t):o},t.smooth=function(e){return arguments.length?(s=e?r:Jr,t):s===r},t}function ti(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function ei(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function ni(t){return t[0]}function ri(t){return t[1]}function ii(){return 1}function ai(){function t(t){var n=new Float32Array(p*y),r=new Float32Array(p*y);t.forEach(function(t,e,r){var i=+o(t,e,r)+d>>f,a=+s(t,e,r)+d>>f,l=+c(t,e,r);i>=0&&i=0&&a>f),ei({width:p,height:y,data:r},{width:p,height:y,data:n},h>>f),ti({width:p,height:y,data:n},{width:p,height:y,data:r},h>>f),ei({width:p,height:y,data:r},{width:p,height:y,data:n},h>>f),ti({width:p,height:y,data:n},{width:p,height:y,data:r},h>>f),ei({width:p,height:y,data:r},{width:p,height:y,data:n},h>>f);var i=m(n) +;if(!Array.isArray(i)){var a=T(n);i=v(0,a,i),(i=g(0,Math.floor(a/i)*i,i)).shift()}return Kr().thresholds(i).size([p,y])(n).map(e)}function e(t){return t.value*=Math.pow(2,-2*f),t.coordinates.forEach(n),t}function n(t){t.forEach(r)}function r(t){t.forEach(i)}function i(t){t[0]=t[0]*Math.pow(2,f)-d,t[1]=t[1]*Math.pow(2,f)-d}function a(){return p=l+2*(d=3*h)>>f,y=u+2*d>>f,t}var o=ni,s=ri,c=ii,l=960,u=500,h=20,f=2,d=3*h,p=l+2*d>>f,y=u+2*d>>f,m=Gr(20);return t.x=function(e){return arguments.length?(o="function"==typeof e?e:Gr(+e),t):o},t.y=function(e){return arguments.length?(s="function"==typeof e?e:Gr(+e),t):s},t.weight=function(e){return arguments.length?(c="function"==typeof e?e:Gr(+e),t):c},t.size=function(t){if(!arguments.length)return[l,u];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return l=e,u=n,a()},t.cellSize=function(t){if(!arguments.length)return 1<=1))throw new Error("invalid cell size");return f=Math.floor(Math.log(t)/Math.LN2),a()},t.thresholds=function(e){return arguments.length?(m="function"==typeof e?e:Array.isArray(e)?Gr(Uy.call(e)):Gr(e),t):m},t.bandwidth=function(t){if(!arguments.length)return Math.sqrt(h*(h+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return h=Math.round((Math.sqrt(4*t*t+1)-1)/2),a()},t}function oi(t){return function(){return t}}function si(t,e,n,r,i,a,o,s,c,l){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=l}function ci(){return!og.ctrlKey&&!og.button}function li(){return this.parentNode}function ui(t){return null==t?{x:og.x,y:og.y}:t}function hi(){return navigator.maxTouchPoints||"ontouchstart"in this}function fi(){function t(t){t.on("mousedown.drag",e).filter(g).on("touchstart.drag",i).on("touchmove.drag",a).on("touchend.drag touchcancel.drag",o).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!h&&f.apply(this,arguments)){var t=s("mouse",d.apply(this,arguments),Ve,this,arguments);t&&(re(og.view).on("mousemove.drag",n,!0).on("mouseup.drag",r,!0),oe(og.view),ie(),u=!1,c=og.clientX,l=og.clientY,t("start"))}}function n(){if(ae(),!u){var t=og.clientX-c,e=og.clientY-l;u=t*t+e*e>b}y.mouse("drag")}function r(){re(og.view).on("mousemove.drag mouseup.drag",null),se(og.view,u),ae(),y.mouse("end")}function i(){if(f.apply(this,arguments)){var t,e,n=og.changedTouches,r=d.apply(this,arguments),i=n.length;for(t=0;t=a?l=!0:10===(n=t.charCodeAt(s++))?u=!0:13===n&&(u=!0,10===t.charCodeAt(s)&&++s),t.slice(r+1,e-1).replace(/""/g,'"')}for(;s9999?"+"+gi(t,6):gi(t,4)}(t.getUTCFullYear())+"-"+gi(t.getUTCMonth()+1,2)+"-"+gi(t.getUTCDate(),2)+(i?"T"+gi(e,2)+":"+gi(n,2)+":"+gi(r,2)+"."+gi(i,3)+"Z":r?"T"+gi(e,2)+":"+gi(n,2)+":"+gi(r,2)+"Z":n||e?"T"+gi(e,2)+":"+gi(n,2)+"Z":"")}(t):a.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),o=t.charCodeAt(0);return{parse:function(t,n){var r,i,a=e(t,function(t,e){if(r)return r(t,e-1);i=t,r=n?function(t,e){var n=di(t);return function(r,i){return e(n(r),i,t)}}(t,n):di(t)});return a.columns=i||[],a},parseRows:e,format:function(e,r){return null==r&&(r=pi(e)),[r.map(i).join(t)].concat(n(e,r)).join("\n")},formatBody:function(t,e){return null==e&&(e=pi(t)),n(t,e).join("\n")},formatRows:function(t){return t.map(r).join("\n")},formatRow:r,formatValue:i}}function mi(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;sm&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}function vi(t){return+t}function bi(t){return t*t}function _i(t){return t*(2-t)}function xi(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function wi(t){return 1==+t?1:1-Math.cos(t*fm)}function ki(t){return Math.sin(t*fm)}function Ti(t){return(1-Math.cos(hm*t))/2}function Ei(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ci(t){return Ei(1-+t)}function Si(t){return 1-Ei(t)}function Ai(t){return((t*=2)<=1?Ei(1-t):2-Ei(t-1))/2}function Mi(t){return 1-Math.sqrt(1-t*t)}function Ni(t){return Math.sqrt(1- --t*t)}function Di(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Oi(t){return 1-Bi(1-t)}function Bi(t){return(t=+t)<.36363636363636365?dm*t*t:t<.7272727272727273?dm*(t-=.5454545454545454)*t+.75:t<.9090909090909091?dm*(t-=.8181818181818182)*t+.9375:dm*(t-=.9545454545454546)*t+.984375}function Li(t){return((t*=2)<=1?1-Bi(1-t):Bi(t-1)+1)/2}function Ii(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function Fi(t,e){return fetch(t,e).then(Ii)}function Ri(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function Pi(t,e){return fetch(t,e).then(Ri)}function Yi(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function zi(t,e){return fetch(t,e).then(Yi)}function Ui(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),zi(e,n).then(function(e){return t(e,r)})}}function ji(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=yi(t);return zi(e,n).then(function(t){return i.parse(t,r)})}function qi(t,e){return new Promise(function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t})}function $i(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Wi(t,e){return fetch(t,e).then($i)}function Hi(t){return function(e,n){return zi(e,n).then(function(e){return(new DOMParser).parseFromString(e,t)})}}function Vi(t,e){function n(){var n,i,a=r.length,o=0,s=0;for(n=0;n=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o,i=d,!(d=d[h=u<<1|l]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(l=e>=(a=(g+m)/2))?g=a:m=a,(u=n>=(o=(y+v)/2))?y=o:v=o}while((h=u<<1|l)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function Qi(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ji(t){return t[0]}function Ki(t){return t[1]}function ta(t,e,n){var r=new ea(null==e?Ji:e,null==n?Ki:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ea(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function na(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}function ra(t){return t.x+t.vx}function ia(t){return t.y+t.vy}function aa(t){function e(){function t(t,e,n,r,i){var a=t.data,s=t.r,d=h+s;if(!a)return e>l+d||ru+d||ic.index){var p=l-a.x-a.vx,g=u-a.y-a.vy,y=p*p+g*g;yt.r&&(t.r=t[e].r)}function r(){if(i){var e,n,r=i.length;for(a=new Array(r),e=0;e1?(null==e?h.remove(t):h.set(t,i(e)),a):h.get(t)},find:function(e,n,r){var i,a,o,s,c,l=0,u=t.length;for(null==r?r=1/0:r*=r,l=0;l1?(d.on(t,e),a):d.on(t)}}}function fa(){function t(t){var e,s=i.length,c=ta(i,la,ua).visitAfter(n);for(o=t,e=0;e=u)){(t.data!==a||t.next)&&(0===i&&(d+=(i=Xi())*i),0===c&&(d+=(c=Xi())*c),d1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ma(t){return(t=ya(Math.abs(t)))?t[1]:NaN}function va(t){if(!(e=Nm.exec(t)))throw new Error("invalid format: "+t);var e;return new ba({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ba(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function _a(t,e){var n=ya(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function xa(t){return t}function wa(t){function e(t){function e(t){var e,a,o,l=_,d=x;if("c"===b)d=w(t)+d,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:w(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),l=(T?"("===f?f:u:"-"===f||"("===f?"":f)+l,d=("s"===b?Fm[8+Am/3]:"")+d+(T&&"("===f?")":""),k)for(e=-1,a=t.length;++e(o=t.charCodeAt(e))||o>57){d=(46===o?s+t.slice(e+1):t.slice(e))+d,t=t.slice(0,e);break}}y&&!p&&(t=i(t,1/0));var E=l.length+t.length+d.length,C=E>1)+l+t+d+C.slice(E);break;default:t=C+l+t+d}return c(t)}var n=(t=va(t)).fill,r=t.align,f=t.sign,d=t.symbol,p=t.zero,g=t.width,y=t.comma,m=t.precision,v=t.trim,b=t.type;"n"===b?(y=!0,b="g"):Dm[b]||(void 0===m&&(m=12),v=!0,b="g"),(p||"0"===n&&"="===r)&&(p=!0,n="0",r="=");var _="$"===d?a:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",x="$"===d?o:/[%p]/.test(b)?l:"",w=Dm[b],k=/[defgprs%]/.test(b);return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),e.toString=function(){return t+""},e}var n,r,i=void 0===t.grouping||void 0===t.thousands?xa:(n=Im.call(t.grouping,Number),r=t.thousands+"",function(t,e){for(var i=t.length,a=[],o=0,s=n[0],c=0;i>0&&s>0&&(c+s+1>e&&(s=Math.max(1,e-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>e));)s=n[o=(o+1)%n.length];return a.reverse().join(r)}),a=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",c=void 0===t.numerals?xa:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Im.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";return{format:e,formatPrefix:function(t,n){var r=e(((t=va(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(ma(n)/3))),a=Math.pow(10,-i),o=Fm[8+i/3];return function(t){return r(a*t)+o}}}}function ka(t){return Om=wa(t),Bm=Om.format,Lm=Om.formatPrefix,Om}function Ta(t){return Math.max(0,-ma(Math.abs(t)))}function Ea(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ma(e)/3)))-ma(Math.abs(t)))}function Ca(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ma(e)-ma(t))+1}function Sa(){return new Aa}function Aa(){this.reset()}function Ma(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}function Na(t){return t>1?0:t<-1?mv:Math.acos(t)}function Da(t){return t>1?vv:t<-1?-vv:Math.asin(t)}function Oa(t){return(t=Dv(t/2))*t}function Ba(){}function La(t,e){t&&Fv.hasOwnProperty(t.type)&&Fv[t.type](t,e)}function Ia(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i=0?1:-1,i=r*n,a=Cv(e=(e*=wv)/2+bv),o=Dv(e),s=Um*o,c=zm*a+s*Cv(i),l=s*r*Dv(i);Rv.add(Ev(l,c)),Ym=t,zm=a,Um=o}function ja(t){return Pv.reset(),Ra(t,Yv),2*Pv}function qa(t){return[Ev(t[1],t[0]),Da(t[2])]}function $a(t){var e=t[0],n=t[1],r=Cv(n);return[r*Cv(e),r*Dv(e),Dv(n)]}function Wa(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ha(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function Va(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Ga(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Xa(t){var e=Bv(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Za(t,e){Zm.push(Qm=[jm=t,$m=t]),eWm&&(Wm=e)}function Qa(t,e){var n=$a([t*wv,e*wv]);if(Xm){var r=Ha(Xm,n),i=Ha([r[1],-r[0],0],r);Xa(i),i=qa(i);var a,o=t-Hm,s=o>0?1:-1,c=i[0]*xv*s,l=kv(o)>180;l^(s*HmWm&&(Wm=a):l^(s*Hm<(c=(c+360)%360-180)&&cWm&&(Wm=e)),l?tro(jm,$m)&&($m=t):ro(t,$m)>ro(jm,$m)&&(jm=t):$m>=jm?(t$m&&($m=t)):t>Hm?ro(jm,t)>ro(jm,$m)&&($m=t):ro(t,$m)>ro(jm,$m)&&(jm=t)}else Zm.push(Qm=[jm=t,$m=t]);eWm&&(Wm=e),Xm=n,Hm=t}function Ja(){Uv.point=Qa}function Ka(){Qm[0]=jm,Qm[1]=$m,Uv.point=Za,Xm=null}function to(t,e){if(Xm){var n=t-Hm;zv.add(kv(n)>180?n+(n>0?360:-360):n)}else Vm=t,Gm=e;Yv.point(t,e),Qa(t,e)}function eo(){Yv.lineStart()}function no(){to(Vm,Gm),Yv.lineEnd(),kv(zv)>gv&&(jm=-($m=180)),Qm[0]=jm,Qm[1]=$m,Xm=null}function ro(t,e){return(e-=t)<0?e+360:e}function io(t,e){return t[0]-e[0]}function ao(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ero(r[0],r[1])&&(r[1]=i[1]),ro(i[0],r[1])>ro(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=ro(r[1],i[0]))>o&&(o=s,jm=i[0],$m=r[1])}return Zm=Qm=null,jm===1/0||qm===1/0?[[NaN,NaN],[NaN,NaN]]:[[jm,qm],[$m,Wm]]}function so(t,e){t*=wv;var n=Cv(e*=wv);co(n*Cv(t),n*Dv(t),Dv(e))}function co(t,e,n){tv+=(t-tv)/++Jm,ev+=(e-ev)/Jm,nv+=(n-nv)/Jm}function lo(){jv.point=uo}function uo(t,e){t*=wv;var n=Cv(e*=wv);hv=n*Cv(t),fv=n*Dv(t),dv=Dv(e),jv.point=ho,co(hv,fv,dv)}function ho(t,e){t*=wv;var n=Cv(e*=wv),r=n*Cv(t),i=n*Dv(t),a=Dv(e),o=Ev(Bv((o=fv*a-dv*i)*o+(o=dv*r-hv*a)*o+(o=hv*i-fv*r)*o),hv*r+fv*i+dv*a);Km+=o,rv+=o*(hv+(hv=r)),iv+=o*(fv+(fv=i)),av+=o*(dv+(dv=a)),co(hv,fv,dv)}function fo(){jv.point=so}function po(){jv.point=yo}function go(){mo(lv,uv),jv.point=so}function yo(t,e){lv=t,uv=e,t*=wv,e*=wv,jv.point=mo;var n=Cv(e);hv=n*Cv(t),fv=n*Dv(t),dv=Dv(e),co(hv,fv,dv)}function mo(t,e){t*=wv;var n=Cv(e*=wv),r=n*Cv(t),i=n*Dv(t),a=Dv(e),o=fv*a-dv*i,s=dv*r-hv*a,c=hv*i-fv*r,l=Bv(o*o+s*s+c*c),u=Da(l),h=l&&-u/l;ov+=h*o,sv+=h*s,cv+=h*c,Km+=u,rv+=u*(hv+(hv=r)),iv+=u*(fv+(fv=i)),av+=u*(dv+(dv=a)),co(hv,fv,dv)}function vo(t){Jm=Km=tv=ev=nv=rv=iv=av=ov=sv=cv=0,Ra(t,jv);var e=ov,n=sv,r=cv,i=e*e+n*n+r*r;return imv?t+Math.round(-t/_v)*_v:t,e]}function wo(t,e,n){return(t%=_v)?e||n?_o(To(t),Eo(e,n)):To(t):e||n?Eo(e,n):xo}function ko(t){return function(e,n){return[(e+=t)>mv?e-_v:e<-mv?e+_v:e,n]}}function To(t){var e=ko(t);return e.invert=ko(-t),e}function Eo(t,e){function n(t,e){var n=Cv(e),s=Cv(t)*n,c=Dv(t)*n,l=Dv(e),u=l*r+s*i;return[Ev(c*a-u*o,s*r-l*i),Da(u*a+c*o)]}var r=Cv(t),i=Dv(t),a=Cv(e),o=Dv(e);return n.invert=function(t,e){var n=Cv(e),s=Cv(t)*n,c=Dv(t)*n,l=Dv(e),u=l*a-c*o;return[Ev(c*a+l*o,s*r+u*i),Da(u*r-s*i)]},n}function Co(t){function e(e){return(e=t(e[0]*wv,e[1]*wv))[0]*=xv,e[1]*=xv,e}return t=wo(t[0]*wv,t[1]*wv,t.length>2?t[2]*wv:0),e.invert=function(e){return(e=t.invert(e[0]*wv,e[1]*wv))[0]*=xv,e[1]*=xv,e},e}function So(t,e,n,r,i,a){if(n){var o=Cv(e),s=Dv(e),c=r*n;null==i?(i=e+r*_v,a=e-c/2):(i=Ao(o,i),a=Ao(o,a),(r>0?ia)&&(i+=r*_v));for(var l,u=i;r>0?u>a:u1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Do(t,e){return kv(t[0]-e[0])=0;--a)i.point((u=l[a])[0],u[1]);else r(f.x,f.p.x,-1,i);f=f.p}l=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Lo(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r=0?1:-1,E=T*k,C=E>mv,S=g*x;if(qv.add(Ev(S*T*Dv(E),y*w+S*Cv(E))),o+=C?k+T*_v:k,C^d>=n^b>=n){var A=Ha($a(f),$a(v));Xa(A);var M=Ha(a,A);Xa(M);var N=(C^k>=0?-1:1)*Da(M[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=C^k>=0?1:-1)}}return(o<-1e-6||o0){for(v||(i.polygonStart(),v=!0),i.lineStart(),t=0;t1&&2&a&&o.push(o.pop().concat(o.shift())),d.push(o.filter(Po))}var f,d,p,g=e(i),y=No(),m=e(y),v=!1,b={point:a,lineStart:s,lineEnd:c,polygonStart:function(){b.point=l,b.lineStart=u,b.lineEnd=h,d=[],f=[]},polygonEnd:function(){b.point=a,b.lineStart=s,b.lineEnd=c,d=S(d);var t=Fo(f,r);d.length?(v||(i.polygonStart(),v=!0),Bo(d,Yo,t,n,i)):t&&(v||(i.polygonStart(),v=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),v&&(i.polygonEnd(),v=!1),d=f=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};return b}}function Po(t){return t.length>1}function Yo(t,e){return((t=t.x)[0]<0?t[1]-vv-gv:vv-t[1])-((e=e.x)[0]<0?e[1]-vv-gv:vv-e[1])}function zo(t){function e(t,e){return Cv(t)*Cv(e)>i}function n(t,e,n){var r=[1,0,0],a=Ha($a(t),$a(e)),o=Wa(a,a),s=a[0],c=o-s*s;if(!c)return!n&&t;var l=i*o/c,u=-i*s/c,h=Ha(r,a),f=Ga(r,l);Va(f,Ga(a,u));var d=h,p=Wa(f,d),g=Wa(d,d),y=p*p-g*(Wa(f,f)-1);if(!(y<0)){var m=Bv(y),v=Ga(d,(-p-m)/g);if(Va(v,f),v=qa(v),!n)return v;var b,_=t[0],x=e[0],w=t[1],k=e[1];x<_&&(b=_,_=x,x=b);var T=x-_,E=kv(T-mv)0^v[1]<(kv(v[0]-_)mv^(_<=v[0]&&v[0]<=x)){var C=Ga(d,(-p+m)/g);return Va(C,f),[v,qa(C)]}}}function r(e,n){var r=o?t:mv-t,i=0;return e<-r?i|=1:e>r&&(i|=2),n<-r?i|=4:n>r&&(i|=8),i}var i=Cv(t),a=6*wv,o=i>0,s=kv(i)>gv;return Ro(e,function(t){var i,a,c,l,u;return{lineStart:function(){l=c=!1,u=1},point:function(h,f){var d,p=[h,f],g=e(h,f),y=o?g?0:r(h,f):g?r(h+(h<0?mv:-mv),f):0;if(!i&&(l=c=g)&&t.lineStart(),g!==c&&(!(d=n(i,p))||Do(i,d)||Do(p,d))&&(p[2]=1),g!==c)u=0,g?(t.lineStart(),d=n(p,i),t.point(d[0],d[1])):(d=n(i,p),t.point(d[0],d[1],2),t.lineEnd()),i=d;else if(s&&i&&o^g){var m;y&a||!(m=n(p,i,!0))||(u=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||i&&Do(i,p)||t.point(p[0],p[1]),i=p,c=g,a=y},lineEnd:function(){c&&t.lineEnd(),i=null},clean:function(){return u|(l&&c)<<1}}},function(e,n,r,i){So(i,t,a,r,e,n)},o?[0,-t]:[-mv,t-mv])}function Uo(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,l){var u=0,h=0;if(null==i||(u=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0){do{l.point(0===u||3===u?t:n,u>1?r:e)}while((u=(u+s+4)%4)!==h)}else l.point(a[0],a[1])}function o(r,i){return kv(r[0]-t)0?0:3:kv(r[0]-n)0?2:1:kv(r[1]-e)0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){function c(t,e){i(t,e)&&x.point(t,e)}function l(a,o){var s=i(a,o);if(h&&f.push([a,o]),b)d=a,p=o,g=s,b=!1,s&&(x.lineStart(),x.point(a,o));else if(s&&v)x.point(a,o);else{var c=[y=Math.max(Kv,Math.min(Jv,y)),m=Math.max(Kv,Math.min(Jv,m))],l=[a=Math.max(Kv,Math.min(Jv,a)),o=Math.max(Kv,Math.min(Jv,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],l=0,u=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>u)return;o>l&&(l=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>u)return;o>l&&(l=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>u)return;o>l&&(l=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>u)return;o>l&&(l=o)}else if(f>0){if(o0&&(t[0]=s+l*h,t[1]=c+l*f),u<1&&(e[0]=s+u*h,e[1]=c+u*f),!0}}}}}(c,l,t,e,n,r)?s&&(x.lineStart(),x.point(a,o),_=!1):(v||(x.lineStart(),x.point(c[0],c[1])),x.point(l[0],l[1]),s||x.lineEnd(),_=!1)}y=a,m=o,v=s}var u,h,f,d,p,g,y,m,v,b,_,x=o,w=No(),k={point:c,lineStart:function(){k.point=l,h&&h.push(f=[]),b=!0,v=!1,y=m=NaN},lineEnd:function(){u&&(l(d,p),g&&v&&w.rejoin(),u.push(w.result())),k.point=c,v&&x.lineEnd()},polygonStart:function(){x=w,u=[],h=[],_=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=h.length;nr&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=_&&e,i=(u=S(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Bo(u,s,e,a,o),o.polygonEnd()),x=o,u=h=f=null}};return k}}function jo(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Uo(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}function qo(){eb.point=eb.lineEnd=Ba}function $o(t,e){Wv=t*=wv,Hv=Dv(e*=wv),Vv=Cv(e), +eb.point=Wo}function Wo(t,e){t*=wv;var n=Dv(e*=wv),r=Cv(e),i=kv(t-Wv),a=Cv(i),o=r*Dv(i),s=Vv*n-Hv*r*a,c=Hv*n+Vv*r*a;tb.add(Ev(Bv(o*o+s*s),c)),Wv=t,Hv=n,Vv=r}function Ho(t){return tb.reset(),Ra(t,eb),+tb}function Vo(t,e){return nb[0]=t,nb[1]=e,Ho(rb)}function Go(t,e){return!(!t||!ab.hasOwnProperty(t.type))&&ab[t.type](t,e)}function Xo(t,e){return 0===Vo(t,e)}function Zo(t,e){for(var n,r,i,a=0,o=t.length;a0&&(i=Vo(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))gv}).map(u)).concat(g(Sv(s/y)*y,o,y).filter(function(t){return kv(t%v)>gv}).map(h))}var n,r,i,a,o,s,c,l,u,h,f,d,p=10,y=p,m=90,v=360,b=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(c).slice(1),f(i).reverse().slice(1),d(l).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.extentMajor(e).extentMinor(e):t.extentMinor()},t.extentMajor=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],l=+e[0][1],c=+e[1][1],a>i&&(e=a,a=i,i=e),l>c&&(e=l,l=c,c=e),t.precision(b)):[[a,l],[i,c]]},t.extentMinor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),s>o&&(e=s,s=o,o=e),t.precision(b)):[[r,s],[n,o]]},t.step=function(e){return arguments.length?t.stepMajor(e).stepMinor(e):t.stepMinor()},t.stepMajor=function(e){return arguments.length?(m=+e[0],v=+e[1],t):[m,v]},t.stepMinor=function(e){return arguments.length?(p=+e[0],y=+e[1],t):[p,y]},t.precision=function(e){return arguments.length?(b=+e,u=es(s,o,90),h=ns(r,n,b),f=es(l,c,90),d=ns(a,i,b),t):b},t.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function is(){return rs()()}function as(t,e){var n=t[0]*wv,r=t[1]*wv,i=e[0]*wv,a=e[1]*wv,o=Cv(r),s=Dv(r),c=Cv(a),l=Dv(a),u=o*Cv(n),h=o*Dv(n),f=c*Cv(i),d=c*Dv(i),p=2*Da(Bv(Oa(a-r)+o*c*Oa(i-n))),g=Dv(p),y=p?function(t){var e=Dv(t*=p)/g,n=Dv(p-t)/g,r=n*u+e*f,i=n*h+e*d,a=n*s+e*l;return[Ev(i,r)*xv,Ev(a,Bv(r*r+i*i))*xv]}:function(){return[n*xv,r*xv]};return y.distance=p,y}function os(t){return t}function ss(){cb.point=cs}function cs(t,e){cb.point=ls,Gv=Zv=t,Xv=Qv=e}function ls(t,e){sb.add(Qv*t-Zv*e),Zv=t,Qv=e}function us(){ls(Gv,Xv)}function hs(t,e){bb+=t,_b+=e,++xb}function fs(){Ab.point=ds}function ds(t,e){Ab.point=ps,hs(mb=t,vb=e)}function ps(t,e){var n=t-mb,r=e-vb,i=Bv(n*n+r*r);wb+=i*(mb+t)/2,kb+=i*(vb+e)/2,Tb+=i,hs(mb=t,vb=e)}function gs(){Ab.point=hs}function ys(){Ab.point=vs}function ms(){bs(gb,yb)}function vs(t,e){Ab.point=bs,hs(gb=mb=t,yb=vb=e)}function bs(t,e){var n=t-mb,r=e-vb,i=Bv(n*n+r*r);wb+=i*(mb+t)/2,kb+=i*(vb+e)/2,Tb+=i,Eb+=(i=vb*t-mb*e)*(mb+t),Cb+=i*(vb+e),Sb+=3*i,hs(mb=t,vb=e)}function _s(t){this._context=t}function xs(t,e){Fb.point=ws,Db=Bb=t,Ob=Lb=e}function ws(t,e){Bb-=t,Lb-=e,Ib.add(Bv(Bb*Bb+Lb*Lb)),Bb=t,Lb=e}function ks(){this._string=[]}function Ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Es(t,e){function n(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),Ra(t,r(i))),i.result()}var r,i,a=4.5;return n.area=function(t){return Ra(t,r(lb)),lb.result()},n.measure=function(t){return Ra(t,r(Rb)),Rb.result()},n.bounds=function(t){return Ra(t,r(pb)),pb.result()},n.centroid=function(t){return Ra(t,r(Mb)),Mb.result()},n.projection=function(e){return arguments.length?(r=null==e?(t=null,os):(t=e).stream,n):t},n.context=function(t){return arguments.length?(i=null==t?(e=null,new ks):new _s(e=t),"function"!=typeof a&&i.pointRadius(a),n):e},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(i.pointRadius(+t),+t),n):a},n.projection(t).context(e)}function Cs(t){return{stream:Ss(t)}}function Ss(t){return function(e){var n=new As;for(var r in t)n[r]=t[r];return n.stream=e,n}}function As(){}function Ms(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Ra(n,t.stream(pb)),e(pb.result()),null!=r&&t.clipExtent(r),t}function Ns(t,e,n){return Ms(t,function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])},n)}function Ds(t,e,n){return Ns(t,[[0,0],e],n)}function Os(t,e,n){return Ms(t,function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])},n)}function Bs(t,e,n){return Ms(t,function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])},n)}function Ls(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,l,u,h,f,d,p,g,y){var m=l-r,v=u-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+f,x=s+d,w=c+p,k=Bv(_*_+x*x+w*w),T=Da(w/=k),E=kv(kv(w)-1)e||kv((m*M+v*N)/b-.5)>.3||o*f+s*d+c*p2?t[2]%360*wv:0,r()):[_*xv,x*xv,w*xv]},e.angle=function(t){return arguments.length?(k=t%360*wv,r()):k*xv},e.reflectX=function(t){return arguments.length?(T=t?-1:1,r()):T<0},e.reflectY=function(t){return arguments.length?(E=t?-1:1,r()):E<0},e.precision=function(t){return arguments.length?(u=Ls(h,N=t*t),i()):Bv(N)},e.fitExtent=function(t,n){return Ns(e,t,n)},e.fitSize=function(t,n){return Ds(e,t,n)},e.fitWidth=function(t,n){return Os(e,t,n)},e.fitHeight=function(t,n){return Bs(e,t,n)},function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function Ys(t){var e=0,n=mv/3,r=Ps(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*wv,n=t[1]*wv):[e*xv,n*xv]},i}function zs(t,e){function n(t,e){var n=Bv(a-2*i*Dv(e))/i;return[n*Dv(t*=i),o-n*Cv(t)]}var r=Dv(t),i=(r+Dv(e))/2;if(kv(i)=.12&&i<.234&&r>=-.425&&r<-.214?l:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:c).invert(t)},t.stream=function(t){return n&&r===t?n:(e=[c.stream(r=t),l.stream(t),u.stream(t)],i=e.length,n={point:function(t,n){for(var r=-1;++r0?e<-vv+gv&&(e=-vv+gv):e>vv-gv&&(e=vv-gv);var n=a/Nv(Qs(e),i);return[n*Dv(i*t),a-n*Cv(i*t)]}var r=Cv(t),i=t===e?Dv(t):Mv(r/Cv(e))/Mv(Qs(e)/Qs(t)),a=r*Nv(Qs(t),i)/i;return i?(n.invert=function(t,e){var n=a-e,r=Ov(i)*Bv(t*t+n*n),o=Ev(t,kv(n))*Ov(n);return n*i<0&&(o-=mv*Ov(t)*Ov(n)),[o/i,2*Tv(Nv(a/r,1/i))-vv]},n):Gs}function Ks(){return Ys(Js).scale(109.5).parallels([30,30])}function tc(t,e){return[t,e]}function ec(){return Rs(tc).scale(152.63)}function nc(t,e){function n(t,e){var n=a-e,r=i*t;return[n*Dv(r),a-n*Cv(r)]}var r=Cv(t),i=t===e?Dv(t):(r-Cv(e))/(e-t),a=r/i+t;return kv(i)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function mc(t,e){return t.parent===e.parent?1:2}function vc(t,e){return t+e.x}function bc(t,e){return Math.max(t,e.y)}function _c(){function t(t){var a,o=0;t.eachAfter(function(t){var n=t.children;n?(t.x=function(t){return t.reduce(vc,0)/t.length}(n),t.y=1+n.reduce(bc,0)):(t.x=a?o+=e(t,a):0,t.y=0,a=t)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(t),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(t),l=s.x-e(s,c)/2,u=c.x+e(c,s)/2;return t.eachAfter(i?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*r}:function(e){e.x=(e.x-l)/(u-l)*n,e.y=(1-(t.y?e.y/t.y:1))*r})}var e=mc,n=1,r=1,i=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(i=!1,n=+e[0],r=+e[1],t):i?null:[n,r]},t.nodeSize=function(e){return arguments.length?(i=!0,n=+e[0],r=+e[1],t):i?[n,r]:null},t}function xc(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function wc(t,e){var n,r,i,a,o,s=new Cc(t),c=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=kc);n=l.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)l.push(r=n.children[a]=new Cc(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Ec)}function kc(t){return t.children}function Tc(t){t.data=t.data.data}function Ec(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Cc(t){this.data=t,this.depth=this.height=0,this.parent=null}function Sc(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Vb.call(t))).length,a=[];r0&&n*n>r*r+i*i}function Dc(t,e){for(var n=0;n(o*=o)?(r=(l+o-i)/(2*l),a=Math.sqrt(Math.max(0,o/l-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(l+i-o)/(2*l),a=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Fc(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Rc(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Pc(t){this._=t,this.next=null,this.previous=null}function Yc(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,l,u,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Ic(n,e,r=t[2]),e=new Pc(e),n=new Pc(n),r=new Pc(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s0)throw new Error("cycle");return a}var e=Kc,n=tl;return t.id=function(n){return arguments.length?(e=jc(n),t):e},t.parentId=function(e){return arguments.length?(n=jc(e),t):n},t}function nl(t,e){return t.parent===e.parent?1:2}function rl(t){var e=t.children;return e?e[0]:t.t}function il(t){var e=t.children;return e?e[e.length-1]:t.t}function al(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function ol(t,e,n){return t.a.parent===e.parent?t.a:n}function sl(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function cl(){function t(t){var c=function(t){for(var e,n,r,i,a,o=new sl(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new sl(r[i],i)),n.parent=e;return(o.parent=new sl(null,0)).children=[o],o}(t);if(c.eachAfter(e),c.parent.m=-c.z,c.eachBefore(n),s)t.eachBefore(r);else{var l=t,u=t,h=t;t.eachBefore(function(t){t.xu.x&&(u=t),t.depth>h.depth&&(h=t)});var f=l===u?1:i(l,u)/2,d=f-l.x,p=a/(u.x+f+d),g=o/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+d)*p,t.y=t.depth*g})}return t}function e(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+i(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+i(t._,r._));t.parent.A=function(t,e,n){if(e){for(var r,a=t,o=t,s=e,c=a.parent.children[0],l=a.m,u=o.m,h=s.m,f=c.m;s=il(s),a=rl(a),s&&a;)c=rl(c),(o=il(o)).a=t,(r=s.z+h-a.z-l+i(s._,a._))>0&&(al(ol(s,t,n),t,r),l+=r,u+=r),h+=s.m,l+=a.m,f+=c.m,u+=o.m;s&&!il(o)&&(o.t=s,o.m+=h-u),a&&!rl(c)&&(c.t=a,c.m+=l-f,n=t)}return n}(t,r,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t){t.x*=a,t.y=t.depth*o}var i=nl,a=1,o=1,s=null;return t.separation=function(e){return arguments.length?(i=e,t):i},t.size=function(e){return arguments.length?(s=!1,a=+e[0],o=+e[1],t):s?null:[a,o]},t.nodeSize=function(e){return arguments.length?(s=!0,a=+e[0],o=+e[1],t):s?[a,o]:null},t}function ll(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,l=t.value&&(i-n)/t.value;++sf&&(f=s),y=u*u*g,(d=Math.max(f/y,y/h))>p){u-=s;break}p=d}m.push(o={value:u,dice:c=e-1){var c=s[t];return c.x0=r,c.y0=i,c.x1=a,void(c.y1=o)}for(var h=l[t],f=n/2+h,d=t+1,p=e-1;d>>1;l[g]o-i){var v=(r*m+a*y)/n;u(t,d,y,r,i,v,o),u(d,e,m,v,i,a,o)}else{var b=(i*m+o*y)/n;u(t,d,y,r,i,a,b),u(d,e,m,r,b,a,o)}}(0,c,t.value,e,n,r,i)}function dl(t,e,n,r,i){(1&t.depth?ll:Qc)(t,e,n,r,i)}function pl(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function gl(t,e){var n=Oe(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function yl(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function ml(t){return((t=Math.exp(t))+1/t)/2}function vl(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],l=e[2],u=s-i,h=c-a,f=u*u+h*h;if(f<1e-12)r=Math.log(l/o)/Kb,n=function(t){return[i+t*u,a+t*h,o*Math.exp(Kb*t*r)]};else{var d=Math.sqrt(f),p=(l*l-o*o+4*f)/(2*o*2*d),g=(l*l-o*o-4*f)/(2*l*2*d),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Kb,n=function(t){var e,n=t*r,s=ml(y),c=o/(2*d)*(s*(e=Kb*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*u,a+c*h,o*s/ml(Kb*n+y)]}}return n.duration=1e3*r,n}function bl(t){return function(e,n){var r=t((e=Te(e)).h,(n=Te(n)).h),i=Be(e.s,n.s),a=Be(e.l,n.l),o=Be(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}function _l(t,e){var n=Be((t=Br(t)).l,(e=Br(e)).l),r=Be(t.a,e.a),i=Be(t.b,e.b),a=Be(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function xl(t){return function(e,n){var r=t((e=Ur(e)).h,(n=Ur(n)).h),i=Be(e.c,n.c),a=Be(e.l,n.l),o=Be(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}function wl(t){return function e(n){function r(e,r){var i=t((e=Wr(e)).h,(r=Wr(r)).h),a=Be(e.s,r.s),o=Be(e.l,r.l),s=Be(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}function kl(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n1&&Sl(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Nl(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e=0;--e)l.push(t[r[a[e]][2]]);for(e=+s;es!=l>s&&o<(c-n)*(s-r)/(l-r)+n&&(u=!u),c=n,l=r;return u}function Ol(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++rr&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function $l(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i2?Wl:$l,o=s=null,e}function e(t){return isNaN(t=+t)?i:(o||(o=a(c.map(n),l,u)))(n(h(t)))}var n,r,i,a,o,s,c=y_,l=y_,u=qe,h=Ul;return e.invert=function(t){return h(r((s||(s=a(l,c.map(n),ze)))(t)))},e.domain=function(e){return arguments.length?(c=d_.call(e,zl),h===Ul||(h=ql(c)),t()):c.slice()},e.range=function(e){return arguments.length?(l=p_.call(e),t()):l.slice()}, +e.rangeRound=function(e){return l=p_.call(e),u=yl,t()},e.clamp=function(t){return arguments.length?(h=t?ql(c):Ul,e):h!==Ul},e.interpolate=function(e){return arguments.length?(u=e,t()):u},e.unknown=function(t){return arguments.length?(i=t,e):i},function(e,i){return n=e,r=i,t()}}function Gl(t,e){return Vl()(t,e)}function Xl(t,e,n,r){var i,a=v(t,e,n);switch((r=va(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=Ea(a,o))||(r.precision=i),Lm(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=Ca(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=Ta(a))||(r.precision=i-2*("%"===r.type))}return Bm(r)}function Zl(t){var e=t.domain;return t.ticks=function(t){var n=e();return y(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Xl(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c0?r=m(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=m(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Ql(){var t=Gl(Ul,Ul);return t.copy=function(){return Hl(t,Ql())},Ll.apply(t,arguments),Zl(t)}function Jl(t){function e(t){return isNaN(t=+t)?n:t}var n;return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=d_.call(n,zl),e):t.slice()},e.unknown=function(t){return arguments.length?(n=t,e):n},e.copy=function(){return Jl(t).unknown(n)},t=arguments.length?d_.call(t,zl):[0,1],Zl(e)}function Kl(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o0){for(;fc)break;g.push(h)}}else for(;f=1;--u)if(!((h=l*u)c)break;g.push(h)}}else g=y(f,d,Math.min(d-f,p)).map(r);return e?g.reverse():g},i.tickFormat=function(t,e){if(null==e&&(e=10===o?".0e":","),"function"!=typeof e&&(e=Bm(e)),t===1/0)return e;null==t&&(t=10);var a=Math.max(1,o*t/i.ticks().length);return function(t){var i=t/r(Math.round(n(t)));return i*o0?o[e-1]:i[0],e=a?[o[a-1],i]:[o[e-1],o[e]]},t.unknown=function(e){return arguments.length?(n=e,t):t},t.thresholds=function(){return o.slice()},t.copy=function(){return bu().domain([r,i]).range(s).unknown(n)},Ll.apply(Zl(t),arguments)}function _u(){function t(t){return t<=t?r[Hp(n,t,0,i)]:e}var e,n=[.5],r=[0,1],i=1;return t.domain=function(e){return arguments.length?(n=p_.call(e),i=Math.min(n.length,r.length-1),t):n.slice()},t.range=function(e){return arguments.length?(r=p_.call(e),i=Math.min(n.length,r.length-1),t):r.slice()},t.invertExtent=function(t){var e=r.indexOf(t);return[n[e-1],n[e]]},t.unknown=function(n){return arguments.length?(e=n,t):e},t.copy=function(){return _u().domain(n).range(r).unknown(e)},Ll.apply(t,arguments)}function xu(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););})},n&&(i.count=function(e,r){return m_.setTime(+e),v_.setTime(+r),t(m_),t(v_),Math.floor(n(m_,v_))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}function wu(t){return xu(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*C_)/M_})}function ku(t){return xu(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/M_})}function Tu(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Eu(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Cu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Su(t){function e(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,l=t.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(a=(i=Eu(Cu(o.y,0,1))).getUTCDay(),i=a>4||0===a?ox.ceil(i):ox(i),i=_x.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(a=(i=Tu(Cu(o.y,0,1))).getDay(),i=a>4||0===a?D_.ceil(i):D_(i),i=W_.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),a="Z"in o?Eu(Cu(o.y,0,1)).getUTCDay():Tu(Cu(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(a+5)%7:o.w+7*o.U-(a+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Eu(o)):Tu(o)}}function r(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=T[i in Nx?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}var i=t.dateTime,a=t.date,o=t.time,s=t.periods,c=t.days,l=t.shortDays,u=t.months,h=t.shortMonths,f=Nu(s),d=Du(s),p=Nu(c),g=Du(c),y=Nu(l),m=Du(l),v=Nu(u),b=Du(u),_=Nu(h),x=Du(h),w={a:function(t){return l[t.getDay()]},A:function(t){return c[t.getDay()]},b:function(t){return h[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:Ju,e:Ju,f:rh,g:ph,G:yh,H:Ku,I:th,j:eh,L:nh,m:ih,M:ah,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Yh,s:zh,S:oh,u:sh,U:ch,V:uh,w:hh,W:fh,x:null,X:null,y:dh,Y:gh,Z:mh,"%":Ph},k={a:function(t){return l[t.getUTCDay()]},A:function(t){return c[t.getUTCDay()]},b:function(t){return h[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:vh,e:vh,f:kh,g:Lh,G:Fh,H:bh,I:_h,j:xh,L:wh,m:Th,M:Eh,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Yh,s:zh,S:Ch,u:Sh,U:Ah,V:Nh,w:Dh,W:Oh,x:null,X:null,y:Bh,Y:Ih,Z:Rh,"%":Ph},T={a:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.w=m[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=g[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=_.exec(e.slice(n));return r?(t.m=x[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=b[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,e,n){return r(t,i,e,n)},d:ju,e:ju,f:Gu,g:Pu,G:Ru,H:$u,I:$u,j:qu,L:Vu,m:Uu,M:Wu,p:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.p=d[r[0].toLowerCase()],n+r[0].length):-1},q:zu,Q:Zu,s:Qu,S:Hu,u:Bu,U:Lu,V:Iu,w:Ou,W:Fu,x:function(t,e,n){return r(t,a,e,n)},X:function(t,e,n){return r(t,o,e,n)},y:Pu,Y:Ru,Z:Yu,"%":Xu};return w.x=e(a,w),w.X=e(o,w),w.c=e(i,w),k.x=e(a,k),k.X=e(o,k),k.c=e(i,k),{format:function(t){var n=e(t+="",w);return n.toString=function(){return t},n},parse:function(t){var e=n(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var n=e(t+="",k);return n.toString=function(){return t},n},utcParse:function(t){var e=n(t+="",!0);return e.toString=function(){return t},e}}}function Au(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a68?1900:2e3),n+r[0].length):-1}function Yu(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function zu(t,e,n){var r=Dx.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Uu(t,e,n){var r=Dx.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ju(t,e,n){var r=Dx.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function qu(t,e,n){var r=Dx.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function $u(t,e,n){var r=Dx.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Wu(t,e,n){var r=Dx.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Hu(t,e,n){var r=Dx.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Vu(t,e,n){var r=Dx.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Gu(t,e,n){var r=Dx.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xu(t,e,n){var r=Ox.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zu(t,e,n){var r=Dx.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Qu(t,e,n){var r=Dx.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ju(t,e){return Au(t.getDate(),e,2)}function Ku(t,e){return Au(t.getHours(),e,2)}function th(t,e){return Au(t.getHours()%12||12,e,2)}function eh(t,e){return Au(1+W_.count(__(t),t),e,3)}function nh(t,e){return Au(t.getMilliseconds(),e,3)}function rh(t,e){return nh(t,e)+"000"}function ih(t,e){return Au(t.getMonth()+1,e,2)}function ah(t,e){return Au(t.getMinutes(),e,2)}function oh(t,e){return Au(t.getSeconds(),e,2)}function sh(t){var e=t.getDay();return 0===e?7:e}function ch(t,e){return Au(N_.count(__(t)-1,t),e,2)}function lh(t){var e=t.getDay();return e>=4||0===e?L_(t):L_.ceil(t)}function uh(t,e){return t=lh(t),Au(L_.count(__(t),t)+(4===__(t).getDay()),e,2)}function hh(t){return t.getDay()}function fh(t,e){return Au(D_.count(__(t)-1,t),e,2)}function dh(t,e){return Au(t.getFullYear()%100,e,2)}function ph(t,e){return Au((t=lh(t)).getFullYear()%100,e,2)}function gh(t,e){return Au(t.getFullYear()%1e4,e,4)}function yh(t,e){var n=t.getDay();return Au((t=n>=4||0===n?L_(t):L_.ceil(t)).getFullYear()%1e4,e,4)}function mh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Au(e/60|0,"0",2)+Au(e%60,"0",2)}function vh(t,e){return Au(t.getUTCDate(),e,2)}function bh(t,e){return Au(t.getUTCHours(),e,2)}function _h(t,e){return Au(t.getUTCHours()%12||12,e,2)}function xh(t,e){return Au(1+_x.count(kx(t),t),e,3)}function wh(t,e){return Au(t.getUTCMilliseconds(),e,3)}function kh(t,e){return wh(t,e)+"000"}function Th(t,e){return Au(t.getUTCMonth()+1,e,2)}function Eh(t,e){return Au(t.getUTCMinutes(),e,2)}function Ch(t,e){return Au(t.getUTCSeconds(),e,2)}function Sh(t){var e=t.getUTCDay();return 0===e?7:e}function Ah(t,e){return Au(ax.count(kx(t)-1,t),e,2)}function Mh(t){var e=t.getUTCDay();return e>=4||0===e?lx(t):lx.ceil(t)}function Nh(t,e){return t=Mh(t),Au(lx.count(kx(t),t)+(4===kx(t).getUTCDay()),e,2)}function Dh(t){return t.getUTCDay()}function Oh(t,e){return Au(ox.count(kx(t)-1,t),e,2)}function Bh(t,e){return Au(t.getUTCFullYear()%100,e,2)}function Lh(t,e){return Au((t=Mh(t)).getUTCFullYear()%100,e,2)}function Ih(t,e){return Au(t.getUTCFullYear()%1e4,e,4)}function Fh(t,e){var n=t.getUTCDay();return Au((t=n>=4||0===n?lx(t):lx.ceil(t)).getUTCFullYear()%1e4,e,4)}function Rh(){return"+0000"}function Ph(){return"%"}function Yh(t){return+t}function zh(t){return Math.floor(+t/1e3)}function Uh(t){return Tx=Su(t),Ex=Tx.format,Cx=Tx.parse,Sx=Tx.utcFormat,Ax=Tx.utcParse,Tx}function jh(t){return new Date(t)}function qh(t){return t instanceof Date?+t:+new Date(+t)}function $h(t,e,n,r,a,o,s,c,l){function u(i){return(s(i)1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return rk.h=360*t-100,rk.s=1.5-1.5*e,rk.l=.8-.9*e,rk+""}function ff(t){var e;return t=(.5-t)*Math.PI,ik.r=255*(e=Math.sin(t))*e,ik.g=255*(e=Math.sin(t+ak))*e,ik.b=255*(e=Math.sin(t+ok))*e,ik+""}function df(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function pf(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function gf(t){return re(Ut(t).call(document.documentElement))}function yf(){return new mf}function mf(){this._="@"+(++hk).toString(36)}function vf(t){return"string"==typeof t?new ee([document.querySelectorAll(t)],[document.documentElement]):new ee([null==t?[]:t],sg)}function bf(t,e){null==e&&(e=$e().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n1?0:t<-1?_k:Math.acos(t)}function wf(t){return t>=1?xk:t<=-1?-xk:Math.asin(t)}function kf(t){return t.innerRadius}function Tf(t){return t.outerRadius}function Ef(t){return t.startAngle}function Cf(t){return t.endAngle}function Sf(t){return t&&t.padAngle}function Af(t,e,n,r,i,a,o,s){var c=n-t,l=r-e,u=o-i,h=s-a,f=h*c-u*l;if(!(f*fN*N+D*D&&(T=C,E=S),{cx:T,cy:E,x01:-u,y01:-h,x11:T*(i/x-1),y11:E*(i/x-1)}}function Nf(){function t(){var t,l,u=+e.apply(this,arguments),h=+n.apply(this,arguments),f=a.apply(this,arguments)-xk,d=o.apply(this,arguments)-xk,p=fk(d-f),g=d>f;if(c||(c=t=xy()),hbk)if(p>wk-bk)c.moveTo(h*pk(f),h*mk(f)),c.arc(0,0,h,f,d,!g),u>bk&&(c.moveTo(u*pk(d),u*mk(d)),c.arc(0,0,u,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=s.apply(this,arguments)/2,E=T>bk&&(i?+i.apply(this,arguments):vk(u*u+h*h)),C=yk(fk(h-u)/2,+r.apply(this,arguments)),S=C,A=C;if(E>bk){var M=wf(E/u*mk(T)),N=wf(E/h*mk(T));(w-=2*M)>bk?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>bk?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*pk(v),O=h*mk(v),B=u*pk(x),L=u*mk(x);if(C>bk){var I,F=h*pk(b),R=h*mk(b),P=u*pk(_),Y=u*mk(_);if(p<_k&&(I=Af(D,O,P,Y,F,R,B,L))){var z=D-I[0],U=O-I[1],j=F-I[0],q=R-I[1],$=1/mk(xf((z*j+U*q)/(vk(z*z+U*U)*vk(j*j+q*q)))/2),W=vk(I[0]*I[0]+I[1]*I[1]);S=yk(C,(u-W)/($-1)),A=yk(C,(h-W)/($+1))}}k>bk?A>bk?(y=Mf(P,Y,D,O,h,A,g),m=Mf(F,R,B,L,h,A,g),c.moveTo(y.cx+y.x01,y.cy+y.y01),Abk&&w>bk?S>bk?(y=Mf(B,L,F,R,u,-S,g),m=Mf(D,O,P,Y,u,-S,g),c.lineTo(y.cx+y.x01,y.cy+y.y01),S=u;--h)l.point(y[h],m[h]);l.lineEnd(),l.areaEnd()}g&&(y[e]=+n(f,e,t),m[e]=+i(f,e,t),l.point(r?+r(f,e,t):y[e],a?+a(f,e,t):m[e]))}if(d)return l=null,d+""||null}function e(){return If().defined(o).curve(c).context(s)}var n=Bf,r=null,i=_f(0),a=Lf,o=_f(!0),s=null,c=Of,l=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:_f(+e),r=null,t):n},t.x0=function(e){return arguments.length?(n="function"==typeof e?e:_f(+e),t):n},t.x1=function(e){return arguments.length?(r=null==e?null:"function"==typeof e?e:_f(+e),t):r},t.y=function(e){return arguments.length?(i="function"==typeof e?e:_f(+e),a=null,t):i},t.y0=function(e){return arguments.length?(i="function"==typeof e?e:_f(+e),t):i},t.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:_f(+e),t):a},t.lineX0=t.lineY0=function(){return e().x(n).y(i)},t.lineY1=function(){return e().x(n).y(a)},t.lineX1=function(){return e().x(r).y(i)},t.defined=function(e){return arguments.length?(o="function"==typeof e?e:_f(!!e),t):o},t.curve=function(e){return arguments.length?(c=e,null!=s&&(l=c(s)),t):c},t.context=function(e){return arguments.length?(null==e?s=l=null:l=c(s=e),t):s},t}function Rf(t,e){return et?1:e>=t?0:NaN}function Pf(t){return t}function Yf(){function t(t){var s,c,l,u,h,f=t.length,d=0,p=new Array(f),g=new Array(f),y=+i.apply(this,arguments),m=Math.min(wk,Math.max(-wk,a.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,o.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s0&&(d+=h);for(null!=n?p.sort(function(t,e){return n(g[t],g[e])}):null!=r&&p.sort(function(e,n){return r(t[e],t[n])}),s=0,l=d?(m-f*b)/d:0;s0?h*l:0)+b,g[c]={data:t[c],index:s,value:h,startAngle:y,endAngle:u,padAngle:v};return g}var e=Pf,n=Rf,r=null,i=_f(0),a=_f(wk),o=_f(0);return t.value=function(n){return arguments.length?(e="function"==typeof n?n:_f(+n),t):e},t.sortValues=function(e){return arguments.length?(n=e,r=null,t):n},t.sort=function(e){return arguments.length?(r=e,n=null,t):r},t.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:_f(+e),t):i},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:_f(+e),t):a},t.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:_f(+e),t):o},t}function zf(t){this._curve=t}function Uf(t){function e(e){return new zf(t(e))}return e._curve=t,e}function jf(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Uf(t)):e()._curve},t}function qf(){return jf(If().curve(kk))}function $f(){var t=Ff().curve(kk),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return jf(n())},delete t.lineX0,t.lineEndAngle=function(){return jf(r())},delete t.lineX1,t.lineInnerRadius=function(){return jf(i())},delete t.lineY0,t.lineOuterRadius=function(){return jf(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Uf(t)):e()._curve},t}function Wf(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}function Hf(t){return t.source}function Vf(t){return t.target}function Gf(t){function e(){var e,s=Tk.call(arguments),c=n.apply(this,s),l=r.apply(this,s);if(o||(o=e=xy()),t(o,+i.apply(this,(s[0]=c,s)),+a.apply(this,s),+i.apply(this,(s[0]=l,s)),+a.apply(this,s)),e)return o=null,e+""||null}var n=Hf,r=Vf,i=Bf,a=Lf,o=null;return e.source=function(t){return arguments.length?(n=t,e):n},e.target=function(t){return arguments.length?(r=t,e):r},e.x=function(t){return arguments.length?(i="function"==typeof t?t:_f(+t),e):i},e.y=function(t){return arguments.length?(a="function"==typeof t?t:_f(+t),e):a},e.context=function(t){return arguments.length?(o=null==t?null:t,e):o},e}function Xf(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Zf(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Qf(t,e,n,r,i){var a=Wf(e,n),o=Wf(e,n=(n+i)/2),s=Wf(r,n),c=Wf(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function Jf(){return Gf(Xf)}function Kf(){return Gf(Zf)}function td(){var t=Gf(Qf);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}function ed(){function t(){var t;if(r||(r=t=xy()),e.apply(this,arguments).draw(r,+n.apply(this,arguments)),t)return r=null,t+""||null}var e=_f(Ek),n=_f(64),r=null;return t.type=function(n){return arguments.length?(e="function"==typeof n?n:_f(n),t):e},t.size=function(e){return arguments.length?(n="function"==typeof e?e:_f(+e),t):n},t.context=function(e){return arguments.length?(r=null==e?null:e,t):r},t}function nd(){}function rd(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function id(t){this._context=t}function ad(t){return new id(t)}function od(t){this._context=t}function sd(t){return new od(t)}function cd(t){this._context=t}function ld(t){return new cd(t)}function ud(t,e){this._basis=new id(t),this._beta=e}function hd(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function fd(t,e){this._context=t,this._k=(1-e)/6}function dd(t,e){this._context=t,this._k=(1-e)/6}function pd(t,e){this._context=t,this._k=(1-e)/6}function gd(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>bk){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>bk){var l=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*l+t._x1*t._l23_2a-e*t._l12_2a)/u,o=(o*l+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function yd(t,e){this._context=t,this._alpha=e}function md(t,e){this._context=t,this._alpha=e}function vd(t,e){this._context=t,this._alpha=e}function bd(t){this._context=t}function _d(t){return new bd(t)}function xd(t){return t<0?-1:1}function wd(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(xd(a)+xd(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function kd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Td(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ed(t){this._context=t}function Cd(t){this._context=new Sd(t)} +function Sd(t){this._context=t}function Ad(t){return new Ed(t)}function Md(t){return new Cd(t)}function Nd(t){this._context=t}function Dd(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a=0;)n[e]=e;return n}function Yd(t,e){return t[e]}function zd(){function t(t){var a,o,s=e.apply(this,arguments),c=t.length,l=s.length,u=new Array(l);for(a=0;a0){for(var n,r,i,a=0,o=t[0].length;a0)for(var n,r,i,a,o,s,c=0,l=t[e[0]].length;c0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function qd(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;oa&&(a=e,r=n);return r}function Vd(t){var e=t.map(Gd);return Pd(t).sort(function(t,n){return e[t]-e[n]})}function Gd(t){for(var e,n=0,r=-1,i=t.length;++r0)){if(a/=f,f<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>u&&(u=a)}else if(f>0){if(a0)){if(a/=d,d<0){if(a0){if(a>h)return;a>u&&(u=a)}if(a=i-l,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>u&&(u=a)}else if(d>0){if(a0||h<1)||(u>0&&(t[0]=[c+u*f,l+u*d]),h<1&&(t[1]=[c+h*f,l+h*d]),!0)}}}}}function hp(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],l=t.left,u=t.right,h=l[0],f=l[1],d=u[0],p=u[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]=-cT)){var d=c*c+l*l,p=u*u+h*h,g=(h*d-l*p)/f,y=(c*p-u*d)/f,m=aT.pop()||new gp;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=rT._;b;)if(m.ysT)s=s.L;else{if(!((i=a-Tp(s,o))>sT)){r>-sT?(e=s.P,n=s):i>-sT?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){nT[t.index]={site:t,halfedges:[]}}(t);var c=bp(t);if(eT.insert(e,c),e||n){if(e===n)return mp(e),n=bp(e.site),eT.insert(c,n),c.edge=n.edge=sp(e.site,c.site),yp(e),void yp(n);if(n){mp(e),mp(n);var l=e.site,u=l[0],h=l[1],f=t[0]-u,d=t[1]-h,p=n.site,g=p[0]-u,y=p[1]-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_=[(y*v-d*b)/m+u,(f*b-g*v)/m+h];lp(n.edge,l,p,_),c.edge=sp(l,t,null,_),n.edge=sp(t,p,null,_),yp(e),yp(n)}else c.edge=sp(e.site,c.site)}}function kp(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],l=c-e;if(!l)return s;var u=s-r,h=1/a-1/l,f=u/l;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*l)-c+l/2+i-a/2)))/h+r:(r+s)/2}function Tp(t,e){var n=t.N;if(n)return kp(n,e);var r=t.site;return r[1]===e?r[0]:1/0}function Ep(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Cp(t,e){return e[1]-t[1]||e[0]-t[0]}function Sp(t,e){var n,r,i,a=t.sort(Cp).pop();for(iT=[],nT=new Array(t.length),eT=new Kk,rT=new Kk;;)if(i=tT,a&&(!i||a[1]sT||Math.abs(i[0][1]-i[1][1])>sT)||delete iT[a]}(o,s,c,l),function(t,e,n,r){var i,a,o,s,c,l,u,h,f,d,p,g,y=nT.length,m=!0;for(i=0;isT||Math.abs(g-f)>sT)&&(c.splice(s,0,iT.push(cp(o,d,Math.abs(p-t)sT?[t,Math.abs(h-t)sT?[Math.abs(f-r)sT?[n,Math.abs(h-n)sT?[Math.abs(f-e)r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Up(){function t(t){t.property("__zoom",Rp).on("wheel.zoom",s).on("mousedown.zoom",c).on("dblclick.zoom",l).filter(b).on("touchstart.zoom",u).on("touchmove.zoom",h).on("touchend.zoom touchcancel.zoom",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(t,e){return(e=Math.max(_[0],Math.min(_[1],e)))===t.k?t:new Dp(e,t.x,t.y)}function n(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new Dp(t.k,r,i)}function r(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function i(t,e,n){t.on("start.zoom",function(){a(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){a(this,arguments).end()}).tween("zoom",function(){var t=this,i=arguments,o=a(t,i),s=y.apply(t,i),c=null==n?r(s):"function"==typeof n?n.apply(t,i):n,l=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=k(u.invert(c).concat(l/u.k),h.invert(c).concat(l/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=l/e[2];t=new Dp(n,c[0]-e[0]*n,c[1]-e[1]*n)}o.zoom(null,t)}})}function a(t,e,n){return!n&&t.__zooming||new o(t,e)}function o(t,e){this.that=t,this.args=e,this.active=0,this.extent=y.apply(t,e),this.taps=0}function s(){function t(){r.wheel=null,r.end()}if(g.apply(this,arguments)){var r=a(this,arguments),i=this.__zoom,o=Math.max(_[0],Math.min(_[1],i.k*Math.pow(2,v.apply(this,arguments)))),s=Ve(this);if(r.wheel)r.mouse[0][0]===s[0]&&r.mouse[0][1]===s[1]||(r.mouse[1]=i.invert(r.mouse[0]=s)),clearTimeout(r.wheel);else{if(i.k===o)return;r.mouse=[s,i.invert(s)],cn(this),r.start()}Lp(),r.wheel=setTimeout(t,150),r.zoom("mouse",m(n(e(i,o),r.mouse[0],r.mouse[1]),r.extent,x))}}function c(){function t(){if(Lp(),!r.moved){var t=og.clientX-s,e=og.clientY-c;r.moved=t*t+e*e>C}r.zoom("mouse",m(n(r.that.__zoom,r.mouse[0]=Ve(r.that),r.mouse[1]),r.extent,x))}function e(){i.on("mousemove.zoom mouseup.zoom",null),se(og.view,r.moved),Lp(),r.end()}if(!p&&g.apply(this,arguments)){var r=a(this,arguments,!0),i=re(og.view).on("mousemove.zoom",t,!0).on("mouseup.zoom",e,!0),o=Ve(this),s=og.clientX,c=og.clientY;oe(og.view),Bp(),r.mouse=[o,this.__zoom.invert(o)],cn(this),r.start()}}function l(){if(g.apply(this,arguments)){var r=this.__zoom,a=Ve(this),o=r.invert(a),s=r.k*(og.shiftKey?.5:2),c=m(n(e(r,s),a,o),y.apply(this,arguments),x);Lp(),w>0?re(this).transition().duration(w).call(i,c,a):re(this).call(t.transform,c)}}function u(){if(g.apply(this,arguments)){var t,e,n,r,i=og.touches,o=i.length,s=a(this,arguments,og.changedTouches.length===o);for(Bp(),e=0;eba,active:()=>qn,arc:()=>Nf,area:()=>Ff,areaRadial:()=>$f,ascending:()=>r,autoType:()=>mi,axisBottom:()=>W,axisLeft:()=>H,axisRight:()=>$,axisTop:()=>q,bisect:()=>Hp,bisectLeft:()=>Wp,bisectRight:()=>$p,bisector:()=>i,blob:()=>Fi,brush:()=>or,brushSelection:()=>rr,brushX:()=>ir,brushY:()=>ar,buffer:()=>Pi,chord:()=>lr,clientPoint:()=>We,cluster:()=>_c,color:()=>de,contourDensity:()=>ai,contours:()=>Kr,create:()=>gf,creator:()=>Ut,cross:()=>s,csv:()=>wm,csvFormat:()=>Gy,csvFormatBody:()=>Xy,csvFormatRow:()=>Qy,csvFormatRows:()=>Zy,csvFormatValue:()=>Jy,csvParse:()=>Hy,csvParseRows:()=>Vy,cubehelix:()=>Wr,curveBasis:()=>ad,curveBasisClosed:()=>sd,curveBasisOpen:()=>ld,curveBundle:()=>qk,curveCardinal:()=>$k,curveCardinalClosed:()=>Wk,curveCardinalOpen:()=>Hk,curveCatmullRom:()=>Vk,curveCatmullRomClosed:()=>Gk,curveCatmullRomOpen:()=>Xk,curveLinear:()=>Of,curveLinearClosed:()=>_d,curveMonotoneX:()=>Ad,curveMonotoneY:()=>Md,curveNatural:()=>Od,curveStep:()=>Ld,curveStepAfter:()=>Fd,curveStepBefore:()=>Id,customEvent:()=>Qt,descending:()=>c,deviation:()=>h,dispatch:()=>ng,drag:()=>fi,dragDisable:()=>oe,dragEnable:()=>se,dsv:()=>ji,dsvFormat:()=>yi,easeBack:()=>mm,easeBackIn:()=>gm,easeBackInOut:()=>mm,easeBackOut:()=>ym,easeBounce:()=>Bi,easeBounceIn:()=>Oi,easeBounceInOut:()=>Li,easeBounceOut:()=>Bi,easeCircle:()=>Di,easeCircleIn:()=>Mi,easeCircleInOut:()=>Di,easeCircleOut:()=>Ni,easeCubic:()=>Un,easeCubicIn:()=>Yn,easeCubicInOut:()=>Un,easeCubicOut:()=>zn,easeElastic:()=>_m,easeElasticIn:()=>bm,easeElasticInOut:()=>xm,easeElasticOut:()=>_m,easeExp:()=>Ai,easeExpIn:()=>Ci,easeExpInOut:()=>Ai,easeExpOut:()=>Si,easeLinear:()=>vi,easePoly:()=>um,easePolyIn:()=>cm,easePolyInOut:()=>um,easePolyOut:()=>lm,easeQuad:()=>xi,easeQuadIn:()=>bi,easeQuadInOut:()=>xi,easeQuadOut:()=>_i,easeSin:()=>Ti,easeSinIn:()=>wi,easeSinInOut:()=>Ti,easeSinOut:()=>ki,entries:()=>Nr,event:()=>og,extent:()=>f,forceCenter:()=>Vi,forceCollide:()=>aa,forceLink:()=>ca,forceManyBody:()=>fa,forceRadial:()=>da,forceSimulation:()=>ha,forceX:()=>pa,forceY:()=>ga,format:()=>Bm,formatDefaultLocale:()=>ka,formatLocale:()=>wa,formatPrefix:()=>Lm,formatSpecifier:()=>va,geoAlbers:()=>js,geoAlbersUsa:()=>qs,geoArea:()=>ja,geoAzimuthalEqualArea:()=>Hs,geoAzimuthalEqualAreaRaw:()=>zb,geoAzimuthalEquidistant:()=>Vs,geoAzimuthalEquidistantRaw:()=>Ub,geoBounds:()=>oo,geoCentroid:()=>vo,geoCircle:()=>Mo,geoClipAntimeridian:()=>$v,geoClipCircle:()=>zo,geoClipExtent:()=>jo,geoClipRectangle:()=>Uo,geoConicConformal:()=>Ks,geoConicConformalRaw:()=>Js,geoConicEqualArea:()=>Us,geoConicEqualAreaRaw:()=>zs,geoConicEquidistant:()=>rc,geoConicEquidistantRaw:()=>nc,geoContains:()=>ts,geoDistance:()=>Vo,geoEqualEarth:()=>ac,geoEqualEarthRaw:()=>ic,geoEquirectangular:()=>ec,geoEquirectangularRaw:()=>tc,geoGnomonic:()=>sc,geoGnomonicRaw:()=>oc,geoGraticule:()=>rs,geoGraticule10:()=>is,geoIdentity:()=>cc,geoInterpolate:()=>as,geoLength:()=>Ho,geoMercator:()=>Xs,geoMercatorRaw:()=>Gs,geoNaturalEarth1:()=>uc,geoNaturalEarth1Raw:()=>lc,geoOrthographic:()=>fc,geoOrthographicRaw:()=>hc,geoPath:()=>Es,geoProjection:()=>Rs,geoProjectionMutator:()=>Ps,geoRotation:()=>Co,geoStereographic:()=>pc,geoStereographicRaw:()=>dc,geoStream:()=>Ra,geoTransform:()=>Cs,geoTransverseMercator:()=>yc,geoTransverseMercatorRaw:()=>gc,gray:()=>Or,hcl:()=>Ur,hierarchy:()=>wc,histogram:()=>_,hsl:()=>Te,html:()=>Em,image:()=>qi,interpolate:()=>qe,interpolateArray:()=>Re,interpolateBasis:()=>Ae,interpolateBasisClosed:()=>Me,interpolateBlues:()=>qw,interpolateBrBG:()=>ew,interpolateBuGn:()=>bw,interpolateBuPu:()=>xw,interpolateCividis:()=>uf,interpolateCool:()=>nk,interpolateCubehelix:()=>i_,interpolateCubehelixDefault:()=>tk,interpolateCubehelixLong:()=>a_,interpolateDate:()=>Ye,interpolateDiscrete:()=>pl,interpolateGnBu:()=>kw,interpolateGreens:()=>Ww,interpolateGreys:()=>Vw,interpolateHcl:()=>n_,interpolateHclLong:()=>r_,interpolateHsl:()=>t_,interpolateHslLong:()=>e_,interpolateHue:()=>gl,interpolateInferno:()=>lk,interpolateLab:()=>_l,interpolateMagma:()=>ck,interpolateNumber:()=>ze,interpolateNumberArray:()=>Ie,interpolateObject:()=>Ue,interpolateOrRd:()=>Ew,interpolateOranges:()=>Kw,interpolatePRGn:()=>rw,interpolatePiYG:()=>aw,interpolatePlasma:()=>uk,interpolatePuBu:()=>Mw,interpolatePuBuGn:()=>Sw,interpolatePuOr:()=>sw,interpolatePuRd:()=>Dw,interpolatePurples:()=>Xw,interpolateRainbow:()=>hf,interpolateRdBu:()=>lw,interpolateRdGy:()=>hw,interpolateRdPu:()=>Bw,interpolateRdYlBu:()=>dw,interpolateRdYlGn:()=>gw,interpolateReds:()=>Qw,interpolateRgb:()=>wg,interpolateRgbBasis:()=>Eg,interpolateRgbBasisClosed:()=>Cg,interpolateRound:()=>yl,interpolateSinebow:()=>ff,interpolateSpectral:()=>mw,interpolateString:()=>je,interpolateTransformCss:()=>Wg,interpolateTransformSvg:()=>Hg,interpolateTurbo:()=>df,interpolateViridis:()=>sk,interpolateWarm:()=>ek,interpolateYlGn:()=>Rw,interpolateYlGnBu:()=>Iw,interpolateYlOrBr:()=>Yw,interpolateYlOrRd:()=>Uw,interpolateZoom:()=>vl,interrupt:()=>cn,interval:()=>Jd,isoFormat:()=>Qk,isoParse:()=>Jk,json:()=>Wi,keys:()=>Ar,lab:()=>Br,lch:()=>zr,line:()=>If,lineRadial:()=>qf,linkHorizontal:()=>Jf,linkRadial:()=>td,linkVertical:()=>Kf,local:()=>yf,map:()=>ky,matcher:()=>nt,max:()=>T,mean:()=>E,median:()=>C,merge:()=>S,min:()=>A,mouse:()=>Ve,namespace:()=>ct,namespaces:()=>ig,nest:()=>xr,now:()=>Ge,pack:()=>Hc,packEnclose:()=>Sc,packSiblings:()=>zc,pairs:()=>a,partition:()=>Jc,path:()=>xy,permute:()=>M,pie:()=>Yf,piecewise:()=>kl,pointRadial:()=>Wf,polygonArea:()=>El,polygonCentroid:()=>Cl,polygonContains:()=>Dl,polygonHull:()=>Nl,polygonLength:()=>Ol,precisionFixed:()=>Ta,precisionPrefix:()=>Ea,precisionRound:()=>Ca,quadtree:()=>ta,quantile:()=>x,quantize:()=>Tl,radialArea:()=>$f,radialLine:()=>qf,randomBates:()=>u_,randomExponential:()=>h_,randomIrwinHall:()=>l_,randomLogNormal:()=>c_,randomNormal:()=>s_,randomUniform:()=>o_,range:()=>g,rgb:()=>me,ribbon:()=>vr,scaleBand:()=>Rl,scaleDiverging:()=>nf,scaleDivergingLog:()=>rf,scaleDivergingPow:()=>of,scaleDivergingSqrt:()=>sf,scaleDivergingSymlog:()=>af,scaleIdentity:()=>Jl,scaleImplicit:()=>g_,scaleLinear:()=>Ql,scaleLog:()=>su,scaleOrdinal:()=>Fl,scalePoint:()=>Yl,scalePow:()=>yu,scaleQuantile:()=>vu,scaleQuantize:()=>bu,scaleSequential:()=>Xh,scaleSequentialLog:()=>Zh,scaleSequentialPow:()=>Jh,scaleSequentialQuantile:()=>tf,scaleSequentialSqrt:()=>Kh,scaleSequentialSymlog:()=>Qh,scaleSqrt:()=>mu,scaleSymlog:()=>hu,scaleThreshold:()=>_u,scaleTime:()=>Wh,scaleUtc:()=>Hh,scan:()=>N,schemeAccent:()=>Wx,schemeBlues:()=>jw,schemeBrBG:()=>tw,schemeBuGn:()=>vw,schemeBuPu:()=>_w,schemeCategory10:()=>$x,schemeDark2:()=>Hx,schemeGnBu:()=>ww,schemeGreens:()=>$w,schemeGreys:()=>Hw,schemeOrRd:()=>Tw,schemeOranges:()=>Jw,schemePRGn:()=>nw,schemePaired:()=>Vx,schemePastel1:()=>Gx,schemePastel2:()=>Xx,schemePiYG:()=>iw,schemePuBu:()=>Aw,schemePuBuGn:()=>Cw,schemePuOr:()=>ow,schemePuRd:()=>Nw,schemePurples:()=>Gw,schemeRdBu:()=>cw,schemeRdGy:()=>uw,schemeRdPu:()=>Ow,schemeRdYlBu:()=>fw,schemeRdYlGn:()=>pw,schemeReds:()=>Zw,schemeSet1:()=>Zx,schemeSet2:()=>Qx,schemeSet3:()=>Jx,schemeSpectral:()=>yw,schemeTableau10:()=>Kx,schemeYlGn:()=>Fw,schemeYlGnBu:()=>Lw,schemeYlOrBr:()=>Pw,schemeYlOrRd:()=>zw,select:()=>re,selectAll:()=>vf,selection:()=>cg,selector:()=>K,selectorAll:()=>et,set:()=>Ey,shuffle:()=>D,stack:()=>zd,stackOffsetDiverging:()=>jd,stackOffsetExpand:()=>Ud,stackOffsetNone:()=>Rd,stackOffsetSilhouette:()=>qd,stackOffsetWiggle:()=>$d,stackOrderAppearance:()=>Wd,stackOrderAscending:()=>Vd,stackOrderDescending:()=>Xd,stackOrderInsideOut:()=>Zd,stackOrderNone:()=>Pd,stackOrderReverse:()=>Qd,stratify:()=>el,style:()=>bt,sum:()=>O,svg:()=>Cm,symbol:()=>ed,symbolCircle:()=>Ek,symbolCross:()=>Ck,symbolDiamond:()=>Mk,symbolSquare:()=>Lk,symbolStar:()=>Bk,symbolTriangle:()=>Fk,symbolWye:()=>Uk,symbols:()=>jk,text:()=>zi,thresholdFreedmanDiaconis:()=>w,thresholdScott:()=>k,thresholdSturges:()=>b,tickFormat:()=>Xl,tickIncrement:()=>m,tickStep:()=>v,ticks:()=>y,timeDay:()=>W_,timeDays:()=>H_,timeFormat:()=>Ex,timeFormatDefaultLocale:()=>Uh,timeFormatLocale:()=>Su,timeFriday:()=>I_,timeFridays:()=>j_,timeHour:()=>G_,timeHours:()=>X_,timeInterval:()=>xu,timeMillisecond:()=>rx,timeMilliseconds:()=>ix,timeMinute:()=>Q_,timeMinutes:()=>J_,timeMonday:()=>D_,timeMondays:()=>P_,timeMonth:()=>k_,timeMonths:()=>T_,timeParse:()=>Cx,timeSaturday:()=>F_,timeSaturdays:()=>q_,timeSecond:()=>tx,timeSeconds:()=>ex,timeSunday:()=>N_,timeSundays:()=>R_,timeThursday:()=>L_,timeThursdays:()=>U_,timeTuesday:()=>O_,timeTuesdays:()=>Y_,timeWednesday:()=>B_,timeWednesdays:()=>z_,timeWeek:()=>N_,timeWeeks:()=>R_,timeYear:()=>__,timeYears:()=>x_,timeout:()=>nn,timer:()=>Qe,timerFlush:()=>Je,touch:()=>He,touches:()=>bf,transition:()=>Rn,transpose:()=>B,tree:()=>cl,treemap:()=>hl,treemapBinary:()=>fl,treemapDice:()=>Qc,treemapResquarify:()=>Jb,treemapSlice:()=>ll,treemapSliceDice:()=>dl,treemapSquarify:()=>Qb,tsv:()=>km,tsvFormat:()=>nm,tsvFormatBody:()=>rm,tsvFormatRow:()=>am,tsvFormatRows:()=>im,tsvFormatValue:()=>om,tsvParse:()=>tm,tsvParseRows:()=>em,utcDay:()=>_x,utcDays:()=>xx,utcFormat:()=>Sx,utcFriday:()=>ux,utcFridays:()=>mx,utcHour:()=>Yx,utcHours:()=>zx,utcMillisecond:()=>rx,utcMilliseconds:()=>ix,utcMinute:()=>jx,utcMinutes:()=>qx,utcMonday:()=>ox,utcMondays:()=>dx,utcMonth:()=>Fx,utcMonths:()=>Rx,utcParse:()=>Ax,utcSaturday:()=>hx,utcSaturdays:()=>vx,utcSecond:()=>tx,utcSeconds:()=>ex,utcSunday:()=>ax,utcSundays:()=>fx,utcThursday:()=>lx,utcThursdays:()=>yx,utcTuesday:()=>sx,utcTuesdays:()=>px,utcWednesday:()=>cx,utcWednesdays:()=>gx,utcWeek:()=>ax,utcWeeks:()=>fx,utcYear:()=>kx,utcYears:()=>Mx,values:()=>Mr,variance:()=>u,version:()=>jp,voronoi:()=>Ap,window:()=>gt,xml:()=>Tm,zip:()=>I,zoom:()=>Up,zoomIdentity:()=>lT,zoomTransform:()=>Op});var jp="5.16.0",qp=i(r),$p=qp.right,Wp=qp.left;const Hp=$p;var Vp=Array.prototype,Gp=Vp.slice,Xp=Vp.map,Zp=Math.sqrt(50),Qp=Math.sqrt(10),Jp=Math.sqrt(2),Kp=Array.prototype.slice,tg=1e-6,eg={value:function(){}};G.prototype=V.prototype={constructor:G,on:function(t,e){var n,r=this._,i=X(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a0)for(var n,r,i=new Array(n),a=0;a=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ag={},og=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ag={mouseenter:"mouseover",mouseleave:"mouseout"}));var sg=[null];ee.prototype=ne.prototype={constructor:ee,select:function(t){"function"!=typeof t&&(t=K(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i=x&&(x=_+1);!(b=m[x])&&++x=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=st);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a1?this.each((null==e?yt:"function"==typeof e?vt:mt)(t,e,null==n?"":n)):bt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?_t:"function"==typeof e?wt:xt)(t,e)):this.node()[t]},classed:function(t,e){var n=kt(t+"");if(arguments.length<2){for(var r=Tt(this.node()),i=-1,a=n.length;++i=240?t-240:t+120,i,r),Ce(t,i,r),Ce(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const wg=function uT(t){function e(t,e){var r=n((t=me(t)).r,(e=me(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Be(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}var n=function(t){return 1==(t=+t)?Be:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ne(isNaN(e)?n:e)}}(t);return e.gamma=uT,e}(1);var kg,Tg,Eg=Le(Ae),Cg=Le(Me),Sg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ag=new RegExp(Sg.source,"g"),Mg=0,Ng=0,Dg=0,Og=0,Bg=0,Lg=0,Ig="object"==typeof performance&&performance.now?performance:Date,Fg="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};Ze.prototype=Qe.prototype={constructor:Ze,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ge():+n)+(null==e?0:+e),this._next||Tg===this||(Tg?Tg._next=this:kg=this,Tg=this),this._call=t,this._time=n,en()},stop:function(){this._call&&(this._call=null,this._time=1/0,en())}};var Rg,Pg,Yg,zg,Ug=ng("start","end","cancel","interrupt"),jg=[],qg=180/Math.PI,$g={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Wg=un(function(t){return"none"===t?$g:(Rg||(Rg=document.createElement("DIV"),Pg=document.documentElement,Yg=document.defaultView),Rg.style.transform=t,t=Yg.getComputedStyle(Pg.appendChild(Rg),null).getPropertyValue("transform"),Pg.removeChild(Rg),ln(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))},"px, ","px)","deg)"),Hg=un(function(t){return null==t?$g:(zg||(zg=document.createElementNS("http://www.w3.org/2000/svg","g")),zg.setAttribute("transform",t),(t=zg.transform.baseVal.consolidate())?ln((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):$g)},", ",")",")"),Vg=cg.prototype.constructor,Gg=0,Xg=cg.prototype;Fn.prototype=Rn.prototype={constructor:Fn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=K(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;oby)if(Math.abs(u*s-c*l)>by&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((my-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>by&&(this._+="L"+(t+b*l)+","+(e+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>l*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,l=e+s,u=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+l:(Math.abs(this._x1-c)>by||Math.abs(this._y1-l)>by)&&(this._+="L"+c+","+l),n&&(h<0&&(h=h%vy+vy),h>_y?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=c)+","+(this._y1=l):h>by&&(this._+="A"+n+","+n+",0,"+ +(h>=my)+","+u+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const xy=fr;var wy="$";br.prototype=_r.prototype={constructor:br,has:function(t){return wy+t in this},get:function(t){return this[wy+t]},set:function(t,e){return this[wy+t]=e,this},remove:function(t){var e=wy+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===wy&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===wy&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===wy&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===wy&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===wy&&++t;return t},empty:function(){for(var t in this)if(t[0]===wy)return!1;return!0},each:function(t){for(var e in this)e[0]===wy&&t(this[e],e.slice(1),this)}};const ky=_r;var Ty=ky.prototype;Cr.prototype=Sr.prototype={constructor:Cr,has:Ty.has,add:function(t){return this[wy+(t+="")]=t,this},remove:Ty.remove,clear:Ty.clear,values:Ty.keys,size:Ty.size,empty:Ty.empty,each:Ty.each};const Ey=Sr;var Cy=Math.PI/180,Sy=180/Math.PI,Ay=.96422,My=.82521,Ny=4/29,Dy=6/29,Oy=3*Dy*Dy;ce(Lr,Br,le(ue,{brighter:function(t){return new Lr(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Lr(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new ve(Rr(3.1338561*(e=Ay*Fr(e))-1.6168667*(t=1*Fr(t))-.4906146*(n=My*Fr(n))),Rr(-.9787684*e+1.9161415*t+.033454*n),Rr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),ce(jr,Ur,le(ue,{brighter:function(t){return new jr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new jr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return qr(this).rgb()}}));var By=-.14861,Ly=1.78277,Iy=-.29227,Fy=-.90649,Ry=1.97294,Py=Ry*Fy,Yy=Ry*Ly,zy=Ly*Iy-Fy*By;ce(Hr,Wr,le(ue,{brighter:function(t){return t=null==t?ug:Math.pow(ug,t),new Hr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?lg:Math.pow(lg,t),new Hr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Cy,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new ve(255*(e+n*(By*r+Ly*i)),255*(e+n*(Iy*r+Fy*i)),255*(e+n*(Ry*r)),this.opacity)}}));var Uy=Array.prototype.slice,jy=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];si.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var qy={},$y={},Wy=yi(","),Hy=Wy.parse,Vy=Wy.parseRows,Gy=Wy.format,Xy=Wy.formatBody,Zy=Wy.formatRows,Qy=Wy.formatRow,Jy=Wy.formatValue,Ky=yi("\t"),tm=Ky.parse,em=Ky.parseRows,nm=Ky.format,rm=Ky.formatBody,im=Ky.formatRows,am=Ky.formatRow,om=Ky.formatValue,sm=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),cm=function hT(t){function e(e){return Math.pow(e,t)}return t=+t,e.exponent=hT,e}(3),lm=function fT(t){function e(e){return 1-Math.pow(1-e,t)}return t=+t,e.exponent=fT,e}(3),um=function dT(t){function e(e){return((e*=2)<=1?Math.pow(e,t):2-Math.pow(2-e,t))/2}return t=+t,e.exponent=dT,e}(3),hm=Math.PI,fm=hm/2,dm=7.5625,pm=1.70158,gm=function pT(t){function e(e){return(e=+e)*e*(t*(e-1)+e)}return t=+t,e.overshoot=pT,e}(pm),ym=function gT(t){function e(e){return--e*e*((e+1)*t+e)+1}return t=+t,e.overshoot=gT,e}(pm),mm=function yT(t){function e(e){return((e*=2)<1?e*e*((t+1)*e-t):(e-=2)*e*((t+1)*e+t)+2)/2}return t=+t,e.overshoot=yT,e}(pm),vm=2*Math.PI,bm=function mT(t,e){function n(n){return t*Ei(- --n)*Math.sin((r-n)/e)}var r=Math.asin(1/(t=Math.max(1,t)))*(e/=vm);return n.amplitude=function(t){return mT(t,e*vm)},n.period=function(e){return mT(t,e)},n}(1,.3),_m=function vT(t,e){function n(n){return 1-t*Ei(n=+n)*Math.sin((n+r)/e)}var r=Math.asin(1/(t=Math.max(1,t)))*(e/=vm);return n.amplitude=function(t){return vT(t,e*vm)},n.period=function(e){return vT(t,e)},n}(1,.3),xm=function bT(t,e){function n(n){return((n=2*n-1)<0?t*Ei(-n)*Math.sin((r-n)/e):2-t*Ei(n)*Math.sin((r+n)/e))/2}var r=Math.asin(1/(t=Math.max(1,t)))*(e/=vm);return n.amplitude=function(t){return bT(t,e*vm)},n.period=function(e){return bT(t,e)},n}(1,.3),wm=Ui(Hy),km=Ui(tm);const Tm=Hi("application/xml");var Em=Hi("text/html"),Cm=Hi("image/svg+xml"),Sm=ta.prototype=ea.prototype;Sm.copy=function(){var t,e,n=new ea(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=na(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=na(e));return n},Sm.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Zi(this.cover(e,n),e,n,t)},Sm.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,l=1/0,u=-1/0,h=-1/0;for(n=0;nu&&(u=r),ih&&(h=i));if(c>u||l>h)return this;for(this.cover(c,l).cover(u,h),n=0;nt||t>=i||r>e||e>=a;)switch(s=(ef||(a=c.y0)>d||(o=c.x1)=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-l],p[p.length-1-l]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_=(s=(p+y)/2))?p=s:y=s,(u=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=u<<1|l]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},Sm.removeAll=function(t){for(var e=0,n=t.length;e=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;va.prototype=ba.prototype,ba.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Dm={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return _a(100*t,e)},r:_a,s:function(t,e){var n=ya(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Am=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ya(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};var Om,Bm,Lm,Im=Array.prototype.map,Fm=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];ka({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Aa.prototype={constructor:Aa,reset:function(){this.s=this.t=0},add:function(t){Ma(pv,t,this.t),Ma(this,pv.s,this.s),this.s?this.t+=pv.t:this.s=pv.t},valueOf:function(){return this.s}};var Rm,Pm,Ym,zm,Um,jm,qm,$m,Wm,Hm,Vm,Gm,Xm,Zm,Qm,Jm,Km,tv,ev,nv,rv,iv,av,ov,sv,cv,lv,uv,hv,fv,dv,pv=new Aa,gv=1e-6,yv=1e-12,mv=Math.PI,vv=mv/2,bv=mv/4,_v=2*mv,xv=180/mv,wv=mv/180,kv=Math.abs,Tv=Math.atan,Ev=Math.atan2,Cv=Math.cos,Sv=Math.ceil,Av=Math.exp,Mv=(Math.floor,Math.log),Nv=Math.pow,Dv=Math.sin,Ov=Math.sign||function(t){return t>0?1:t<0?-1:0},Bv=Math.sqrt,Lv=Math.tan,Iv={Feature:function(t,e){La(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rgv?Wm=90:zv<-1e-6&&(qm=-90),Qm[0]=jm,Qm[1]=$m},sphere:function(){jm=-($m=180),qm=-(Wm=90)}},jv={sphere:Ba,point:so,lineStart:lo,lineEnd:fo,polygonStart:function(){jv.lineStart=po,jv.lineEnd=go},polygonEnd:function(){jv.lineStart=lo,jv.lineEnd=fo}};xo.invert=xo;var qv=Sa();const $v=Ro(function(){return!0},function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?mv:-mv,c=kv(a-n);kv(c-mv)0?vv:-vv),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=mv&&(kv(n-i)gv?Tv((Dv(e)*(a=Cv(r))*Dv(n)-Dv(r)*(i=Cv(e))*Dv(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}},function(t,e,n,r){var i;if(null==t)i=n*vv,r.point(-mv,i),r.point(0,i),r.point(mv,i),r.point(mv,0),r.point(mv,-i),r.point(0,-i),r.point(-mv,-i),r.point(-mv,0),r.point(-mv,i);else if(kv(t[0]-e[0])>gv){var a=t[0]fb&&(fb=t),edb&&(db=e)},lineStart:Ba,lineEnd:Ba,polygonStart:Ba,polygonEnd:Ba,result:function(){var t=[[ub,hb],[fb,db]];return fb=db=-(hb=ub=1/0),t}};var gb,yb,mb,vb,bb=0,_b=0,xb=0,wb=0,kb=0,Tb=0,Eb=0,Cb=0,Sb=0,Ab={point:hs,lineStart:fs,lineEnd:gs,polygonStart:function(){Ab.lineStart=ys,Ab.lineEnd=ms},polygonEnd:function(){Ab.point=hs,Ab.lineStart=fs,Ab.lineEnd=gs},result:function(){var t=Sb?[Eb/Sb,Cb/Sb]:Tb?[wb/Tb,kb/Tb]:xb?[bb/xb,_b/xb]:[NaN,NaN];return bb=_b=xb=wb=kb=Tb=Eb=Cb=Sb=0,t}};const Mb=Ab;_s.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,_v)}},result:Ba};var Nb,Db,Ob,Bb,Lb,Ib=Sa(),Fb={point:Ba,lineStart:function(){Fb.point=xs},lineEnd:function(){Nb&&ws(Db,Ob),Fb.point=Ba},polygonStart:function(){Nb=!0},polygonEnd:function(){Nb=null},result:function(){var t=+Ib;return Ib.reset(),t}};const Rb=Fb;ks.prototype={_radius:4.5,_circle:Ts(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Ts(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},As.prototype={constructor:As,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Pb=Cv(30*wv),Yb=Ss({point:function(t,e){this.stream.point(t*wv,e*wv)} +}),zb=$s(function(t){return Bv(2/(1+t))});zb.invert=Ws(function(t){return 2*Da(t/2)});var Ub=$s(function(t){return(t=Na(t))&&t/Dv(t)});Ub.invert=Ws(function(t){return t}),Gs.invert=function(t,e){return[t,2*Tv(Av(e))-vv]},tc.invert=tc;var jb=1.340264,qb=-.081106,$b=893e-6,Wb=.003796,Hb=Bv(3)/2;ic.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jb+qb*i+a*($b+Wb*i))-e)/(jb+3*qb*i+a*(7*$b+9*Wb*i)))*r)*i*i,!(kv(n)gv&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},hc.invert=Ws(Da),dc.invert=Ws(function(t){return 2*Tv(t)}),gc.invert=function(t,e){return[-e,2*Tv(Av(t))-vv]},Cc.prototype=wc.prototype={constructor:Cc,count:function(){return this.eachAfter(xc)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return wc(this).eachBefore(Tc)}};var Vb=Array.prototype.slice,Gb={depth:-1},Xb={};sl.prototype=Object.create(Cc.prototype);var Zb=(1+Math.sqrt(5))/2;const Qb=function _T(t){function e(e,n,r,i,a){ul(t,e,n,r,i,a)}return e.ratio=function(t){return _T((t=+t)>1?t:1)},e}(Zb),Jb=function xT(t){function e(e,n,r,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,c,l,u,h=-1,f=o.length,d=e.value;++h1?t:1)},e}(Zb);var Kb=Math.SQRT2;const t_=bl(Oe);var e_=bl(Be);const n_=xl(Oe);var r_=xl(Be);const i_=wl(Oe);var a_=wl(Be);const o_=function wT(t){function e(e,n){return e=null==e?0:+e,n=null==n?1:+n,1===arguments.length?(n=e,e=0):n-=e,function(){return t()*n+e}}return e.source=wT,e}(Bl),s_=function kT(t){function e(e,n){var r,i;return e=null==e?0:+e,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*t()-1,a=2*t()-1,i=r*r+a*a}while(!i||i>1);return e+n*a*Math.sqrt(-2*Math.log(i)/i)}}return e.source=kT,e}(Bl),c_=function TT(t){function e(){var e=s_.source(t).apply(this,arguments);return function(){return Math.exp(e())}}return e.source=TT,e}(Bl),l_=function ET(t){function e(e){return function(){for(var n=0,r=0;r0?xu(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};const __=b_;var x_=b_.range,w_=xu(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()});const k_=w_;var T_=w_.range,E_=1e3,C_=6e4,S_=36e5,A_=864e5,M_=6048e5,N_=wu(0),D_=wu(1),O_=wu(2),B_=wu(3),L_=wu(4),I_=wu(5),F_=wu(6),R_=N_.range,P_=D_.range,Y_=O_.range,z_=B_.range,U_=L_.range,j_=I_.range,q_=F_.range,$_=xu(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*C_)/A_},function(t){return t.getDate()-1});const W_=$_;var H_=$_.range,V_=xu(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*E_-t.getMinutes()*C_)},function(t,e){t.setTime(+t+e*S_)},function(t,e){return(e-t)/S_},function(t){return t.getHours()});const G_=V_;var X_=V_.range,Z_=xu(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*E_)},function(t,e){t.setTime(+t+e*C_)},function(t,e){return(e-t)/C_},function(t){return t.getMinutes()});const Q_=Z_;var J_=Z_.range,K_=xu(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*E_)},function(t,e){return(e-t)/E_},function(t){return t.getUTCSeconds()});const tx=K_;var ex=K_.range,nx=xu(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});nx.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?xu(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):nx:null};const rx=nx;var ix=nx.range,ax=ku(0),ox=ku(1),sx=ku(2),cx=ku(3),lx=ku(4),ux=ku(5),hx=ku(6),fx=ax.range,dx=ox.range,px=sx.range,gx=cx.range,yx=lx.range,mx=ux.range,vx=hx.range,bx=xu(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/A_},function(t){return t.getUTCDate()-1});const _x=bx;var xx=bx.range,wx=xu(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});wx.every=function(t){return isFinite(t=Math.floor(t))&&t>0?xu(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};const kx=wx;var Tx,Ex,Cx,Sx,Ax,Mx=wx.range,Nx={"-":"",_:" ",0:"0"},Dx=/^\s*\d+/,Ox=/^%/,Bx=/[\\^$*+?|[\]().{}]/g;Uh({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Lx=31536e6,Ix=xu(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()});const Fx=Ix;var Rx=Ix.range,Px=xu(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*S_)},function(t,e){return(e-t)/S_},function(t){return t.getUTCHours()});const Yx=Px;var zx=Px.range,Ux=xu(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*C_)},function(t,e){return(e-t)/C_},function(t){return t.getUTCMinutes()});const jx=Ux;var qx=Ux.range;const $x=cf("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Wx=cf("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Hx=cf("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Vx=cf("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Gx=cf("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Xx=cf("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Zx=cf("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Qx=cf("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Jx=cf("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Kx=cf("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");var tw=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(cf);const ew=lf(tw);var nw=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(cf);const rw=lf(nw);var iw=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(cf);const aw=lf(iw);var ow=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(cf);const sw=lf(ow);var cw=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(cf);const lw=lf(cw);var uw=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(cf);const hw=lf(uw);var fw=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(cf);const dw=lf(fw);var pw=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(cf);const gw=lf(pw);var yw=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(cf);const mw=lf(yw);var vw=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(cf);const bw=lf(vw);var _w=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(cf);const xw=lf(_w);var ww=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(cf);const kw=lf(ww);var Tw=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(cf);const Ew=lf(Tw);var Cw=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(cf);const Sw=lf(Cw);var Aw=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(cf);const Mw=lf(Aw);var Nw=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(cf);const Dw=lf(Nw);var Ow=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(cf);const Bw=lf(Ow);var Lw=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(cf);const Iw=lf(Lw);var Fw=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(cf);const Rw=lf(Fw);var Pw=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(cf);const Yw=lf(Pw);var zw=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(cf);const Uw=lf(zw);var jw=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(cf);const qw=lf(jw);var $w=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(cf);const Ww=lf($w);var Hw=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(cf);const Vw=lf(Hw);var Gw=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(cf);const Xw=lf(Gw);var Zw=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(cf);const Qw=lf(Zw);var Jw=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(cf);const Kw=lf(Jw),tk=a_(Wr(300,.5,0),Wr(-240,.5,1));var ek=a_(Wr(-100,.75,.35),Wr(80,1.5,.8)),nk=a_(Wr(260,.75,.35),Wr(80,1.5,.8)),rk=Wr(),ik=me(),ak=Math.PI/3,ok=2*Math.PI/3;const sk=pf(cf("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var ck=pf(cf("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),lk=pf(cf("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),uk=pf(cf("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),hk=0;mf.prototype=yf.prototype={constructor:mf,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var fk=Math.abs,dk=Math.atan2,pk=Math.cos,gk=Math.max,yk=Math.min,mk=Math.sin,vk=Math.sqrt,bk=1e-12,_k=Math.PI,xk=_k/2,wk=2*_k;Df.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var kk=Uf(Of);zf.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Tk=Array.prototype.slice;const Ek={draw:function(t,e){var n=Math.sqrt(e/_k);t.moveTo(n,0),t.arc(0,0,n,0,wk)}},Ck={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Sk=Math.sqrt(1/3),Ak=2*Sk;const Mk={draw:function(t,e){var n=Math.sqrt(e/Ak),r=n*Sk;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var Nk=Math.sin(_k/10)/Math.sin(7*_k/10),Dk=Math.sin(wk/10)*Nk,Ok=-Math.cos(wk/10)*Nk;const Bk={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Dk*n,i=Ok*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=wk*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},Lk={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var Ik=Math.sqrt(3);const Fk={draw:function(t,e){var n=-Math.sqrt(e/(3*Ik));t.moveTo(0,2*n),t.lineTo(-Ik*n,-n),t.lineTo(Ik*n,-n),t.closePath()}};var Rk=-.5,Pk=Math.sqrt(3)/2,Yk=1/Math.sqrt(12),zk=3*(Yk/2+1);const Uk={draw:function(t,e){var n=Math.sqrt(e/zk),r=n/2,i=n*Yk,a=r,o=n*Yk+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(Rk*r-Pk*i,Pk*r+Rk*i),t.lineTo(Rk*a-Pk*o,Pk*a+Rk*o),t.lineTo(Rk*s-Pk*c,Pk*s+Rk*c),t.lineTo(Rk*r+Pk*i,Rk*i-Pk*r),t.lineTo(Rk*a+Pk*o,Rk*o-Pk*a),t.lineTo(Rk*s+Pk*c,Rk*c-Pk*s),t.closePath()}};var jk=[Ek,Ck,Mk,Lk,Bk,Fk,Uk];id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:rd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},od.prototype={areaStart:nd,areaEnd:nd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:rd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:rd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ud.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const qk=function AT(t){function e(e){return 1===t?new id(e):new ud(e,t)}return e.beta=function(t){return AT(+t)},e}(.85);fd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:hd(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:hd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const $k=function MT(t){function e(e){return new fd(e,t)}return e.tension=function(t){return MT(+t)},e}(0);dd.prototype={areaStart:nd,areaEnd:nd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:hd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Wk=function NT(t){function e(e){return new dd(e,t)}return e.tension=function(t){return NT(+t)},e}(0);pd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:hd(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}} +;const Hk=function DT(t){function e(e){return new pd(e,t)}return e.tension=function(t){return DT(+t)},e}(0);yd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:gd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Vk=function OT(t){function e(e){return t?new yd(e,t):new fd(e,0)}return e.alpha=function(t){return OT(+t)},e}(.5);md.prototype={areaStart:nd,areaEnd:nd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Gk=function BT(t){function e(e){return t?new md(e,t):new dd(e,0)}return e.alpha=function(t){return BT(+t)},e}(.5);vd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gd(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Xk=function LT(t){function e(e){return t?new vd(e,t):new pd(e,0)}return e.alpha=function(t){return LT(+t)},e}(.5);bd.prototype={areaStart:nd,areaEnd:nd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ed.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Td(this,this._t0,kd(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Td(this,kd(this,n=wd(this,t,e)),n);break;default:Td(this,this._t0,n=wd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Cd.prototype=Object.create(Ed.prototype)).point=function(t,e){Ed.prototype.point.call(this,e,t)},Sd.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Nd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=Dd(t),i=Dd(e),a=0,o=1;o=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var Zk="%Y-%m-%dT%H:%M:%S.%LZ";const Qk=Date.prototype.toISOString?function(t){return t.toISOString()}:Sx(Zk);const Jk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Ax(Zk);np.prototype={constructor:np,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=op(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(ip(this,n),n=(t=n).U),n.C=!1,r.C=!0,ap(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(ap(this,n),n=(t=n).U),n.C=!1,r.C=!0,ip(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?op(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,ip(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,ap(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,ip(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,ap(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,ip(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,ap(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const Kk=np;var tT,eT,nT,rT,iT,aT=[],oT=[],sT=1e-6,cT=1e-12;Sp.prototype={constructor:Sp,polygons:function(){var t=this.edges;return this.cells.map(function(e){var n=e.halfedges.map(function(n){return dp(e,t[n])});return n.data=e.site.data,n})},triangles:function(){var t=[],e=this.edges;return this.cells.forEach(function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s=n.site,c=-1,l=e[i[a-1]],u=l.left===s?l.right:l.left;++c=s)return null;var c=t-i.site[0],l=e-i.site[1],u=c*c+l*l;do{i=a.cells[r=o],o=null,i.halfedges.forEach(function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],l=e-s[1],h=c*c+l*l;h{t.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(1138).time,notime:n(1138).notime},version:n(8177)}},2188:(t,e,n)=>{"use strict";var r=n(8436),i=n(4079);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),function(t){r.has(n,t.w)?e.push(t):a(t.w)}),delete n[o])}),e}(t);r.forEach(e,function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))})},undo:function(t){r.forEach(t.edges(),function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}})}}},1133:(t,e,n)=>{function r(t,e,n,r,i,o){var s={width:0,height:0,rank:o,borderType:e},c=i[e][o-1],l=a.addDummyNode(t,"border",s,n);i[e][o]=l,t.setParent(l,r),c&&t.setEdge(c,l,{weight:1})}var i=n(8436),a=n(1138);t.exports=function(t){i.forEach(t.children(),function e(n){var a=t.children(n),o=t.node(n);if(a.length&&i.forEach(a,e),i.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s{"use strict";function r(t){s.forEach(t.nodes(),function(e){i(t.node(e))}),s.forEach(t.edges(),function(e){i(t.edge(e))})}function i(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function o(t){var e=t.x;t.x=t.y,t.y=e}var s=n(8436);t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||r(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){s.forEach(t.nodes(),function(e){a(t.node(e))}),s.forEach(t.edges(),function(e){var n=t.edge(e);s.forEach(n.points,a),s.has(n,"y")&&a(n)})}(t),"lr"!==e&&"rl"!==e||(function(t){s.forEach(t.nodes(),function(e){o(t.node(e))}),s.forEach(t.edges(),function(e){var n=t.edge(e);s.forEach(n.points,o),s.has(n,"x")&&o(n)})}(t),r(t))}}},7822:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7570:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.forEach(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.forEach(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}}},574:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},4079:(t,e,n)=>{function r(t,e,n,r,o){var s=o?[]:void 0;return a.forEach(t.inEdges(r.v),function(r){var a=t.edge(r),c=t.node(r.v);o&&s.push({v:r.v,w:r.w}),c.out-=a,i(e,n,c)}),a.forEach(t.outEdges(r.v),function(r){var a=t.edge(r),o=r.w,s=t.node(o);s["in"]-=a,i(e,n,s)}),t.removeNode(r.v),s}function i(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var a=n(8436),o=n(574).Graph,s=n(7822);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new o,r=0,c=0;a.forEach(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),a.forEach(t.edges(),function(t){var i=n.edge(t.v,t.w)||0,a=e(t),o=i+a;n.setEdge(t.v,t.w,o),c=Math.max(c,n.node(t.v).out+=a),r=Math.max(r,n.node(t.w)["in"]+=a)});var l=a.range(c+r+3).map(function(){return new s}),u=r+1;return a.forEach(n.nodes(),function(t){i(l,u,n.node(t))}),{graph:n,buckets:l,zeroIdx:u}}(t,e||c),l=function(t,e,n){for(var i,a=[],o=e[e.length-1],s=e[0];t.nodeCount();){for(;i=s.dequeue();)r(t,e,n,i);for(;i=o.dequeue();)r(t,e,n,i);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(i=e[c].dequeue()){a=a.concat(r(t,e,n,i,!0));break}}return a}(n.graph,n.buckets,n.zeroIdx);return a.flatten(a.map(l,function(e){return t.outEdges(e.v,e.w)}),!0)};var c=a.constant(1)},8123:(t,e,n)=>{"use strict";function r(t,e){return a.mapValues(a.pick(t,e),Number)}function i(t){var e={};return a.forEach(t,function(t,n){e[n.toLowerCase()]=t}),e}var a=n(8436),o=n(2188),s=n(5995),c=n(8093),l=n(1138).normalizeRanks,u=n(4219),h=n(1138).removeEmptyRanks,f=n(2981),d=n(1133),p=n(3258),g=n(3408),y=n(7873),m=n(1138),v=n(574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?m.time:m.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return function(t){var e=new v({multigraph:!0,compound:!0}),n=i(t.graph());return e.setGraph(a.merge({},_,r(n,b),a.pick(n,x))),a.forEach(t.nodes(),function(n){var o=i(t.node(n));e.setNode(n,a.defaults(r(o,w),k)),e.setParent(n,t.parent(n))}),a.forEach(t.edges(),function(n){var o=i(t.edge(n));e.setEdge(n,a.merge({},E,r(o,T),a.pick(o,C)))}),e}(t)});n(" runLayout",function(){!function(t,e){e(" makeSpaceForEdgeLabels",function(){!function(t){var e=t.graph();e.ranksep/=2,a.forEach(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}(t)}),e(" removeSelfEdges",function(){!function(t){a.forEach(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}(t)}),e(" acyclic",function(){o.run(t)}),e(" nestingGraph.run",function(){f.run(t)}),e(" rank",function(){c(m.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){!function(t){a.forEach(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};m.addDummyNode(t,"edge-proxy",i,"_ep")}})}(t)}),e(" removeEmptyRanks",function(){h(t)}),e(" nestingGraph.cleanup",function(){f.cleanup(t)}),e(" normalizeRanks",function(){l(t)}),e(" assignRankMinMax",function(){!function(t){var e=0;a.forEach(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=a.max(e,r.maxRank))}),t.graph().maxRank=e}(t)}),e(" removeEdgeLabelProxies",function(){!function(t){a.forEach(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}(t)}),e(" normalize.run",function(){s.run(t)}),e(" parentDummyChains",function(){u(t)}),e(" addBorderSegments",function(){d(t)}),e(" order",function(){g(t)}),e(" insertSelfEdges",function(){!function(t){var e=m.buildLayerMatrix(t);a.forEach(e,function(e){var n=0;a.forEach(e,function(e,r){var i=t.node(e);i.order=r+n,a.forEach(i.selfEdges,function(e){m.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}(t)}),e(" adjustCoordinateSystem",function(){p.adjust(t)}),e(" position",function(){y(t)}),e(" positionSelfEdges",function(){!function(t){a.forEach(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}(t)}),e(" removeBorderNodes",function(){!function(t){a.forEach(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),o=t.node(a.last(n.borderLeft)),s=t.node(a.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(i.y-r.y),n.x=o.x+n.width/2,n.y=r.y+n.height/2}}),a.forEach(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}(t)}),e(" normalize.undo",function(){s.undo(t)}),e(" fixupEdgeLabelCoords",function(){!function(t){a.forEach(t.edges(),function(e){var n=t.edge(e);if(a.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}(t)}),e(" undoCoordinateSystem",function(){p.undo(t)}),e(" translateGraph",function(){!function(t){function e(t){var e=t.x,a=t.y,s=t.width,c=t.height;n=Math.min(n,e-s/2),r=Math.max(r,e+s/2),i=Math.min(i,a-c/2),o=Math.max(o,a+c/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,o=0,s=t.graph(),c=s.marginx||0,l=s.marginy||0;a.forEach(t.nodes(),function(n){e(t.node(n))}),a.forEach(t.edges(),function(n){var r=t.edge(n);a.has(r,"x")&&e(r)}),n-=c,i-=l,a.forEach(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),a.forEach(t.edges(),function(e){var r=t.edge(e);a.forEach(r.points,function(t){t.x-=n,t.y-=i}),a.has(r,"x")&&(r.x-=n),a.has(r,"y")&&(r.y-=i)}),s.width=r-n+c,s.height=o-i+l}(t)}),e(" assignNodeIntersects",function(){!function(t){a.forEach(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(m.intersectRect(a,n)),i.points.push(m.intersectRect(o,r))})}(t)}),e(" reversePoints",function(){!function(t){a.forEach(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}(t)}),e(" acyclic.undo",function(){o.undo(t)})}(e,n)}),n(" updateInputGraph",function(){!function(t,e){a.forEach(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),a.forEach(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,a.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)})})};var b=["nodesep","edgesep","ranksep","marginx","marginy"],_={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},x=["acyclicer","ranker","rankdir","align"],w=["width","height"],k={width:0,height:0},T=["minlen","weight","width","height","labeloffset"],E={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},C=["labelpos"]},8436:(t,e,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(t){}r||(r=window._),t.exports=r},2981:(t,e,n)=>{function r(t,e,n,o,s,c,l){var u=t.children(l);if(u.length){var h=a.addBorderNode(t,"_bt"),f=a.addBorderNode(t,"_bb"),d=t.node(l);t.setParent(h,l),d.borderTop=h,t.setParent(f,l),d.borderBottom=f,i.forEach(u,function(i){r(t,e,n,o,s,c,i);var a=t.node(i),u=a.borderTop?a.borderTop:i,d=a.borderBottom?a.borderBottom:i,p=a.borderTop?o:2*o,g=u!==d?1:s-c[l]+1;t.setEdge(h,u,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(l)||t.setEdge(e,h,{weight:0,minlen:s+c[l]})}else l!==e&&t.setEdge(e,l,{weight:0,minlen:n})}var i=n(8436),a=n(1138);t.exports={run:function(t){var e=a.addDummyNode(t,"root",{},"_root"),n=function(t){function e(r,a){var o=t.children(r);o&&o.length&&i.forEach(o,function(t){e(t,a+1)}),n[r]=a}var n={};return i.forEach(t.children(),function(t){e(t,1)}),n}(t),o=i.max(i.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,i.forEach(t.edges(),function(e){t.edge(e).minlen*=s});var c=function(t){return i.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}(t)+1;i.forEach(t.children(),function(i){r(t,e,s,c,o,n,i)}),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,i.forEach(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}}},5995:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,l=t.node(c).rank,u=e.name,h=t.edge(e),f=h.labelRank;if(l!==s+1){for(t.removeEdge(e),a=0,++s;s{var r=n(8436);t.exports=function(t,e,n){var i,a={};r.forEach(n,function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}})}},5439:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}},3128:(t,e,n)=>{var r=n(8436),i=n(574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(function(e){return t.node(e)});return r.forEach(t.nodes(),function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})}),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))}),o}},6630:(t,e,n)=>{"use strict";function r(t,e,n){for(var r=i.zipObject(n,i.map(n,function(t,e){return e})),a=i.flatten(i.map(e,function(e){return i.sortBy(i.map(t.outEdges(e),function(e){return{pos:r[e.w],weight:t.edge(e).weight}}),"pos")}),!0),o=1;o0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;l+=t.weight*n})),l}var i=n(8436);t.exports=function(t,e){for(var n=0,i=1;i{"use strict";function r(t,e,n){return o.map(e,function(e){return u(t,e,n)})}function i(t,e){var n=new f;o.forEach(t,function(t){var r=t.graph().root,i=l(t,r,n,e);o.forEach(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){o.forEach(e,function(e){o.forEach(e,function(e,n){t.node(e).order=n})})}var o=n(8436),s=n(2588),c=n(6630),l=n(1026),u=n(3128),h=n(5093),f=n(574).Graph,d=n(1138);t.exports=function(t){var e=d.maxRank(t),n=r(t,o.range(1,e+1),"inEdges"),l=r(t,o.range(e-1,-1,-1),"outEdges"),u=s(t);a(t,u);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){i(p%2?n:l,p%4>=2),u=d.buildLayerMatrix(t);var y=c(t,u);y{"use strict";var r=n(8436);t.exports=function(t){var e={},n=r.filter(t.nodes(),function(e){return!t.children(e).length}),i=r.max(r.map(n,function(e){return t.node(e).rank})),a=r.map(r.range(i+1),function(){return[]}),o=r.sortBy(n,function(e){return t.node(e).rank});return r.forEach(o,function s(n){if(!r.has(e,n)){e[n]=!0;var i=t.node(n);a[i.rank].push(n),r.forEach(t.successors(n),s)}}),a}},9567:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t,e){var n={};return r.forEach(t,function(t,e){var i=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)}),r.forEach(e.edges(),function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))}),function(t){function e(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0)}}function n(e){return function(n){n["in"].push(e),0==--n.indegree&&t.push(n)}}for(var i=[];t.length;){var a=t.pop();i.push(a),r.forEach(a["in"].reverse(),e(a)),r.forEach(a.out,n(a))}return r.map(r.filter(i,function(t){return!t.merged}),function(t){return r.pick(t,["vs","i","barycenter","weight"])})}(r.filter(n,function(t){return!t.indegree}))}},1026:(t,e,n)=>{var r=n(8436),i=n(5439),a=n(9567),o=n(7304);t.exports=function s(t,e,n,c){var l=t.children(e),u=t.node(e),h=u?u.borderLeft:void 0,f=u?u.borderRight:void 0,d={};h&&(l=r.filter(l,function(t){return t!==h&&t!==f}));var p=i(t,l);r.forEach(p,function(e){if(t.children(e.v).length){var i=s(t,e.v,n,c);d[e.v]=i,r.has(i,"barycenter")&&(a=e,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o});var g=a(p,n);!function(t,e){r.forEach(t,function(t){t.vs=r.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),t.predecessors(h).length)){var m=t.node(t.predecessors(h)[0]),v=t.node(t.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+v.order)/(y.weight+2),y.weight+=2}return y}},7304:(t,e,n)=>{function r(t,e,n){for(var r;e.length&&(r=i.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}var i=n(8436),a=n(1138);t.exports=function(t,e){var n,o=a.partition(t,function(t){return i.has(t,"barycenter")}),s=o.lhs,c=i.sortBy(o.rhs,function(t){return-t.i}),l=[],u=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycentere.barycenter?1:n?e.i-t.i:t.i-e.i})),f=r(l,c,f),i.forEach(s,function(t){f+=t.vs.length,l.push(t.vs),u+=t.barycenter*t.weight,h+=t.weight,f=r(l,c,f)});var d={vs:i.flatten(l,!0)};return h&&(d.barycenter=u/h,d.weight=h),d}},4219:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}),e}(t);r.forEach(t.graph().dummyChains,function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),l=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||l>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0;n!==i.w;){if(r=t.node(n),u){for(;(l=o[c])!==s&&t.node(l).maxRank{"use strict";function r(t,e){var n={};return f.reduce(e,function(e,r){var i=0,o=0,s=e.length,c=f.last(r);return f.forEach(r,function(e,l){var u=function(t,e){if(t.node(e).dummy)return f.find(t.predecessors(e),function(e){return t.node(e).dummy})}(t,e),h=u?t.node(u).order:s;(u||e===c)&&(f.forEach(r.slice(o,l+1),function(e){f.forEach(t.predecessors(e),function(r){var o=t.node(r),s=o.order;!(ss)&&a(r,e,c)})})}var r={};return f.reduce(e,function(e,r){var i,a=-1,o=0;return f.forEach(r,function(s,c){if("border"===t.node(s).dummy){var l=t.predecessors(s);l.length&&(i=t.node(l[0]).order,n(r,o,c,a,i),o=c,a=i)}n(r,o,r.length,i,e.length)}),r}),r}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function o(t,e,n){if(e>n){var r=e;e=n,n=r}return f.has(t[e],n)}function s(t,e,n,r){var i={},a={},s={};return f.forEach(e,function(t){f.forEach(t,function(t,e){i[t]=t,a[t]=t,s[t]=e})}),f.forEach(e,function(t){var e=-1;f.forEach(t,function(t){var c=r(t);if(c.length)for(var l=((c=f.sortBy(c,function(t){return s[t]})).length-1)/2,u=Math.floor(l),h=Math.ceil(l);u<=h;++u){var d=c[u];a[t]===t&&e{"use strict";var r=n(8436),i=n(1138),a=n(3573).positionX;t.exports=function(t){(function(t){ +var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,function(e){var i=r.max(r.map(e,function(e){return t.node(e).height}));r.forEach(e,function(e){t.node(e).y=a+i/2}),a+=i+n})})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),function(e,n){t.node(n).x=e})}},300:(t,e,n)=>{"use strict";function r(t,e){return o.forEach(t.nodes(),function n(r){o.forEach(e.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;t.hasNode(o)||c(e,i)||(t.setNode(o,{}),t.setEdge(r,o,{}),n(o))})}),t.nodeCount()}function i(t,e){return o.minBy(e.edges(),function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return c(e,n)})}function a(t,e,n){o.forEach(t.nodes(),function(t){e.node(t).rank+=n})}var o=n(8436),s=n(574).Graph,c=n(6681).slack;t.exports=function(t){var e,n=new s({directed:!1}),o=t.nodes()[0],l=t.nodeCount();for(n.setNode(o,{});r(n,t){"use strict";var r=n(6681).longestPath,i=n(300),a=n(2472);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){a(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t)}};var o=r},2472:(t,e,n)=>{"use strict";function r(t){t=v(t),g(t);var e,n=d(t);for(o(n),i(n,t);e=c(n);)u(n,t,e,l(n,t,e))}function i(t,e){var n=m(t,t.nodes());n=n.slice(0,n.length-1),f.forEach(n,function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=a(t,e,n)}(t,e,n)})}function a(t,e,n){var r=t.node(n).parent,i=!0,a=e.edge(n,r),o=0;return a||(i=!1,a=e.edge(r,n)),o=a.weight,f.forEach(e.nodeEdges(n),function(a){var s,c,l=a.v===n,u=l?a.w:a.v;if(u!==r){var h=l===i,f=e.edge(a).weight;if(o+=h?f:-f,s=n,c=u,t.hasEdge(s,c)){var d=t.edge(n,u).cutvalue;o+=h?-d:d}}}),o}function o(t,e){arguments.length<2&&(e=t.nodes()[0]),s(t,{},1,e)}function s(t,e,n,r,i){var a=n,o=t.node(r);return e[r]=!0,f.forEach(t.neighbors(r),function(i){f.has(e,i)||(n=s(t,e,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function c(t){return f.find(t.edges(),function(e){return t.edge(e).cutvalue<0})}function l(t,e,n){var r=n.v,i=n.w;e.hasEdge(r,i)||(r=n.w,i=n.v);var a=t.node(r),o=t.node(i),s=a,c=!1;a.lim>o.lim&&(s=o,c=!0);var l=f.filter(e.edges(),function(e){return c===h(0,t.node(e.v),s)&&c!==h(0,t.node(e.w),s)});return f.minBy(l,function(t){return p(e,t)})}function u(t,e,n,r){var a=n.v,s=n.w;t.removeEdge(a,s),t.setEdge(r.v,r.w,{}),o(t),i(t,e),function(t,e){var n=f.find(t.nodes(),function(t){return!e.node(t).parent}),r=y(t,n);r=r.slice(1),f.forEach(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}(t,e)}function h(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var f=n(8436),d=n(300),p=n(6681).slack,g=n(6681).longestPath,y=n(574).alg.preorder,m=n(574).alg.postorder,v=n(1138).simplify;t.exports=r,r.initLowLimValues=o,r.initCutValues=i,r.calcCutValue=a,r.leaveEdge=c,r.enterEdge=l,r.exchangeEdges=u},6681:(t,e,n)=>{"use strict";var r=n(8436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),function(e){return n(e.w)-t.edge(e).minlen}));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o})},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},1138:(t,e,n)=>{"use strict";function r(t,e,n,r){var i;do{i=a.uniqueId(r)}while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function i(t){return a.max(a.map(t.nodes(),function(e){var n=t.node(e).rank;if(!a.isUndefined(n))return n}))}var a=n(8436),o=n(574).Graph;t.exports={addDummyNode:r,simplify:function(t){var e=(new o).setGraph(t.graph());return a.forEach(t.nodes(),function(n){e.setNode(n,t.node(n))}),a.forEach(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e},asNonCompoundGraph:function(t){var e=new o({multigraph:t.isMultigraph()}).setGraph(t.graph());return a.forEach(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),a.forEach(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e},successorWeights:function(t){var e=a.map(t.nodes(),function(e){var n={};return a.forEach(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return a.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=a.map(t.nodes(),function(e){var n={};return a.forEach(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return a.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,l=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(o)*l?(s<0&&(l=-l),n=l*o/s,r=l):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=a.map(a.range(i(t)+1),function(){return[]});return a.forEach(t.nodes(),function(n){var r=t.node(n),i=r.rank;a.isUndefined(i)||(e[i][r.order]=n)}),e},normalizeRanks:function(t){var e=a.min(a.map(t.nodes(),function(e){return t.node(e).rank}));a.forEach(t.nodes(),function(n){var r=t.node(n);a.has(r,"rank")&&(r.rank-=e)})},removeEmptyRanks:function(t){var e=a.min(a.map(t.nodes(),function(e){return t.node(e).rank})),n=[];a.forEach(t.nodes(),function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;a.forEach(n,function(e,n){a.isUndefined(e)&&n%i!=0?--r:r&&a.forEach(e,function(e){t.node(e).rank+=r})})},addBorderNode:function(t,e,n,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=n,a.order=i),r(t,"border",a,e)},maxRank:i,partition:function(t,e){var n={lhs:[],rhs:[]};return a.forEach(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n},time:function(t,e){var n=a.now();try{return e()}finally{console.log(t+" time: "+(a.now()-n)+"ms")}},notime:function(t,e){return e()}}},8177:t=>{t.exports="0.8.5"},7856:function(t){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,n){return(e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function r(){return(r=n()?Reflect.construct:function(t,n,r){var i=[null];i.push.apply(i,n);var a=new(Function.bind.apply(t,i));return r&&e(a,r.prototype),a}).apply(null,arguments)}function i(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1?n-1:0),i=1;i/gm),W=y(/^data-[\-\w.\u00B7-\uFFFF]/),H=y(/^aria-[\-\w]+$/),V=y(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=y(/^(?:\w+script|data):/i),X=y(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Z=y(/^html$/i),Q=function(){return"undefined"==typeof window?null:window},J=function(e,n){if("object"!==t(e)||"function"!=typeof e.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var a="dompurify"+(r?"#"+r:"");try{return e.createPolicy(a,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+a+" could not be created."),null}};return function K(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Q(),n=function(t){return K(t)};if(n.version="2.3.8",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,a=e.document,o=e.DocumentFragment,u=e.HTMLTemplateElement,h=e.Node,f=e.Element,d=e.NodeFilter,p=e.NamedNodeMap,y=void 0===p?e.NamedNodeMap||e.MozNamedAttrMap:p,m=e.HTMLFormElement,v=e.DOMParser,b=e.trustedTypes,_=f.prototype,x=l(_,"cloneNode"),tt=l(_,"nextSibling"),et=l(_,"childNodes"),nt=l(_,"parentNode");if("function"==typeof u){var rt=a.createElement("template");rt.content&&rt.content.ownerDocument&&(a=rt.content.ownerDocument)}var it=J(b,r),at=it?it.createHTML(""):"",ot=a,st=ot.implementation,ct=ot.createNodeIterator,lt=ot.createDocumentFragment,ut=ot.getElementsByTagName,ht=r.importNode,ft={};try{ft=c(a).documentMode?a.documentMode:{}}catch(t){}var dt={};n.isSupported="function"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt,gt,yt=q,mt=$,vt=W,bt=H,_t=G,xt=X,wt=V,kt=null,Tt=s({},[].concat(i(O),i(B),i(L),i(F),i(P))),Et=null,Ct=s({},[].concat(i(Y),i(z),i(U),i(j))),St=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),At=null,Mt=null,Nt=!0,Dt=!0,Ot=!1,Bt=!1,Lt=!1,It=!1,Ft=!1,Rt=!1,Pt=!1,Yt=!1,zt=!0,Ut=!0,jt=!1,qt={},$t=null,Wt=s({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ht=null,Vt=s({},["audio","video","img","source","image","track"]),Gt=null,Xt=s({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Zt="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",Jt="http://www.w3.org/1999/xhtml",Kt=Jt,te=!1,ee=["application/xhtml+xml","text/html"],ne="text/html",re=null,ie=a.createElement("form"),ae=function(t){return t instanceof RegExp||t instanceof Function},oe=function(e){re&&re===e||(e&&"object"===t(e)||(e={}),e=c(e),kt="ALLOWED_TAGS"in e?s({},e.ALLOWED_TAGS):Tt,Et="ALLOWED_ATTR"in e?s({},e.ALLOWED_ATTR):Ct,Gt="ADD_URI_SAFE_ATTR"in e?s(c(Xt),e.ADD_URI_SAFE_ATTR):Xt,Ht="ADD_DATA_URI_TAGS"in e?s(c(Vt),e.ADD_DATA_URI_TAGS):Vt,$t="FORBID_CONTENTS"in e?s({},e.FORBID_CONTENTS):Wt,At="FORBID_TAGS"in e?s({},e.FORBID_TAGS):{},Mt="FORBID_ATTR"in e?s({},e.FORBID_ATTR):{},qt="USE_PROFILES"in e&&e.USE_PROFILES,Nt=!1!==e.ALLOW_ARIA_ATTR,Dt=!1!==e.ALLOW_DATA_ATTR,Ot=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Bt=e.SAFE_FOR_TEMPLATES||!1,Lt=e.WHOLE_DOCUMENT||!1,Rt=e.RETURN_DOM||!1,Pt=e.RETURN_DOM_FRAGMENT||!1,Yt=e.RETURN_TRUSTED_TYPE||!1,Ft=e.FORCE_BODY||!1,zt=!1!==e.SANITIZE_DOM,Ut=!1!==e.KEEP_CONTENT,jt=e.IN_PLACE||!1,wt=e.ALLOWED_URI_REGEXP||wt,Kt=e.NAMESPACE||Jt,e.CUSTOM_ELEMENT_HANDLING&&ae(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(St.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ae(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(St.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(St.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),pt=pt=-1===ee.indexOf(e.PARSER_MEDIA_TYPE)?ne:e.PARSER_MEDIA_TYPE,gt="application/xhtml+xml"===pt?function(t){return t}:E,Bt&&(Dt=!1),Pt&&(Rt=!0),qt&&(kt=s({},i(P)),Et=[],!0===qt.html&&(s(kt,O),s(Et,Y)),!0===qt.svg&&(s(kt,B),s(Et,z),s(Et,j)),!0===qt.svgFilters&&(s(kt,L),s(Et,z),s(Et,j)),!0===qt.mathMl&&(s(kt,F),s(Et,U),s(Et,j))),e.ADD_TAGS&&(kt===Tt&&(kt=c(kt)),s(kt,e.ADD_TAGS)),e.ADD_ATTR&&(Et===Ct&&(Et=c(Et)),s(Et,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&s(Gt,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&($t===Wt&&($t=c($t)),s($t,e.FORBID_CONTENTS)),Ut&&(kt["#text"]=!0),Lt&&s(kt,["html","head","body"]),kt.table&&(s(kt,["tbody"]),delete At.tbody),g&&g(e),re=e)},se=s({},["mi","mo","mn","ms","mtext"]),ce=s({},["foreignobject","desc","title","annotation-xml"]),le=s({},["title","style","font","a","script"]),ue=s({},B);s(ue,L),s(ue,I);var he=s({},F);s(he,R);var fe=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:Jt,tagName:"template"});var n=E(t.tagName),r=E(e.tagName);return t.namespaceURI===Qt?e.namespaceURI===Jt?"svg"===n:e.namespaceURI===Zt?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(ue[n]):t.namespaceURI===Zt?e.namespaceURI===Jt?"math"===n:e.namespaceURI===Qt?"math"===n&&ce[r]:Boolean(he[n]):t.namespaceURI===Jt&&!(e.namespaceURI===Qt&&!ce[r])&&!(e.namespaceURI===Zt&&!se[r])&&!he[n]&&(le[n]||!ue[n])},de=function(t){T(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(K){try{t.outerHTML=at}catch(K){t.remove()}}},pe=function(t,e){try{T(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){T(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!Et[t])if(Rt||Pt)try{de(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ge=function(t){var e,n;if(Ft)t=""+t;else{var r=C(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pt&&(t=''+t+"");var i=it?it.createHTML(t):t;if(Kt===Jt)try{e=(new v).parseFromString(i,pt)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(Kt,"template",null);try{e.documentElement.innerHTML=te?"":i}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),Kt===Jt?ut.call(e,Lt?"html":"body")[0]:Lt?e.documentElement:o},ye=function(t){return ct.call(t.ownerDocument||t,t,d.SHOW_ELEMENT|d.SHOW_COMMENT|d.SHOW_TEXT,null,!1)},me=function(t){return t instanceof m&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof y)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},ve=function(e){return"object"===t(h)?e instanceof h:e&&"object"===t(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},be=function(t,e,r){dt[t]&&w(dt[t],function(t){t.call(n,e,r,re)})},_e=function(t){var e;if(be("beforeSanitizeElements",t,null),me(t))return de(t),!0;if(N(/[\u0080-\uFFFF]/,t.nodeName))return de(t),!0;var r=gt(t.nodeName);if(be("uponSanitizeElement",t,{tagName:r,allowedTags:kt}),t.hasChildNodes()&&!ve(t.firstElementChild)&&(!ve(t.content)||!ve(t.content.firstElementChild))&&N(/<[/\w]/g,t.innerHTML)&&N(/<[/\w]/g,t.textContent))return de(t),!0;if("select"===r&&N(/