diff --git a/app/Http/Controllers/Admin/AdminSettingsController.php b/app/Http/Controllers/Admin/AdminSettingsController.php index ab5b838fc..9e1a685cd 100644 --- a/app/Http/Controllers/Admin/AdminSettingsController.php +++ b/app/Http/Controllers/Admin/AdminSettingsController.php @@ -11,41 +11,79 @@ use App\Util\Lexer\PrettyNumber; trait AdminSettingsController { - public function settings(Request $request) - { - return view('admin.settings.home'); - } + public function settings(Request $request) + { + return view('admin.settings.home'); + } - public function settingsBackups(Request $request) - { - $path = storage_path('app/'.config('app.name')); - $files = is_dir($path) ? new \DirectoryIterator($path) : []; - return view('admin.settings.backups', compact('files')); - } + public function settingsBackups(Request $request) + { + $path = storage_path('app/'.config('app.name')); + $files = is_dir($path) ? new \DirectoryIterator($path) : []; + return view('admin.settings.backups', compact('files')); + } - public function settingsConfig(Request $request) - { - $editor = []; - $config = file_get_contents(base_path('.env')); - return view('admin.settings.config', compact('editor', 'config')); - } + public function settingsConfig(Request $request) + { + $editor = config('pixelfed.admin.env_editor'); + $config = !$editor ? false : file_get_contents(base_path('.env')); + $backup = !$editor ? false : (is_file(base_path('.env.backup')) ? file_get_contents(base_path('.env.backup')) : false); + return view('admin.settings.config', compact('editor', 'config', 'backup')); + } - public function settingsMaintenance(Request $request) - { - return view('admin.settings.maintenance'); - } + public function settingsConfigStore(Request $request) + { + if(config('pixelfed.admin.env_editor') !== true) { + abort(400); + } + $res = $request->input('res'); - public function settingsStorage(Request $request) - { - $storage = []; - return view('admin.settings.storage', compact('storage')); - } + $old = file_get_contents(app()->environmentFilePath()); + if(empty($old) || $old != $res) { + $oldFile = fopen(app()->environmentFilePath().'.backup', 'w'); + fwrite($oldFile, $old); + fclose($oldFile); + } + + $file = fopen(app()->environmentFilePath(), 'w'); + fwrite($file, $res); + fclose($file); + Artisan::call('config:cache'); + return ['msg' => 200]; + } + + public function settingsConfigRestore(Request $request) + { + if(config('pixelfed.admin.env_editor') !== true) { + abort(400); + } + $res = file_get_contents(app()->environmentFilePath().'.backup'); + if(empty($res)) { + abort(400, 'No backup exists.'); + } + $file = fopen(app()->environmentFilePath(), 'w'); + fwrite($file, $res); + fclose($file); + Artisan::call('config:cache'); + return ['msg' => 200]; + } + + public function settingsMaintenance(Request $request) + { + return view('admin.settings.maintenance'); + } + + public function settingsStorage(Request $request) + { + $storage = []; + return view('admin.settings.storage', compact('storage')); + } + + public function settingsFeatures(Request $request) + { + return view('admin.settings.features'); + } - public function settingsFeatures(Request $request) - { - return view('admin.settings.features'); - } - public function settingsHomeStore(Request $request) { $this->validate($request, [ @@ -57,7 +95,7 @@ trait AdminSettingsController public function settingsPages(Request $request) { - $pages = Page::orderByDesc('updated_at')->paginate(10); + $pages = Page::orderByDesc('updated_at')->paginate(10); return view('admin.pages.home', compact('pages')); } @@ -66,35 +104,35 @@ trait AdminSettingsController return view('admin.pages.edit'); } - public function settingsSystem(Request $request) - { - $sys = [ - 'pixelfed' => config('pixelfed.version'), - 'php' => phpversion(), - 'laravel' => app()->version(), - ]; - switch (config('database.default')) { - case 'pgsql': - $sys['database'] = [ - 'name' => 'Postgres', - 'version' => explode(' ', DB::select(DB::raw('select version();'))[0]->version)[1] - ]; - break; + public function settingsSystem(Request $request) + { + $sys = [ + 'pixelfed' => config('pixelfed.version'), + 'php' => phpversion(), + 'laravel' => app()->version(), + ]; + switch (config('database.default')) { + case 'pgsql': + $sys['database'] = [ + 'name' => 'Postgres', + 'version' => explode(' ', DB::select(DB::raw('select version();'))[0]->version)[1] + ]; + break; - case 'mysql': - $sys['database'] = [ - 'name' => 'MySQL', - 'version' => DB::select( DB::raw("select version()") )[0]->{'version()'} - ]; - break; - - default: - $sys['database'] = [ - 'name' => 'Unknown', - 'version' => '?' - ]; - break; - } - return view('admin.settings.system', compact('sys')); - } + case 'mysql': + $sys['database'] = [ + 'name' => 'MySQL', + 'version' => DB::select( DB::raw("select version()") )[0]->{'version()'} + ]; + break; + + default: + $sys['database'] = [ + 'name' => 'Unknown', + 'version' => '?' + ]; + break; + } + return view('admin.settings.system', compact('sys')); + } } \ No newline at end of file diff --git a/config/pixelfed.php b/config/pixelfed.php index 7356fb2ed..301c53158 100644 --- a/config/pixelfed.php +++ b/config/pixelfed.php @@ -274,4 +274,8 @@ return [ 'sanitizer' => [ 'restrict_html_types' => env('RESTRICT_HTML_TYPES', true) ], + + 'admin' => [ + 'env_editor' => env('ADMIN_ENV_EDITOR', false) + ], ]; diff --git a/public/js/ace.js b/public/js/ace.js new file mode 100644 index 000000000..129d9185e --- /dev/null +++ b/public/js/ace.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{12:function(e,t,i){e.exports=i("HFBm")},B9Yq:function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},HFBm:function(e,t,i){(function(e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function e(t,i,n){"string"==typeof t?(2==arguments.length&&(n=i),e.modules[t]||(e.payloads[t]=n,e.modules[t]=null)):e.original?e.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var i,n,s=function(e,t,i){if("string"==typeof t){var n=r(e,t);if(null!=n)return i&&i(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],a=0,l=t.length;a1&&function(e,t,i){if(Array.prototype.indexOf)return e.indexOf(t,i);for(var n=i||0;n-1&&(i=RegExp(this.source,s.replace.call(((n=this).global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.extended?"x":"")+(n.sticky?"y":""),"g","")),s.replace.call(e.slice(a.index),i,function(){for(var e=1;ea.index&&this.lastIndex--}return a},r||(RegExp.prototype.test=function(e){var t=s.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(e,t,i){function s(){}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if("function"!=typeof t)throw new TypeError("Function.prototype.bind called on incompatible "+t);var i=g.call(arguments,1),n=function n(){if(this instanceof n){var s=t.apply(this,i.concat(g.call(arguments)));return Object(s)===s?s:this}return t.apply(e,i.concat(g.call(arguments)))};return t.prototype&&(s.prototype=t.prototype,n.prototype=new s,s.prototype=null),n});var o,r,a,l,h,c=Function.prototype.call,u=Array.prototype,d=Object.prototype,g=u.slice,f=c.bind(d.toString),m=c.bind(d.hasOwnProperty);if((h=m(d,"__defineGetter__"))&&(o=c.bind(d.__defineGetter__),r=c.bind(d.__defineSetter__),a=c.bind(d.__lookupGetter__),l=c.bind(d.__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,i=[];if(i.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"XXX"),i.length,t+1==i.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(g.call(arguments,2))):[]}}else Array.prototype.splice=function(e,t){var i=this.length;e>0?e>i&&(e=i):null==e?e=0:e<0&&(e=Math.max(i+e,0)),e+ta)for(u=h;u--;)this[l+u]=this[a+u];if(o&&e===c)this.length=c,this.push.apply(this,s);else for(this.length=c+o,u=0;u>>0;if("[object Function]"!=f(e))throw new TypeError;for(;++s>>0,s=Array(n),o=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var r=0;r>>0,o=[],r=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var a=0;a>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0,s=arguments[1];if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");for(var o=0;o>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var s,o=0;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o++];break}if(++o>=n)throw new TypeError("reduce of empty array with no initial value")}for(;o>>0;if("[object Function]"!=f(e))throw new TypeError(e+" is not a function");if(!n&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var s,o=n-1;if(arguments.length>=2)s=arguments[1];else for(;;){if(o in i){s=i[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}do{o in this&&(s=e.call(void 0,s,i[o],o,t))}while(o--);return s}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(e){var t=b&&"[object String]"==f(this)?this.split(""):O(this),i=t.length>>>0;if(!i)return-1;var n=0;for(arguments.length>1&&(n=_(arguments[1])),n=n>=0?n:Math.max(0,i+n);n>>0;if(!i)return-1;var n=i-1;for(arguments.length>1&&(n=Math.min(n,_(arguments[1]))),n=n>=0?n:i-Math.abs(n);n>=0;n--)if(n in t&&e===t[n])return n;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:d)}),!Object.getOwnPropertyDescriptor){Object.getOwnPropertyDescriptor=function(e,t){if("object"!=n(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.getOwnPropertyDescriptor called on a non-object: "+e);if(m(e,t)){var i;if(i={enumerable:!0,configurable:!0},h){var s=e.__proto__;e.__proto__=d;var o=a(e,t),r=l(e,t);if(e.__proto__=s,o||r)return o&&(i.get=o),r&&(i.set=r),i}return i.value=e[t],i}}}(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)}),Object.create)||(v=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 i;if(null===e)i=v();else{if("object"!=n(e))throw new TypeError("typeof prototype["+n(e)+"] != 'object'");var s=function(){};s.prototype=e,(i=new s).__proto__=e}return void 0!==t&&Object.defineProperties(i,t),i});function y(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(e){}}if(Object.defineProperty){var S=y({}),C="undefined"==typeof document||y(document.createElement("div"));if(!S||!C)var x=Object.defineProperty}if(!Object.defineProperty||x){Object.defineProperty=function(e,t,i){if("object"!=n(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.defineProperty called on non-object: "+e);if("object"!=n(i)&&"function"!=typeof i||null===i)throw new TypeError("Property description must be an object: "+i);if(x)try{return x.call(Object,e,t,i)}catch(e){}if(m(i,"value"))if(h&&(a(e,t)||l(e,t))){var s=e.__proto__;e.__proto__=d,delete e[t],e[t]=i.value,e.__proto__=s}else e[t]=i.value;else{if(!h)throw new TypeError("getters & setters can not be defined on this javascript engine");m(i,"get")&&o(e,t,i.get),m(i,"set")&&r(e,t,i.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var i in t)m(t,i)&&Object.defineProperty(e,i,t[i]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(e){Object.freeze=(w=Object.freeze,function(e){return"function"==typeof e?e:w(e)})}if(Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;for(var t="";m(e,t);)t+="?";e[t]=!0;var i=m(e,t);return delete e[t],i}),!Object.keys){var A=!0,k=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],L=k.length;for(var R in{toString:null})A=!1;Object.keys=function(e){if("object"!=n(e)&&"function"!=typeof e||null===e)throw new TypeError("Object.keys called on a non-object");var t=[];for(var i in e)m(e,i)&&t.push(i);if(A)for(var s=0,o=L;s0||-1)*Math.floor(Math.abs(e))),e}var O=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(e,t,i){"use strict";e("./regexp"),e("./es5-shim"),"undefined"==typeof Element||Element.prototype.remove||Object.defineProperty(Element.prototype,"remove",{enumerable:!1,writable:!0,configurable:!0,value:function(){this.parentNode&&this.parentNode.removeChild(this)}})}),ace.define("ace/lib/useragent",["require","exports","module"],function(e,t,i){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var s="object"==("undefined"==typeof navigator?"undefined":n(navigator))?navigator:{},o=(/mac|win|linux/i.exec(s.platform)||["other"])[0].toLowerCase(),r=s.userAgent||"",a=s.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==("undefined"==typeof opera?"undefined":n(opera))&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isIPad=r.indexOf("iPad")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIPad||t.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,t,i){"use strict";var s=e("./useragent");if(t.buildDom=function e(t,i,s){if("string"==typeof t&&t){var o=document.createTextNode(t);return i&&i.appendChild(o),o}if(!Array.isArray(t))return t;if("string"!=typeof t[0]||!t[0]){for(var r=[],a=0;a=1.5,"undefined"!=typeof document){var o=document.createElement("div");t.HI_DPI&&void 0!==o.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),s.isEdge||void 0===o.style.animationName||(t.HAS_CSS_ANIMATION=!0),o=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,i){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(i)+"px)"}:t.translate=function(e,t,i){e.style.top=Math.round(i)+"px",e.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(e,t,i){"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 i in t)e[i]=t[i];return e},t.implement=function(e,i){t.mixin(e,i)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./oop"),s=function(){var e,t,i={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},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,s),t.keyCodeToString=function(e){var t=s[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,i){"use strict";var s=e("./keys"),o=e("./useragent"),r=null,a=0;t.addListener=function(e,t,i){if(e.addEventListener)return e.addEventListener(t,i,!1);if(e.attachEvent){var n=function(){i.call(e,window.event)};i._wrapper=n,e.attachEvent("on"+t,n)}},t.removeListener=function(e,t,i){if(e.removeEventListener)return e.removeEventListener(t,i,!1);e.detachEvent&&e.detachEvent("on"+t,i._wrapper||i)},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||o.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.preventDefault?e.button:{1:0,2:2,4:1}[e.button]},t.capture=function(e,i,n){function s(e){i&&i(e),n&&n(e),t.removeListener(document,"mousemove",i,!0),t.removeListener(document,"mouseup",s,!0),t.removeListener(document,"dragstart",s,!0)}return t.addListener(document,"mousemove",i,!0),t.addListener(document,"mouseup",s,!0),t.addListener(document,"dragstart",s,!0),s},t.addMouseWheelListener=function(e,i){"onmousewheel"in e?t.addListener(e,"mousewheel",function(e){void 0!==e.wheelDeltaX?(e.wheelX=-e.wheelDeltaX/8,e.wheelY=-e.wheelDeltaY/8):(e.wheelX=0,e.wheelY=-e.wheelDelta/8),i(e)}):"onwheel"in e?t.addListener(e,"wheel",function(e){switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.35*e.deltaX||0,e.wheelY=.35*e.deltaY||0;break;case e.DOM_DELTA_LINE:case e.DOM_DELTA_PAGE:e.wheelX=5*(e.deltaX||0),e.wheelY=5*(e.deltaY||0)}i(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)),i(e)})},t.addMultiMouseDownListener=function(e,i,n,s){var r,a,l,h=0,c={2:"dblclick",3:"tripleclick",4:"quadclick"};function u(e){if(0!==t.getButton(e)?h=0:e.detail>1?++h>4&&(h=1):h=1,o.isIE){var u=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-a)>5;l&&!u||(h=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),1==h&&(r=e.clientX,a=e.clientY)}if(e._clicks=h,n[s]("mousedown",e),h>4)h=0;else if(h>1)return n[s](c[h],e)}function d(e){h=2,l&&clearTimeout(l),l=setTimeout(function(){l=null},i[h-1]||600),n[s]("mousedown",e),n[s](c[h],e)}Array.isArray(e)||(e=[e]),e.forEach(function(e){t.addListener(e,"mousedown",u),o.isOldIE&&t.addListener(e,"dblclick",d)})};var l=!o.isMac||!o.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)};function h(e,t,i){var n=l(t);if(!o.isMac&&r){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),r.altGr){if(3==(3&n))return;r.altGr=0}if(18===i||17===i){var h="location"in t?t.location:t.keyLocation;if(17===i&&1===h)1==r[i]&&(a=t.timeStamp);else if(18===i&&3===n&&2===h){t.timeStamp-a<50&&(r.altGr=!0)}}}if((i in s.MODIFIER_KEYS&&(i=-1),8&n&&i>=91&&i<=93&&(i=-1),!n&&13===i)&&(3===(h="location"in t?t.location:t.keyLocation)&&(e(t,n,-i),t.defaultPrevented)))return;if(o.isChromeOS&&8&n){if(e(t,n,i),t.defaultPrevented)return;n&=-9}return!!(n||i in s.FUNCTION_KEYS||i in s.PRINTABLE_KEYS)&&e(t,n,i)}function c(){r=Object.create(null)}if(t.getModifierString=function(e){return s.KEY_MODS[l(e)]},t.addCommandKeyListener=function(e,i){var n=t.addListener;if(o.isOldGecko||o.isOpera&&!("KeyboardEvent"in window)){var s=null;n(e,"keydown",function(e){s=e.keyCode}),n(e,"keypress",function(e){return h(i,e,s)})}else{var a=null;n(e,"keydown",function(e){r[e.keyCode]=(r[e.keyCode]||0)+1;var t=h(i,e,e.keyCode);return a=e.defaultPrevented,t}),n(e,"keypress",function(e){a&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),a=null)}),n(e,"keyup",function(e){r[e.keyCode]=null}),r||(c(),n(window,"focus",c))}},"object"==("undefined"==typeof window?"undefined":n(window))&&window.postMessage&&!o.isOldIE){var u=1;t.nextTick=function(e,i){i=i||window;var n="zero-timeout-message-"+u++;t.addListener(i,"message",function s(o){o.data==n&&(t.stopPropagation(o),t.removeListener(i,"message",s),e())}),i.postMessage(n,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,i){return setTimeout(function i(){t.$idleBlocked?setTimeout(i,100):e()},i)},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"==("undefined"==typeof window?"undefined":n(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,i){"use strict";var s=function(e,t,i,n){this.start={row:e,column:t},this.end={row:i,column:n}};(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,i=e.end,n=e.start;return 1==(t=this.compare(i.row,i.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.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"==n(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"==n(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 i={row:t+1,column:0};else if(this.end.rowt)var n={row:t+1,column:0};else if(this.start.row0;)1&t&&(i+=e),(t>>=1)&&(e+=e);return i};var s=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(s,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var i in e)t[i]=e[i];return t},t.copyArray=function(e){for(var t=[],i=0,s=e.length;i63,c=e("../lib/keys"),u=c.KEY_MODS,d=s.isIOS,g=d?/\s/:/\n/;t.TextInput=function(e,t){var i=o.createElement("textarea");i.className="ace_text-input",i.setAttribute("wrap","off"),i.setAttribute("autocorrect","off"),i.setAttribute("autocapitalize","off"),i.setAttribute("spellcheck",!1),i.style.opacity="0",e.insertBefore(i,e.firstChild);var f=!1,m=!1,p=!1,v=!1,w="";s.isMobile||(i.style.fontSize="1px");var $=!1,b=!1,y="",S=0,C=0;try{var x=document.activeElement===i}catch(e){}n.addListener(i,"blur",function(e){b||(t.onBlur(e),x=!1)}),n.addListener(i,"focus",function(e){if(!b){if(x=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(A):A()}}),this.$focusScroll=!1,this.focus=function(){if(w||h||"browser"==this.$focusScroll)return i.focus({preventScroll:!0});var e=i.style.top;i.style.position="fixed",i.style.top="0px";try{var t=0!=i.getBoundingClientRect().top}catch(e){return}var n=[];if(t)for(var s=i.parentElement;s&&1==s.nodeType;)n.push(s),s.setAttribute("ace_nocontext",!0),s=!s.parentElement&&s.getRootNode?s.getRootNode().host:s.parentElement;i.focus({preventScroll:!0}),t&&n.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){i.style.position="","0px"==i.style.top&&(i.style.top=e)},0)},this.blur=function(){i.blur()},this.isFocused=function(){return x},t.on("beforeEndOperation",function(){t.curOp&&"insertstring"==t.curOp.command.name||(p&&(y=i.value="",W()),A())});var A=d?function(e){if(x&&(!f||e)&&!v){e||(e="");var n="\n ab"+e+"cde fg\n";n!=i.value&&(i.value=y=n);var s=4+(e.length||(t.selection.isEmpty()?0:1));4==S&&C==s||i.setSelectionRange(4,s),S=4,C=s}}:function(){if(!p&&!v&&(x||L)){p=!0;var e=t.selection,n=e.getRange(),s=e.cursor.row,o=n.start.column,r=n.end.column,a=t.session.getLine(s);if(n.start.row!=s){var l=t.session.getLine(s-1);o=n.start.rows+1?h.length:r,r+=a.length+1,a=a+"\n"+h}a.length>400&&(o<400&&r<400?a=a.slice(0,400):(a="\n",o=0,r=1));var c=a+"\n\n";if(c!=y&&(i.value=y=c,S=C=c.length),L&&(S=i.selectionStart,C=i.selectionEnd),C!=r||S!=o||i.selectionEnd!=C)try{i.setSelectionRange(o,r),S=o,C=r}catch(e){}p=!1}};x&&t.onFocus();var k=null;this.setInputHandler=function(e){k=e},this.getInputHandler=function(){return k};var L=!1,R=function(e,n){if(L&&(L=!1),m)return A(),e&&t.onPaste(e),m=!1,"";for(var s=i.selectionStart,o=i.selectionEnd,r=S,a=y.length-C,l=e,h=e.length-s,c=e.length-o,u=0;r>0&&y[u]==e[u];)u++,r--;for(l=l.slice(u),u=1;a>0&&y.length-u>S-1&&y[y.length-u]==e[e.length-u];)u++,a--;return h-=u-1,c-=u-1,l=l.slice(0,l.length-u+1),n||h!=l.length||r||a||c?(v=!0,l&&!r&&!a&&!h&&!c||$?t.onTextInput(l):t.onTextInput(l,{extendLeft:r,extendRight:a,restoreStart:h,restoreEnd:c}),v=!1,y=e,S=s,C=o,l):""},E=function(e){if(p)return I();var t=i.value,n=R(t,!0);(t.length>500||g.test(n))&&A()},M=function e(t,i,n){var s=t.clipboardData||window.clipboardData;if(s&&!a){var o=l||n?"Text":"text/plain";try{return i?!1!==s.setData(o,i):s.getData(o)}catch(t){if(!n)return e(t,i,!0)}}},T=function(e,s){var o=t.getCopyText();if(!o)return n.preventDefault(e);M(e,o)?(d&&(A(o),f=o,setTimeout(function(){f=!1},10)),s?t.onCut():t.onCopy(),n.preventDefault(e)):(f=!0,i.value=o,i.select(),setTimeout(function(){f=!1,A(),s?t.onCut():t.onCopy()}))},_=function(e){T(e,!0)},O=function(e){T(e,!1)},F=function(e){var o=M(e);"string"==typeof o?(o&&t.onPaste(o,e),s.isIE&&setTimeout(A),n.preventDefault(e)):(i.value="",m=!0)};n.addCommandKeyListener(i,t.onCommandKey.bind(t)),n.addListener(i,"select",function(e){p||(f?f=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=y.length&&e.value===y&&y&&e.selectionEnd!==C}(i)&&(t.selectAll(),A()))}),n.addListener(i,"input",E),n.addListener(i,"cut",_),n.addListener(i,"copy",O),n.addListener(i,"paste",F),"oncut"in i&&"oncopy"in i&&"onpaste"in i||n.addListener(e,"keydown",function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:O(e);break;case 86:F(e);break;case 88:_(e)}});var I=function(){if(p&&t.onCompositionUpdate&&!t.$readOnly){if($)return B();if(p.useTextareaForIME)t.onCompositionUpdate(i.value);else{var e=i.value;R(e),p.markerRange&&(p.context&&(p.markerRange.start.column=p.selectionStart=p.context.compositionStartOffset),p.markerRange.end.column=p.markerRange.start.column+C-p.selectionStart)}}},W=function(e){t.onCompositionEnd&&!t.$readOnly&&(p=!1,t.onCompositionEnd(),t.off("mousedown",B),e&&E())};function B(){b=!0,i.blur(),i.focus(),b=!1}var D,H=r.delayedCall(I,50).schedule.bind(null,null);function P(){clearTimeout(D),D=setTimeout(function(){w&&(i.style.cssText=w,w=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()},0)}n.addListener(i,"compositionstart",function(e){if(!p&&t.onCompositionStart&&!t.$readOnly&&(p={},!$)){setTimeout(I,0),t.on("mousedown",B);var n=t.getSelectionRange();n.end.row=n.start.row,n.end.column=n.start.column,p.markerRange=n,p.selectionStart=S,t.onCompositionStart(p),p.useTextareaForIME?(i.value="",y="",S=0,C=0):(i.msGetInputContext&&(p.context=i.msGetInputContext()),i.getInputContext&&(p.context=i.getInputContext()))}}),n.addListener(i,"compositionupdate",I),n.addListener(i,"keyup",function(e){27==e.keyCode&&i.value.lengthC&&"\n"==y[o]?r=c.end:nC&&y.slice(0,o).split("\n").length>2?r=c.down:o>C&&" "==y[o-1]?(r=c.right,a=u.option):(o>C||o==C&&C!=S&&n==o)&&(r=c.right),n!==o&&(a|=u.shift),r&&(t.onCommandKey(null,a,r),S=n,C=o,A(""))}};document.addEventListener("selectionchange",o),t.on("destroy",function(){document.removeEventListener("selectionchange",o)})}(0,t,i)}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/useragent");function s(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 o(e,t){if(e.start.row==e.end.row)var i=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)i=2*t.row-e.start.row-e.end.row;else var i=t.column-4;return i<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}(function(){this.onMouseDown=function(e){var t=e.inSelection(),i=e.getDocumentPosition();this.mousedownEvent=e;var s=this.editor,o=e.getButton();return 0!==o?((s.getSelectionRange().isEmpty()||1==o)&&s.selection.moveToPosition(i),void(2==o&&(s.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||s.isFocused()||(s.focus(),!this.$focusTimeout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(i,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 i=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?i.selection.selectToPosition(e):t||i.selection.moveToPosition(e),t||this.select(),i.renderer.scroller.setCapture&&i.renderer.scroller.setCapture(),i.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,t=this.editor,i=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(i);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,i);i=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(i),t.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var t,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y),s=i.selection[e](n.row,n.column);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(s.start),a=this.$clickSelection.comparePoint(s.end);if(-1==r&&a<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==a&&r>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==r&&1==a)n=s.end,t=s.start;else{var l=o(this.$clickSelection,n);n=l.cursor,t=l.anchor}i.selection.setSelectionAnchor(t.row,t.column)}i.selection.selectToPosition(n),i.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,t,i,n,s=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,i=this.x,n=this.y,Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))),o=Date.now();(s>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var t=e.getDocumentPosition(),i=this.editor,n=i.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=i.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},this.onTripleClick=function(e){var t=e.getDocumentPosition(),i=this.editor;this.setState("selectByLines");var n=i.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=i.selection.getLineRange(n.start.row),this.$clickSelection.end=i.selection.getLineRange(n.end.row).end):this.$clickSelection=i.selection.getLineRange(t.row),this.select()},this.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.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 i=this.$lastScroll,n=e.domEvent.timeStamp,s=n-i.t,o=s?e.wheelX/s:i.vx,r=s?e.wheelY/s:i.vy;s<550&&(o=(o+i.vx)/2,r=(r+i.vy)/2);var a=Math.abs(o/r),l=!1;if(a>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(l=!0),a<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(l=!0),l)i.allowed=n;else if(n-i.allowed<550){Math.abs(o)<=1.5*Math.abs(i.vx)&&Math.abs(r)<=1.5*Math.abs(i.vy)?(l=!0,i.allowed=n):i.allowed=0}return i.t=n,i.vx=o,i.vy=r,l?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}}}).call(s.prototype),t.DefaultHandlers=s}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(e,t,i){"use strict";e("./lib/oop");var n=e("./lib/dom");function s(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}(function(){this.$init=function(){return this.$element=n.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(e){this.getElement().textContent=e},this.setHtml=function(e){this.getElement().innerHTML=e},this.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},this.setClassName=function(e){n.addCssClass(this.getElement(),e)},this.show=function(e,t,i){null!=e&&this.setText(e),null!=t&&null!=i&&this.setPosition(t,i),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(s.prototype),t.Tooltip=s}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/event"),r=e("../tooltip").Tooltip;function a(e){r.call(this,e)}s.inherits(a,r),function(){this.setPosition=function(e,t){var i=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();(e+=15)+s>i&&(e-=e+s-i),(t+=15)+o>n&&(t-=20+o),r.prototype.setPosition.call(this,e,t)}}.call(a.prototype),t.GutterHandler=function(e){var t,i,s,r=e.editor,l=r.renderer.$gutterLayer,h=new a(r.container);function c(){t&&(t=clearTimeout(t)),s&&(h.hide(),s=null,r._signal("hideGutterTooltip",h),r.removeEventListener("mousewheel",c))}function u(e){h.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",function(t){if(r.isFocused()&&0==t.getButton()&&"foldWidgets"!=l.getRegion(t)){var i=t.getDocumentPosition().row,n=r.session.selection;if(t.getShiftKey())n.selectTo(i,0);else{if(2==t.domEvent.detail)return r.selectAll(),t.preventDefault();e.$clickSelection=r.selection.getLineRange(i)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}),e.editor.setDefaultHandler("guttermousemove",function(o){var a=o.domEvent.target||o.domEvent.srcElement;if(n.hasCssClass(a,"ace_fold-widget"))return c();s&&e.$tooltipFollowsMouse&&u(o),i=o,t||(t=setTimeout(function(){t=null,i&&!e.isMousePressed?function(){var t=i.getDocumentPosition().row,n=l.$annotations[t];if(!n)return c();if(t==r.session.getLength()){var o=r.renderer.pixelToScreenCoordinates(0,i.y).row,a=i.$pos;if(o>r.session.documentToScreenRow(a.row,a.column))return c()}if(s!=n)if(s=n.text.join("
"),h.setHtml(s),h.show(),r._signal("showGutterTooltip",h),r.on("mousewheel",c),e.$tooltipFollowsMouse)u(i);else{var d=i.domEvent.target.getBoundingClientRect(),g=h.getElement().style;g.left=d.right+"px",g.top=d.bottom+"px"}}():c()},50))}),o.addListener(r.renderer.$gutter,"mouseout",function(e){i=null,s&&!t&&(t=setTimeout(function(){t=null,c()},50))}),r.on("changeSession",c)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,i){"use strict";var n=e("../lib/event"),s=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=s.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,i){"use strict";var n=e("../lib/dom"),s=e("../lib/event"),o=e("../lib/useragent"),r=200,a=200,l=5;function h(e){var t=e.editor,i=n.createElement("img");i.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",o.isOpera&&(i.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),t.addEventListener("mousedown",this.onMouseDown.bind(e));var h,u,d,g,f,m,p,v,w,$,b,y=t.container,S=0;function C(){var e=m;(function(e,i){var n=Date.now(),s=!i||e.row!=i.row,o=!i||e.column!=i.column;!$||s||o?(t.moveCursorToPosition(e),$=n,b={x:u,y:d}):c(b.x,b.y,u,d)>l?$=null:n-$>=a&&(t.renderer.scrollCursorIntoView(),$=null)})(m=t.renderer.screenToTextCoordinates(u,d),e),function(e,i){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:u-a.left,right:a.right-u},y:{top:d-a.top,bottom:a.bottom-d}},h=Math.min(l.x.left,l.x.right),c=Math.min(l.y.top,l.y.bottom),g={row:e.row,column:e.column};h/o<=2&&(g.column+=l.x.left=r&&t.renderer.scrollCursorIntoView(g):w=n:w=null}(m,e)}function x(){f=t.selection.toOrientedRange(),h=t.session.addMarker(f,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),C(),g=setInterval(C,20),S=0,s.addListener(document,"mousemove",L)}function A(){clearInterval(g),t.session.removeMarker(h),h=null,t.selection.fromOrientedRange(f),t.isFocused()&&!v&&t.$resetCursorStyle(),f=null,m=null,S=0,w=null,$=null,s.removeListener(document,"mousemove",L)}this.onDragStart=function(e){if(this.cancelDrag||!y.draggable){var n=this;return setTimeout(function(){n.startSelect(),n.captureMouse(e)},0),e.preventDefault()}f=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",o.isOpera&&(t.container.appendChild(i),i.scrollTop=0),s.setDragImage&&s.setDragImage(i,0,0),o.isOpera&&t.container.removeChild(i),s.clearData(),s.setData("Text",t.session.getTextRange()),v=!0,this.setState("drag")},this.onDragEnd=function(e){if(y.draggable=!1,v=!1,this.setState(null),!t.getReadOnly()){var i=e.dataTransfer.dropEffect;p||"move"!=i||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&R(e.dataTransfer))return u=e.clientX,d=e.clientY,h||x(),S++,e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&R(e.dataTransfer))return u=e.clientX,d=e.clientY,h||(x(),S++),null!==k&&(k=null),e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--S<=0&&h)return A(),p=null,s.preventDefault(e)},this.onDrop=function(e){if(m){var i=e.dataTransfer;if(v)switch(p){case"move":f=f.contains(m.row,m.column)?{start:m,end:m}:t.moveText(f,m);break;case"copy":f=t.moveText(f,m,!0)}else{var n=i.getData("Text");f={start:m,end:t.session.insert(m,n)},t.focus(),p=null}return A(),s.preventDefault(e)}},s.addListener(y,"dragstart",this.onDragStart.bind(e)),s.addListener(y,"dragend",this.onDragEnd.bind(e)),s.addListener(y,"dragenter",this.onDragEnter.bind(e)),s.addListener(y,"dragover",this.onDragOver.bind(e)),s.addListener(y,"dragleave",this.onDragLeave.bind(e)),s.addListener(y,"drop",this.onDrop.bind(e));var k=null;function L(){null==k&&(k=setTimeout(function(){null!=k&&h&&A()},20))}function R(e){var t=e.types;return!t||Array.prototype.some.call(t,function(e){return"text/plain"==e||"Text"==e})}function E(e){var t=["copy","copymove","all","uninitialized"],i=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return i&&t.indexOf(n)>=0?s="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?s="move":t.indexOf(n)>=0&&(s="copy"),s}}function c(e,t,i,n){return Math.sqrt(Math.pow(i-e,2)+Math.pow(n-t,2))}(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(e){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=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&(c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop());"dragWait"===this.state&&(c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition())))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,i=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&i){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),t.getDragDelay()){if(o.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(h.prototype),t.DragdropHandler=h}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event"],function(e,t,i){"use strict";var n=e("./mouse_event").MouseEvent;t.addTouchListeners=function(e,t){var i,s,o,r,a,l,h,c,u="scroll",d=0,g=0,f=0,m=0;function p(){a=null,clearTimeout(a),t.selection.isEmpty()&&t.selection.moveToPosition(h),u="wait"}e.addEventListener("contextmenu",function(e){c&&t.textInput.getElement().focus()}),e.addEventListener("touchstart",function(e){var l=e.touches;if(a||l.length>1)return clearTimeout(a),a=null,void(u="zoom");c=t.$mouseHandler.isMousePressed=!0;var v=l[0];i=v.clientX,s=v.clientY,f=m=0,e.clientX=v.clientX,e.clientY=v.clientY;var w=e.timeStamp;r=w;var $=new n(e,t);if(h=$.getDocumentPosition(),w-o<500&&1==l.length&&!d)g++,e.preventDefault(),e.button=0,function(){a=null,clearTimeout(a),t.selection.moveToPosition(h);var e=g>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),u="wait"}();else{g=0,a=setTimeout(p,450);var b=t.selection.cursor,y=t.selection.isEmpty()?b:t.selection.anchor,S=t.renderer.$cursorLayer.getPixelPosition(b,!0),C=t.renderer.$cursorLayer.getPixelPosition(y,!0),x=t.renderer.scroller.getBoundingClientRect(),A=t.renderer.layerConfig.lineHeight,k=t.renderer.layerConfig.lineHeight,L=function(e,t){return(e/=k)*e+(t=t/A-.75)*t},R=L(e.clientX-x.left-S.left,e.clientY-x.top-S.top),E=L(e.clientX-x.left-C.left,e.clientY-x.top-C.top);R<3.5&&E<3.5&&(u=R>E?"cursor":"anchor"),u=E<3.5?"anchor":R<3.5?"cursor":"scroll"}o=w}),e.addEventListener("touchend",function(e){c=t.$mouseHandler.isMousePressed=!1,l&&clearInterval(l),"zoom"==u?(u="",d=0):a?(t.selection.moveToPosition(h),d=0):"scroll"==u&&(d+=60,l=setInterval(function(){d--<=0&&(clearInterval(l),l=null),Math.abs(f)<.01&&(f=0),Math.abs(m)<.01&&(m=0),d<20&&(f*=.9),d<20&&(m*=.9),t.renderer.scrollBy(10*f,10*m)},10),e.preventDefault()),clearTimeout(a),a=null}),e.addEventListener("touchmove",function(e){a&&(clearTimeout(a),a=null);var o=e.touches;if(!(o.length>1||"zoom"==u)){var l=o[0],h=i-l.clientX,c=s-l.clientY;if("wait"==u){if(!(h*h+c*c>4))return e.preventDefault();u="cursor"}i=l.clientX,s=l.clientY,e.clientX=l.clientX,e.clientY=l.clientY;var d=e.timeStamp,g=d-r;if(r=d,"scroll"==u){var p=new n(e,t);p.speed=1,p.wheelX=h,p.wheelY=c,10*Math.abs(h)1&&(s=i[i.length-2]);var r=l[t+"Path"];return null==r?r=l.basePath:"/"==n&&(t=n=""),r&&"/"!=r.slice(-1)&&(r+="/"),r+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return l.$moduleUrls[e]=t},t.$loading={},t.loadModule=function(i,n){var s,r;Array.isArray(i)&&(r=i[0],i=i[1]);try{s=e(i)}catch(e){}if(s&&!t.$loading[i])return n&&n(s);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var a=function(){e([i],function(e){t._emit("load.module",{name:i,module:e});var n=t.$loading[i];t.$loading[i]=null,n.forEach(function(t){t&&t(e)})})};if(!t.get("packaged"))return a();o.loadScript(t.moduleUrl(i,r),a),h()}};var h=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$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(){})};function c(s){if(a&&a.document){l.packaged=s||e.packaged||n.packaged||a.define&&i("B9Yq").packaged;for(var o,r={},h="",c=document.currentScript||document._currentScript,u=(c&&c.ownerDocument||document).getElementsByTagName("script"),d=0;d=e){for(o=d+1;o=e;)o++;for(a=d,l=o-1;a=t.length||(l=i[s-1])!=g&&l!=f||(h=t[s+1])!=g&&h!=f?m:(o&&(h=f),h==l?h:m);case y:return(l=s>0?i[s-1]:p)==g&&s+10&&i[s-1]==g)return g;if(o)return m;for(M=s+1,c=t.length;M=1425&&_<=2303||64286==_;if(l=t[M],O&&(l==d||l==w))return d}return s<1||(l=t[s-1])==p?m:i[s-1];case p:return o=!1,r=!0,n;case v:return a=!0,m;case x:case A:case L:case R:case k:o=!1;case E:return m}}function F(e){var t=e.charCodeAt(0),i=t>>8;return 0==i?t>191?u:M[t]:5==i?/[\u0591-\u05f4]/.test(e)?d:u:6==i?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?C:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?S:/[\u06f0-\u06f9]/.test(e)?g:w:32==i&&t<=8287?T[255&t]:254==i&&t>=65136?w:m}t.L=u,t.R=d,t.EN=g,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,i,u){if(e.length<2)return{};var g=e.split(""),b=new Array(g.length),y=new Array(g.length),S=[];n=u?c:0,function(e,t,i,c){var u=n?h:l,d=null,g=null,f=null,m=0,w=null,b=-1,y=null,S=null,C=[];if(!c)for(y=0,c=[];y0)if(16==w){for(y=b;y-1){for(y=b;y=0&&c[x]==$;x--)t[x]=n}}(g,S,g.length,i);for(var C=0;Cw&&i[C]0&&"ل"===g[C-1]&&/\u0622|\u0623|\u0625|\u0627/.test(g[C])&&(S[C-1]=S[C]=t.R_H,C++);g[g.length-1]===t.DOT&&(S[g.length-1]=t.B),"‫"===g[0]&&(S[0]=t.RLE);for(C=0;C=0&&(e=this.session.$docRowCache[i])}return e},this.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var i,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(i=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=i,e++;else e=this.currentRow;return e},this.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var i=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 o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,s=n.getVisualFromLogicalIdx(i,this.bidiMap),o=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&e<=t&&o[s]%2!=0&&s++;for(var a=0;at&&o[s]%2==0&&(r+=this.charWidths[o[s]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},this.getSelections=function(e,t){var i,n=this.bidiMap,s=n.bidiLevels,o=[],r=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,h=!1,c=!1,u=0;this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,g=0;g=a&&di+o/2;){if(i+=o,n===s.length-1){o=0;break}o=this.charWidths[s[++n]]}return n>0&&s[n-1]%2!=0&&s[n]%2==0?(e0&&s[n-1]%2==0&&s[n]%2!=0?t=1+(e>i?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===s.length-1&&0===o&&s[n-1]%2==0||!this.isRtlDir&&0===n&&s[n]%2!=0?t=1+this.bidiMap.logicalFromVisual[n]:(n>0&&s[n-1]%2!=0&&0!==o&&n--,t=this.bidiMap.logicalFromVisual[n]),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,i){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=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 i=t?e.end:e.start,n=t?e.start:e.end;this.$setSelection(i.row,i.column,n.row,n.column)},this.$setSelection=function(e,t,i,n){var s=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(i,n),this.$isEmpty=!r.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||o)&&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 i=e||this.lead;e=i.row,t=i.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 i,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,i=s.end.row):i=n,!0===t?new r(n,0,i,this.session.getLine(i).length):new r(n,0,i+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,i){var n=e.column,s=e.column+t;return i<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).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 i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):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=n)}}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,i=this.doc.getLine(e),n=i.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(t)),t>=i.length)return this.moveCursorTo(e,i.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,i)}},this.$shortWordEndIndex=function(e){var t,i=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))i=this.session.tokenRe.lastIndex;else{for(;(t=e[i])&&n.test(t);)i++;if(i<1)for(s.lastIndex=0;(t=e[i])&&!s.test(t);)if(s.lastIndex=0,i++,n.test(t)){if(i>2){i--;break}for(;(t=e[i])&&n.test(t);)i++;if(i>2)break}}return s.lastIndex=0,i},this.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,i=this.doc.getLine(e),n=i.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==i.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e0&&/^\s*$/.test(n));i=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),r=this.$shortWordEndIndex(o);return this.moveCursorTo(t,i-r)},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 i,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(i=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(i/this.session.$bidiHandler.charWidths[0])):i=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column);var s=this.session.screenToDocumentPosition(n.row+e,n.column,i);0!==e&&0===t&&s.row===this.lead.row&&s.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[s.row]&&(s.row>0||e>0)&&s.row++,this.moveCursorTo(s.row,s.column+t,0===t)},this.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},this.moveCursorTo=function(e,t,i){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(e,t,i){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,i)},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(e){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(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var i=r.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(i.cursor=i.start),this.addRange(i,!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(a.prototype),t.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(e,t,i){"use strict";var n=e("./config"),s=2e3,o=function(e){for(var t in this.states=e,this.regExps={},this.matchMappings={},this.states){for(var i=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},r="g",a=[],l=0;l1?this.$applyToken:h.token),u>1&&(/\\\d/.test(h.regex)?c=h.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+s+1)}):(u=1,c=this.removeCapturingGroups(h.regex)),h.splitRegex||"string"==typeof h.token||a.push(h)),o[s]=l,s+=u,n.push(c),h.onMatch||(h.onMatch=null)}}n.length||(o[0]=0,n.push("$")),a.forEach(function(e){e.splitRegex=this.createSplitterRegexp(e.regex,r)},this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(e){s=0|e},this.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),i=this.token.apply(this,t);if("string"==typeof i)return[{type:i,value:e}];for(var n=[],s=0,o=i.length;sc){var v=e.substring(c,p-m.length);d.type==g?d.value+=v:(d.type&&h.push(d),d={type:g,value:v})}for(var w=0;ws){for(u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:h,state:i.length?i:n}},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,i){"use strict";var n=e("../lib/lang"),s=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(e,t){if(t)for(var i in e){for(var n=e[i],s=0;s=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,i=e[t].start;if(void 0!==i)return i;for(i=0;t>0;)i+=e[t-=1].value.length;return i},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(s.prototype),t.TokenIterator=s}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(e,t,i){"use strict";var n,s=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,a=e("../../lib/lang"),l=["text","paren.rparen","punctuation.operator"],h=["text","paren.rparen","punctuation.operator","comment"],c={},u={'"':'"',"'":"'"},d=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:""}},g=function(e,t,i,n){var s=e.end.row-e.start.row;return{text:i+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}},f=function e(t){this.add("braces","insertion",function(i,s,o,r,l){var h=o.getCursorPosition(),c=r.doc.getLine(h.row);if("{"==l){d(o);var u=o.getSelectionRange(),f=r.doc.getTextRange(u);if(""!==f&&"{"!==f&&o.getWrapBehavioursEnabled())return g(u,f,"{","}");if(e.isSaneInsertion(o,r))return/[\]\}\)]/.test(c[h.column])||o.inMultiSelectMode||t&&t.braces?(e.recordAutoInsert(o,r,"}"),{text:"{}",selection:[1,1]}):(e.recordMaybeInsert(o,r,"{"),{text:"{",selection:[1,1]})}else if("}"==l){if(d(o),"}"==c.substring(h.column,h.column+1))if(null!==r.$findOpeningBracket("}",{column:h.column+1,row:h.row})&&e.isAutoInsertedClosing(h,c,l))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==l||"\r\n"==l){d(o);var m="";if(e.isMaybeInsertedClosing(h,c)&&(m=a.stringRepeat("}",n.maybeInsertedBrackets),e.clearMaybeInsertedClosing()),"}"===c.substring(h.column,h.column+1)){var p=r.findMatchingBracket({row:h.row,column:h.column+1},"}");if(!p)return null;var v=this.$getIndent(r.getLine(p.row))}else{if(!m)return void e.clearMaybeInsertedClosing();v=this.$getIndent(c)}var w=v+r.getTabString();return{text:"\n"+w+"\n"+v+m,selection:[1,w.length,1,w.length]}}e.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,i,s,o){var r=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==r){if(d(i),"}"==s.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}}),this.add("parens","insertion",function(t,i,n,s,o){if("("==o){d(n);var r=n.getSelectionRange(),a=s.doc.getTextRange(r);if(""!==a&&n.getWrapBehavioursEnabled())return g(r,a,"(",")");if(e.isSaneInsertion(n,s))return e.recordAutoInsert(n,s,")"),{text:"()",selection:[1,1]}}else if(")"==o){d(n);var l=n.getCursorPosition(),h=s.doc.getLine(l.row);if(")"==h.substring(l.column,l.column+1))if(null!==s.$findOpeningBracket(")",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,h,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o&&(d(i),")"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s}),this.add("brackets","insertion",function(t,i,n,s,o){if("["==o){d(n);var r=n.getSelectionRange(),a=s.doc.getTextRange(r);if(""!==a&&n.getWrapBehavioursEnabled())return g(r,a,"[","]");if(e.isSaneInsertion(n,s))return e.recordAutoInsert(n,s,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){d(n);var l=n.getCursorPosition(),h=s.doc.getLine(l.row);if("]"==h.substring(l.column,l.column+1))if(null!==s.$findOpeningBracket("]",{column:l.column+1,row:l.row})&&e.isAutoInsertedClosing(l,h,o))return e.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(e,t,i,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o&&(d(i),"]"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s}),this.add("string_dquotes","insertion",function(e,t,i,n,s){var o=n.$mode.$quotes||u;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;d(i);var r=s,a=i.getSelectionRange(),l=n.doc.getTextRange(a);if(!(""===l||1==l.length&&o[l])&&i.getWrapBehavioursEnabled())return g(a,l,r,r);if(!l){var h=i.getCursorPosition(),c=n.doc.getLine(h.row),f=c.substring(h.column-1,h.column),m=c.substring(h.column,h.column+1),p=n.getTokenAt(h.row,h.column),v=n.getTokenAt(h.row,h.column+1);if("\\"==f&&p&&/escape/.test(p.type))return null;var w,$=p&&/string|escape/.test(p.type),b=!v||/string|escape/.test(v.type);if(m==r)(w=$!==b)&&/string\.end/.test(v.type)&&(w=!1);else{if($&&!b)return null;if($&&b)return null;var y=n.$mode.tokenRe;y.lastIndex=0;var S=y.test(f);y.lastIndex=0;var C=y.test(f);if(S||C)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var x=c[h.column-2];if(f==r&&(x==r||y.test(x)))return null;w=!0}return{text:w?r+r:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,i,n,s){var o=n.$mode.$quotes||u,r=n.doc.getTextRange(s);if(!s.isMultiLine()&&o.hasOwnProperty(r)&&(d(i),n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)==r))return s.end.column++,s})};f.isSaneInsertion=function(e,t){var i=e.getCursorPosition(),n=new r(t,i.row,i.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",l)){var s=new r(t,i.row,i.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",l))return!1}return n.stepForward(),n.getCurrentTokenRow()!==i.row||this.$matchTokenType(n.getCurrentToken()||"text",h)},f.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},f.recordAutoInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=i+o.substr(s.column),n.autoInsertedBrackets++},f.recordMaybeInsert=function(e,t,i){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+i,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},f.isAutoInsertedClosing=function(e,t,i){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&i===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},f.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},f.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},f.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},s.inherits(f,o),t.CstyleBehaviour=f}),ace.define("ace/unicode",["require","exports","module"],function(e,t,i){"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],s=0,o=[],r=0;r2?n%l!=l-1:n%l==0})}else{if(!this.blockComment)return!1;var g=this.blockComment.start,f=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+h.escapeRegExp(g)+")"),p=new RegExp("(?:"+h.escapeRegExp(f)+")\\s*$"),v=function(e,t){$(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},f),s.insertInLine({row:t,column:a},g))},w=function(e,t){var i;(i=e.match(p))&&s.removeInLine(t,e.length-i[0].length,e.length),(i=e.match(m))&&s.removeInLine(t,i[1].length,i[0].length)},$=function(e,i){if(m.test(e))return!0;for(var n=t.getTokens(i),s=0;se.length&&(y=e.length)}),a==1/0&&(a=y,o=!1,r=!1),c&&a%l!=0&&(a=Math.floor(a/l)*l),b(r?w:v)},this.toggleBlockComment=function(e,t,i,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,r,a=(m=new c(t,n.row,n.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(s.start))){var g=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+p;h=new u(g,f,g,f+s.start.length);break}a=m.stepBackward()}var m;for(a=(m=new c(t,n.row,n.column)).getCurrentToken();a&&/comment/.test(a.type);){var p;if(-1!=(p=a.value.indexOf(s.end))){g=m.getCurrentTokenRow(),f=m.getCurrentTokenColumn()+p;d=new u(g,f,g,f+s.end.length);break}a=m.stepForward()}d&&t.remove(d),h&&(t.remove(h),o=h.start.row,r=-s.start.length)}else r=s.start.length,o=i.start.row,t.insert(i.end,s.end),t.insert(i.start,s.start);l.start.row==o&&(l.start.column+=r),l.end.row==o&&(l.end.column+=r),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,i){return this.$getIndent(t)},this.checkOutdent=function(e,t,i){return!1},this.autoOutdent=function(e,t,i){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var i=e[t],n=i.prototype.$id,o=s.$modes[n];o||(s.$modes[n]=o=new i),s.$modes[t]||(s.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var r=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(t=0;tthis.row)){var i=function(t,i,n){var s="insert"==t.action,o=(s?1:-1)*(t.end.row-t.start.row),r=(s?1:-1)*(t.end.column-t.start.column),a=t.start,l=s?a:t.end;if(e(i,a,n))return{row:i.row,column:i.column};if(e(l,i,!n))return{row:i.row+o,column:i.column+(i.row==l.row?r:0)};return{row:a.row,column:a.column}}(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},this.setPosition=function(e,t,i){var n;if(n=i?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},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 i={};return e>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):e<0?(i.row=0,i.column=0):(i.row=e,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,t))),t<0&&(i.column=0),i}}).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,i){"use strict";var n=e("./lib/oop"),s=e("./apply_delta").applyDelta,o=e("./lib/event_emitter").EventEmitter,r=e("./range").Range,a=e("./anchor").Anchor,l=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 a(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 i=t.length-1;e.end.row-e.start.row==i&&(t[i]=t[i].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 i=this.clippedPos(e.row,e.column),n=this.pos(e.row,e.column+t.length);return this.applyDelta({start:i,end:n,action:"insert",lines:[t]},!0),this.clonePos(n)},this.clippedPos=function(e,t){var i=this.getLength();void 0===e?e=i:e<0?e=0:e>=i&&(e=i-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.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 i=0;(e=Math.min(Math.max(e,0),this.getLength()))0,n=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 i="insert"==e.action;(i?e.lines.length<=1&&!e.lines[0]:!r.comparePoints(e.start,e.end))||(i&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},this.$splitAndapplyLargeDelta=function(e,t){for(var i=e.lines,n=i.length-t+1,s=e.start.row,o=e.start.column,r=0,a=0;r20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,-1==n&&(n=t),o<=n&&i.fireUpdateEvent(o,n)}}};(function(){n.implement(this,s),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 i={first:e,last:t};this._signal("update",{data:i})},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,i=e.end.row-t;if(0===i)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,i+1,null),this.states.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}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),i=this.states[e-1],n=this.tokenizer.getLineTokens(t,i,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.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,i){"use strict";var n=e("./lib/lang"),s=(e("./lib/oop"),e("./range").Range),o=function(e,t,i){this.setRegexp(e),this.clazz=t,this.type=i||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},this.update=function(e,t,i,o){if(this.regExp)for(var r=o.firstRow,a=o.lastRow,l=r;l<=a;l++){var h=this.cache[l];null==h&&((h=n.getMatchOffsets(i.getLine(l),this.regExp)).length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map(function(e){return new s(l,e.offset,l,e.offset+e.length)}),this.cache[l]=h.length?h:"");for(var c=h.length;c--;)t.drawSingleLineMarker(e,h[c].toScreenRange(i),this.clazz,o)}}}).call(o.prototype),t.SearchHighlight=o}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=e("../range").Range;function s(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var i=t[t.length-1];this.range=new n(t[0].start.row,t[0].start.column,i.end.row,i.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}(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,i){var n,s,o=0,r=this.folds,a=!0;null==t&&(t=this.end.row,i=this.end.column);for(var l=0;l0)){var l=n(e,r.start);return 0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){var t=!e.isEmpty(),i=this.pointIndex(e.start,t);i<0&&(i=-i-1);var n=this.pointIndex(e.end,t,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(var t=[],i=e.length;i--;)t.push.apply(t,this.add(e[i]));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,s=(i=i.sort(function(e,t){return n(e.start,t.start)}))[0],o=1;o=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 i=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row=n)break}if("insert"==e.action)for(var l=s-n,h=-t.column+i.column;rn)break;if(c.start.row==n&&c.start.column>=t.column&&(c.start.column==t.column&&this.$insertRight||(c.start.column+=h,c.start.row+=l)),c.end.row==n&&c.end.column>=t.column){if(c.end.column==t.column&&this.$insertRight)continue;c.end.column==t.column&&h>0&&rc.start.column&&c.end.column==o[r+1].start.column&&(c.end.column-=h),c.end.column+=h,c.end.row+=l}}else for(l=n-s,h=t.column-i.column;rs)break;c.end.rowt.column)&&(c.end.column=t.column,c.end.row=t.row):(c.end.column+=h,c.end.row+=l):c.end.row>s&&(c.end.row+=l),c.start.rowt.column)&&(c.start.column=t.column,c.start.row=t.row):(c.start.column+=h,c.start.row+=l):c.start.row>s&&(c.start.row+=l)}if(0!=l&&r=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var i=this.$foldData,n=0;for(t&&(n=i.indexOf(t)),-1==n&&(n=0);n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var i=this.$foldData,n=t-e+1,s=0;s=t){a=e?n-=t-a:n=0);break}r>=e&&(n-=a>=e?r-a:r-e+1)}return n},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 i,n=this.$foldData,r=!1;e instanceof o?i=e:(i=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(i.range);var a=i.start.row,l=i.start.column,h=i.end.row,c=i.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(h,c,-1);if(u&&d==u)return u.addSubFold(i);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(h,c)&&this.removeFold(d);var g=this.getFoldsInRange(i.range);g.length>0&&(this.removeFolds(g),g.forEach(function(e){i.addSubFold(e)}));for(var f=0;f0&&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 i,s;if(null==e?(i=new n(0,0,this.getLength(),0),t=!0):i="number"==typeof e?new n(e,0,e,this.getLine(e).length):"row"in e?n.fromPoints(e,e):e,s=this.getFoldsInRangeList(i),t)this.removeFolds(s);else for(var o=s;o.length;)this.expandFolds(o),o=this.getFoldsInRangeList(i);if(s.length)return s},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var i=this.getFoldLine(e,t);return i?i.end.row:e},this.getRowFoldStart=function(e,t){var i=this.getFoldLine(e,t);return i?i.start.row:e},this.getFoldDisplayLine=function(e,t,i,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==i&&(i=this.getLine(t).length);var o=this.doc,r="";return e.walk(function(e,t,i,a){if(!(tc)break}while(o&&l.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();return h.end.row=s.getCurrentTokenRow(),h.end.column=s.getCurrentTokenColumn()+o.value.length-2,h}},this.foldAll=function(e,t,i){null==i&&(i=1e5);var n=this.foldWidgets;if(n){t=t||this.getLength();for(var s=e=e||0;s=e){s=o.end.row;try{var r=this.addFold("...",o);r&&(r.collapseChildren=i)}catch(e){}}}}},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 i=this.foldWidgets;if(!i||t&&i[e])return{};for(var n,s=e-1;s>=0;){var o=i[s];if(null==o&&(o=i[s]=this.getFoldWidget(s)),"start"==o){var r=this.getFoldWidgetRange(s);if(n||(n=r),r&&r.end.row>=e)break}s--}return{range:-1!==s&&r,firstRange:n}},this.onFoldWidgetClick=function(e,t){var i={children:(t=t.domEvent).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,i)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var i=this.getFoldWidget(e),n=this.getLine(e),s="end"===i?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var r=this.getFoldWidgetRange(e,!0);if(r&&!r.isMultiLine()&&(o=this.getFoldAt(r.start.row,r.start.column,1))&&r.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,h=a.range.end.row;this.foldAll(l,h,t.all?1e4:0)}else t.children?(h=r?r.end.row:this.getLength(),this.foldAll(e+1,h,t.all?1e4:0)):r&&(t.all&&(r.collapseChildren=1e4),this.addFold("...",r));return r}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var i=this.$toggleFoldWidget(t,{});if(!i){var n=this.getParentFoldRangeData(t,!0);if(i=n.range||n.firstRange){t=i.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",i)}}},this.updateFoldWidgets=function(e){var t=e.start.row,i=e.end.row-t;if(0===i)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,i+1,null);else{var n=Array(i+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},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)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,i){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var i=t||this.getLine(e.row).charAt(e.column-1);if(""==i)return null;var n=i.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,i=this.getLine(e.row),n=!0,o=i.charAt(e.column-1),r=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(r||(o=i.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!r)return null;if(r[1]){if(!(a=this.$findClosingBracket(r[1],e)))return null;t=s.fromPoints(e,a),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var a;if(!(a=this.$findOpeningBracket(r[2],e)))return null;t=s.fromPoints(a,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-r.getCurrentTokenColumn()-2,h=a.value;;){for(;l>=0;){var c=h.charAt(l);if(c==s){if(0==(o-=1))return{row:r.getCurrentTokenRow(),column:l+r.getCurrentTokenColumn()}}else c==e&&(o+=1);l-=1}do{a=r.stepBackward()}while(a&&!i.test(a.type));if(null==a)break;l=(h=a.value).length-1}return null}},this.$findClosingBracket=function(e,t,i){var s=this.$brackets[e],o=1,r=new n(this,t.row,t.column),a=r.getCurrentToken();if(a||(a=r.stepForward()),a){i||(i=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=t.column-r.getCurrentTokenColumn();;){for(var h=a.value,c=h.length;li&&(this.$docRowCache.splice(i,t),this.$screenRowCache.splice(i,t))},this.$getRowCacheIndex=function(e,t){for(var i=0,n=e.length-1;i<=n;){var s=i+n>>1,o=e[s];if(t>o)i=s+1;else{if(!(t=t);o++);return(i=n[o])?(i.index=o,i.start=s-i.value.length,i):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=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo: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()?o.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&&(n=!!i.charAt(t-1).match(this.tokenRe)),n||(n=!!i.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else if(/^\s+$/.test(i.slice(t-1,t+1)))s=/\s/;else s=this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&i.charAt(o).match(s));o++}for(var r=t;re&&(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(),i=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],r=o?o.start.row:1/0,a=t.length,l=0;lr){if((l=o.end.row+1)>=a)break;r=(o=this.$foldData[s++])?o.start.row:1/0}null==i[l]&&(i[l]=this.$getStringScreenWidth(t[l])[0]),i[l]>n&&(n=i[l])}this.screenWidth=n}},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 i=e.length-1;-1!=i;i--){var n=e[i];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.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 i=0;ie.end.column&&(o.start.column+=h),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=h)),r&&o.start.row>=e.end.row&&(o.start.row+=r,o.end.row+=r)}if(o.end=this.insert(o.start,n),s.length){var a=e.start,l=o.start,h=(r=l.row-a.row,l.column-a.column);this.addFolds(s.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+=r,e.end.row+=r,e}))}return o},this.indentRows=function(e,t,i){i=i.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},i)},this.outdentRows=function(e){for(var t=e.collapseRows(),i=new u(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);i.start.row=s,i.end.row=s;for(var r=0;r0){var s;if((s=this.getRowFoldEnd(t+i))>this.doc.getLength()-1)return 0;n=s-t}else{e=this.$clipRowToDocument(e);n=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),r=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e}),a=0==i?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,a),r.length&&this.addFolds(r),n},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 i=this.doc.getLength();e>=i?(e=i-1,t=this.doc.getLine(i-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 i=this.$wrapLimitRange;i.max<0&&(i={min:t,max:t});var n=this.$constrainWrapLimit(e,i.min,i.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(e,t,i){return t&&(e=Math.max(t,e)),i&&(e=Math.min(i,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,i=e.action,n=e.start,s=e.end,o=n.row,r=s.row,a=r-o,l=null;if(this.$updating=!0,0!=a)if("remove"===i){this[t?"$wrapData":"$rowLengthCache"].splice(o,a);var h=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var c=0;if(m=this.getFoldLine(s.row)){m.addRemoveChars(s.row,s.column,n.column-s.column),m.shiftRow(-a);var u=this.getFoldLine(o);u&&u!==m&&(u.merge(m),m=u),c=h.indexOf(m)+1}for(;c=s.row&&m.shiftRow(-a)}r=o}else{var d=Array(a);d.unshift(o,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,d);h=this.$foldData,c=0;if(m=this.getFoldLine(o)){var f=m.range.compareInside(n.row,n.column);0==f?(m=m.split(n.row,n.column))&&(m.shiftRow(a),m.addRemoveChars(r,0,s.column-n.column)):-1==f&&(m.addRemoveChars(o,0,s.column-n.column),m.shiftRow(a)),c=h.indexOf(m)+1}for(;c=o&&m.shiftRow(a)}}else a=Math.abs(e.start.column-e.end.column),"remove"===i&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(m=this.getFoldLine(o))&&m.addRemoveChars(o,n.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(o,r):this.$updateRowLengthCache(o,r),l},this.$updateRowLengthCache=function(e,t,i){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},this.$updateWrapData=function(i,n){var s,o,r=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,h=this.$wrapLimit,c=i;for(n=Math.min(n,r.length-1);c<=n;)(o=this.getFoldLine(c,o))?(s=[],o.walk(function(i,n,o,a){var l;if(null!=i){(l=this.$getDisplayTokens(i,s.length))[0]=e;for(var h=1;h=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)}this.$computeWrapSplits=function(n,s,o){if(0==n.length)return[];var a=[],l=n.length,c=0,u=0,d=this.$wrapAsCode,g=this.$indentedSoftWrap,f=s<=Math.max(2*o,8)||!1===g?0:Math.floor(s/2);function m(e){for(var t=e-c,s=c;ss-p;){var v=c+s-p;if(n[v-1]>=i&&n[v]>=i)m(v);else if(n[v]!=e&&n[v]!=t){for(var w=Math.max(v-(s-(s>>2)),c-1);v>w&&n[v]w&&n[v]w&&9==n[v];)v--}else for(;v>w&&n[v]w?m(++v):(2==n[v=c+s]&&v--,m(v-p))}else{for(;v!=c-1&&n[v]!=e;v--);if(v>c){m(v);continue}for(v=c+s;v39&&a<48||a>57&&a<64?s.push(9):a>=4352&&d(a)?s.push(1,2):s.push(1)}return s},this.$getStringScreenWidth=function(e,t,i){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),i=i||0,s=0;s=4352&&d(n)?i+=2:i+=1,!(i>t));s++);return[i,s]},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),i=this.$wrapData[t.row];return i.length&&i[0]=0){a=h[c],o=this.$docRowCache[c];var d=e>h[u-1]}else d=!u;for(var g=this.getLength()-1,f=this.getNextFoldLine(o),m=f?f.start.row:1/0;a<=e&&!(a+(l=this.getRowLength(o))>e||o>=g);)a+=l,++o>m&&(o=f.end.row+1,m=(f=this.getNextFoldLine(o,f))?f.start.row:1/0),d&&(this.$docRowCache.push(o),this.$screenRowCache.push(a));if(f&&f.start.row<=o)n=this.getFoldDisplayLine(f),o=f.start.row;else{if(a+l<=e||o>g)return{row:g,column:this.getLine(g).length};n=this.getLine(o),f=null}var p=0,v=Math.floor(e-a);if(this.$useWrapMode){var w=this.$wrapData[o];w&&(s=w[v],v>0&&w.length&&(p=w.indent,r=w[v-1]||w[w.length-1],n=n.substring(r)))}return void 0!==i&&this.$bidiHandler.isBidiRow(a+v,o,v)&&(t=this.$bidiHandler.offsetToCol(i)),r+=this.$getStringScreenWidth(n,t-p)[1],this.$useWrapMode&&r>=s&&(r=s-1),f?f.idxToPosition(r):{row:o,column:r}},this.documentToScreenPosition=function(e,t){if(void 0===t)var i=this.$clipPositionToDocument(e.row,e.column);else i=this.$clipPositionToDocument(e,t);e=i.row,t=i.column;var n,s=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var r,a=0,l=this.$docRowCache,h=this.$getRowCacheIndex(l,e),c=l.length;if(c&&h>=0){a=l[h],s=this.$screenRowCache[h];var u=e>l[c-1]}else u=!c;for(var d=this.getNextFoldLine(a),g=d?d.start.row:1/0;a=g){if((r=d.end.row+1)>e)break;g=(d=this.getNextFoldLine(r,d))?d.start.row:1/0}else r=a+1;s+=this.getRowLength(a),a=r,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(s))}var f="";d&&a>=g?(f=this.getFoldDisplayLine(d,e,t),o=d.start.row):(f=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var p=this.$wrapData[o];if(p){for(var v=0;f.length>=p[v];)s++,v++;f=f.substring(p[v-1]||0,f.length),m=v>0?p.indent:0}}return{row:s,column:m+this.$getStringScreenWidth(f)[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 i=this.$wrapData.length,n=0,s=(a=0,(t=this.$foldData[a++])?t.start.row:1/0);ns&&(n=t.end.row+1,s=(t=this.$foldData[a++])?t.start.row:1/0)}else{e=this.getLength();for(var r=this.$foldData,a=0;ai);o++);return[n,o]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker()},this.isFullWidth=d}.call(m.prototype),e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),a.defineOptions(m.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(e){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=m}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,i){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,r=function(){this.$options={}};(function(){this.set=function(e){return s.mixin(this.$options,e),this},this.getOptions=function(){return n.copyObject(this.$options)},this.setOptions=function(e){this.$options=e},this.find=function(e){var t=this.$options,i=this.$matchIterator(e,t);if(!i)return!1;var n=null;return i.forEach(function(e,i,s,r){return n=new o(e,i,s,r),!(i==r&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start))||(n=null,!1)}),n},this.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var i=t.range,s=i?e.getLines(i.start.row,i.end.row):e.doc.getAllLines(),r=[],a=t.re;if(t.$isMultiLine){var l,h=a.length,c=s.length-h;e:for(var u=a.offset||0;u<=c;u++){for(var d=0;dm||(r.push(l=new o(u,m,u+h-1,p)),h>2&&(u=u+h-2))}}else for(var v=0;vy&&r[d].end.row==i.end.row;)d--;for(r=r.slice(v,d+1),v=0,d=r.length;v=a;i--)if(u(i,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(i=l,a=r.row;i>=a;i--)if(u(i,Number.MAX_VALUE,e))return}};else h=function(e){var i=r.row;if(!u(i,r.column,e)){for(i+=1;i<=l;i++)if(u(i,0,e))return;if(0!=t.wrap)for(i=a,l=r.row;i<=l;i++)if(u(i,0,e))return}};if(t.$isMultiLine)var c=i.length,u=function(t,s,o){var r=n?t-c+1:t;if(!(r<0)){var a=e.getLine(r),l=a.search(i[0]);if(!(!n&&ls))return!!o(r,l,r+c-1,u)||void 0}}};else if(n)u=function(t,n,s){var o,r=e.getLine(t),a=[],l=0;for(i.lastIndex=0;o=i.exec(r);){var h=o[0].length;if(l=o.index,!h){if(l>=r.length)break;i.lastIndex=l+=1}if(o.index+h>n)break;a.push(o.index,h)}for(var c=a.length-1;c>=0;c-=2){var u=a[c-1];if(s(t,u,t,u+(h=a[c])))return!0}};else u=function(t,n,s){var o,r,a=e.getLine(t);for(i.lastIndex=n;r=i.exec(a);){var l=r[0].length;if(s(t,o=r.index,t,o+l))return!0;if(!l&&(i.lastIndex=o+=1,o>=a.length))return!1}};return{forEach:h}}}).call(r.prototype),t.Search=r}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,i){"use strict";var s=e("../lib/keys"),o=e("../lib/useragent"),r=s.KEY_MODS;function a(e,t){this.platform=t||(o.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=!0}function l(e,t){a.call(this,e,t),this.$singleCommand=!1}l.prototype=a.prototype,function(){function e(e){return"object"==n(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 i=e&&("string"==typeof e?e:e.name);e=this.commands[i],t||delete this.commands[i];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var r=o.indexOf(e);-1!=r&&(o.splice(r,1),1==o.length&&(n[s]=o[0]))}}},this.bindKey=function(e,t,i){if("object"==n(e)&&e&&(null==i&&(i=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 n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach(function(e){var t=this.parseKeys(e),i=r[t.hashId]+t.key;n+=(n?" ":"")+i,this._addCommandToBinding(n,"chainKeys")},this),n+=" "}var o=this.parseKeys(e),a=r[o.hashId]+o.key;this._addCommandToBinding(n+a,t,i)},this)},this._addCommandToBinding=function(t,i,n){var s,o=this.commandKeyBinding;if(i)if(!o[t]||this.$singleCommand)o[t]=i;else{Array.isArray(o[t])?-1!=(s=o[t].indexOf(i))&&o[t].splice(s,1):o[t]=[o[t]],"number"!=typeof n&&(n=e(i));var r=o[t];for(s=0;sn)break}r.splice(s,0,i)}else delete o[t]},this.addCommands=function(e){e&&Object.keys(e).forEach(function(t){var i=e[t];if(i){if("string"==typeof i)return this.bindKey(i,t);"function"==typeof i&&(i={exec:i}),"object"===n(i)&&(i.name||(i.name=t),this.addCommand(i))}},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}),i=t.pop(),n=s[i];if(s.FUNCTION_KEYS[n])i=s.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:i,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:i.toUpperCase(),hashId:-1}}for(var o=0,r=t.length;r--;){var a=s.KEY_MODS[t[r]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;o|=a}return{key:i,hashId:o}},this.findKeyCommand=function(e,t){var i=r[e]+t;return this.commandKeyBinding[i]},this.handleKeyboard=function(e,t,i,n){if(!(n<0)){var s=r[t]+i,o=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=i.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:o}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},this.getStatusText=function(e,t){return t.$keyChain||""}}.call(a.prototype),t.HashHandler=a,t.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("../lib/oop"),s=e("../keyboard/hash_handler").MultiHashHandler,o=e("../lib/event_emitter").EventEmitter,r=function(e,t){s.call(this,t,e),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.command.exec(e.editor,e.args||{})})};n.inherits(r,s),function(){n.implement(this,o),this.exec=function(e,t,i){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,i))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 s={editor:t,command:e,args:i};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.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,i){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function r(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",bindKey:r("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",function(t){t.init(e),e.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:r("Alt-E","F4"),exec:function(e){s.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:r("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("./ext/error_marker",function(t){t.showErrorMarker(e,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:r("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:r(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:r("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:r("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:r("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:r("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:r("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:r(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:r("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:r("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:r("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:r("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:r("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:r("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:r("Ctrl-F","Command-F"),exec:function(e){s.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:r("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:r("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:r("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:r("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:r("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:r("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:r("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:r("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:r("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:r("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:r("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:r("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:r("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:r("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:r("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:r("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:r("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:r("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:r("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:r("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:r(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:r("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:r(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:r("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:r("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:r("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:r("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:r("Ctrl-P","Ctrl-P"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:r("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:r("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:r(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},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:r("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:r("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:r("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:r("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:r("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:r("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:r("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:r("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",function(t){t.Search(e,!0)})}},{name:"undo",description:"Undo",bindKey:r("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:r("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:r("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:r("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:r("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:r("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:r("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:r("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:r("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:r("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:r("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:r("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:r("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:r("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:r("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:r("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:r("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:r("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:r("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(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:r(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:r("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:r("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:r("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",description:"Expand to line",bindKey:r("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:r(null,null),exec:function(e){for(var t=e.selection.isBackwards(),i=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),r=e.session.doc.getLine(i.row).length,a=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,l=e.session.doc.getLine(i.row),h=i.row+1;h<=s.row+1;h++){var c=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(h)));0!==c.length&&(c=" "+c),l+=c}s.row+10?(e.selection.moveCursorTo(i.row,i.column),e.selection.selectTo(i.row,i.column+a)):(r=e.session.doc.getLine(i.row).length>r?r+1:r,e.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:r(null,null),exec:function(e){var t=e.session.doc.getLength()-1,i=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var r=0;r=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==i&&this.renderer.animateScrolling(this.curOp.scrollTop)}var o=this.selection.toJSON();this.curOp.selectionAfter=o,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(o),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,i=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==i.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==i.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var i=this;w.loadModule(["keybinding",e],function(n){i.$keybindingId==e&&i.keyBinding.setKeyboardHandler(n&&n.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 i=this.session.getSelection();i.off("changeCursor",this.$onCursorChange),i.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")||o.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 i=t.findMatchingBracket(e.getCursorPosition());if(i)var n=new f(i.row,i.column,i.row,i.column+1);else if(t.$mode.getMatching)n=t.$mode.getMatching(e.session);n&&(t.$bracketHighlight=t.addMarker(n,"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 i=e.getCursorPosition(),n=new $(e.session,i.row,i.column),s=n.getCurrentToken();if(!s||!/\b(?:tag-open|tag-name)/.test(s.type))return t.removeMarker(t.$tagHighlight),void(t.$tagHighlight=null);if(-1==s.type.indexOf("tag-open")||(s=n.stepForward())){var o=s.value,r=0,a=n.stepBackward();if("<"==a.value)do{a=s,(s=n.stepForward())&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"=0);else{do{s=a,a=n.stepBackward(),s&&s.value===o&&-1!==s.type.indexOf("tag-name")&&("<"===a.value?r++:"1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var i=new f(e.row,e.column,e.row,1/0);i.id=t.addMarker(i,"ace_active-line","screenLine"),t.$highlightLineMarker=i}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(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var i=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(i,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var i=t.start.column,n=t.end.column,s=e.getLine(t.start.row),o=s.substring(i,n);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var r=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),a=s.substring(i-1,n+1);if(r.test(a))return r}}},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(),i=!1;if(!e&&this.$copyWithEmptySelection){i=!0;for(var n=this.selection.getAllRanges(),s=0;so.length||s.length<2||!s[1])return this.commands.exec("insertstring",this,t);for(var r=o.length;r--;){var a=o[r];a.isEmpty()||n.remove(a),n.insert(a.start,s[r])}}},this.execCommand=function(e,t){return this.commands.exec(e,this,t)},this.insert=function(e,t){var i=this.session,n=i.getMode(),s=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var o=n.transformAction(i.getState(s.row),"insertion",this,i,e);o&&(e!==o.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=o.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){(r=new f.fromPoints(s,s)).end.column+=e.length,this.session.remove(r)}}else{var r=this.getSelectionRange();s=this.session.remove(r),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=i.getLine(s.row);if(s.column>a.search(/\S|$/)){var l=a.substr(s.column).search(/\S|$/);i.doc.removeInLine(s.row,s.column,s.column+l)}}this.clearSelection();var h=s.column,c=i.getState(s.row),u=(a=i.getLine(s.row),n.checkOutdent(c,a,e));i.insert(s,e);if(o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new f(s.row,h+o.selection[0],s.row,h+o.selection[1])):this.selection.setSelectionRange(new f(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),i.getDocument().isNewLine(e)){var d=n.getNextLineIndent(c,a.slice(0,s.column),i.getTabString());i.insert({row:s.row+1,column:0},d)}u&&n.autoOutdent(c,i,s.row)},this.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var i=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(i):i(),this.endOperation()},this.applyComposition=function(e,t){var i;(t.extendLeft||t.extendRight)&&((i=this.selection.getRange()).start.column-=t.extendLeft,i.end.column+=t.extendRight,this.selection.setRange(i),e||i.isEmpty()||this.remove());(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd)&&((i=this.selection.getRange()).start.column-=t.restoreStart,i.end.column-=t.restoreEnd,this.selection.setRange(i))},this.onCommandKey=function(e,t,i){this.keyBinding.onCommandKey(e,t,i)},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 i=this.session,n=i.getState(t.start.row),s=i.getMode().transformAction(n,"deletion",this,i,t);if(0===t.end.column){var o=i.getTextRange(t);if("\n"==o[o.length-1]){var r=i.getLine(t.end.row);/^\s+$/.test(r)&&(t.end.column=r.length)}}s&&(t=s)}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 i,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0});var s=new f(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,i[n-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),i=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,i,e)},this.getNumberAt=function(e,t){var i=/[\-]?[0-9]+(?:\.[0-9]+)?/g;i.lastIndex=0;for(var n=this.session.getLine(e);i.lastIndex=t)return{value:s[0],start:s.index,end:s.index+s[0].length}}return null},this.modifyNumber=function(e){var t=this.selection.getCursor().row,i=this.selection.getCursor().column,n=new f(t,i-1,t,i),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,i);if(o){var r=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,a=o.start+o.value.length-r,l=parseFloat(o.value);l*=Math.pow(10,a),r!==o.end&&i=a&&o<=l&&(i=t,h.selection.clearSelection(),h.moveCursorTo(e,a+n),h.selection.selectTo(e,l+n)),a=l});for(var c,u=this.$toggleWordPairs,d=0;dg+1)break;g=f.last}for(c--,a=this.session.$moveLines(d,g,t?0:e),t&&-1==e&&(u=c+1);u<=c;)r[u].moveBy(a,0),u++;t||(a=0),l+=a}s.fromOrientedRange(s.ranges[0]),s.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 i=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(s,0)}):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection());var o=i.scrollTop;i.scrollBy(0,s*n.lineHeight),null!=t&&i.scrollCursorIntoView(null,.5),i.animateScrolling(o)},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,i,n){this.renderer.scrollToLine(e,t,i,n)},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 i=this.getCursorPosition(),n=new $(this.session,i.row,i.column),s=n.getCurrentToken(),o=s||n.stepForward();if(o){var r,a,l=!1,h={},c=i.column-o.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(o.value.match(/[{}()\[\]]/g)){for(;c=0;--o)this.$tryReplace(i[o],e)&&n++;return this.selection.setSelectionRange(s),n},this.$tryReplace=function(e,t){var i=this.session.getTextRange(e);return null!==(t=this.$search.replace(i,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"==n(e)&&s.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 i=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(i)},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,i=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",function(){n=!0}),r=this.renderer.on("beforeRender",function(){n&&(t=i.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(n&&t&&(i.isFocused()||i.searchBox&&i.searchBox.isFocused())){var e=i.renderer,o=e.$cursorLayer.$pixelPos,r=e.layerConfig,a=o.top-r.offset;null!=(n=o.top>=0&&a+t.top<0||!(o.topwindow.innerHeight)&&null)&&(s.style.top=a+"px",s.style.left=o.left+"px",s.style.height=r.lineHeight+"px",s.scrollIntoView(n)),n=t=null}});this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",r))}}},this.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},this.prompt=function(e,t,i){var n=this;w.loadModule("./ext/prompt",function(s){s.prompt(n,e,t,i)})}}.call(y.prototype),w.defineOptions(y.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(e){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(e){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?S.attach(this):S.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?S.attach(this):S.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 S={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,i){return Math.max(t.toString().length,(i.lastRow+1).toString().length,2)*i.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=y}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,i){"use strict";var n=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(e){this.$session=e},this.add=function(e,t,i){this.$fromUndo||e!=this.$lastDelta&&(!1!==t&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev),"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e))},this.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var i=this.$undoStack,n=i.length;n--;){var s=i[n][0];if(s.id<=e)break;s.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(e){null==e&&(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?a(e):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(n.prototype);var s=e("./range").Range,o=s.comparePoints;s.comparePoints;function r(e){return{row:e.row,column:e.column}}function a(e){if(e=e||this,Array.isArray(e))return e.map(a).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(l).join("\n"):l(e.value)),e.start&&(t+=l(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function l(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function h(e,t){var i="insert"==e.action,n="insert"==t.action;if(i&&n)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(i&&!n)if(o(t.start,e.end)>=0)d(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}else if(!i&&n)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;d(e,t,1)}else if(!i&&!n)if(o(t.start,e.start)>=0)d(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;d(e,t,-1)}return[t,e]}function c(e,t){for(var i=e.length;i--;)for(var n=0;n=0?d(e,t,-1):o(e.start,t.start)<=0?d(t,e,1):(d(e,s.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!i&&n)o(t.start,e.end)>=0?d(t,e,-1):o(t.start,e.start)<=0?d(e,t,1):(d(t,s.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!i&&!n)if(o(t.start,e.end)>=0)d(t,e,-1);else{var r,a;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(r=e,e=f(e,t.start)),o(e.end,t.end)>0&&(a=f(e,t.end)),g(t.end,e.start,e.end,-1),a&&!r&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,r,a].filter(Boolean);d(e,t,-1)}return[t,e]}function d(e,t,i){g(e.start,t.start,t.end,i),g(e.end,t.start,t.end,i)}function g(e,t,i,n){e.row==(1==n?t:i).row&&(e.column+=n*(i.column-t.column)),e.row+=n*(i.row-t.row)}function f(e,t){var i=e.lines,n=e.end;e.end=r(t);var s=e.end.row-e.start.row,o=i.splice(s,i.length),a=s?t.column:t.column-e.start.column;return i.push(o[0].substring(0,a)),o[0]=o[0].substr(a),{start:r(t),end:n,lines:o,action:e.action}}function m(e,t){t=function(e){return{start:r(e.start),end:r(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var i=e.length;i--;){for(var n=e[i],s=0;so&&(l=s.end.row+1,o=(s=t.getNextFoldLine(l,s))?s.start.row:1/0),l>n){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(r=this.$lines.get(++a))?r.row=l:(r=this.$lines.createCell(l,e,this.session,h),this.$lines.push(r)),this.$renderCell(r,e,s,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},this.$updateGutterWidth=function(e){var t=this.session,i=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,s=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(s=t.getLength()+n-1);var o=i?i.getWidth(t,s,e):s.toString().length*e.characterWidth,r=this.$padding||this.$computePadding();(o+=r.left+r.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},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 i=0;i=this.$cursorRow){if(n.row>this.$cursorRow){var s=this.session.getFoldLine(this.$cursorRow);if(!(i>0&&s&&s.start.row==t[i-1].row))break;n=t[i-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;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 i=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=i,!t||n0;s--)this.$lines.shift();if(n>i)for(s=this.session.getFoldedRowCount(i+1,n);s>0;s--)this.$lines.pop();e.firstRown&&this.$lines.push(this.$renderLines(e,n+1,i)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},this.$renderLines=function(e,t,i){for(var n=[],s=t,o=this.session.getNextFoldLine(s),r=o?o.start.row:1/0;s>r&&(s=o.end.row+1,r=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>i);){var a=this.$lines.createCell(s,e,this.session,h);this.$renderCell(a,e,o,s),n.push(a),s++}return n},this.$renderCell=function(e,t,i,s){var o=e.element,r=this.session,a=o.childNodes[0],l=o.childNodes[1],h=r.$firstLineNumber,c=r.$breakpoints,u=r.$decorations,d=r.gutterRenderer||this.$renderer,g=this.$showFoldWidgets&&r.foldWidgets,f=i?i.start.row:Number.MAX_VALUE,m="ace_gutter-cell ";if(this.$highlightGutterLine&&(s==this.$cursorRow||i&&s=f&&this.$cursorRow<=i.end.row)&&(m+="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)),c[s]&&(m+=c[s]),u[s]&&(m+=u[s]),this.$annotations[s]&&(m+=this.$annotations[s].className),o.className!=m&&(o.className=m),g){var p=g[s];null==p&&(p=g[s]=r.getFoldWidget(s))}if(p){m="ace_fold-widget ace_"+p;"start"==p&&s==f&&si.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,i){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)};(function(){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 i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=t,i.className=e},this.update=function(e){if(e){var t;for(var i in this.config=e,this.i=0,this.markers){var n=this.markers[i];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),r=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,r,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}if(-1!=this.i)for(;this.id?4:0)|(h==l?8:0)),s,h==l?0:1,o)},this.drawMultiLineMarker=function(e,t,i,n,s){var o=this.$padding,r=n.lineHeight,a=this.$getTop(t.start.row,n),l=o+t.start.column*n.characterWidth;(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row))?((h=t.clone()).end.row=h.start.row,h.end.column=this.session.getLine(h.start.row).length,this.drawBidiSingleLineMarker(e,h,i+" ace_br1 ace_start",n,null,s)):this.elt(i+" ace_br1 ace_start","height:"+r+"px;right:0;top:"+a+"px;left:"+l+"px;"+(s||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var h;(h=t.clone()).start.row=h.end.row,h.start.column=0,this.drawBidiSingleLineMarker(e,h,i+" ace_br12",n,null,s)}else{a=this.$getTop(t.end.row,n);var c=t.end.column*n.characterWidth;this.elt(i+" ace_br12","height:"+r+"px;width:"+c+"px;top:"+a+"px;left:"+o+"px;"+(s||""))}if(!((r=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){a=this.$getTop(t.start.row+1,n);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(i+(u?" ace_br"+u:""),"height:"+r+"px;right:0;top:"+a+"px;left:"+o+"px;"+(s||""))}},this.drawSingleLineMarker=function(e,t,i,n,s,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,i,n,s,o);var r=n.lineHeight,a=(t.end.column+(s||0)-t.start.column)*n.characterWidth,l=this.$getTop(t.start.row,n),h=this.$padding+t.start.column*n.characterWidth;this.elt(i,"height:"+r+"px;width:"+a+"px;top:"+l+"px;left:"+h+"px;"+(o||""))},this.drawBidiSingleLineMarker=function(e,t,i,n,s,o){var r=n.lineHeight,a=this.$getTop(t.start.row,n),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach(function(e){this.elt(i,"height:"+r+"px;width:"+e.width+(s||0)+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(o||""))},this)},this.drawFullLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;t.start.row!=t.end.row&&(r+=this.$getTop(t.end.row,n)-o),this.elt(i,"height:"+r+"px;top:"+o+"px;left:0;right:0;"+(s||""))},this.drawScreenLineMarker=function(e,t,i,n,s){var o=this.$getTop(t.start.row,n),r=n.lineHeight;this.elt(i,"height:"+r+"px;top:"+o+"px;left:0;right:0;"+(s||""))}}).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,i){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=function(e){this.dom=s,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,a),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="—",this.SPACE_CHAR="·",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],i=1;ic&&(a=l.end.row+1,c=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(a>s);){var u=o[r++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==c&&l);var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(h=!0,u.style.height=d)}a++}if(h)for(;r0;s--)this.$lines.shift();if(t.lastRow>e.lastRow)for(s=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);s>0;s--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow))},this.$renderLinesFragment=function(e,t,i){for(var n=[],o=t,r=this.session.getNextFoldLine(o),a=r?r.start.row:1/0;o>a&&(o=r.end.row+1,a=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(o>i);){var l=this.$lines.createCell(o,e,this.session),h=l.element;this.dom.removeChildren(h),s.setStyle(h.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),s.setStyle(h.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(h,o,o==a&&r),this.$useLineGroups()?h.className="ace_line_group":h.className="ace_line",n.push(l),o++}return n},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,i=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,t,i))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(e,t,i,n){for(var s,r=/(\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,a=this.dom.createFragment(this.element),l=0;s=r.exec(n);){var h=s[1],c=s[2],u=s[3],d=s[4],g=s[5];if(this.showInvisibles||!c){var f=l!=s.index?n.slice(l,s.index):"";if(l=s.index+s[0].length,f&&a.appendChild(this.dom.createTextNode(f,this.element)),h){var m=this.session.getScreenTabSize(t+s.index);a.appendChild(this.$tabStrings[m].cloneNode(!0)),t+=m-1}else if(c){if(this.showInvisibles)(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",v.textContent=o.stringRepeat(this.SPACE_CHAR,c.length),a.appendChild(v);else a.appendChild(this.com.createTextNode(c,this.element))}else if(u){(v=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",v.textContent=o.stringRepeat(this.SPACE_CHAR,u.length),a.appendChild(v)}else if(d){this.showInvisibles&&this.SPACE_CHAR;t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className=this.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=this.showInvisibles?this.SPACE_CHAR:"",a.appendChild(v)}else if(g){t+=1,(v=this.dom.createElement("span")).style.width=2*this.config.characterWidth+"px",v.className="ace_cjk",v.textContent=g,a.appendChild(v)}}}if(a.appendChild(this.dom.createTextNode(l?n.slice(l):n,this.element)),this.$textToken[i.type])e.appendChild(a);else{var p="ace_"+i.type.replace(/\./g," ace_"),v=this.dom.createElement("span");"fold"==i.type&&(v.style.width=i.value.length*this.config.characterWidth+"px"),v.className=p,v.appendChild(a),e.appendChild(v)}return t+n.length},this.renderIndentGuide=function(e,t,i){var n=t.search(this.$indentGuideRe);if(n<=0||n>=i)return t;if(" "==t[0]){for(var s=(n-=n%this.tabSize)/this.tabSize,o=0;o=r;)a=this.$renderToken(l,a,c,u.substring(0,r-n)),u=u.substring(r-n),n=r,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(o.stringRepeat(" ",i.indent),this.element)),a=0,r=i[++s]||Number.MAX_VALUE;0!=u.length&&(n+=u.length,a=this.$renderToken(l,a,c,u))}}i[i.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(e,t){var i=0,n=t[0],s=n.value;this.displayIndentGuides&&(s=this.renderIndentGuide(e,s)),s&&(i=this.$renderToken(e,i,n,s));for(var o=1;othis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,i,n,s);i=this.$renderToken(e,i,n,s)}},this.$renderOverflowMessage=function(e,t,i,n,s){i&&this.$renderToken(e,t,i,n.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=s?"":"",e.appendChild(o)},this.$renderLine=function(e,t,i){if(i||0==i||(i=this.session.getFoldLine(t)),i)var n=this.$getFoldLineTokens(t,i);else n=this.session.getTokens(t);var s=e;if(n.length){var o=this.session.getRowSplitData(t);if(o&&o.length){this.$renderWrappedLine(e,n,o);s=e.lastChild}else{s=e;this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,n)}}else this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s));if(this.showInvisibles&&s){i&&(t=i.end.row);var r=this.dom.createElement("span");r.className="ace_invisible ace_invisible_eol",r.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(r)}},this.$getFoldLineTokens=function(e,t){var i=this.session,n=[];var s=i.getTokens(e);return t.walk(function(e,t,o,r,a){null!=e?n.push({type:"fold",value:e}):(a&&(s=i.getTokens(t)),s.length&&function(e,t,i){for(var s=0,o=0;o+e[s].value.lengthi-t&&(r=r.substring(0,i-t)),n.push({type:e[s].type,value:r}),o=t+r.length,s+=1);oi?n.push({type:e[s].type,value:r.substring(0,i-o)}):n.push(e[s]),o+=r.length,s+=1}}(s,r,o))},t.end.row,this.session.getLine(t.end.row).length),n},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),t.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,i){"use strict";var n=e("../lib/dom"),s=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 i=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e.row)?this.session.$bidiHandler.getPosLeft(i.column):i.column*this.config.characterWidth),top:(i.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||r.top<0)&&i>1)){var a=this.cursors[s++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,r,e,t[i],this.session):this.isCursorInView(r,e)?(n.setStyle(l,"display","block"),n.translate(a,r.left,r.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>s;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=r,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(s.prototype),t.Cursor=s}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/event"),r=e("./lib/event_emitter").EventEmitter,a=function(e){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=s.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",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=s.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>32768?(this.coeff=32768/e,e=32768):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 h=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(h,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(h.prototype),t.ScrollBar=l,t.ScrollBarV=l,t.ScrollBarH=h,t.VScrollBar=l,t.HScrollBar=h}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,i){"use strict";var n=e("./lib/event"),s=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(e){i.pending=!1;var t=i.changes;if(t&&(n.blockIdle(100),i.changes=0,i.onRender(t)),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(e){var t=this.changes;return this.changes=0,t}}).call(s.prototype),t.RenderLoop=s}),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,i){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),r=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,h="function"==typeof ResizeObserver,c=200,u=t.FontMetrics=function(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.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",256),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()};(function(){n.implement(this,l),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",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},this.checkForSizeChanges=function(e){if(void 0===e&&(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 i=t[0].contentRect;e.checkForSizeChanges({height:i.height,width:i.width/256})}),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/256};return 0===t.width||0===t.height?null:t},this.$measureCharWidth=function(e){return this.$main.innerHTML=o.stringRepeat(e,256),this.$main.getBoundingClientRect().width/256},this.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(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=s.buildDom([e(0,0),e(c,0),e(0,c),e(c,c)],this.el)},this.transformCoordinates=function(e,t){e&&(e=o(1/this.$getZoom(this.el),e));function i(e,t,i){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*i[0]+t[0]*i[1])/n,(+e[1]*i[0]-e[0]*i[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function r(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var a=r(this.els[0]),l=r(this.els[1]),h=r(this.els[2]),u=r(this.els[3]),d=i(n(u,l),n(u,h),n(s(l,h),s(u,a))),g=o(1+d[0],n(l,a)),f=o(1+d[1],n(h,a));if(t){var m=t,p=d[0]*m[0]/c+d[1]*m[1]/c+1,v=s(o(m[0],g),o(m[1],f));return s(o(1/p/c,v),a)}var w=n(e,a),$=i(n(g,o(d[0],w)),n(f,o(d[1],w)),w);return o(c,$)}}).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,i){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./config"),r=e("./layer/gutter").Gutter,a=e("./layer/marker").Marker,l=e("./layer/text").Text,h=e("./layer/cursor").Cursor,c=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,d=e("./renderloop").RenderLoop,g=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,m='.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;}',p=e("./lib/useragent"),v=p.isIE;s.importCssString(m,"ace_editor.css");var w=function(e,t){var i=this;this.container=e||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.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 a(this.content);var n=this.$textLayer=new l(this.content);this.canvas=n.element,this.$markerFront=new a(this.content),this.$cursorLayer=new h(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){i.$scrollAnimation||i.session.setScrollTop(e.data-i.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(e){i.$scrollAnimation||i.session.setScrollLeft(e.data-i.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){i.updateCharacterSize(),i.onResize(!0,i.gutterWidth,i.$size.width,i.$size.height),i._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=!p.isIOS,this.$loop=new d(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,f),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()},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,i){if(void 0===t&&(t=1/0),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,i,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),i||(i=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,i,n);if(!this.$size.scrollerHeight||!i&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(e,t,i,n){n-=this.$extraHeight||0;var o=0,r=this.$size,a={width:r.width,height:r.height,scrollerHeight:r.scrollerHeight,scrollerWidth:r.scrollerWidth};if(n&&(e||r.height!=n)&&(r.height=n,o|=this.CHANGE_SIZE,r.scrollerHeight=r.height,this.$horizScroll&&(r.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),i&&(e||r.width!=i)){o|=this.CHANGE_SIZE,r.width=i,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,s.setStyle(this.scrollBarH.element.style,"left",t+"px"),s.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),r.scrollerWidth=Math.max(0,i-t-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",l),s.setStyle(this.scroller.style,"right",l),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return r.$dirty=!i||!n,o&&this._signal("resize",a),o},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=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.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 i=this.$cursorLayer.$pixelPos;if(i){t&&t.markerRange&&(i=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var n=this.layerConfig,o=i.top,r=i.left;o-=n.offset;var a=t&&t.useTextareaForIME?this.lineHeight:v?0:1;if(o<0||o>n.height-a)s.translate(this.textarea,0,0);else{var l=1;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0],a+=2}else o+=this.lineHeight+2;else o+=this.lineHeight;(r-=this.scrollLeft)>this.$size.scrollerWidth-l&&(r=this.$size.scrollerWidth-l),r+=this.gutterWidth+this.margin.left,s.setStyle(e,"height",a+"px"),s.setStyle(e,"width",l+"px"),s.translate(this.textarea,Math.min(r,this.$size.scrollerWidth-l),Math.min(o,this.$size.height-a))}}}else s.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,i,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},this.setMargin=function(e,t,i,n){var s=this.margin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|i,s.v=s.top+s.bottom,s.h=s.left+s.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 i=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(),i.firstRow!=this.layerConfig.firstRow&&i.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(i.firstRow-this.layerConfig.firstRow)*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}i=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-i.offset);var o=i.width+2*this.$padding+"px",r=i.minHeight+"px";s.setStyle(this.content.style,"width",o),s.setStyle(this.content.style,"height",r)}if(e&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-i.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),e&this.CHANGE_FULL)return this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),void this._signal("afterRender");if(e&this.CHANGE_SCROLL)return e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(i):this.$textLayer.scrollLines(i),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(i):this.$gutterLayer.scrollLines(i)),this.$markerBack.update(i),this.$markerFront.update(i),this.$cursorLayer.update(i),this.$moveTextAreaToCursor(),void this._signal("afterRender");e&this.CHANGE_TEXT?(this.$textLayer.update(i),this.$showGutter&&this.$gutterLayer.update(i)):e&this.CHANGE_LINES?(this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(i):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(i):e&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(i),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(i),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(i),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(i),this._signal("afterRender")}else this.$changes|=e},this.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,i=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(i+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&i>this.$maxPixelHeight&&(i=this.$maxPixelHeight);var n=!(i<=2*this.lineHeight)&&e>t;if(i!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=i+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,i),this.desiredHeight=i,this._signal("autosize")}},this.$computeLayerConfig=function(){var e=this.session,t=this.$size,i=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!i&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),r=this.$horizScroll!==o;r&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=t.scrollerHeight+this.lineHeight,h=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=h;var c=this.scrollMargin;this.session.setScrollTop(Math.max(-c.top,Math.min(this.scrollTop,n-t.scrollerHeight+c.bottom))),this.session.setScrollLeft(Math.max(-c.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+c.right)));var u=!i&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+h<0||this.scrollTop>c.top),d=a!==u;d&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var g,f,m=this.scrollTop%this.lineHeight,p=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),w=v+p,$=this.lineHeight;v=e.screenToDocumentRow(v,0);var b=e.getFoldLine(v);b&&(v=b.start.row),g=e.documentToScreenRow(v,0),f=e.getRowLength(v)*$,w=Math.min(e.screenToDocumentRow(w,0),e.getLength()-1),l=t.scrollerHeight+e.getRowLength(w)*$+f,m=this.scrollTop-g*$;var y=0;return(this.layerConfig.width!=s||r)&&(y=this.CHANGE_H_SCROLL),(r||d)&&(y|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),d&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:v,firstRowScreen:g,lastRow:w,lineHeight:$,characterWidth:this.characterWidth,minHeight:l,maxHeight:n,offset:m,gutterOffset:$?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/$)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),y},this.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var i=this.layerConfig;if(!(e>i.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(e){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,i){this.scrollCursorIntoView(e,i),this.scrollCursorIntoView(t,i)},this.scrollCursorIntoView=function(e,t,i){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),s=n.left,o=n.top,r=i&&i.top||0,a=i&&i.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+r>o?(t&&l+r>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):l+this.$size.scrollerHeight-as?(s=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 i;if(this.$hasCssTransforms){i={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else i=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-i.left-this.$padding,o=s/this.characterWidth,r=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),a=this.$blockCursor?Math.floor(o):Math.round(o);return{row:r,column:a,side:o-a>0?1:-1,offsetX:s}},this.screenToTextCoordinates=function(e,t){var i;if(this.$hasCssTransforms){i={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else i=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-i.left-this.$padding,o=s/this.characterWidth,r=this.$blockCursor?Math.floor(o):Math.round(o),a=Math.floor((t+this.scrollTop-i.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(r,0),s)},this.textToScreenCoordinates=function(e,t){var i=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:i.left+s-this.scrollLeft,pageY:i.top+o-this.scrollTop}},this.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){s.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?(s.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),s.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,i,n){var s=this.session;s.bgTokenizer.lines[i]=null;var o={type:t,value:e},r=s.getTokens(i);if(null==n)r.push(o);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(l.prototype);t.UIWorkerClient=function(e,t,i){var n=null,s=!1,a=Object.create(o),h=[],c=new l({messageBuffer:h,terminate:function(){},postMessage:function(e){h.push(e),n&&(s?setTimeout(u):u())}});c.setEmitSync=function(e){s=e};var u=function(){var e=h.shift();e.command?n[e.command].apply(n,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){c.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},r.loadModule(["worker",t],function(e){for(n=new e[i](a);h.length;)u()}),c},t.WorkerClient=l,t.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,i){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),r=function(e,t,i,n,s,o){var r=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=n,this.$onCursorChange=function(){setTimeout(function(){r.onCursorChange()})},this.$pos=i;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,s),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 s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=i.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(i){var n=t.createAnchor(i.row,i.column);n.$insertRight=!0,n.detach(),e.others.push(n)}),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,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=i),s&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;r>=0;r--){var a={row:(l=this.others[r]).row,column:l.column+o};this.doc.insertMergedLines(a,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;r>=0;r--){var l;a={row:(l=this.others[r]).row,column:l.column+o};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,s){t.removeMarker(i.markerId),i.markerId=t.addMarker(new n(i.row,i.column,i.row,i.column+e.length),s,null,!1)};i(this.pos,this.mainClass);for(var s=this.others.length;s--;)i(this.others[s],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,i=0;i1&&!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 i=e.length;i--;){var n=this.ranges.indexOf(e[i]);this.ranges.splice(n,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 n,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],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{i=this.getRange();var n=this.isBackwards(),o=i.start.row,r=i.end.row;if(o==r){if(n)var a=i.end,l=i.start;else a=i.start,l=i.end;return this.addRange(s.fromPoints(l,l)),void this.addRange(s.fromPoints(a,a))}var h=[],c=this.getLineRange(o,!0);c.start.column=i.start.column,h.push(c);for(var u=o+1;u1){var e=this.rangeList.ranges,t=e[e.length-1],i=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(i,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,i){var n=[],o=e.column0;)w--;if(w>0)for(var $=0;n[$].isEmpty();)$++;for(var b=w;b>=$;b--)n[b].isEmpty()&&n.splice(b,1)}return n}}.call(o.prototype);var d=e("./editor").Editor;function g(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",r),e.commands.addCommands(h.defaultCommands),function(e){var t=e.textInput.getElement(),i=!1;function n(t){i&&(e.renderer.setMouseCursor(""),i=!1)}a.addListener(t,"keydown",function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?i||(e.renderer.setMouseCursor("crosshair"),i=!0):i&&n()}),a.addListener(t,"keyup",n),a.addListener(t,"blur",n)}(e))}(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,i=e.length;i--;){var n=e[i];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,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(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(h.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(h.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,i=e.editor;if(i.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=i.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=i.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(i.exitMultiSelectMode(),n=t.exec(i,e.args||{})):n=t.multiSelectAction(i,e.args||{});else{var n=t.exec(i,e.args||{});i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,i){if(!this.inVirtualSelectionMode){var n,s=i&&i.keepOrder,r=1==i||i&&i.$byLines,a=this.session,l=this.selection,h=l.rangeList,c=(s?l:h).ranges;if(!c.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new o(a);this.inVirtualSelectionMode=!0;for(var g=c.length;g--;){if(r)for(;g>0&&c[g].start.row==c[g-1].end.row;)g--;d.fromOrientedRange(c[g]),d.index=g,this.selection=a.selection=d;var f=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===f||(n=f),d.toOrientedRange(c[g])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},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,i=[],n=0;nr&&(r=i.column),nc?e.insert(n,l.stringRepeat(" ",o-c)):e.remove(new s(n.row,n.column,n.row,n.column-o+c)),t.start.column=t.end.column=r,t.start.row=t.end.row=n.row,t.cursor=t.end}),t.fromOrientedRange(i[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var c=this.selection.getRange(),u=c.start.row,d=c.end.row,g=u==d;if(g){var f,m=this.session.getLength();do{f=this.session.getLine(d)}while(/[=:]/.test(f)&&++d0);u<0&&(u=0),d>=m&&(d=m-1)}var p=this.session.removeFullLines(u,d);p=this.$reAlignText(p,g),this.session.insert({row:u,column:0},p.join("\n")+"\n"),g||(c.start.column=0,c.end.column=p[p.length-1].length),this.selection.setRange(c)}},this.$reAlignText=function(e,t){var i,n,s,o=!0,r=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==i?(i=t[1].length,n=t[2].length,s=t[3].length,t):(i+n+s!=t[1].length+t[2].length+t[3].length&&(r=!1),i!=t[1].length&&(o=!1),i>t[1].length&&(i=t[1].length),nt[3].length&&(s=t[3].length),t):[e]}).map(t?h:o?r?function(e){return e[2]?a(i+n-e[2].length)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:h:function(e){return e[2]?a(i)+e[2]+a(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return l.stringRepeat(" ",e)}function h(e){return e[2]?a(i)+e[2]+a(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(d.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 i=e.oldSession;i&&(i.multiSelect.off("addRange",this.$onAddRange),i.multiSelect.off("removeRange",this.$onRemoveRange),i.multiSelect.off("multiSelect",this.$onMultiSelect),i.multiSelect.off("singleSelect",this.$onSingleSelect),i.multiSelect.lead.off("change",this.$checkMultiselectChange),i.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=g,e("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(e){g(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,i){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,i){var n=e.getLine(i);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,i){return null},this.indentationBlock=function(e,t,i){var s=/\S/,o=e.getLine(t),r=o.search(s);if(-1!=r){for(var a=i||o.length,l=e.getLength(),h=t,c=t;++th){var d=e.getLine(c).length;return new n(h,a,c,d)}}},this.openingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s+1},a=e.$findClosingBracket(t,r,o);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>r.row&&(a.row--,a.column=e.getLine(a.row).length),n.fromPoints(r,a)}},this.closingBracketBlock=function(e,t,i,s,o){var r={row:i,column:s},a=e.$findOpeningBracket(t,r);if(a)return a.column++,r.column--,n.fromPoints(a,r)}}).call(s.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(e,t,i){"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,i){"use strict";e("./lib/oop");var n=e("./lib/dom");e("./range").Range;function s(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)}(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(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var i=this.session.lineWidgets;i&&i.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))})}},this.updateOnFold=function(e,t){var i=t.lineWidgets;if(i&&e.action){for(var n=e.data,s=n.start.row,o=n.end.row,r="add"==e.action,a=s+1;a0&&!n[s];)s--;this.firstRow=i.firstRow,this.lastRow=i.lastRow,t.$cursorLayer.config=i;for(var r=s;r<=o;r++){var a=n[r];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:r,column:0},!0).top;a.coverLine||(l+=i.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-i.offset+"px";var h=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(h-=t.scrollLeft),a.el.style.left=h+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=i.width+2*i.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}}}).call(s.prototype),t.LineWidgets=s}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(e,t,i){"use strict";var n=e("../line_widgets").LineWidgets,s=e("../lib/dom"),o=e("../range").Range;t.showErrorMarker=function(e,t){var i=e.session;i.widgetManager||(i.widgetManager=new n(i),i.widgetManager.attach(e));var r=e.getCursorPosition(),a=r.row,l=i.widgetManager.getWidgetsAtRow(a).filter(function(e){return"errorMarker"==e.type})[0];l?l.destroy():a-=t;var h,c=function(e,t,i){var n=e.getAnnotations().sort(o.comparePoints);if(n.length){var s=function(e,t,i){for(var n=0,s=e.length-1;n<=s;){var o=n+s>>1,r=i(t,e[o]);if(r>0)n=o+1;else{if(!(r<0))return o;s=o-1}}return-(n+1)}(n,{row:t,column:-1},o.comparePoints);s<0&&(s=-s-1),s>=n.length?s=i>0?0:n.length-1:0===s&&i<0&&(s=n.length-1);var r=n[s];if(r&&i){if(r.row===t){do{r=n[s+=i]}while(r&&r.row===t);if(!r)return n.slice()}var a=[];t=r.row;do{a[i<0?"unshift":"push"](r),r=n[s+=i]}while(r&&r.row==t);return a.length&&a}}}(i,a,t);if(c){var u=c[0];r.column=(u.pos&&"number"!=typeof u.column?u.pos.sc:u.column)||0,r.row=u.row,h=e.renderer.$gutterLayer.$annotations[r.row]}else{if(l)return;h={text:["Looks good!"],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);var d={row:r.row,fixedWidth:!0,coverGutter:!0,el:s.createElement("div"),type:"errorMarker"},g=d.el.appendChild(s.createElement("div")),f=d.el.appendChild(s.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(r).left;f.style.left=m+e.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("
"),g.appendChild(s.createElement("div"));var p=function(e,t,i){if(0===t&&("esc"===i||"return"===i))return d.destroy(),{command:"null"}};d.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(p),i.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(p),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})},s.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,n){"use strict";e("./lib/fixoldbrowsers");var s=e("./lib/dom"),o=e("./lib/event"),r=e("./range").Range,a=e("./editor").Editor,l=e("./edit_session").EditSession,h=e("./undomanager").UndoManager,c=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,t.define=i("B9Yq"),t.edit=function(e,i){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 a)return e.env.editor;var r="";if(e&&/input|textarea/i.test(e.tagName)){var l=e;r=l.value,e=s.createElement("pre"),l.parentNode.replaceChild(e,l)}else e&&(r=e.textContent,e.innerHTML="");var h=t.createEditSession(r),u=new a(new c(e),h,i),d={document:h,editor:u,onResize:u.resize.bind(u,null)};return l&&(d.textarea=l),o.addListener(window,"resize",d.onResize),u.on("destroy",function(){o.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),u.container.env=u.env=d,u},t.createEditSession=function(e,t){var i=new l(e,t);return i.setUndoManager(new h),i},t.Range=r,t.Editor=a,t.EditSession=l,t.UndoManager=h,t.VirtualRenderer=c,t.version=t.config.version}),ace.require(["ace/ace"],function(i){for(var s in i&&(i.config.init(!0),i.define=ace.define),window.ace||(window.ace=i),i)i.hasOwnProperty(s)&&(window.ace[s]=i[s]);window.ace.default=window.ace,"object"==n(e)&&"object"==n(t)&&e&&(e.exports=window.ace)})}).call(this,i("YuTi")(e))},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}}},[[12,0]]]); \ No newline at end of file diff --git a/public/js/activity.js b/public/js/activity.js index 6952e855b..37934eaa2 100644 --- a/public/js/activity.js +++ b/public/js/activity.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{1:function(t,a,e){t.exports=e("hUgz")},"KHd+":function(t,a,e){"use strict";function n(t,a,e,n,o,i,s,r){var c,l="function"==typeof t?t.options:t;if(a&&(l.render=a,l.staticRenderFns=e,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=r?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,a){return c.call(a),u(t,a)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}e.d(a,"a",function(){return n})},hUgz:function(t,a,e){Vue.component("activity-component",e("tXHz").default)},tXHz:function(t,a,e){"use strict";e.r(a);function n(t){return function(t){if(Array.isArray(t)){for(var a=0,e=new Array(t.length);a10?t.complete():axios.get("/api/v1/notifications",{params:{page:this.notificationCursor}}).then(function(e){if(e.data.length){var o,i=e.data.filter(function(t){return!("share"==t.type&&!status)});(o=a.notifications).push.apply(o,n(i)),a.notificationCursor++,t.loaded()}else t.complete()})},truncate:function(t){return t.length<=15?t:t.slice(0,15)+"..."},timeAgo:function(t){var a=Date.parse(t),e=Math.floor((new Date-a)/1e3),n=Math.floor(e/31536e3);return n>=1?n+"y":(n=Math.floor(e/604800))>=1?n+"w":(n=Math.floor(e/86400))>=1?n+"d":(n=Math.floor(e/3600))>=1?n+"h":(n=Math.floor(e/60))>=1?n+"m":Math.floor(e)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},followProfile:function(t){var a=this,e=t.account.id;axios.post("/i/follow",{item:e}).then(function(t){a.notifications.map(function(t){t.account.id===e&&(t.relationship.following=!0)})}).catch(function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")})},viewContext:function(t){switch(t.type){case"follow":return t.account.url;case"mention":return t.status.url;case"like":case"favourite":case"comment":return t.status.url}return"/"}}},i=e("KHd+"),s=Object(i.a)(o,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"container"},[e("div",{staticClass:"row my-5"},[e("div",{staticClass:"col-12 col-md-8 offset-md-2"},[t._l(t.notifications,function(a,n){return t.notifications.length>0?e("div",{staticClass:"media mb-3 align-items-center px-3 border-bottom pb-3"},[e("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:a.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),e("div",{staticClass:"media-body font-weight-light"},["favourite"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" liked your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"comment"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" commented on your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"mention"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(a.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t")])]):"follow"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" followed you.\n\t\t\t\t\t\t\t")])]):"share"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" shared your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),e("div",{staticClass:"align-items-center"},[e("span",{staticClass:"small text-muted",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.created_at}},[t._v(t._s(t.timeAgo(a.created_at)))])])]),t._v(" "),e("div",[a.status&&a.status&&a.status.media_attachments&&a.status.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.url}},[e("img",{attrs:{src:a.status.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):a.status&&a.status.parent&&a.status.parent.media_attachments&&a.status.parent.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.parent.url}},[e("img",{attrs:{src:a.status.parent.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):e("div",[e("a",{staticClass:"btn btn-outline-primary py-0 font-weight-bold",attrs:{href:t.viewContext(a)}},[t._v("View")])])])]):t._e()}),t._v(" "),t.notifications.length?e("div",[e("infinite-loading",{on:{infinite:t.infiniteNotifications}},[e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?e("div",{staticClass:"text-lighter text-center py-3"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])])])},[function(){var t=this.$createElement,a=this._self._c||t;return a("p",{staticClass:"mb-0"},[a("i",{staticClass:"fas fa-inbox fa-3x"})])}],!1,null,null,null);a.default=s.exports}},[[1,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{1:function(t,a,e){t.exports=e("hUgz")},"KHd+":function(t,a,e){"use strict";function n(t,a,e,n,o,i,s,r){var c,l="function"==typeof t?t.options:t;if(a&&(l.render=a,l.staticRenderFns=e,l._compiled=!0),n&&(l.functional=!0),i&&(l._scopeId="data-v-"+i),s?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},l._ssrRegister=c):o&&(c=r?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,a){return c.call(a),u(t,a)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}e.d(a,"a",function(){return n})},hUgz:function(t,a,e){Vue.component("activity-component",e("tXHz").default)},tXHz:function(t,a,e){"use strict";e.r(a);function n(t){return function(t){if(Array.isArray(t)){for(var a=0,e=new Array(t.length);a10?t.complete():axios.get("/api/v1/notifications",{params:{page:this.notificationCursor}}).then(function(e){if(e.data.length){var o,i=e.data.filter(function(t){return!("share"==t.type&&!status)});(o=a.notifications).push.apply(o,n(i)),a.notificationCursor++,t.loaded()}else t.complete()})},truncate:function(t){return t.length<=15?t:t.slice(0,15)+"..."},timeAgo:function(t){var a=Date.parse(t),e=Math.floor((new Date-a)/1e3),n=Math.floor(e/31536e3);return n>=1?n+"y":(n=Math.floor(e/604800))>=1?n+"w":(n=Math.floor(e/86400))>=1?n+"d":(n=Math.floor(e/3600))>=1?n+"h":(n=Math.floor(e/60))>=1?n+"m":Math.floor(e)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},followProfile:function(t){var a=this,e=t.account.id;axios.post("/i/follow",{item:e}).then(function(t){a.notifications.map(function(t){t.account.id===e&&(t.relationship.following=!0)})}).catch(function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")})},viewContext:function(t){switch(t.type){case"follow":return t.account.url;case"mention":return t.status.url;case"like":case"favourite":case"comment":return t.status.url}return"/"}}},i=e("KHd+"),s=Object(i.a)(o,function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"container"},[e("div",{staticClass:"row my-5"},[e("div",{staticClass:"col-12 col-md-8 offset-md-2"},[t._l(t.notifications,function(a,n){return t.notifications.length>0?e("div",{staticClass:"media mb-3 align-items-center px-3 border-bottom pb-3"},[e("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:a.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),e("div",{staticClass:"media-body font-weight-light"},["favourite"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" liked your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"comment"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" commented on your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"mention"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(a.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t")])]):"follow"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" followed you.\n\t\t\t\t\t\t\t")])]):"share"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" shared your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),e("div",{staticClass:"align-items-center"},[e("span",{staticClass:"small text-muted",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.created_at}},[t._v(t._s(t.timeAgo(a.created_at)))])])]),t._v(" "),e("div",[a.status&&a.status&&a.status.media_attachments&&a.status.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.url}},[e("img",{attrs:{src:a.status.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):a.status&&a.status.parent&&a.status.parent.media_attachments&&a.status.parent.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.parent.url}},[e("img",{attrs:{src:a.status.parent.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):e("div",[e("a",{staticClass:"btn btn-outline-primary py-0 font-weight-bold",attrs:{href:t.viewContext(a)}},[t._v("View")])])])]):t._e()}),t._v(" "),t.notifications.length?e("div",[e("infinite-loading",{on:{infinite:t.infiniteNotifications}},[e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?e("div",{staticClass:"text-lighter text-center py-3"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])])])},[function(){var t=this.$createElement,a=this._self._c||t;return a("p",{staticClass:"mb-0"},[a("i",{staticClass:"fas fa-inbox fa-3x"})])}],!1,null,null,null);a.default=s.exports}},[[1,0]]]); \ No newline at end of file diff --git a/public/js/app.js b/public/js/app.js index baa2491fc..cc5c1e1e7 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{"+lRy":function(e,n){},0:function(e,n,t){t("JO1w"),t("+lRy"),t("xWuY"),t("YfGV"),e.exports=t("RvBz")},"8oxB":function(e,n){var t,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var f,s=[],a=!1,l=-1;function d(){a&&f&&(a=!1,f.length?s=f.concat(s):l=-1,s.length&&w())}function w(){if(!a){var e=c(d);a=!0;for(var n=s.length;n;){for(f=s,s=[];++l1)for(var t=1;t1)for(var t=1;tl;)i(s,n=e[l++])&&(~o(u,n)||u.push(n));return u}},"1k5C":function(t,e,n){var i=n("zghF"),r=n("FzTG"),o=n("2WkB");t.exports=function(t){return function(e,n,a){var s,l=i(e),u=r(l.length),c=o(a,u);if(t&&n!=n){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((t||c in l)&&l[c]===n)return t||c||0;return!t&&-1}}},2:function(t,e,n){t.exports=n("9rzN")},"2Cff":function(t,e){e.f={}.propertyIsEnumerable},"2WkB":function(t,e,n){var i=n("fzXU"),r=Math.max,o=Math.min;t.exports=function(t,e){return(t=i(t))<0?r(t+e,0):o(t,e)}},"3UdA":function(t,e,n){"use strict";var i=n("M3/C"),r=n("XdFA"),o=n("fYXY"),a=n("Kj25"),s=n("RcZF"),l=n("FzTG"),u=n("V0AS"),c=n("EeJJ");r(r.S+r.F*!n("neMV")(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,r,d,f=o(t),h="function"==typeof this?this:Array,p=arguments.length,m=p>1?arguments[1]:void 0,b=void 0!==m,g=0,v=c(f);if(b&&(m=i(m,p>2?arguments[2]:void 0,2)),null==v||h==Array&&s(v))for(n=new h(e=l(f.length));e>g;g++)u(n,g,b?m(f[g],g):f[g]);else for(d=v.call(f),n=new h;!(r=d.next()).done;g++)u(n,g,b?a(d,m,[r.value,g],!0):r.value);return n.length=g,n}})},"3gpc":function(t,e,n){"use strict";var i=n("45Vf"),r=n("DDXM"),o=n("nBEg"),a=n("2Cff"),s=n("fYXY"),l=n("Mo8M"),u=Object.assign;t.exports=!u||n("OZBl")(function(){var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(t){e[t]=t}),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=i})?function(t,e){for(var n=s(t),u=arguments.length,c=1,d=o.f,f=a.f;u>c;)for(var h,p=l(arguments[c++]),m=d?r(p).concat(d(p)):r(p),b=m.length,g=0;b>g;)h=m[g++],i&&!f.call(p,h)||(n[h]=p[h]);return n}:u},"45Vf":function(t,e,n){t.exports=!n("OZBl")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},"4Toj":function(t,e,n){var i=n("54Wo");t.exports=function(t,e){var n=i(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}},"4Wae":function(t,e,n){t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=9)}([function(t,e,n){var i=n(6);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals),(0,n(3).default)("09280948",i,!0,{})},function(t,e,n){var i=n(8);"string"==typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals),(0,n(3).default)("51e4c3f9",i,!0,{})},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,i=t[1]||"",r=t[3];if(!r)return i;if(e&&"function"==typeof btoa){var o=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[i].concat(a).concat([o]).join("\n")}return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},r=0;rn.parts.length&&(i.parts.length=n.parts.length)}else{var a=[];for(r=0;r',"\nscript:\n...\ninfiniteHandler($state) {\n ajax('https://www.example.com/api/news')\n .then((res) => {\n if (res.data.length) {\n $state.loaded();\n } else {\n $state.complete();\n }\n });\n}\n...","","more details: https://github.com/PeachScript/vue-infinite-loading/issues/57#issuecomment-324370549"].join("\n"),INFINITE_EVENT:"`:on-infinite` property will be deprecated soon, please use `@infinite` event instead.",IDENTIFIER:"the `reset` event will be deprecated soon, please reset this component by change the `identifier` property."},a={INFINITE_LOOP:["executed the callback function more than ".concat(i.loopCheckMaxCalls," times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper ranther than automatic searching, you can do this:"),'\n\x3c!-- add a special attribute for the real scroll wrapper --\x3e\n
\n ...\n \x3c!-- set force-use-infinite-wrapper --\x3e\n \n
\nor\n
\n ...\n \x3c!-- set force-use-infinite-wrapper as css selector of the real scroll wrapper --\x3e\n \n
\n ',"more details: https://github.com/PeachScript/vue-infinite-loading/issues/55#issuecomment-316934169"].join("\n")},s={READY:0,LOADING:1,COMPLETE:2,ERROR:3},l={color:"#666",fontSize:"14px",padding:"10px 0"},u={mode:"development",props:{spinner:"default",distance:100,forceUseInfiniteWrapper:!1},system:i,slots:{noResults:"No results :(",noMore:"No more data :)",error:"Opps, something went wrong :(",errorBtnText:"Retry",spinner:""},WARNINGS:o,ERRORS:a,STATUS:s},c=n(4),d=n.n(c),f={BUBBLES:{render:function(t){return t("span",{attrs:{class:"loading-bubbles"}},Array.apply(Array,Array(8)).map(function(){return t("span",{attrs:{class:"bubble-item"}})}))}},CIRCLES:{render:function(t){return t("span",{attrs:{class:"loading-circles"}},Array.apply(Array,Array(8)).map(function(){return t("span",{attrs:{class:"circle-item"}})}))}},DEFAULT:{render:function(t){return t("i",{attrs:{class:"loading-default"}})}},SPIRAL:{render:function(t){return t("i",{attrs:{class:"loading-spiral"}})}},WAVEDOTS:{render:function(t){return t("span",{attrs:{class:"loading-wave-dots"}},Array.apply(Array,Array(5)).map(function(){return t("span",{attrs:{class:"wave-item"}})}))}}};function h(t,e,n,i,r,o,a,s){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),a?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=l):r&&(l=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(t,e){return l.call(e),c(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}var p=h({name:"Spinner",computed:{spinnerView:function(){return f[(this.$attrs.spinner||"").toUpperCase()]||this.spinnerInConfig},spinnerInConfig:function(){return u.slots.spinner&&"string"==typeof u.slots.spinner?{render:function(){return this._v(u.slots.spinner)}}:"object"===d()(u.slots.spinner)?u.slots.spinner:f[u.props.spinner.toUpperCase()]||f.DEFAULT}}},function(){var t=this.$createElement;return(this._self._c||t)(this.spinnerView,{tag:"component"})},[],!1,function(t){var e=n(5);e.__inject__&&e.__inject__(t)},"46b20d22",null);p.options.__file="Spinner.vue";var m=p.exports;function b(t){"production"!==u.mode&&console.warn("[Vue-infinite-loading warn]: ".concat(t))}var g={timers:[],caches:[],throttle:function(t){var e=this;-1===this.caches.indexOf(t)&&(this.caches.push(t),this.timers.push(setTimeout(function(){t(),e.caches.splice(e.caches.indexOf(t),1),e.timers.shift()},u.system.throttleLimit)))},reset:function(){this.timers.forEach(function(t){clearTimeout(t)}),this.timers.length=0,this.caches=[]}},v={isChecked:!1,timer:null,times:0,track:function(){var t=this;this.times+=1,clearTimeout(this.timer),this.timer=setTimeout(function(){t.isChecked=!0},u.system.loopCheckTimeout),this.times>u.system.loopCheckMaxCalls&&(function(t){console.error("[Vue-infinite-loading error]: ".concat(t))}(a.INFINITE_LOOP),this.isChecked=!0)}},y={key:"_infiniteScrollHeight",getScrollElm:function(t){return t===window?document.documentElement:t},save:function(t){var e=this.getScrollElm(t);e[this.key]=e.scrollHeight},restore:function(t){var e=this.getScrollElm(t);"number"==typeof e[this.key]&&(e.scrollTop=e.scrollHeight-e[this.key]+e.scrollTop),this.remove(e)},remove:function(t){void 0!==t[this.key]&&delete t[this.key]}};function w(t){return t.offsetWidth+t.offsetHeight>0}var S=h({name:"InfiniteLoading",data:function(){return{scrollParent:null,scrollHandler:null,isFirstLoad:!0,status:s.READY,slots:u.slots}},components:{Spinner:m},computed:{isShowSpinner:function(){return this.status===s.LOADING},isShowError:function(){return this.status===s.ERROR},isShowNoResults:function(){return this.status===s.COMPLETE&&this.isFirstLoad},isShowNoMore:function(){return this.status===s.COMPLETE&&!this.isFirstLoad},slotStyles:function(){var t=this,e={};return Object.keys(u.slots).forEach(function(n){var i=function(t){return t.replace(/[A-Z]/g,function(t){return"-".concat(t.toLowerCase())})}(n);(!t.$slots[i]&&!u.slots[n].render||t.$slots[i]&&!t.$slots[i][0].tag)&&(e[n]=l)}),e}},props:{distance:{type:Number,default:u.props.distance},spinner:String,direction:{type:String,default:"bottom"},forceUseInfiniteWrapper:{type:[Boolean,String],default:u.props.forceUseInfiniteWrapper},identifier:{default:+new Date},onInfinite:Function},watch:{identifier:function(){this.stateChanger.reset()}},mounted:function(){var t=this;this.$watch("forceUseInfiniteWrapper",function(){t.scrollParent=t.getScrollParent()},{immediate:!0}),this.scrollHandler=function(e){t.status===s.READY&&(e&&e.constructor===Event&&w(t.$el)?g.throttle(t.attemptLoad):t.attemptLoad())},setTimeout(function(){t.scrollHandler(),t.scrollParent.addEventListener("scroll",t.scrollHandler,r)},1),this.$on("$InfiniteLoading:loaded",function(e){t.isFirstLoad=!1,"top"===t.direction&&t.$nextTick(function(){y.restore(t.scrollParent)}),t.status===s.LOADING&&t.$nextTick(t.attemptLoad.bind(null,!0)),e&&e.target===t||b(o.STATE_CHANGER)}),this.$on("$InfiniteLoading:complete",function(e){t.status=s.COMPLETE,t.$nextTick(function(){t.$forceUpdate()}),t.scrollParent.removeEventListener("scroll",t.scrollHandler,r),e&&e.target===t||b(o.STATE_CHANGER)}),this.$on("$InfiniteLoading:reset",function(e){t.status=s.READY,t.isFirstLoad=!0,y.remove(t.scrollParent),t.scrollParent.addEventListener("scroll",t.scrollHandler,r),setTimeout(function(){g.reset(),t.scrollHandler()},1),e&&e.target===t||b(o.IDENTIFIER)}),this.stateChanger={loaded:function(){t.$emit("$InfiniteLoading:loaded",{target:t})},complete:function(){t.$emit("$InfiniteLoading:complete",{target:t})},reset:function(){t.$emit("$InfiniteLoading:reset",{target:t})},error:function(){t.status=s.ERROR,g.reset()}},this.onInfinite&&b(o.INFINITE_EVENT)},deactivated:function(){this.status===s.LOADING&&(this.status=s.READY),this.scrollParent.removeEventListener("scroll",this.scrollHandler,r)},activated:function(){this.scrollParent.addEventListener("scroll",this.scrollHandler,r)},methods:{attemptLoad:function(t){var e=this;this.status!==s.COMPLETE&&w(this.$el)&&this.getCurrentDistance()<=this.distance?(this.status=s.LOADING,"top"===this.direction&&this.$nextTick(function(){y.save(e.scrollParent)}),"function"==typeof this.onInfinite?this.onInfinite.call(null,this.stateChanger):this.$emit("infinite",this.stateChanger),!t||this.forceUseInfiniteWrapper||v.isChecked||v.track()):this.status===s.LOADING&&(this.status=s.READY)},getCurrentDistance:function(){return"top"===this.direction?"number"==typeof this.scrollParent.scrollTop?this.scrollParent.scrollTop:this.scrollParent.pageYOffset:this.$el.getBoundingClientRect().top-(this.scrollParent===window?window.innerHeight:this.scrollParent.getBoundingClientRect().bottom)},getScrollParent:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.$el;return"string"==typeof this.forceUseInfiniteWrapper&&(t=e.querySelector(this.forceUseInfiniteWrapper)),t||("BODY"===e.tagName?t=window:!this.forceUseInfiniteWrapper&&["scroll","auto"].indexOf(getComputedStyle(e).overflowY)>-1?t=e:(e.hasAttribute("infinite-wrapper")||e.hasAttribute("data-infinite-wrapper"))&&(t=e)),t||this.getScrollParent(e.parentNode)}},destroyed:function(){!this.status!==s.COMPLETE&&(g.reset(),y.remove(this.scrollParent),this.scrollParent.removeEventListener("scroll",this.scrollHandler,r))}},function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"infinite-loading-container"},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowSpinner,expression:"isShowSpinner"}],staticClass:"infinite-status-prompt",style:t.slotStyles.spinner},[t._t("spinner",[n("spinner",{attrs:{spinner:t.spinner}})])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoResults,expression:"isShowNoResults"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noResults},[t._t("no-results",[t.slots.noResults.render?n(t.slots.noResults,{tag:"component"}):[t._v(t._s(t.slots.noResults))]])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowNoMore,expression:"isShowNoMore"}],staticClass:"infinite-status-prompt",style:t.slotStyles.noMore},[t._t("no-more",[t.slots.noMore.render?n(t.slots.noMore,{tag:"component"}):[t._v(t._s(t.slots.noMore))]])],2),t._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:t.isShowError,expression:"isShowError"}],staticClass:"infinite-status-prompt",style:t.slotStyles.error},[t._t("error",[t.slots.error.render?n(t.slots.error,{tag:"component",attrs:{trigger:t.attemptLoad}}):[t._v("\n "+t._s(t.slots.error)+"\n "),n("br"),t._v(" "),n("button",{staticClass:"btn-try-infinite",domProps:{textContent:t._s(t.slots.errorBtnText)},on:{click:t.attemptLoad}})]],{trigger:t.attemptLoad})],2)])},[],!1,function(t){var e=n(7);e.__inject__&&e.__inject__(t)},"46b21138",null);S.options.__file="InfiniteLoading.vue";var x=S.exports;function T(t){u.mode=t.config.productionTip?"development":"production"}Object.defineProperty(x,"install",{configurable:!1,enumerable:!1,value:function(t,e){Object.assign(u.props,e&&e.props),Object.assign(u.slots,e&&e.slots),Object.assign(u.system,e&&e.system),t.component("infinite-loading",x),T(t)}}),"undefined"!=typeof window&&window.Vue&&(window.Vue.component("infinite-loading",x),T(window.Vue)),e.default=x}])},"4kDO":function(t,e,n){"use strict";var i=n("xZdT")(!0);n("H3kC")(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},"54Wo":function(t,e,n){var i=n("yNUO");t.exports=function(t,e){var n=i(t),r=i(e);return n.getTime()-r.getTime()}},"6DAA":function(t,e,n){var i=n("kOWh");t.exports=function(){var t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],e=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],u={MMM:function(e){return t[e.getMonth()]},MMMM:function(t){return e[t.getMonth()]},dd:function(t){return n[t.getDay()]},ddd:function(t){return r[t.getDay()]},dddd:function(t){return o[t.getDay()]},A:function(t){return t.getHours()/12>=1?a[1]:a[0]},a:function(t){return t.getHours()/12>=1?s[1]:s[0]},aa:function(t){return t.getHours()/12>=1?l[1]:l[0]}};return["M","D","DDD","d","Q","W"].forEach(function(t){u[t+"o"]=function(e,n){return function(t){var e=t%100;if(e>20||e<10)switch(e%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"}(n[t](e))}}),{formatters:u,formattingTokensRegExp:i(u)}}},"7jYL":function(t,e,n){var i=n("OIIs");t.exports=Array.isArray||function(t){return"Array"==i(t)}},"8oxB":function(t,e){var n,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,u=[],c=!1,d=-1;function f(){c&&l&&(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var t=s(f);c=!0;for(var e=u.length;e;){for(l=u,u=[];++d1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:e;return m(e)?e.reduce(function(e,n){return[].concat(F(e),[t(n,n)])},[]):N(e)?B(e).reduce(function(n,i){return function(t){for(var e=1;e2&&void 0!==arguments[2]?arguments[2]:null;if(!(e=m(e)?e.join("."):e)||!I(t))return n;if(e in t)return t[e];var i=(e=String(e).replace(/\[(\d+)]/g,".$1")).split(".").filter(Boolean);return 0===i.length?n:i.every(function(e){return I(t)&&e in t&&null!=(t=t[e])})?t:n};function R(t){return(R="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)}var H=function(t){return R(t)},z=function(t){return Object.prototype.toString.call(t).slice(8,-1)},G=function(t){return void 0===t},U=function(t){return null===t},W=function(t){return"function"===H(t)},Y=function(t){return"boolean"===H(t)},X=function(t){return"string"===H(t)},q=function(t){return"number"===H(t)},K=function(t){return t instanceof Date},J=function(t){return"RegExp"===z(t)},Z=function t(e){var n=O(e),i=!0,r=!1,o=void 0;try{for(var a,s=n[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var l=a.value,u=e[l];e[l]=u&&I(u)?t(u):u}}catch(t){r=!0,o=t}finally{try{i||null==s.return||s.return()}finally{if(r)throw o}}return P(e)}({breakpoints:["xs","sm","md","lg","xl"],BAlert:{dismissLabel:"Close",variant:"info"},BBadge:{variant:"secondary"},BButton:{variant:"secondary"},BButtonClose:{textVariant:null,ariaLabel:"Close"},BCardSubTitle:{subTitleTextVariant:"muted"},BCarousel:{labelPrev:"Previous Slide",labelNext:"Next Slide",labelGotoSlide:"Goto Slide",labelIndicators:"Select a slide to display"},BDropdown:{toggleText:"Toggle Dropdown",variant:"secondary",splitVariant:null},BFormFile:{browseText:"Browse",placeholder:"No file chosen",dropPlaceholder:"Drop files here"},BFormText:{textVariant:"muted"},BImg:{blankColor:"transparent"},BImgLazy:{blankColor:"transparent"},BJumbotron:{bgVariant:null,borderVariant:null,textVariant:null},BListGroupItem:{variant:null},BModal:{titleTag:"h5",size:"md",headerBgVariant:null,headerBorderVariant:null,headerTextVariant:null,headerCloseVariant:null,bodyBgVariant:null,bodyTextVariant:null,footerBgVariant:null,footerBorderVariant:null,footerTextVariant:null,cancelTitle:"Cancel",cancelVariant:"secondary",okTitle:"OK",okVariant:"primary",headerCloseLabel:"Close"},BNavbar:{variant:null},BNavbarToggle:{label:"Toggle navigation"},BProgress:{variant:null},BProgressBar:{variant:null},BSpinner:{variant:null},BTable:{selectedVariant:"primary",headVariant:null,footVariant:null},BToast:{toaster:"b-toaster-top-right",autoHideDelay:5e3,variant:null,toastClass:null,headerClass:null,bodyClass:null,solid:!1},BToaster:{ariaLive:null,ariaAtomic:null,role:null},BTooltip:{delay:0,boundary:"scrollParent",boundaryPadding:5},BPopover:{delay:0,boundary:"scrollParent",boundaryPadding:5}});function Q(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};if(N(t)){var e=O(t),n=!0,i=!1,r=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if(!j(Z,s))return void u('config: unknown config property "'.concat(s,'"'));var l=t[s];if("breakpoints"===s){var c=t.breakpoints;!m(c)||c.length<2||c.some(function(t){return!X(t)||0===t.length})?u('config: "breakpoints" must be an array of at least 2 breakpoint names'):this.$_config.breakpoints=L(c)}else if(N(l)){var d=O(l),f=!0,h=!1,p=void 0;try{for(var b,g=d[Symbol.iterator]();!(f=(b=g.next()).done);f=!0){var v=b.value;j(Z[s],v)?(this.$_config[s]=this.$_config[s]||{},G(l[v])||(this.$_config[s][v]=L(l[v]))):u('config: unknown config property "'.concat(s,'.{$prop}"'))}}catch(t){h=!0,p=t}finally{try{f||null==g.return||g.return()}finally{if(h)throw p}}}}}catch(t){i=!0,r=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw r}}}}},{key:"resetConfig",value:function(){this.$_config={}}},{key:"getConfig",value:function(){return L(this.$_config)}},{key:"getConfigValue",value:function(t){return L(V(this.$_config,t,V(Z,t)))}},{key:"defaults",get:function(){return Z}}])&&Q(e.prototype,n),i&&Q(e,i),t}(),et=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r;e.prototype.$bvConfig=r.prototype.$bvConfig=e.prototype.$bvConfig||r.prototype.$bvConfig||new tt,e.prototype.$bvConfig.setConfig(t)};function nt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var it,rt,ot=(it=!1,rt=["Multiple instances of Vue detected!","You may need to set up an alias for Vue in your bundler config.","See: https://bootstrap-vue.js.org/docs#using-module-bundlers"].join("\n"),function(t){it||r===t||o.k||u(rt),it=!0}),at=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.components,n=t.directives,i=t.plugins,r=function t(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.installed||(t.installed=!0,ot(r),et(o,r),ct(r,e),ft(r,n),lt(r,i))};return r.installed=!1,r},st=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{},{install:at(t)})},lt=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)n&&e[n]&&t.use(e[n])},ut=function(t,e,n){t&&e&&n&&t.component(e,n)},ct=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)ut(t,n,e[n])},dt=function(t,e,n){t&&e&&n&&t.directive(e.replace(/^VB/,"B"),n)},ft=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};for(var n in e)dt(t,n,e[n])},ht=function(t){var e=E(null);return function(){for(var n=arguments.length,i=new Array(n),r=0;r1&&void 0!==arguments[1]?arguments[1]:null;return e?mt("".concat(t,".").concat(e)):mt(t)||{}},gt=function(){return mt("breakpoints")},vt=ht(function(){return gt()}),yt=function(){return L(vt())},wt=ht(function(){var t=yt();return t[0]="",t}),St=o.i?window:{},xt=o.b?document:{},Tt="undefined"!=typeof Element?Element.prototype:{},kt=Tt.matches||Tt.msMatchesSelector||Tt.webkitMatchesSelector,Ot=Tt.closest||function(t){var e=this;do{if(Dt(e,t))return e;e=e.parentElement||e.parentNode}while(!U(e)&&e.nodeType===Node.ELEMENT_NODE);return null},Bt=St.requestAnimationFrame||St.webkitRequestAnimationFrame||St.mozRequestAnimationFrame||St.msRequestAnimationFrame||St.oRequestAnimationFrame||function(t){return setTimeout(t,16)},Ct=St.MutationObserver||St.WebKitMutationObserver||St.MozMutationObserver||null,_t=function(t){return o.e?I(t)?t:{useCapture:Boolean(t||!1)}:Boolean(I(t)?t.useCapture:t)},$t=function(t,e,n,i){t&&t.addEventListener&&t.addEventListener(e,n,_t(i))},Pt=function(t,e,n,i){t&&t.removeEventListener&&t.removeEventListener(e,n,_t(i))},Et=function(t){return Boolean(t&&t.nodeType===Node.ELEMENT_NODE)},jt=function(t){if(!Et(t)||!Lt(xt.body,t))return!1;if("none"===t.style.display)return!1;var e=Yt(t);return Boolean(e&&e.height>0&&e.width>0)},It=function(t){return!Et(t)||t.disabled||Boolean(Ut(t,"disabled"))||Ht(t,"disabled")},Nt=function(t){return Et(t)&&t.offsetHeight},At=function(t,e){return p((Et(e)?e:xt).querySelectorAll(t))},Mt=function(t,e){return(Et(e)?e:xt).querySelector(t)||null},Dt=function(t,e){return!!Et(t)&&kt.call(t,e)},Ft=function(t,e){if(!Et(e))return null;var n=Ot.call(e,t);return n===e?null:n},Lt=function(t,e){return!(!t||!W(t.contains))&&t.contains(e)},Vt=function(t,e){e&&Et(t)&&t.classList&&t.classList.add(e)},Rt=function(t,e){e&&Et(t)&&t.classList&&t.classList.remove(e)},Ht=function(t,e){return!!(e&&Et(t)&&t.classList)&&t.classList.contains(e)},zt=function(t,e,n){e&&Et(t)&&t.setAttribute(e,n)},Gt=function(t,e){e&&Et(t)&&t.removeAttribute(e)},Ut=function(t,e){return e&&Et(t)?t.getAttribute(e):null},Wt=function(t,e){return e&&Et(t)?t.hasAttribute(e):null},Yt=function(t){return Et(t)?t.getBoundingClientRect():null},Xt=function(t){return o.i&&Et(t)?St.getComputedStyle(t):{}},qt=function(t){var e={top:0,left:0};if(!Et(t)||0===t.getClientRects().length)return e;var n=Yt(t);if(n){var i=t.ownerDocument.defaultView;e.top=n.top+i.pageYOffset,e.left=n.left+i.pageXOffset}return e},Kt=function(t){var e={top:0,left:0};if(!Et(t))return e;var n={top:0,left:0},i=Xt(t);if("fixed"===i.position)e=Yt(t)||e;else{e=qt(t);for(var r=t.ownerDocument,o=t.offsetParent||r.documentElement;o&&(o===r.body||o===r.documentElement)&&"static"===Xt(o).position;)o=o.parentNode;if(o&&o!==t&&o.nodeType===Node.ELEMENT_NODE){n=qt(o);var a=Xt(o);n.top+=parseFloat(a.borderTopWidth),n.left+=parseFloat(a.borderLeftWidth)}}return{top:e.top-n.top-parseFloat(i.marginTop),left:e.left-n.left-parseFloat(i.marginLeft)}},Jt=function(){return(Jt=Object.assign||function(t){for(var e,n=1,i=arguments.length;n1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Boolean(e[t]||n[t])},le=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=n[t]||i[t];return W(r)?r(e):r},ue={methods:{hasNormalizedSlot:function(t){return se(t,this.$scopedSlots,this.$slots)},normalizeSlot:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=le(t,e,this.$scopedSlots,this.$slots);return n?g(n):n}}};var ce={disabled:{type:Boolean,default:!1},ariaLabel:{type:String,default:function(){return bt("BButtonClose","ariaLabel")}},textVariant:{type:String,default:function(){return bt("BButtonClose","textVariant")}}},de=r.extend({name:"BButtonClose",functional:!0,props:ce,render:function(t,e){var n,i,r,o=e.props,a=e.data,s=(e.listeners,e.slots),l=e.scopedSlots,u=s(),c=l||{},d={staticClass:"close",class:(n={},i="text-".concat(o.textVariant),r=o.textVariant,i in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,n),attrs:{type:"button",disabled:o.disabled,"aria-label":o.ariaLabel?String(o.ariaLabel):null},on:{click:function(t){o.disabled&&t instanceof Event&&(t.stopPropagation(),t.preventDefault())}}};return se("default",c,u)||(d.domProps={innerHTML:"×"}),t("button",ee(a,d),le("default",{},c,u))}});var fe=function(t){return""===t||Y(t)?0:(t=parseInt(t,10))>0?t:0},he=function(t){return""===t||!0===t||!(parseInt(t,10)<1)&&Boolean(t)},pe=function(t){return!isNaN(parseInt(t,10))},me=r.extend({name:"BAlert",mixins:[ue],model:{prop:"show",event:"input"},props:{variant:{type:String,default:function(){return bt("BAlert","variant")}},dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:function(){return bt("BAlert","dismissLabel")}},show:{type:[Boolean,Number,String],default:!1},fade:{type:Boolean,default:!1}},data:function(){return{countDownTimerId:null,countDown:0,localShow:he(this.show)}},watch:{show:function(t){this.countDown=fe(t),this.localShow=he(t)},countDown:function(t){var e=this;this.clearTimer(),pe(this.show)&&(this.$emit("dismiss-count-down",t),this.show!==t&&this.$emit("input",t),t>0?(this.localShow=!0,this.countDownTimerId=setTimeout(function(){e.countDown--},1e3)):this.$nextTick(function(){Bt(function(){e.localShow=!1})}))},localShow:function(t){t||!this.dismissible&&!pe(this.show)||this.$emit("dismissed"),pe(this.show)||this.show===t||this.$emit("input",t)}},created:function(){this.countDown=fe(this.show),this.localShow=he(this.show)},mounted:function(){this.countDown=fe(this.show),this.localShow=he(this.show)},beforeDestroy:function(){this.clearTimer()},methods:{dismiss:function(){this.clearTimer(),this.countDown=0,this.localShow=!1},clearTimer:function(){this.countDownTimerId&&(clearInterval(this.countDownTimerId),this.countDownTimerId=null)}},render:function(t){var e,n,i,r;if(this.localShow){var o=t(!1);this.dismissible&&(o=t(de,{attrs:{"aria-label":this.dismissLabel},on:{click:this.dismiss}},[this.normalizeSlot("dismiss")])),e=[e=t("div",{key:this._uid,staticClass:"alert",class:(n={"alert-dismissible":this.dismissible},i="alert-".concat(this.variant),r=this.variant,i in n?Object.defineProperty(n,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[i]=r,n),attrs:{role:"alert","aria-live":"polite","aria-atomic":!0}},[o,this.normalizeSlot("default")])]}return t(ae,{props:{noFade:!this.fade}},e)}}),be=st({components:{BAlert:me}}),ge=function(t){return t},ve=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ge;return(m(t)?t.slice():B(t)).reduce(function(t,i){return t[n(i)]=e[i],t},{})},ye=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return G(t)||U(t)?"":m(t)||N(t)&&t.toString===Object.prototype.toString?JSON.stringify(t,null,e):String(t)},we=/%2C/g,Se=/[!'()*]/g,xe=function(t){return"%"+t.charCodeAt(0).toString(16)},Te=function(t){return encodeURIComponent(ye(t)).replace(Se,xe).replace(we,",")},ke=decodeURIComponent,Oe=function(t){var e={};return(t=ye(t).trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),i=ke(n.shift()),r=n.length>0?ke(n.join("=")):null;G(e[i])?e[i]=r:m(e[i])?e[i].push(r):e[i]=[e[i],r]}),e):e},Be=function(t){return"a"!==t},Ce=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.href,n=t.to,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"a",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"#",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"/";if(Be(i))return null;if(e)return e;if(n){if(X(n))return n||o;if(N(n)&&(n.path||n.query||n.hash)){var a=ye(n.path),s=function(t){if(!N(t))return"";var e=B(t).map(function(e){var n=t[e];return G(n)?"":U(n)?Te(e):m(n)?n.reduce(function(t,n){return U(n)?t.push(Te(e)):G(n)||t.push(Te(e)+"="+Te(n)),t},[]).join("&"):Te(e)+"="+Te(n)}).filter(function(t){return t.length>0}).join("&");return e?"?".concat(e):""}(n.query),l=ye(n.hash);return l=l&&"#"!==l.charAt(0)?"#".concat(l):l,"".concat(a).concat(s).concat(l)||o}}return r};function _e(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:{},e=t.to,n=t.disabled,i=arguments.length>1?arguments[1]:void 0;return i.$router&&e&&!n?i.$nuxt?"nuxt-link":"router-link":"a"}(n,r),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.target,n=t.rel;return"_blank"===e&&U(n)?"noopener":n||null}(n),l=Ce(n,a),u=Be(a)?"nativeOn":"on",c=(i[u]||{}).click,d={click:je({tag:a,href:l,disabled:n.disabled,suppliedHandler:c,parent:r})},f=ee(i,{class:{active:n.active,disabled:n.disabled},attrs:{rel:s,target:n.target,tabindex:n.disabled?"-1":i.attrs?i.attrs.tabindex:null,"aria-disabled":n.disabled?"true":null},props:_e({},n,{tag:n.routerTag})});return l?f.attrs.href=l:delete f.props.href,f[u]=_e({},f[u]||{},d),t(a,f,o)}});function Ne(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Ae=Ee();delete Ae.href.default,delete Ae.to.default;var Me=function(t){for(var e=1;e]+)>)/gi,Ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String(t).replace(Le,"")},Re=function(t,e){return t?{innerHTML:t}:e?{textContent:e}:{}};function He(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ze=function(t){for(var e=1;e-1&&(e=e.slice(0,n).reverse(),this.setItemFocus(e[0]))},focusNext:function(t){var e=this.getItems(),n=e.indexOf(t.target);n>-1&&(e=e.slice(n+1),this.setItemFocus(e[0]))},focusLast:function(t){var e=this.getItems().reverse();this.setItemFocus(e[0])},getItems:function(){var t=At(bn,this.$el);return t.forEach(function(t){t.tabIndex=-1}),t.filter(function(t){return jt(t)})}},render:function(t){return t("div",{staticClass:"btn-toolbar",class:{"justify-content-between":this.justify},attrs:{role:"toolbar",tabindex:this.keyNav?"0":null},on:this.keyNav?{focusin:this.onFocusin,keydown:this.onKeydown}:{}},[this.normalizeSlot("default")])}}),vn=st({components:{BButtonToolbar:gn,BBtnToolbar:gn}}),yn=function(t){return X(t)||(t=String(t)),(t=t.trim()).charAt(0).toUpperCase()+t.slice(1)},wn=function(t,e){return t+yn(e)},Sn=function(t){return(t=String(t)).charAt(0).toLowerCase()+t.slice(1)},xn=function(t,e){return Sn(e.replace(t,""))};function Tn(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:ge;if(m(t))return t.map(e);var n={};for(var i in t)t.hasOwnProperty(i)&&(n[e(i)]=I(t[i])?Tn({},t[i]):t[i]);return n},Bn={props:{tag:{type:String,default:"div"},bgVariant:{type:String,default:null},borderVariant:{type:String,default:null},textVariant:{type:String,default:null}}},Cn={title:{type:String,default:""},titleTag:{type:String,default:"h4"}},_n=r.extend({name:"BCardTitle",functional:!0,props:Cn,render:function(t,e){var n=e.props,i=e.data,r=e.children;return t(n.titleTag,ee(i,{staticClass:"card-title"}),r||n.title)}}),$n={subTitle:{type:String,default:""},subTitleTag:{type:String,default:"h6"},subTitleTextVariant:{type:String,default:function(){return bt("BCardSubTitle","subTitleTextVariant")}}},Pn=r.extend({name:"BCardSubTitle",functional:!0,props:$n,render:function(t,e){var n=e.props,i=e.data,r=e.children;return t(n.subTitleTag,ee(i,{staticClass:"card-subtitle",class:[n.subTitleTextVariant?"text-".concat(n.subTitleTextVariant):null]}),r||n.subTitle)}});function En(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0)&&(this.isShown=!0,this.setListeners(!1))},checkView:function(){if(this.isShown)this.setListeners(!1);else{var t=parseInt(this.offset,10)||0,e=document.documentElement,n=0-t,i=0-t,r=e.clientHeight+t,o=e.clientWidth+t,a=Yt(this.$el);a.right>=n&&a.bottom>=i&&a.left<=o&&a.top<=r&&this.doShow([{isIntersecting:!0}])}},onScroll:function(){this.isShown?this.setListeners(!1):(clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(this.checkView,parseInt(this.throttle,10)||100))}},render:function(t){return t(Jn,{props:{src:this.computedSrc,blank:this.computedBlank,width:this.computedWidth,height:this.computedHeight,alt:this.alt,blankColor:this.blankColor,fluid:this.fluid,fluidGrow:this.fluidGrow,block:this.block,thumbnail:this.thumbnail,rounded:this.rounded,left:this.left,right:this.right,center:this.center}})}});function ei(t){for(var e=1;e0||r.removedNodes.length>0)&&(n=!0)}n&&e()});return r.observe(t,function(t){for(var e=1;e0),touchStartX:0,touchDeltaX:0}},watch:{value:function(t,e){t!==e&&this.setSlide(t)},interval:function(t,e){t!==e&&(t?(this.pause(!0),this.start(!1)):this.pause(!1))},isPaused:function(t,e){t!==e&&this.$emit(t?"paused":"unpaused")},index:function(t,e){t===e||this.isSliding||this.doSlide(t,e)}},created:function(){this._intervalId=null,this._animationTimeout=null,this._touchTimeout=null,this.isPaused=!(parseInt(this.interval,10)>0)},mounted:function(){this.transitionEndEvent=function(t){for(var e in bi)if(!G(t.style[e]))return bi[e];return null}(this.$el)||null,this.updateSlides(),fi(this.$refs.inner,this.updateSlides.bind(this),{subtree:!1,childList:!0,attributes:!0,attributeFilter:["id"]})},beforeDestroy:function(){clearTimeout(this._animationTimeout),clearTimeout(this._touchTimeout),clearInterval(this._intervalId),this._intervalId=null,this._animationTimeout=null,this._touchTimeout=null},methods:{setSlide:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!(o.j&&document.visibilityState&&document.hidden)){var i=this.slides.length;0!==i&&(this.isSliding?this.$once("sliding-end",function(){return e.setSlide(t,n)}):(this.direction=n,t=Math.floor(t),this.index=t>=i?0:t>=0?t:i-1))}},prev:function(){this.setSlide(this.index-1,"prev")},next:function(){this.setSlide(this.index+1,"next")},pause:function(t){t||(this.isPaused=!0),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},start:function(t){t||(this.isPaused=!1),this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null),this.interval&&this.slides.length>1&&(this._intervalId=setInterval(this.next,Math.max(1e3,this.interval)))},restart:function(t){this.$el.contains(document.activeElement)||this.start()},doSlide:function(t,e){var n=this,i=Boolean(this.interval),r=this.calcDirection(this.direction,e,t),o=r.overlayClass,a=r.dirClass,s=this.slides[e],l=this.slides[t];if(s&&l){if(this.isSliding=!0,i&&this.pause(!1),this.$emit("sliding-start",t),this.$emit("input",this.index),this.noAnimation)Vt(l,"active"),Rt(s,"active"),this.isSliding=!1,this.$nextTick(function(){return n.$emit("sliding-end",t)});else{Vt(l,o),Nt(l),Vt(s,a),Vt(l,a);var u=!1,c=function e(i){if(!u){if(u=!0,n.transitionEndEvent)n.transitionEndEvent.split(/\s+/).forEach(function(t){return Pt(s,t,e,gi)});n._animationTimeout=null,Rt(l,a),Rt(l,o),Vt(l,"active"),Rt(s,"active"),Rt(s,a),Rt(s,o),zt(s,"aria-current","false"),zt(l,"aria-current","true"),zt(s,"aria-hidden","true"),zt(l,"aria-hidden","false"),n.isSliding=!1,n.direction=null,n.$nextTick(function(){return n.$emit("sliding-end",t)})}};if(this.transitionEndEvent)this.transitionEndEvent.split(/\s+/).forEach(function(t){return $t(s,t,c,gi)});this._animationTimeout=setTimeout(c,650)}i&&this.start(!1)}},updateSlides:function(){this.pause(!0),this.slides=At(".carousel-item",this.$refs.inner);var t=this.slides.length,e=Math.max(0,Math.min(Math.floor(this.index),t-1));this.slides.forEach(function(n,i){var r=i+1;i===e?(Vt(n,"active"),zt(n,"aria-current","true")):(Rt(n,"active"),zt(n,"aria-current","false")),zt(n,"aria-posinset",String(r)),zt(n,"aria-setsize",String(t))}),this.setSlide(e),this.start(this.isPaused)},calcDirection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t?pi[t]:n>e?pi.next:pi.prev},handleClick:function(t,e){var n=t.keyCode;"click"!==t.type&&n!==mn.SPACE&&n!==mn.ENTER||(t.preventDefault(),t.stopPropagation(),e())},handleSwipe:function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;e>0?this.prev():e<0&&this.next()}},touchStart:function(t){o.f&&mi[t.pointerType.toUpperCase()]?this.touchStartX=t.clientX:o.f||(this.touchStartX=t.touches[0].clientX)},touchMove:function(t){t.touches&&t.touches.length>1?this.touchDeltaX=0:this.touchDeltaX=t.touches[0].clientX-this.touchStartX},touchEnd:function(t){o.f&&mi[t.pointerType.toUpperCase()]&&(this.touchDeltaX=t.clientX-this.touchStartX),this.handleSwipe(),this.pause(!1),this._touchTimeout&&clearTimeout(this._touchTimeout),this._touchTimeout=setTimeout(this.start,500+Math.max(1e3,this.interval))}},render:function(t){var e=this,n=t("div",{ref:"inner",class:["carousel-inner"],attrs:{id:this.safeId("__BV_inner_"),role:"list"}},[this.normalizeSlot("default")]),i=t(!1);this.controls&&(i=[t("a",{class:["carousel-control-prev"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_")},on:{click:function(t){e.handleClick(t,e.prev)},keydown:function(t){e.handleClick(t,e.prev)}}},[t("span",{class:["carousel-control-prev-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelPrev])]),t("a",{class:["carousel-control-next"],attrs:{href:"#",role:"button","aria-controls":this.safeId("__BV_inner_")},on:{click:function(t){e.handleClick(t,e.next)},keydown:function(t){e.handleClick(t,e.next)}}},[t("span",{class:["carousel-control-next-icon"],attrs:{"aria-hidden":"true"}}),t("span",{class:["sr-only"]},[this.labelNext])])]);var r=t("ol",{class:["carousel-indicators"],directives:[{name:"show",rawName:"v-show",value:this.indicators,expression:"indicators"}],attrs:{id:this.safeId("__BV_indicators_"),"aria-hidden":this.indicators?"false":"true","aria-label":this.labelIndicators,"aria-owns":this.safeId("__BV_inner_")}},this.slides.map(function(n,i){return t("li",{key:"slide_".concat(i),class:{active:i===e.index},attrs:{role:"button",id:e.safeId("__BV_indicator_".concat(i+1,"_")),tabindex:e.indicators?"0":"-1","aria-current":i===e.index?"true":"false","aria-label":"".concat(e.labelGotoSlide," ").concat(i+1),"aria-describedby":e.slides[i].id||null,"aria-controls":e.safeId("__BV_inner_")},on:{click:function(t){e.handleClick(t,function(){e.setSlide(i)})},keydown:function(t){e.handleClick(t,function(){e.setSlide(i)})}}})})),a={mouseenter:this.noHoverPause?ci:this.pause,mouseleave:this.noHoverPause?ci:this.restart,focusin:this.pause,focusout:this.restart,keydown:function(t){if(!/input|textarea/i.test(t.target.tagName)){var n=t.keyCode;n!==mn.LEFT&&n!==mn.RIGHT||(t.preventDefault(),t.stopPropagation(),e[n===mn.LEFT?"prev":"next"]())}}};return!this.noTouch&&o.h&&(o.f?(a["&pointerdown"]=this.touchStart,a["&pointerup"]=this.touchEnd):(a["&touchstart"]=this.touchStart,a["&touchmove"]=this.touchMove,a["&touchend"]=this.touchEnd)),t("div",{staticClass:"carousel",class:{slide:!this.noAnimation,"carousel-fade":!this.noAnimation&&this.fade,"pointer-event":!this.noTouch&&o.h&&o.f},style:{background:this.background},attrs:{role:"region",id:this.safeId(),"aria-busy":this.isSliding?"true":"false"},on:a},[n,i,r])}}),yi={imgSrc:{type:String},imgAlt:{type:String},imgWidth:{type:[Number,String]},imgHeight:{type:[Number,String]},imgBlank:{type:Boolean,default:!1},imgBlankColor:{type:String,default:"transparent"},contentVisibleUp:{type:String},contentTag:{type:String,default:"div"},caption:{type:String},captionHtml:{type:String},captionTag:{type:String,default:"h3"},text:{type:String},textHtml:{type:String},textTag:{type:String,default:"p"},background:{type:String}},wi=r.extend({name:"BCarouselSlide",mixins:[hi,ue],inject:{bvCarousel:{default:function(){return{noTouch:!0}}}},props:yi,data:function(){return{}},computed:{contentClasses:function(){return[this.contentVisibleUp?"d-none":"",this.contentVisibleUp?"d-".concat(this.contentVisibleUp,"-block"):""]},computedWidth:function(){return this.imgWidth||this.bvCarousel.imgWidth||null},computedHeight:function(){return this.imgHeight||this.bvCarousel.imgHeight||null}},render:function(t){var e=!this.bvCarousel.noTouch&&o.h,n=this.normalizeSlot("img");n||!this.imgSrc&&!this.imgBlank||(n=t(Jn,{props:{fluidGrow:!0,block:!0,src:this.imgSrc,blank:this.imgBlank,blankColor:this.imgBlankColor,width:this.computedWidth,height:this.computedHeight,alt:this.imgAlt},on:e?{dragstart:function(t){t.preventDefault()}}:{}})),n||(n=t(!1));var i=t(this.contentTag,{staticClass:"carousel-caption",class:this.contentClasses},[this.caption||this.captionHtml?t(this.captionTag,{domProps:Re(this.captionHtml,this.caption)}):t(!1),this.text||this.textHtml?t(this.textTag,{domProps:Re(this.textHtml,this.text)}):t(!1),this.normalizeSlot("default")]);return t("div",{staticClass:"carousel-item",style:{background:this.background||this.bvCarousel.background||null},attrs:{id:this.safeId(),role:"listitem"}},[n,i])}}),Si=st({components:{BCarousel:vi,BCarouselSlide:wi}}),xi={methods:{listenOnRoot:function(t,e){var n=this;return this.$root.$on(t,e),this.$on("hook:beforeDestroy",function(){n.$root.$off(t,e)}),this},listenOnRootOnce:function(t,e){var n=this;return this.$root.$once(t,e),this.$on("hook:beforeDestroy",function(){n.$root.$off(t,e)}),this},emitOnRoot:function(t){for(var e,n=arguments.length,i=new Array(n>1?n-1:0),r=1;r0&&(t.__BV_toggle_TARGETS__=i,t.__BV_toggle_CONTROLS__=i.join(" "),t.__BV_toggle_STATE__=!1,zt(t,"aria-controls",t.__BV_toggle_CONTROLS__),zt(t,"aria-expanded","false"),"BUTTON"!==t.tagName&&zt(t,"role","button"),t[Ii]=function(e,n){-1!==(t.__BV_toggle_TARGETS__||[]).indexOf(e)&&(zt(t,"aria-expanded",n?"true":"false"),t.__BV_toggle_STATE__=n,n?Rt(t,"collapsed"):Vt(t,"collapsed"))},n.context.$root.$on("bv::collapse::state",t[Ii]),n.context.$root.$on("bv::collapse::sync::state",t[Ii]))},componentUpdated:Mi,updated:Mi,unbind:function(t,e,n){Ei(n,e,ji),t[Ii]&&(n.context.$root.$off("bv::collapse::state",t[Ii]),n.context.$root.$off("bv::collapse::sync::state",t[Ii])),Ni(t,Ii),Ni(t,"__BV_toggle_STATE__"),Ni(t,"__BV_toggle_CONTROLS__"),Ni(t,"__BV_toggle_TARGETS__"),Rt(t,"collapsed"),Gt(t,"aria-expanded"),Gt(t,"aria-controls"),Gt(t,"role")}},Fi=st({components:{BCollapse:ki},directives:{VBToggle:Di}}),Li=(o.i?window:{}).HTMLElement||Object,Vi=n("8L3F");function Ri(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!e)throw new TypeError("Failed to construct '".concat(this.constructor.name,"'. 1 argument required, ").concat(arguments.length," given."));k(this,t.Defaults,this.constructor.Defaults,n,{type:e}),C(this,{type:M(),cancelable:M(),nativeEvent:M(),target:M(),relatedTarget:M(),vueTarget:M(),componentId:M()});var i=!1;this.preventDefault=function(){this.cancelable&&(i=!0)},_(this,"defaultPrevented",{enumerable:!0,get:function(){return i}})}var e,n,i;return e=t,i=[{key:"Defaults",get:function(){return{type:"",cancelable:!0,nativeEvent:null,target:null,relatedTarget:null,vueTarget:null,componentId:null}}}],(n=null)&&Ri(e.prototype,n),i&&Ri(e,i),t}(),zi={data:function(){return{listenForClickOut:!1}},watch:{listenForClickOut:function(t,e){t!==e&&(Pt(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,!1),t&&$t(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,!1))}},beforeCreate:function(){this.clickOutElement=null,this.clickOutEventName=null},mounted:function(){this.clickOutElement||(this.clickOutElement=document),this.clickOutEventName||(this.clickOutEventName="ontouchstart"in document.documentElement?"touchstart":"click"),this.listenForClickOut&&$t(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,!1)},beforeDestroy:function(){Pt(this.clickOutElement,this.clickOutEventName,this._clickOutHandler,!1)},methods:{isClickOut:function(t){return!Lt(this.$el,t.target)},_clickOutHandler:function(t){this.clickOutHandler&&this.isClickOut(t)&&this.clickOutHandler(t)}}},Gi={data:function(){return{listenForFocusIn:!1}},watch:{listenForFocusIn:function(t,e){t!==e&&(Pt(this.focusInElement,"focusin",this._focusInHandler,!1),t&&$t(this.focusInElement,"focusin",this._focusInHandler,!1))}},beforeCreate:function(){this.focusInElement=null},mounted:function(){this.focusInElement||(this.focusInElement=document),this.listenForFocusIn&&$t(this.focusInElement,"focusin",this._focusInHandler,!1)},beforeDestroy:function(){Pt(this.focusInElement,"focusin",this._focusInHandler,!1)},methods:{_focusInHandler:function(t){this.focusInHandler&&this.focusInHandler(t)}}};function Ui(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Wi={FORM_CHILD:".dropdown form",ITEM_SELECTOR:[".dropdown-item",".b-dropdown-form"].map(function(t){return"".concat(t,":not(.disabled):not([disabled])")}).join(", ")},Yi="top-start",Xi="top-end",qi="bottom-start",Ki="bottom-end",Ji="right-start",Zi="left-start",Qi={mixins:[zi,Gi],provide:function(){return{bvDropdown:this}},props:{disabled:{type:Boolean,default:!1},text:{type:String,default:""},html:{type:String},dropup:{type:Boolean,default:!1},dropright:{type:Boolean,default:!1},dropleft:{type:Boolean,default:!1},right:{type:Boolean,default:!1},offset:{type:[Number,String],default:0},noFlip:{type:Boolean,default:!1},popperOpts:{default:function(){}}},data:function(){return{visible:!1,inNavbar:null,visibleChangePrevented:!1}},computed:{toggler:function(){var t=this.$refs.toggle;return t?t.$el||t:null},directionClass:function(){return this.dropup?"dropup":this.dropright?"dropright":this.dropleft?"dropleft":""}},watch:{visible:function(t,e){if(this.visibleChangePrevented)this.visibleChangePrevented=!1;else if(t!==e){var n=t?"show":"hide",i=new Hi(n,{cancelable:!0,vueTarget:this,target:this.$refs.menu,relatedTarget:null});if(this.emitEvent(i),i.defaultPrevented)return this.visibleChangePrevented=!0,this.visible=e,void this.$off("hidden",this.focusToggler);"show"===n?this.showMenu():this.hideMenu()}},disabled:function(t,e){t!==e&&t&&this.visible&&(this.visible=!1)}},created:function(){this._popper=null},deactivated:function(){this.visible=!1,this.whileOpenListen(!1),this.removePopper()},beforeDestroy:function(){this.visible=!1,this.whileOpenListen(!1),this.removePopper()},methods:{emitEvent:function(t){var e=t.type;this.$emit(e,t),this.$root.$emit("bv::dropdown::".concat(e),t)},showMenu:function(){var t=this;if(!this.disabled){if(this.$root.$emit("bv::dropdown::shown",this),U(this.inNavbar)&&this.isNav&&(this.inNavbar=Boolean(Ft(".navbar",this.$el))),!this.inNavbar)if(void 0===Vi.default)u("b-dropdown: Popper.js not found. Falling back to CSS positioning.");else{var e=this.dropup&&this.right||this.split?this.$el:this.$refs.toggle;e=e.$el||e,this.createPopper(e)}this.whileOpenListen(!0),this.$nextTick(function(){t.focusMenu(),t.$emit("shown")})}},hideMenu:function(){this.whileOpenListen(!1),this.$root.$emit("bv::dropdown::hidden",this),this.$emit("hidden"),this.removePopper()},createPopper:function(t){this.removePopper(),this._popper=new Vi.default(t,this.$refs.menu,this.getPopperConfig())},removePopper:function(){this._popper&&this._popper.destroy(),this._popper=null},getPopperConfig:function(){var t=qi;this.dropup?t=this.right?Xi:Yi:this.dropright?t=Ji:this.dropleft?t=Zi:this.right&&(t=Ki);var e={placement:t,modifiers:{offset:{offset:this.offset||0},flip:{enabled:!this.noFlip}}};return this.boundary&&(e.modifiers.preventOverflow={boundariesElement:this.boundary}),function(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0];this.disabled||(this.visible=!1,t&&this.$once("hidden",this.focusToggler))},toggle:function(t){var e=(t=t||{}).type,n=t.keyCode;"click"!==e&&("keydown"!==e||n!==mn.ENTER&&n!==mn.SPACE&&n!==mn.DOWN)||(this.disabled?this.visible=!1:(this.$emit("toggle",t),t.defaultPrevented||(t.preventDefault(),t.stopPropagation(),this.visible=!this.visible)))},click:function(t){this.disabled?this.visible=!1:this.$emit("click",t)},onKeydown:function(t){var e=t.keyCode;e===mn.ESC?this.onEsc(t):e===mn.DOWN?this.focusNext(t,!1):e===mn.UP&&this.focusNext(t,!0)},onEsc:function(t){this.visible&&(this.visible=!1,t.preventDefault(),t.stopPropagation(),this.$once("hidden",this.focusToggler))},clickOutHandler:function(){this.visible&&(this.visible=!1)},focusInHandler:function(t){!this.visible||Lt(this.$refs.menu,t.target)||Lt(this.$refs.toggle,t.target)||(this.visible=!1)},focusNext:function(t,e){var n=this;!this.visible||t&&Ft(Wi.FORM_CHILD,t.target)||(t.preventDefault(),t.stopPropagation(),this.$nextTick(function(){var i=n.getItems();if(!(i.length<1)){var r=i.indexOf(t.target);e&&r>0?r--:!e&&r0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;return"".concat(e).concat(yn(t))}),Qr={name:"BFormGroup",mixins:[hi,Fr,ue],get props(){return delete this.props,this.props=(t=wt(),e=t.reduce(function(t,e){return t[Zr(e,"labelCols")]={type:[Number,String,Boolean],default:!e&&null},t},E(null)),n=t.reduce(function(t,e){return t[Zr(e,"labelAlign")]={type:String,default:null},t},E(null)),Wr({label:{type:String,default:null},labelFor:{type:String,default:null},labelSize:{type:String,default:null},labelSrOnly:{type:Boolean,default:!1}},e,n,{labelClass:{type:[String,Array,Object],default:null},description:{type:String,default:null},invalidFeedback:{type:String,default:null},validFeedback:{type:String,default:null},tooltip:{type:Boolean,default:!1},feedbackAriaLive:{type:String,default:"assertive"},validated:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1,deprecated:Xr},breakpoint:{type:String,default:null,deprecated:Xr}}));var t,e,n},computed:{labelColProps:function(){var t=this,e={};if(this.horizontal){u("b-form-group: ".concat(Xr));var n=this.breakpoint||wt()[1],i=parseInt(this.labelCols,10)||3;return e[n]=i>0?i:3,e}return wt().forEach(function(n){var i=t[Zr(n,"labelCols")];if(Y(i=""===i||(i||!1))||(i=(i=parseInt(i,10)||0)>0&&i),i){var r=n||(Y(i)?"col":"cols");e[r]=i}}),e},labelAlignClasses:function(){var t=this,e=[];return wt().forEach(function(n){var i=t[Zr(n,"labelAlign")]||null;if(i){var r=n?"text-".concat(n,"-").concat(i):"text-".concat(i);e.push(r)}}),e},isHorizontal:function(){return B(this.labelColProps).length>0},labelId:function(){return this.$slots.label||this.label?this.safeId("_BV_label_"):null},descriptionId:function(){return this.$slots.description||this.description?this.safeId("_BV_description_"):null},hasInvalidFeedback:function(){var t=this.$slots;return!1===this.computedState&&(t["invalid-feedback"]||this.invalidFeedback)},invalidFeedbackId:function(){return this.hasInvalidFeedback?this.safeId("_BV_feedback_invalid_"):null},hasValidFeedback:function(){return!0===this.computedState&&(this.$slots["valid-feedback"]||this.validFeedback)},validFeedbackId:function(){return this.hasValidFeedback?this.safeId("_BV_feedback_valid_"):null},describedByIds:function(){return[this.descriptionId,this.invalidFeedbackId,this.validFeedbackId].filter(Boolean).join(" ")||null}},watch:{describedByIds:function(t,e){t!==e&&this.setInputDescribedBy(t,e)}},mounted:function(){var t=this;this.$nextTick(function(){t.setInputDescribedBy(t.describedByIds)})},methods:{legendClick:function(t){if(!this.labelFor){var e=t.target?t.target.tagName:"";if(!/^(input|select|textarea|label|button|a)$/i.test(e)){var n=At("input:not([disabled]),textarea:not([disabled]),select:not([disabled])",this.$refs.content).filter(jt);n&&1===n.length&&n[0].focus&&n[0].focus()}}},setInputDescribedBy:function(t,e){if(this.labelFor&&o.j){var n=Mt("#".concat(this.labelFor),this.$refs.content);if(n){var i="aria-describedby",r=(Ut(n,i)||"").split(/\s+/);t=(t||"").split(/\s+/),e=(e||"").split(/\s+/),r=r.filter(function(t){return!b(e,t)}).concat(t).filter(Boolean),(r=B(r.reduce(function(t,e){return Wr({},t,Yr({},e,!0))},{})).join(" ").trim())?zt(n,i,r):Gt(n,i)}}}},render:function(t){var e=!this.labelFor,n=this.isHorizontal,i=function(t,e){var n=e.normalizeSlot("label")||e.label,i=e.labelFor,r=!i,o=e.isHorizontal,a=r?"legend":"label";if(n||o){if(e.labelSrOnly){var s=t(!1);return n&&(s=t(a,{class:"sr-only",attrs:{id:e.labelId,for:i||null}},[n])),t(o?Ur:"div",{props:o?e.labelColProps:{}},[s])}return t(o?Ur:a,{on:r?{click:e.legendClick}:{},props:o?Wr({tag:a},e.labelColProps):{},attrs:{id:e.labelId,for:i||null,tabindex:r?"-1":null},class:[o||r?"col-form-label":"",!o&&r?"pt-0":"",o||r?"":"d-block",e.labelSize?"col-form-label-".concat(e.labelSize):"",e.labelAlignClasses,e.labelClass]},[n])}return t(!1)}(t,this),r=t(n?Ur:"div",{ref:"content",attrs:{tabindex:e?"-1":null,role:e?"group":null}},[this.normalizeSlot("default")||t(!1),qr(t,this),Kr(t,this),Jr(t,this)]),o={staticClass:"form-group",class:[this.validated?"was-validated":null,this.stateClass],attrs:{id:this.safeId(),disabled:e?this.disabled:null,role:e?null:"group","aria-invalid":!1===this.computedState?"true":null,"aria-labelledby":e&&n?this.labelId:null,"aria-describedby":e?this.describedByIds:null}};return t(e?"fieldset":n?Mr:"div",o,n&&e?[t(Mr,{},[i,r])]:[i,r])}},to=st({components:{BFormGroup:Qr,BFormFieldset:Qr}}),eo=function(t,e){for(var n=0;n-1:Bi(t,e)},isRadio:function(){return!1},isCheck:function(){return!0}},watch:{computedLocalChecked:function(t,e){this.$emit("input",t),this.$refs&&this.$refs.input&&this.$emit("update:indeterminate",this.$refs.input.indeterminate)},indeterminate:function(t,e){this.setIndeterminate(t)}},mounted:function(){this.setIndeterminate(this.indeterminate)},methods:{handleChange:function(t){var e=t.target,n=e.checked,i=e.indeterminate,r=this.computedLocalChecked,o=this.value,a=m(r),s=a?null:this.uncheckedValue;if(a){var l=eo(r,o);n&&l<0?r=r.concat(o):!n&&l>-1&&(r=r.slice(0,l).concat(r.slice(l+1)))}else r=n?o:s;this.computedLocalChecked=r,this.$emit("change",n?o:s),this.isGroup&&this.bvGroup.$emit("change",r),this.$emit("update:indeterminate",i)},setIndeterminate:function(t){m(this.computedLocalChecked)&&(t=!1),this.$refs&&this.$refs.input&&(this.$refs.input.indeterminate=t,this.$emit("update:indeterminate",t))}}}),ao=r.extend({name:"BFormRadio",mixins:[hi,io,no,ro,Fr],inject:{bvGroup:{from:"bvRadioGroup",default:!1}},props:{checked:{type:[String,Object,Number,Boolean],default:null}},computed:{isChecked:function(){return Bi(this.value,this.computedLocalChecked)},isRadio:function(){return!0},isCheck:function(){return!1}},watch:{computedLocalChecked:function(t,e){this.$emit("input",this.computedLocalChecked)}},methods:{handleChange:function(t){var e=t.target.checked,n=this.value;this.computedLocalChecked=n,this.$emit("change",e?n:null),this.isGroup&&this.bvGroup.$emit("change",e?n:null)}}}),so={mixins:[ue],model:{prop:"checked",event:"input"},props:{validated:{type:Boolean,default:!1},ariaInvalid:{type:[Boolean,String],default:!1},stacked:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},buttons:{type:Boolean,default:!1},buttonVariant:{type:String,default:"secondary"}},computed:{inline:function(){return!this.stacked},groupName:function(){return this.name||this.safeId()},groupClasses:function(){return this.buttons?["btn-group-toggle",this.inline?"btn-group":"btn-group-vertical",this.size?"btn-group-".concat(this.size):"",this.validated?"was-validated":""]:[this.validated?"was-validated":""]},computedAriaInvalid:function(){var t=this.ariaInvalid;return!0===t||"true"===t||""===t?"true":!1===this.computedState?"true":null}},watch:{checked:function(t,e){this.localChecked=t},localChecked:function(t,e){this.$emit("input",t)}},render:function(t){var e=this,n=this.formOptions.map(function(n,i){var r="_BV_option_".concat(i,"_");return t(e.isRadioGroup?ao:oo,{key:r,props:{id:e.safeId(r),value:n.value,disabled:n.disabled||!1}},[t("span",{domProps:Re(n.html,n.text)})])});return t("div",{class:this.groupClasses,attrs:{id:this.safeId(),role:this.isRadioGroup?"radiogroup":"group",tabindex:"-1","aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid}},[this.normalizeSlot("first"),n,this.normalizeSlot("default")])}},lo={switches:{type:Boolean,default:!1},checked:{type:[String,Number,Object,Array,Boolean],default:null}},uo=r.extend({name:"BFormCheckboxGroup",mixins:[hi,no,so,Or,ro,Fr],provide:function(){return{bvCheckGroup:this}},props:lo,data:function(){return{localChecked:this.checked||[]}},computed:{isRadioGroup:function(){return!1}}}),co=st({components:{BFormCheckbox:oo,BCheckbox:oo,BCheck:oo,BFormCheckboxGroup:uo,BCheckboxGroup:uo,BCheckGroup:uo}}),fo={checked:{type:[String,Object,Number,Boolean],default:null}},ho=r.extend({name:"BFormRadioGroup",mixins:[hi,no,so,Or,ro,Fr],provide:function(){return{bvRadioGroup:this}},props:fo,data:function(){return{localChecked:this.checked}},computed:{isRadioGroup:function(){return!0}}}),po=st({components:{BFormRadio:ao,BRadio:ao,BFormRadioGroup:ho,BRadioGroup:ho}}),mo={model:{prop:"value",event:"update"},props:{value:{type:[String,Number],default:""},ariaInvalid:{type:[Boolean,String],default:!1},readonly:{type:Boolean,default:!1},plaintext:{type:Boolean,default:!1},autocomplete:{type:String,default:null},placeholder:{type:String,default:null},formatter:{type:Function,default:null},trim:{type:Boolean,default:!1},number:{type:Boolean,default:!1},lazyFormatter:{type:Boolean,value:!1}},data:function(){return{localValue:this.stringifyValue(this.value)}},computed:{computedClass:function(){return[{"custom-range":"range"===this.type,"form-control-plaintext":this.plaintext&&"range"!==this.type&&"color"!==this.type,"form-control":!this.plaintext&&"range"!==this.type||"color"===this.type},this.sizeFormClass,this.stateClass]},computedAriaInvalid:function(){return this.ariaInvalid&&"false"!==this.ariaInvalid?!0===this.ariaInvalid?"true":this.ariaInvalid:!1===this.computedState?"true":null}},watch:{value:function(t){t!==this.localValue&&(this.localValue=this.stringifyValue(t))}},mounted:function(){var t=this.stringifyValue(this.value);t!==this.localValue&&(this.localValue=t)},methods:{stringifyValue:function(t){return G(t)||U(t)?"":String(t)},getFormatted:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return t=this.stringifyValue(t),this.lazyFormatter&&!n||!W(this.formatter)||(t=this.formatter(t,e)),t},updateValue:function(t){if((t=this.stringifyValue(t))!==this.localValue){if(this.localValue=t,this.number){var e=parseFloat(t);t=isNaN(e)?t:e}else this.trim&&(t=t.trim());this.$emit("update",t)}else this.$refs.input&&t!==this.$refs.input.value&&(this.$refs.input.value=t)},onInput:function(t){if(!t.target.composing){var e=this.getFormatted(t.target.value,t);!1===e||t.defaultPrevented?t.preventDefault():(this.updateValue(e),this.$emit("input",e))}},onChange:function(t){if(!t.target.composing){var e=this.getFormatted(t.target.value,t);!1===e||t.defaultPrevented?t.preventDefault():(this.updateValue(e),this.$emit("change",e))}},onBlur:function(t){if(this.lazyFormatter){var e=this.getFormatted(t.target.value,t,!0);if(!1===e)return;this.updateValue(e)}this.$emit("blur",t)},focus:function(){this.disabled||this.$el.focus()},blur:function(){this.disabled||this.$el.blur()}}},bo={computed:{selectionStart:{cache:!1,get:function(){return this.$refs.input.selectionStart},set:function(t){this.$refs.input.selectionStart=t}},selectionEnd:{cache:!1,get:function(){return this.$refs.input.selectionEnd},set:function(t){this.$refs.input.selectionEnd=t}},selectionDirection:{cache:!1,get:function(){return this.$refs.input.selectionDirection},set:function(t){this.$refs.input.selectionDirection=t}}},methods:{select:function(){var t;(t=this.$refs.input).select.apply(t,arguments)},setSelectionRange:function(){var t;(t=this.$refs.input).setSelectionRange.apply(t,arguments)},setRangeText:function(){var t;(t=this.$refs.input).setRangeText.apply(t,arguments)}}},go={computed:{validity:{cache:!1,get:function(){return this.$refs.input.validity}},validationMessage:{cache:!1,get:function(){return this.$refs.input.validationMessage}},willValidate:{cache:!1,get:function(){return this.$refs.input.willValidate}}},methods:{setCustomValidity:function(){var t;return(t=this.$refs.input).setCustomValidity.apply(t,arguments)},checkValidity:function(){var t;return(t=this.$refs.input).checkValidity.apply(t,arguments)},reportValidity:function(){var t;return(t=this.$refs.input).reportValidity.apply(t,arguments)}}};function vo(t){for(var e=1;ed?s:"".concat(d,"px")}},render:function(t){return t("textarea",{ref:"input",class:this.computedClass,style:this.computedStyle,directives:[{name:"model",rawName:"v-model",value:this.localValue,expression:"localValue"}],attrs:{id:this.safeId(),name:this.name,form:this.form||null,disabled:this.disabled,placeholder:this.placeholder,required:this.required,autocomplete:this.autocomplete||null,readonly:this.readonly||this.plaintext,rows:this.computedRows,wrap:this.wrap||null,"aria-required":this.required?"true":null,"aria-invalid":this.computedAriaInvalid},domProps:{value:this.localValue},on:To({},this.$listeners,{input:this.onInput,change:this.onChange,blur:this.onBlur})})}}),Bo=st({components:{BFormTextarea:Oo,BTextarea:Oo}}),Co={props:{plain:{type:Boolean,default:!1}},computed:{custom:function(){return!this.plain}}},_o=r.extend({name:"BFormFile",mixins:[hi,no,Fr,Co,ue],model:{prop:"value",event:"input"},props:{value:{default:null},accept:{type:String,default:""},capture:{type:Boolean,default:!1},placeholder:{type:String,default:function(){return bt("BFormFile","placeholder")}},browseText:{type:String,default:function(){return bt("BFormFile","browseText")}},dropPlaceholder:{type:String,default:function(){return bt("BFormFile","dropPlaceholder")}},multiple:{type:Boolean,default:!1},directory:{type:Boolean,default:!1},noTraverse:{type:Boolean,default:!1},noDrop:{type:Boolean,default:!1},fileNameFormatter:{type:Function,default:null}},data:function(){return{selectedFile:null,dragging:!1,hasFocus:!1}},computed:{selectLabel:function(){if(this.dragging&&this.dropPlaceholder)return this.dropPlaceholder;if(!this.selectedFile||0===this.selectedFile.length)return this.placeholder;var t=g(this.selectedFile).filter(Boolean);return this.hasNormalizedSlot("file-name")?[this.normalizeSlot("file-name",{files:t,names:t.map(function(t){return t.name})})]:W(this.fileNameFormatter)?String(this.fileNameFormatter(t)):t.map(function(t){return t.name}).join(", ")}},watch:{selectedFile:function(t,e){t===e||m(t)&&m(e)&&t.length===e.length&&t.every(function(t,n){return t===e[n]})||(!t&&this.multiple?this.$emit("input",[]):this.$emit("input",t))},value:function(t){(!t||m(t)&&0===t.length)&&this.reset()}},methods:{focusHandler:function(t){this.plain||"focusout"===t.type?this.hasFocus=!1:this.hasFocus=!0},reset:function(){try{this.$refs.input.value=""}catch(t){}this.$refs.input.type="",this.$refs.input.type="file",this.selectedFile=this.multiple?[]:null},onFileChange:function(t){var e=this;this.$emit("change",t);var n=t.dataTransfer&&t.dataTransfer.items;if(!n||this.noTraverse)this.setFiles(t.target.files||t.dataTransfer.files);else{for(var i=[],r=0;r0&&void 0!==arguments[0]?arguments[0]:[];if(t)if(this.multiple){for(var e=[],n=0;n0&&this.onFileChange(t))},traverseFileTree:function(t,e){var n=this;return new Promise(function(i){e=e||"",t.isFile?t.file(function(t){t.$path=e,i(t)}):t.isDirectory&&t.createReader().readEntries(function(r){for(var o=[],a=0;a0}},watch:{modalCount:function(t,e){o.j&&(this.getScrollbarWidth(),t>0&&0===e?(this.checkScrollbar(),this.setScrollbar(),Vt(document.body,"modal-open")):0===t&&e>0&&(this.resetScrollbar(),Rt(document.body,"modal-open")),zt(document.body,"data-modal-open-count",String(t)))},modals:function(t,e){var n=this;this.checkScrollbar(),Bt(function(){n.updateModals(t||[])})}},methods:{registerModal:function(t){var e=this;t&&-1===this.modals.indexOf(t)&&(this.modals.push(t),t.$once("hook:beforeDestroy",function(){e.unregisterModal(t)}))},unregisterModal:function(t){var e=this.modals.indexOf(t);e>-1&&(this.modals.splice(e,1),t._isBeingDestroyed||t._isDestroyed||this.resetModal(t))},getBaseZIndex:function(){if(U(this.baseZIndex)&&o.j){var t=document.createElement("div");t.className="modal-backdrop d-none",t.style.display="none",document.body.appendChild(t),this.baseZIndex=parseInt(Xt(t).zIndex||1040,10),document.body.removeChild(t)}return this.baseZIndex||1040},getScrollbarWidth:function(){if(U(this.scrollbarWidth)&&o.j){var t=document.createElement("div");t.className="modal-scrollbar-measure",document.body.appendChild(t),this.scrollbarWidth=Yt(t).width-t.clientWidth,document.body.removeChild(t)}return this.scrollbarWidth||0},updateModals:function(t){var e=this,n=this.getBaseZIndex(),i=this.getScrollbarWidth();t.forEach(function(t,r){t.zIndex=n+r,t.scrollbarWidth=i,t.isTop=r===e.modals.length-1,t.isBodyOverflowing=e.isBodyOverflowing})},resetModal:function(t){t&&(t.zIndex=this.getBaseZIndex(),t.isTop=!0,t.isBodyOverflowing=!1)},checkScrollbar:function(){var t=Yt(document.body),e=t.left,n=t.right;this.isBodyOverflowing=e+n1&&void 0!==arguments[1]?arguments[1]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e){return!e||"object"!==Ca(e)&&"function"!=typeof e?Pa(t):e}(this,ja(e).call(this,t,i)),C(Pa(n),{trigger:M()}),n}var n,i,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ia(t,e)}(e,Hi),n=e,r=[{key:"Defaults",get:function(){return function(t){for(var e=1;e0&&!e[0].text?e[0]:t(!1)}}),Ma=r.extend({name:"BTransporterSingle",mixins:[ue],props:{disabled:{type:Boolean,default:!1},container:{type:[String,Li],default:"body"},tag:{type:String,default:"div"}},watch:{disabled:{immediate:!0,handler:function(t){t?this.unmountTarget():this.$nextTick(this.mountTarget)}}},created:function(){this._bv_defaultFn=null,this._bv_target=null},beforeMount:function(){this.mountTarget()},updated:function(){var t=this;this.$nextTick(function(){t.updateTarget()})},beforeDestroy:function(){this.unmountTarget(),this._bv_defaultFn=null},methods:{getContainer:function(){if(o.j){var t=this.container;return X(t)?Mt(t):t}return null},mountTarget:function(){if(!this._bv_target){var t=this.getContainer();if(t){var e=document.createElement("div");t.appendChild(e),this._bv_target=new Aa({el:e,parent:this,propsData:{nodes:g(this.normalizeSlot("default",{}))}})}}},updateTarget:function(){if(o.j&&this._bv_target){var t=this.$scopedSlots.default;this.disabled||(t&&this._bv_defaultFn!==t?this._bv_target.updatedNodes=t:t||(this._bv_target.updatedNodes=this.$slots.default)),this._bv_defaultFn=t}},unmountTarget:function(){this._bv_target&&(this._bv_target.$destroy(),this._bv_target=null)}},render:function(t){if(this.disabled){var e=g(this.normalizeSlot("default",{})).filter(Boolean);if(e.length>0&&!e[0].text)return e[0]}return t(!1)}});function Da(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Fa={subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["style","class"]},La={passive:!0,capture:!1},Va={title:{type:String,default:""},titleHtml:{type:String},titleTag:{type:String,default:function(){return bt("BModal","titleTag")}},size:{type:String,default:function(){return bt("BModal","size")}},centered:{type:Boolean,default:!1},scrollable:{type:Boolean,default:!1},buttonSize:{type:String,default:""},noStacking:{type:Boolean,default:!1},noFade:{type:Boolean,default:!1},noCloseOnBackdrop:{type:Boolean,default:!1},noCloseOnEsc:{type:Boolean,default:!1},noEnforceFocus:{type:Boolean,default:!1},headerBgVariant:{type:String,default:function(){return bt("BModal","headerBgVariant")}},headerBorderVariant:{type:String,default:function(){return bt("BModal","headerBorderVariant")}},headerTextVariant:{type:String,default:function(){return bt("BModal","headerTextVariant")}},headerCloseVariant:{type:String,default:function(){return bt("BModal","headerCloseVariant")}},headerClass:{type:[String,Array],default:null},bodyBgVariant:{type:String,default:function(){return bt("BModal","bodyBgVariant")}},bodyTextVariant:{type:String,default:function(){return bt("BModal","bodyTextVariant")}},modalClass:{type:[String,Array],default:null},dialogClass:{type:[String,Array],default:null},contentClass:{type:[String,Array],default:null},bodyClass:{type:[String,Array],default:null},footerBgVariant:{type:String,default:function(){return bt("BModal","footerBgVariant")}},footerBorderVariant:{type:String,default:function(){return bt("BModal","footerBorderVariant")}},footerTextVariant:{type:String,default:function(){return bt("BModal","footerTextVariant")}},footerClass:{type:[String,Array],default:null},hideHeader:{type:Boolean,default:!1},hideFooter:{type:Boolean,default:!1},hideHeaderClose:{type:Boolean,default:!1},hideBackdrop:{type:Boolean,default:!1},okOnly:{type:Boolean,default:!1},okDisabled:{type:Boolean,default:!1},cancelDisabled:{type:Boolean,default:!1},visible:{type:Boolean,default:!1},returnFocus:{default:null},headerCloseLabel:{type:String,default:function(){return bt("BModal","headerCloseLabel")}},cancelTitle:{type:String,default:function(){return bt("BModal","cancelTitle")}},cancelTitleHtml:{type:String},okTitle:{type:String,default:function(){return bt("BModal","okTitle")}},okTitleHtml:{type:String},cancelVariant:{type:String,default:function(){return bt("BModal","cancelVariant")}},okVariant:{type:String,default:function(){return bt("BModal","okVariant")}},lazy:{type:Boolean,default:!1},busy:{type:Boolean,default:!1},static:{type:Boolean,default:!1}},Ra=r.extend({name:"BModal",mixins:[hi,xi,ue],model:{prop:"visible",event:"change"},props:Va,data:function(){return{isHidden:!0,isVisible:!1,isTransitioning:!1,isShow:!1,isBlock:!1,isOpening:!1,isClosing:!1,ignoreBackdropClick:!1,isModalOverflowing:!1,return_focus:this.returnFocus||null,scrollbarWidth:0,zIndex:Ba.getBaseZIndex(),isTop:!0,isBodyOverflowing:!1}},computed:{modalClasses:function(){return[{fade:!this.noFade,show:this.isShow},this.modalClass]},modalStyles:function(){var t="".concat(this.scrollbarWidth,"px");return{paddingLeft:!this.isBodyOverflowing&&this.isModalOverflowing?t:"",paddingRight:this.isBodyOverflowing&&!this.isModalOverflowing?t:"",display:this.isBlock?"block":"none"}},dialogClasses:function(){var t;return[(t={},Da(t,"modal-".concat(this.size),Boolean(this.size)),Da(t,"modal-dialog-centered",this.centered),Da(t,"modal-dialog-scrollable",this.scrollable),t),this.dialogClass]},headerClasses:function(){var t;return[(t={},Da(t,"bg-".concat(this.headerBgVariant),Boolean(this.headerBgVariant)),Da(t,"text-".concat(this.headerTextVariant),Boolean(this.headerTextVariant)),Da(t,"border-".concat(this.headerBorderVariant),Boolean(this.headerBorderVariant)),t),this.headerClass]},bodyClasses:function(){var t;return[(t={},Da(t,"bg-".concat(this.bodyBgVariant),Boolean(this.bodyBgVariant)),Da(t,"text-".concat(this.bodyTextVariant),Boolean(this.bodyTextVariant)),t),this.bodyClass]},footerClasses:function(){var t;return[(t={},Da(t,"bg-".concat(this.footerBgVariant),Boolean(this.footerBgVariant)),Da(t,"text-".concat(this.footerTextVariant),Boolean(this.footerTextVariant)),Da(t,"border-".concat(this.footerBorderVariant),Boolean(this.footerBorderVariant)),t),this.footerClass]},modalOuterStyle:function(){return{position:"absolute",zIndex:this.zIndex}},slotScope:function(){return{ok:this.onOk,cancel:this.onCancel,close:this.onClose,hide:this.hide,visible:this.isVisible}}},watch:{visible:function(t,e){t!==e&&this[t?"show":"hide"]()}},created:function(){this._observer=null},mounted:function(){this.zIndex=Ba.getBaseZIndex(),this.listenOnRoot("bv::show::modal",this.showHandler),this.listenOnRoot("bv::hide::modal",this.hideHandler),this.listenOnRoot("bv::toggle::modal",this.toggleHandler),this.listenOnRoot("bv::modal::show",this.modalListener),!0===this.visible&&this.$nextTick(this.show)},beforeDestroy:function(){this._observer&&(this._observer.disconnect(),this._observer=null),this.setEnforceFocus(!1),this.setResizeEvent(!1),this.isVisible&&(this.isVisible=!1,this.isShow=!1,this.isTransitioning=!1)},methods:{updateModel:function(t){t!==this.visible&&this.$emit("change",t)},buildEvent:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Na(t,function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"";if(this.isVisible&&!this.isClosing){this.isClosing=!0;var e=this.buildEvent("hide",{cancelable:"FORCE"!==t,trigger:t||null});if("ok"===t?this.$emit("ok",e):"cancel"===t?this.$emit("cancel",e):"headerclose"===t&&this.$emit("close",e),this.emitEvent(e),e.defaultPrevented||!this.isVisible)return this.isClosing=!1,void this.updateModel(!0);this._observer&&(this._observer.disconnect(),this._observer=null),this.isVisible=!1,this.updateModel(!1)}},toggle:function(t){t&&(this.return_focus=t),this.isVisible?this.hide("toggle"):this.show()},getActiveElement:function(){if(o.j){var t=document.activeElement;if(t&&t!==document.body&&t.focus)return t}return null},doShow:function(){var t=this;Ba.modalsAreOpen&&this.noStacking?this.listenOnRootOnce("bv::modal::hidden",this.doShow):(Ba.registerModal(this),this.isHidden=!1,this.$nextTick(function(){t.isVisible=!0,t.isOpening=!1,t.updateModel(!0),t.$nextTick(function(){t._observer=fi(t.$refs.content,t.checkModalOverflow.bind(t),Fa)})}))},onBeforeEnter:function(){this.isTransitioning=!0,this.setResizeEvent(!0)},onEnter:function(){this.isBlock=!0},onAfterEnter:function(){var t=this;this.checkModalOverflow(),this.isShow=!0,this.isTransitioning=!1,this.$nextTick(function(){t.emitEvent(t.buildEvent("shown")),t.focusFirst(),t.setEnforceFocus(!0)})},onBeforeLeave:function(){this.isTransitioning=!0,this.setResizeEvent(!1)},onLeave:function(){this.isShow=!1},onAfterLeave:function(){var t=this;this.isBlock=!1,this.isTransitioning=!1,this.setEnforceFocus(!1),this.isModalOverflowing=!1,this.isHidden=!0,this.$nextTick(function(){t.returnFocusTo(),t.isClosing=!1,t.return_focus=null,Ba.unregisterModal(t),t.emitEvent(t.buildEvent("hidden"))})},emitEvent:function(t){var e=t.type;this.emitOnRoot("bv::modal::".concat(e),t,t.componentId),this.$emit(e,t)},onDialogMousedown:function(){var t=this,e=this.$refs.modal;$t(e,"mouseup",function n(i){Pt(e,"mouseup",n,La),i.target===e&&(t.ignoreBackdropClick=!0)},La)},onClickOut:function(t){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:this.isVisible&&!this.noCloseOnBackdrop&&Lt(document.body,t.target)&&(Lt(this.$refs.content,t.target)||this.hide("backdrop"))},onOk:function(){this.hide("ok")},onCancel:function(){this.hide("cancel")},onClose:function(){this.hide("headerclose")},onEsc:function(t){t.keyCode===mn.ESC&&this.isVisible&&!this.noCloseOnEsc&&this.hide("esc")},focusHandler:function(t){var e=this.$refs.modal;!this.noEnforceFocus&&this.isTop&&this.isVisible&&e&&document!==t.target&&!Lt(e,t.target)&&e.focus({preventScroll:!0})},setEnforceFocus:function(t){(t?$t:Pt)(document,"focusin",this.focusHandler,La)},setResizeEvent:function(t){var e=t?$t:Pt;e(window,"resize",this.checkModalOverflow,La),e(window,"orientationchange",this.checkModalOverflow,La)},showHandler:function(t,e){t===this.safeId()&&(this.return_focus=e||this.getActiveElement(),this.show())},hideHandler:function(t){t===this.safeId()&&this.hide("event")},toggleHandler:function(t,e){t===this.safeId()&&this.toggle(e)},modalListener:function(t){this.noStacking&&t.vueTarget!==this&&this.hide()},focusFirst:function(){if(o.j){var t=this.$refs.modal,e=this.getActiveElement();!t||e&&Lt(t,e)||this.$nextTick(function(){t.scrollTop=0,t.focus()})}},returnFocusTo:function(){var t=this.returnFocus||this.return_focus||null;(t=X(t)?Mt(t):t)&&(t=t.$el||t,jt(t)&&t.focus&&t.focus())},checkModalOverflow:function(){if(this.isVisible){var t=this.$refs.modal;this.isModalOverflowing=t.scrollHeight>document.documentElement.clientHeight}},makeModal:function(t){var e=t(!1);if(!this.hideHeader){var n=this.normalizeSlot("modal-header",this.slotScope);if(!n){var i=t(!1);this.hideHeaderClose||(i=t(de,{props:{disabled:this.isTransitioning,ariaLabel:this.headerCloseLabel,textVariant:this.headerCloseVariant||this.headerTextVariant},on:{click:this.onClose}},[this.normalizeSlot("modal-header-close",{})]));var r=!this.hasNormalizedSlot("modal-title")&&this.titleHtml?{innerHTML:this.titleHtml}:{};n=[t(this.titleTag,{class:["modal-title"],domProps:r},[this.normalizeSlot("modal-title",this.slotScope)||Ve(this.title)]),i]}e=t("header",{ref:"header",staticClass:"modal-header",class:this.headerClasses,attrs:{id:this.safeId("__BV_modal_header_")}},[n])}var o=t("div",{ref:"body",staticClass:"modal-body",class:this.bodyClasses,attrs:{id:this.safeId("__BV_modal_body_")}},this.normalizeSlot("default",this.slotScope)),a=t(!1);if(!this.hideFooter){var s=this.normalizeSlot("modal-footer",this.slotScope);if(!s){var l=t(!1);if(!this.okOnly){var u=this.cancelTitleHtml?{innerHTML:this.cancelTitleHtml}:null;l=t(cn,{props:{variant:this.cancelVariant,size:this.buttonSize,disabled:this.cancelDisabled||this.busy||this.isTransitioning},on:{click:this.onCancel}},[this.normalizeSlot("modal-cancel",{})||(u?t("span",{domProps:u}):Ve(this.cancelTitle))])}var c=this.okTitleHtml?{innerHTML:this.okTitleHtml}:null;s=[l,t(cn,{props:{variant:this.okVariant,size:this.buttonSize,disabled:this.okDisabled||this.busy||this.isTransitioning},on:{click:this.onOk}},[this.normalizeSlot("modal-ok",{})||(c?t("span",{domProps:c}):Ve(this.okTitle))])]}a=t("footer",{ref:"footer",staticClass:"modal-footer",class:this.footerClasses,attrs:{id:this.safeId("__BV_modal_footer_")}},[s])}var d=t("div",{ref:"content",staticClass:"modal-content",class:this.contentClass,attrs:{role:"document",id:this.safeId("__BV_modal_content_"),"aria-labelledby":this.hideHeader?null:this.safeId("__BV_modal_header_"),"aria-describedby":this.safeId("__BV_modal_body_")}},[e,o,a]),f=t("div",{staticClass:"modal-dialog",class:this.dialogClasses,on:{mousedown:this.onDialogMousedown}},[d]),h=t("div",{ref:"modal",staticClass:"modal",class:this.modalClasses,style:this.modalStyles,directives:[{name:"show",rawName:"v-show",value:this.isVisible,expression:"isVisible"}],attrs:{id:this.safeId(),role:"dialog",tabindex:"-1","aria-hidden":this.isVisible?null:"true","aria-modal":this.isVisible?"true":null},on:{keydown:this.onEsc,click:this.onClickOut}},[f]);h=t("transition",{props:{enterClass:"",enterToClass:"",enterActiveClass:"",leaveClass:"",leaveActiveClass:"",leaveToClass:""},on:{beforeEnter:this.onBeforeEnter,enter:this.onEnter,afterEnter:this.onAfterEnter,beforeLeave:this.onBeforeLeave,leave:this.onLeave,afterLeave:this.onAfterLeave}},[h]);var p=t(!1);!this.hideBackdrop&&this.isVisible&&(p=t("div",{staticClass:"modal-backdrop",attrs:{id:this.safeId("__BV_modal_backdrop_")}},[this.normalizeSlot("modal-backdrop",{})])),p=t(ae,{props:{noFade:this.noFade}},[p]);var m=t(!1);return this.isVisible&&this.isTop&&!this.noEnforceFocus&&(m=t("div",{attrs:{tabindex:"0"}})),t("div",{key:"modal-outer-".concat(this._uid),style:this.modalOuterStyle,attrs:{id:this.safeId("__BV_modal_outer_")}},[h,m,p])}},render:function(t){return this.static?this.lazy&&this.isHidden?t(!1):this.makeModal(t):this.isHidden?t(!1):t(Ma,{},[this.makeModal(t)])}}),Ha=Ra,za={click:!0},Ga=function(t,e,n){"BUTTON"!==t.tagName&&zt(t,"role","button")},Ua={bind:function(t,e,n){Pi(n,e,za,function(t){var e=t.targets,n=t.vnode;e.forEach(function(t){n.context.$root.$emit("bv::show::modal",t,n.elm)})}),Ga(t)},updated:Ga,componentUpdated:Ga,unbind:function(t,e,n){Ei(n,e,za),"BUTTON"!==t.tagName&&Gt(t,"role")}};function Wa(t,e){for(var n=0;n1?n-1:0),r=1;r1?n-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2?arguments[2]:void 0;if(t&&!l("$bvModal")&&!s("$bvModal")&&W(i))return function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ja;if(!s("$bvModal")&&!l("$bvModal")){var r=new e({parent:n,propsData:Ya({},Qa(bt("BModal")||{}),{hideHeaderClose:!0,hideHeader:!(t.title||t.titleHtml)},A(t,B(Za)),{lazy:!1,busy:!1,visible:!1,noStacking:!1,noEnforceFocus:!1})});return B(Za).forEach(function(e){G(t[e])||(r.$slots[Za[e]]=g(t[e]))}),new Promise(function(t,e){var n=!1;r.$once("hook:destroyed",function(){n||e(new Error("BootstrapVue MsgBox destroyed before resolve"))}),r.$on("hide",function(e){if(!e.defaultPrevented){var r=i(e);e.defaultPrevented||(n=!0,t(r))}});var o=document.createElement("div");document.body.appendChild(o),r.$mount(o)})}}(Ya({},Qa(n),{msgBoxContent:t}),this._vm,i)}},{key:"msgBoxOk",value:function(t){var e=Ya({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{okOnly:!0,okDisabled:!1,hideFooter:!1,msgBoxContent:t});return this.msgBox(t,e,function(t){return!0})}},{key:"msgBoxConfirm",value:function(t){var e=Ya({},arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{okOnly:!1,okDisabled:!1,cancelDisabled:!1,hideFooter:!1});return this.msgBox(t,e,function(t){var e=t.trigger;return"ok"===e||"cancel"!==e&&null})}}])&&Wa(n.prototype,i),r&&Wa(n,r),t}();t.mixin({beforeCreate:function(){this._bv__modal=new n(this)}}),t.prototype.hasOwnProperty("$bvModal")||_(t.prototype,"$bvModal",{get:function(){return this&&this._bv__modal||a("'".concat("$bvModal","' must be accessed from a Vue instance 'this' context")),this._bv__modal}})}}}),es=st({components:{BModal:Ra},directives:{VBModal:Ua},plugins:{BVModalPlugin:ts}});function ns(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var is={tag:{type:String,default:"ul"},fill:{type:Boolean,default:!1},justified:{type:Boolean,default:!1},align:{type:String,default:null},tabs:{type:Boolean,default:!1},pills:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},small:{type:Boolean,default:!1},isNavBar:{type:Boolean,default:!1,deprecated:'Setting prop "is-nav-bar" is deprecated. Use the component instead.'}},rs=r.extend({name:"BNav",functional:!0,props:is,render:function(t,e){var n,i,r=e.props,o=e.data,a=e.children;return t(r.tag,ee(o,{class:(n={nav:!r.isNavBar,"navbar-nav":r.isNavBar,"nav-tabs":r.tabs&&!r.isNavBar,"nav-pills":r.pills&&!r.isNavBar,"flex-column":r.vertical&&!r.isNavBar,"nav-fill":!r.vertical&&r.fill,"nav-justified":!r.vertical&&r.justified},ns(n,(i=r.align,"justify-content-".concat(i="left"===i?"start":"right"===i?"end":i)),!r.vertical&&r.align),ns(n,"small",r.small),n)}),a)}});function os(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var as=Ee(),ss=r.extend({name:"BNavItem",functional:!0,props:function(t){for(var e=1;ee?e:n<1?1:n}function Ns(t){if(t.keyCode===mn.SPACE)return t.preventDefault(),t.stopImmediatePropagation(),t.stopPropagation(),t.currentTarget.click(),!1}var As={mixins:[ue],model:{prop:"value",event:"input"},props:{disabled:{type:Boolean,default:!1},value:{type:[Number,String],default:null,validator:function(t){var e=parseInt(t,10);return!(!U(t)&&(isNaN(e)||e<1))||(u("pagination: v-model value must be a number greater than 0"),!1)}},limit:{type:[Number,String],default:Es,validator:function(t){var e=parseInt(t,10);return!(isNaN(e)||e<1)||(u('pagination: prop "limit" must be a number greater than 0'),!1)}},size:{type:String,default:"md"},align:{type:String,default:"left"},hideGotoEndButtons:{type:Boolean,default:!1},ariaLabel:{type:String,default:"Pagination"},labelFirstPage:{type:String,default:"Go to first page"},firstText:{type:String,default:"«"},labelPrevPage:{type:String,default:"Go to previous page"},prevText:{type:String,default:"‹"},labelNextPage:{type:String,default:"Go to next page"},nextText:{type:String,default:"›"},labelLastPage:{type:String,default:"Go to last page"},lastText:{type:String,default:"»"},labelPage:{type:[String,Function],default:"Go to page"},hideEllipsis:{type:Boolean,default:!1},ellipsisText:{type:String,default:"…"}},data:function(){var t=parseInt(this.value,10);return{currentPage:t>0?t:-1,localNumPages:1,localLimit:Es}},computed:{btnSize:function(){return this.size?"pagination-".concat(this.size):""},alignment:function(){var t=this.align;return"center"===t?"justify-content-center":"end"===t||"right"===t?"justify-content-end":"fill"===t?"text-center":""},computedCurrentPage:function(){return Is(this.currentPage,this.localNumPages)},paginationParams:function(){var t=this.limit,e=this.localNumPages,n=this.computedCurrentPage,i=this.hideEllipsis,r=!1,o=!1,a=t,s=1;return e<=t?a=e:n3?i||(o=!0,a=t-1):e-n+23?(i||(a=t-1,r=!0),s=e-a+1):(t>3&&!i&&(a=t-2,r=o=!0),s=n-Math.floor(a/2)),s<1?s=1:s>e-a&&(s=e-a+1),{showFirstDots:r,showLastDots:o,numLinks:a,startNum:s}},pageList:function(){var t=this.paginationParams,e=t.numLinks,n=t.startNum,i=this.computedCurrentPage,r=function(t,e){return Ps(e).map(function(e,n){return{number:n+t,classes:null}})}(n,e);if(r.length>3){var o=i-n,a="bv-d-xs-down-none";if(0===o)for(var s=3;so+1;c--)r[c].classes=a}}return r}},watch:{value:function(t,e){t!==e&&(this.currentPage=Is(t,this.localNumPages))},currentPage:function(t,e){t!==e&&this.$emit("input",t>0?t:null)},limit:function(t,e){t!==e&&(this.localLimit=js(t))}},created:function(){var t=this;this.localLimit=js(this.limit),this.$nextTick(function(){t.currentPage=t.currentPage>t.localNumPages?t.localNumPages:t.currentPage})},methods:{getButtons:function(){return At("a.page-link",this.$el).filter(function(t){return jt(t)})},setBtnFocus:function(t){t.focus()},focusCurrent:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().find(function(e){return parseInt(Ut(e,"aria-posinset"),10)===t.computedCurrentPage});e&&e.focus?t.setBtnFocus(e):t.focusFirst()})},focusFirst:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().find(function(t){return!It(t)});e&&e.focus&&e!==document.activeElement&&t.setBtnFocus(e)})},focusLast:function(){var t=this;this.$nextTick(function(){var e=t.getButtons().reverse().find(function(t){return!It(t)});e&&e.focus&&e!==document.activeElement&&t.setBtnFocus(e)})},focusPrev:function(){var t=this;this.$nextTick(function(){var e=t.getButtons(),n=e.indexOf(document.activeElement);n>0&&!It(e[n-1])&&e[n-1].focus&&t.setBtnFocus(e[n-1])})},focusNext:function(){var t=this;this.$nextTick(function(){var e=t.getButtons(),n=e.indexOf(document.activeElement);ni,p=n<1?1:n>i?i:n,m={disabled:h,page:p,index:p-1},b=e.normalizeSlot(a,m)||ye(s)||t(!1),g=t(h?"span":Ie,{staticClass:"page-link",props:h?{}:e.linkProps(n),attrs:{role:"menuitem",tabindex:h?null:"-1","aria-label":o,"aria-controls":e.ariaControls||null,"aria-disabled":h?"true":null},on:h?{}:{click:function(t){e.onClick(n,t)},keydown:Ns}},[b]);return t("li",{key:f,staticClass:"page-item",class:{disabled:h,"flex-fill":u},attrs:{role:"none presentation","aria-hidden":h?"true":null}},[g])},h=function(n){return t("li",{key:"ellipsis-".concat(n?"last":"first"),staticClass:"page-item",class:["disabled","bv-d-xs-down-none",u?"flex-fill":""],attrs:{role:"separator"}},[t("span",{staticClass:"page-link"},[e.normalizeSlot("ellipsis-text",{})||ye(e.ellipsisText)||t(!1)])])};n.push(this.hideGotoEndButtons?t(!1):f(1,this.labelFirstPage,"first-text",this.firstText,1,"bookend-goto-first")),n.push(f(l-1,this.labelPrevPage,"prev-text",this.prevText,1,"bookend-goto-prev")),n.push(a?h(!1):t(!1)),this.pageList.forEach(function(o,a){var s=c(o.number)&&!d,l=r?null:s||d&&0===a?"0":"-1",f={role:"menuitemradio","aria-disabled":r?"true":null,"aria-controls":e.ariaControls||null,"aria-label":W(e.labelPage)?e.labelPage(o.number):"".concat(e.labelPage," ").concat(o.number),"aria-checked":s?"true":"false","aria-posinset":o.number,"aria-setsize":i,tabindex:l},h=ye(e.makePage(o.number)),p={page:o.number,index:o.number-1,content:h,active:s,disabled:r},m=t(r?"span":Ie,{props:r?{}:e.linkProps(o.number),staticClass:"page-link",attrs:f,on:r?{}:{click:function(t){e.onClick(o.number,t)},keydown:Ns}},[e.normalizeSlot("page",p)||h]);n.push(t("li",{key:"page-".concat(o.number),staticClass:"page-item",class:[{disabled:r,active:s,"flex-fill":u},o.classes],attrs:{role:"none presentation"}},[m]))}),n.push(s?h(!0):t(!1)),n.push(f(l+1,this.labelNextPage,"next-text",this.nextText,i,"bookend-goto-next")),n.push(this.hideGotoEndButtons?t(!1):f(i,this.labelLastPage,"last-text",this.lastText,i,"bookend-goto-last"));var p=t("ul",{ref:"ul",staticClass:"pagination",class:["b-pagination",this.btnSize,this.alignment],attrs:{role:"menubar","aria-disabled":r?"true":"false","aria-label":this.ariaLabel||null},on:{keydown:function(t){var n=t.keyCode,i=t.shiftKey;n===mn.LEFT?(t.preventDefault(),i?e.focusFirst():e.focusPrev()):n===mn.RIGHT&&(t.preventDefault(),i?e.focusLast():e.focusNext())}}},n);return this.isNav?t("nav",{attrs:{"aria-disabled":r?"true":null,"aria-hidden":r?"true":"false"}},[p]):p}},Ms=20,Ds=0;var Fs={perPage:{type:[Number,String],default:Ms},totalRows:{type:[Number,String],default:Ds},ariaControls:{type:String,default:null}},Ls=r.extend({name:"BPagination",mixins:[As],props:Fs,computed:{numberOfPages:function(){var t,e,n=Math.ceil((t=this.totalRows,((e=parseInt(t,10)||Ds)<0?0:e)/function(t){var e=parseInt(t,10)||Ms;return e<1?1:e}(this.perPage)));return n<1?1:n}},watch:{numberOfPages:function(t){t!==this.localNumPages&&(this.localNumPages=t,this.currentPage=1)}},created:function(){var t=this;this.localNumPages=this.numberOfPages;var e=parseInt(this.value,10)||0;e>0?this.currentPage=e:this.$nextTick(function(){t.currentPage=0})},mounted:function(){this.localNumPages=this.numberOfPages},methods:{onClick:function(t,e){var n=this;t>this.numberOfPages?t=this.numberOfPages:t<1&&(t=1),this.currentPage=t,this.$emit("change",this.currentPage),this.$nextTick(function(){var t=e.target;jt(t)&&n.$el.contains(t)&&t.focus?t.focus():n.focusCurrent()})},makePage:function(t){return t},linkProps:function(t){return{href:"#"}}}}),Vs=st({components:{BPagination:Ls}}),Rs={numberOfPages:{type:[Number,String],default:1,validator:function(t){var e=parseInt(t,10);return!(isNaN(e)||e<1)||(u('b-pagination: prop "number-of-pages" must be a number greater than 0'),!1)}},baseUrl:{type:String,default:"/"},useRouter:{type:Boolean,default:!1},linkGen:{type:Function,default:null},pageGen:{type:Function,default:null},pages:{type:Array,default:null},noPageDetect:{type:Boolean,default:!1},activeClass:{type:String},exact:{type:Boolean,default:!1},exactActiveClass:{type:String},noPrefetch:{type:Boolean,default:!1}},Hs=r.extend({name:"BPaginationNav",mixins:[As],props:Rs,computed:{isNav:function(){return!0},computedValue:function(){var t=parseInt(this.value,10);return isNaN(t)||t<1?null:t}},watch:{numberOfPages:function(t,e){var n=this;this.$nextTick(function(){n.setNumPages()})},pages:function(t,e){var n=this;this.$nextTick(function(){n.setNumPages()})}},created:function(){this.setNumPages()},mounted:function(){var t=this;this.$router&&this.$watch("$route",function(e,n){t.$nextTick(function(){Bt(function(){t.guessCurrentPage()})})})},methods:{setNumPages:function(){var t,e,n=this;m(this.pages)&&this.pages.length>0?this.localNumPages=this.pages.length:this.localNumPages=(t=this.numberOfPages,(e=parseInt(t,10)||1)<1?1:e),this.$nextTick(function(){n.guessCurrentPage()})},onClick:function(t,e){var n=this;t!==this.currentPage&&(Bt(function(){n.currentPage=t,n.$emit("change",t)}),this.$nextTick(function(){try{(e.currentTarget||e.target).blur()}catch(t){}}))},getPageInfo:function(t){if(!m(this.pages)||0===this.pages.length||G(this.pages[t-1])){var e="".concat(this.baseUrl).concat(t);return{link:this.useRouter?{path:e}:e,text:ye(t)}}var n=this.pages[t-1];if(I(n)){var i=n.link;return{link:I(i)?i:this.useRouter?{path:i}:i,text:ye(n.text||t)}}return{link:ye(n),text:ye(t)}},makePage:function(t){var e=this.getPageInfo(t);return this.pageGen&&W(this.pageGen)?this.pageGen(t,e):e.text},makeLink:function(t){var e=this.getPageInfo(t);return this.linkGen&&W(this.linkGen)?this.linkGen(t,e):e.link},linkProps:function(t){var e=this.makeLink(t),n={target:this.target||null,rel:this.rel||null,disabled:this.disabled,exact:this.exact,activeClass:this.activeClass,exactActiveClass:this.exactActiveClass,append:this.append,replace:this.replace,noPrefetch:this.noPrefetch};return this.useRouter||I(e)?n.to=e:n.href=e,n},resolveLink:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{(t=document.createElement("a")).href=Ce({to:e},"a","/","/"),document.body.appendChild(t);var n=t,i=n.pathname,r=n.hash,o=n.search;return document.body.removeChild(t),{path:i,hash:r,query:Oe(o)}}catch(e){try{t&&t.parentNode&&t.parentNode.removeChild(t)}catch(t){}return{}}},resolveRoute:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var e=this.$router.resolve(t,this.$route).route;return{path:e.path,hash:e.hash,query:e.query}}catch(t){return{}}},guessCurrentPage:function(){var t=this.computedValue,e=this.$router,n=this.$route;if(!this.noPageDetect&&!t&&(o.j||!o.j&&e))for(var i=e&&n?{path:n.path,hash:n.hash,query:n.query}:{},r=o.j?window.location||document.location:null,a=r?{path:r.pathname,hash:r.hash,query:Oe(r.search)}:{},s=1;!t&&s<=this.localNumPages;s++){var l=this.makeLink(s);t=e&&(I(l)||this.useRouter)?Bi(this.resolveRoute(l),i)?s:null:o.j?Bi(this.resolveLink(l),a)?s:null:-1}this.currentPage=t>0?t:0}}}),zs=st({components:{BPaginationNav:Hs}});function Gs(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Us(t,e){for(var n=0;n
',trigger:"hover focus",title:"",delay:0,html:!1,placement:"top",offset:0,arrowPadding:6,container:!1,fallbackPlacement:"flip",callbacks:{},boundary:"scrollParent",boundaryPadding:5},nl={WebkitTransition:["webkitTransitionEnd"],MozTransition:["transitionend"],OTransition:["otransitionend","oTransitionEnd"],transition:["transitionend"]},il={passive:!0,capture:!1},rl=1,ol=function(t){return"__BV_".concat(t,"_").concat(rl++,"__")},al=function(){function t(e,n,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$isEnabled=!0,this.$fadeTimeout=null,this.$hoverTimeout=null,this.$visibleInterval=null,this.$hoverState="",this.$activeTrigger={},this.$popper=null,this.$element=e,this.$tip=null,this.$id=ol(this.constructor.NAME),this.$root=i||null,this.$routeWatcher=null,this.$forceHide=this.forceHide.bind(this),this.$doHide=this.doHide.bind(this),this.$doShow=this.doShow.bind(this),this.$doDisable=this.doDisable.bind(this),this.$doEnable=this.doEnable.bind(this),this._noop=ci.bind(this),this.updateConfig(n)}var e,n,i;return e=t,i=[{key:"getAttachment",value:function(t){return Ys[t.toUpperCase()]}},{key:"Default",get:function(){return el}},{key:"NAME",get:function(){return"tooltip"}}],(n=[{key:"updateConfig",value:function(t){var e=function(t){for(var e=1;e0&&e.forEach(function(e){Rt(t,e)})}},{key:"handlePopperPlacementChange",value:function(t){this.cleanTipClass(),this.addAttachmentClass(this.constructor.getAttachment(t.placement))}},{key:"fixTransition",value:function(t){var e=this.$config.animation||!1;U(Ut(t,"x-placement"))&&(Rt(t,Js),this.$config.animation=!1,this.hide(),this.show(),this.$config.animation=e)}}])&&Us(e.prototype,n),i&&Us(e,i),t}();function sl(t){return(sl="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 ll(t,e){for(var n=0;n

'}),ml="fade",bl="show",gl=".popover-header",vl=".popover-body",yl=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ul(this,cl(e).apply(this,arguments))}var n,i,r;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dl(t,e)}(e,al),n=e,r=[{key:"Default",get:function(){return pl}},{key:"NAME",get:function(){return"popover"}}],(i=[{key:"isWithContent",value:function(t){if(!(t=t||this.$tip))return!1;var e=Boolean((Mt(gl,t)||{}).innerHTML),n=Boolean((Mt(vl,t)||{}).innerHTML);return e||n}},{key:"addAttachmentClass",value:function(t){Vt(this.getTipElement(),"".concat("bs-popover","-").concat(t))}},{key:"setContent",value:function(t){this.setElementContent(Mt(gl,t),this.getTitle()),this.setElementContent(Mt(vl,t),this.getContent()),Rt(t,ml),Rt(t,bl)}},{key:"cleanTipClass",value:function(){var t=this.getTipElement(),e=t.className.match(hl);!U(e)&&e.length>0&&e.forEach(function(e){Rt(t,e)})}},{key:"getTitle",value:function(){var t=this.$config.title||"";return W(t)&&(t=t(this.$element)),I(t)&&t.nodeType&&!t.innerHTML.trim()&&(t=""),X(t)&&(t=t.trim()),t||(t=(t=Ut(this.$element,"title")||Ut(this.$element,"data-original-title")||"").trim()),t}},{key:"getContent",value:function(){var t=this.$config.content||"";return W(t)&&(t=t(this.$element)),I(t)&&t.nodeType&&!t.innerHTML.trim()&&(t=""),X(t)&&(t=t.trim()),t}}])&&ll(n.prototype,i),r&&ll(n,r),e}();function wl(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Sl={top:"top",topleft:"topleft",topright:"topright",right:"right",righttop:"righttop",rightbottom:"rightbottom",bottom:"bottom",bottomleft:"bottomleft",bottomright:"bottomright",left:"left",lefttop:"lefttop",leftbottom:"leftbottom",auto:"auto"},xl={subtree:!0,childList:!0,characterData:!0,attributes:!0,attributeFilter:["class","style"]},Tl={props:{target:{type:[String,Object,Li,Function]},offset:{type:[Number,String],default:0},noFade:{type:Boolean,default:!1},container:{type:String,default:null},show:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},data:function(){return{localShow:!1}},computed:{baseConfig:function(){var t=this.container,e=I(this.delay)?this.delay:parseInt(this.delay,10)||0;return{title:(this.title||"").trim()||"",content:(this.content||"").trim()||"",placement:Sl[this.placement]||"auto",fallbackPlacement:this.fallbackPlacement||"flip",container:!!t&&(/^#/.test(t)?t:"#".concat(t)),boundary:this.boundary,boundaryPadding:this.boundaryPadding,delay:e||0,offset:this.offset||0,animation:!this.noFade,trigger:m(this.triggers)?this.triggers.join(" "):this.triggers,callbacks:{show:this.onShow,shown:this.onShown,hide:this.onHide,hidden:this.onHidden,enabled:this.onEnabled,disabled:this.onDisabled}}}},watch:{show:function(t,e){t!==e&&(t?this.onOpen():this.onClose())},disabled:function(t,e){t!==e&&(t?this.onDisable():this.onEnable())},localShow:function(t,e){t!==this.show&&this.$emit("update:show",t)}},created:function(){this._toolpop=null,this._obs_title=null,this._obs_content=null},mounted:function(){var t=this;this.$nextTick(function(){t.createToolpop()&&(t.disabled&&t.onDisable(),t.$on("open",t.onOpen),t.$on("close",t.onClose),t.$on("disable",t.onDisable),t.$on("enable",t.onEnable),t.setObservers(!0),t.show&&t.onOpen())})},updated:function(){this._toolpop&&this._toolpop.updateConfig(this.getConfig())},activated:function(){this.setObservers(!0)},deactivated:function(){this._toolpop&&(this.setObservers(!1),this._toolpop.hide())},beforeDestroy:function(){this.$off("open",this.onOpen),this.$off("close",this.onClose),this.$off("disable",this.onDisable),this.$off("enable",this.onEnable),this.setObservers(!1),this.bringItBack(),this._toolpop&&(this._toolpop.destroy(),this._toolpop=null)},methods:{getConfig:function(){var t=function(t){for(var e=1;e0&&B(t).forEach(function(e){var i=Gl(e,t[e]);i&&n.push(i)}),0===n.length&&m(e)&&e.length>0){var i=e[0];B(i).forEach(function(t){Vl[t]||n.push({key:t,label:Ll(t)})})}var r={};return n.filter(function(t){return!r[t.key]&&(r[t.key]=!0,t.label=X(t.label)?t.label:Ll(t.key),!0)})},Wl={props:{items:{type:Array,default:function(){return[]}},fields:{type:[Array,Object],default:null},primaryKey:{type:String,default:null},value:{type:Array,default:function(){return[]}}},data:function(){return{localItems:m(this.items)?this.items.slice():[]}},computed:{computedFields:function(){return Ul(this.fields,this.localItems)},computedFieldsObj:function(){return this.computedFields.reduce(function(t,e){return e[t.key]=t,e},{})},computedItems:function(){return(this.paginatedItems||this.sortedItems||this.filteredItems||this.localItems||[]).slice()},context:function(){return{filter:this.localFilter,sortBy:this.localSortBy,sortDesc:this.localSortDesc,perPage:parseInt(this.perPage,10)||0,currentPage:parseInt(this.currentPage,10)||1,apiUrl:this.apiUrl}}},watch:{items:function(t){m(t)?this.localItems=t.slice():(G(t)||U(t))&&(this.localItems=[])},computedItems:function(t){this.$emit("input",t)},context:function(t,e){Bi(t,e)||this.$emit("context-changed",t)}},mounted:function(){this.$emit("input",this.computedItems)}};function Yl(t){return B(t).reduce(function(e,n){return Vl[n]||(e[n]=t[n]),e},{})}function Xl(t){return G(t)||U(t)?"":t instanceof Object&&!(t instanceof Date)?B(t).sort().filter(function(t){return!G(t)&&!U(t)}).map(function(e){return Xl(t[e])}).join(" "):String(t)}var ql='Supplying a function to prop "filter" is deprecated. Use "filter-function" instead.',Kl={props:{filter:{type:[String,RegExp,Object,Array,Function],default:null,deprecation:ql},filterFunction:{type:Function,default:null}},data:function(){return{isFiltered:!1}},computed:{localFiltering:function(){return!this.hasProvider||!!this.noProviderFiltering},filteredCheck:function(){return{filteredItems:this.filteredItems,localItems:this.localItems,localFilter:this.localFilter}},localFilter:function(){return W(this.filter)?"":!this.localFiltering||W(this.filterFunction)||X(this.filter)||J(this.filter)?L(this.filter):""},localFilterFn:function(){var t=this.filter,e=this.filterFunction;return W(e)?e:W(t)?(u("b-table: ".concat(ql)),t):null},filteredItems:function(){var t=this.localItems||[],e=this.localFilter,n=this.filterFnFactory(this.localFilterFn,e)||this.defaultFilterFnFactory(e);return this.localFiltering&&n&&t.length>0&&(t=t.filter(n)),t}},watch:{filteredCheck:function(t){var e,n=t.filteredItems,i=(t.localItems,t.localFilter);(e=!!i&&(!Bi(i,[])&&!Bi(i,{})&&!!i))&&this.$emit("filtered",n,n.length),this.isFiltered=e},isFiltered:function(t,e){!1===t&&!0===e&&this.$emit("filtered",this.localItems,this.localItems.length)}},created:function(){var t=this;this.$nextTick(function(){t.isFiltered=Boolean(t.localFilter)})},methods:{filterFnFactory:function(t,e){if(!t||!W(t)||!e||Bi(e,[])||Bi(e,{}))return null;return function(n){return t(n,e)}},defaultFilterFnFactory:function(t){if(!t||!X(t)&&!J(t))return null;var e=t;if(X(e)){var n=t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&").replace(/[\s\uFEFF\xA0]+/g,"\\s+");e=new RegExp(".*".concat(n,".*"),"i")}return function(t){return e.lastIndex=0,e.test((n=t)instanceof Object?Xl(Yl(n)):"");var n}}}},Jl=function(t,e){return t.map(function(t,e){return[e,t]}).sort(function(t,e){return this(t[1],e[1])||t[0]-e[0]}.bind(e)).map(function(t){return t[1]})};var Zl={props:{sortBy:{type:String,default:null},sortDesc:{type:Boolean,default:!1},sortDirection:{type:String,default:"asc",validator:function(t){return b(["asc","desc","last"],t)}},sortCompare:{type:Function,default:null},noSortReset:{type:Boolean,default:!1},labelSortAsc:{type:String,default:"Click to sort Ascending"},labelSortDesc:{type:String,default:"Click to sort Descending"},labelSortClear:{type:String,default:"Click to clear sorting"},noLocalSorting:{type:Boolean,default:!1},noFooterSorting:{type:Boolean,default:!1}},data:function(){return{localSortBy:this.sortBy||"",localSortDesc:this.sortDesc||!1}},computed:{localSorting:function(){return this.hasProvider?!!this.noProviderSorting:!this.noLocalSorting},isSortable:function(){return this.computedFields.some(function(t){return t.sortable})},sortedItems:function(){var t=(this.filteredItems||this.localItems||[]).slice(),e=this.localSortBy,n=this.localSortDesc,i=this.sortCompare,r=this.localSorting;return e&&r?Jl(t,function(t,r){var o=null;return W(i)&&(o=i(t,r,e,n)),(G(o)||U(o)||!1===o)&&(o=function(t,e,n){return t=V(t,n,""),e=V(e,n,""),K(t)&&K(e)||q(t)&&q(e)?te?1:0:Xl(t).localeCompare(Xl(e),void 0,{numeric:!0})}(t,r,e)),(o||0)*(n?-1:1)}):t}},watch:{isSortable:function(t,e){t?this.isSortable&&this.$on("head-clicked",this.handleSort):this.$off("head-clicked",this.handleSort)},sortDesc:function(t,e){t!==this.localSortDesc&&(this.localSortDesc=t||!1)},sortBy:function(t,e){t!==this.localSortBy&&(this.localSortBy=t||null)},localSortDesc:function(t,e){t!==e&&this.$emit("update:sortDesc",t)},localSortBy:function(t,e){t!==e&&this.$emit("update:sortBy",t)}},created:function(){this.isSortable&&this.$on("head-clicked",this.handleSort)},methods:{handleSort:function(t,e,n,i){var r=this;if(this.isSortable&&(!i||!this.noFooterSorting)){var o=!1,a=function(){var t=e.sortDirection||r.sortDirection;"asc"===t?r.localSortDesc=!1:"desc"===t&&(r.localSortDesc=!0)};e.sortable?(t===this.localSortBy?this.localSortDesc=!this.localSortDesc:(this.localSortBy=t,a()),o=!0):this.localSortBy&&!this.noSortReset&&(this.localSortBy=null,a(),o=!0),o&&this.$emit("sort-changed",this.context)}},sortTheadThClasses:function(t,e,n){return{}},sortTheadThAttrs:function(t,e,n){if(!this.isSortable||n&&this.noFooterSorting)return{};var i=e.sortable,r="";e.label&&e.label.trim()||e.headerTitle||(r=Ll(t));var o="";if(i)if(this.localSortBy===t)o=this.localSortDesc?this.labelSortAsc:this.labelSortDesc;else{o=this.localSortDesc?this.labelSortDesc:this.labelSortAsc;var a=this.sortDirection||e.sortDirection;"asc"===a?o=this.labelSortAsc:"desc"===a&&(o=this.labelSortDesc)}else this.noSortReset||(o=this.localSortBy?this.labelSortClear:"");return{"aria-label":(r=[r.trim(),o.trim()].filter(Boolean).join(": "))||null,"aria-sort":i&&this.localSortBy===t?this.localSortDesc?"descending":"ascending":i?"none":null}}}},Ql={props:{perPage:{type:[Number,String],default:0},currentPage:{type:[Number,String],default:1}},computed:{localPaging:function(){return!this.hasProvider||!!this.noProviderPaging},paginatedItems:function(){var t=this.sortedItems||this.filteredItems||this.localItems||[],e=Math.max(parseInt(this.currentPage,10)||1,1),n=Math.max(parseInt(this.perPage,10)||0,0);return this.localPaging&&n&&(t=t.slice((e-1)*n,e*n)),t}}},tu={props:{caption:{type:String,default:null},captionHtml:{type:String},captionTop:{type:Boolean,default:!1}},computed:{captionClasses:function(){return{"b-table-caption-top":this.captionTop}},captionId:function(){return this.isStacked?this.safeId("_caption_"):null}},methods:{renderCaption:function(){var t=this.$createElement,e=this.normalizeSlot("table-caption",{}),n=t(!1);if(e||this.caption||this.captionHtml){var i={key:"caption",class:this.captionClasses,attrs:{id:this.captionId}};e||(i.domProps=Re(this.captionHtml,this.caption)),n=t("caption",i,[e])}return n}}},eu={methods:{renderColgroup:function(){var t=this.$createElement,e=this.computedFields,n=t(!1);return this.hasNormalizedSlot("table-colgroup")&&(n=t("colgroup",{key:"colgroup"},[this.normalizeSlot("table-colgroup",{columns:e.length,fields:e})])),n}}};function nu(t){if(t&&t.target){var e=t.target;if("TD"===e.tagName||"TH"===e.tagName||"TR"===e.tagName||e.disabled)return!1;if(Ft(".dropdown-menu",e))return!0;var n="LABEL"===e.tagName?e:Ft("label",e);return!(!n||!n.control||n.control.disabled)||Dt(e,Rl)}}function iu(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=window;if(e&&e.getSelection&&""!==e.getSelection().toString()&&Et(t)){var n=e.getSelection();return!!n.containsNode&&n.containsNode(t,!0)}return!1}function ru(t){for(var e=1;e0&&void 0!==arguments[0]&&arguments[0],n=this.$createElement;if(!0===this.isStacked)return n(!1);var i=this.computedFields||[],r=i.map(function(i,r){var o=null;i.label.trim()||i.headerTitle||(o=Ll(i.key));var a=t.$listeners["head-clicked"]||t.isSortable,s={};a&&(s.click=function(n){t.headClicked(n,i,e)},s.keydown=function(n){var r=n.keyCode;r!==mn.ENTER&&r!==mn.SPACE||t.headClicked(n,i,e)});var l=t.isSortable?t.sortTheadThAttrs(i.key,i,e):{},u=t.isSortable?t.sortTheadThClasses(i.key,i,e):null,c={key:i.key,class:[t.fieldClasses(i),u],style:i.thStyle||{},attrs:ru({tabindex:a?"0":null,abbr:i.headerAbbr||null,title:i.headerTitle||null,role:"columnheader",scope:"col","aria-colindex":String(r+1),"aria-label":o},l),on:s},d={label:i.label,column:i.key,field:i},f=e&&t.hasNormalizedSlot("FOOT_".concat(i.key))?t.normalizeSlot("FOOT_".concat(i.key),d):t.normalizeSlot("HEAD_".concat(i.key),d);return f||(c.domProps=Re(i.labelHtml)),n("th",c,f||i.label)}).filter(function(t){return t}),o=[];if(e)o.push(n("tr",{class:this.tfootTrClass,attrs:{role:"row"}},r));else{var a={columns:i.length,fields:i};o.push(this.normalizeSlot("thead-top",a)||n(!1)),o.push(n("tr",{class:this.theadTrClass,attrs:{role:"row"}},r))}return n(e?"tfoot":"thead",{key:e?"tfoot":"thead",class:e?this.footClasses:this.headClasses,attrs:{role:"rowgroup"}},o)}}},su={props:{footClone:{type:Boolean,default:!1},footVariant:{type:String,default:function(){return bt("BTable","footVariant")}},tfootClass:{type:[String,Array,Object],default:null},tfootTrClass:{type:[String,Array,Object],default:null}},computed:{footClasses:function(){var t=this.footVariant||this.headVariant||null;return[t?"thead-".concat(t):"",this.tfootClass]}},methods:{renderTfoot:function(){var t=this.$createElement;return this.footClone?this.renderThead(!0):t(!1)}}};function lu(t){for(var e=1;e0?o[a-1].focus():i===mn.DOWN&&a0&&(h=String((this.currentPage-1)*this.perPage+e+1));var p=this.primaryKey,m=!p||G(t[p])||U(t[p])?String(e):ye(t[p]),b=!p||G(t[p])||U(t[p])?null:this.safeId("_row_".concat(t[p])),g={};s&&(g.click=function(i){n.rowClicked(i,t,e)},g.keydown=function(i){n.tbodyRowKeydown(i,t,e)});var v=this.selectableRowClasses?this.selectableRowClasses(e):{},y=this.selectableRowAttrs?this.selectableRowAttrs(e):{};if(c.push(i("tr",{key:"__b-table-row-".concat(m,"__"),ref:"itemRows",refInFor:!0,class:[this.rowClasses(t),v,{"b-table-has-details":u}],attrs:lu({id:b,tabindex:s?"0":null,"data-pk":b?String(t[p]):null,"aria-describedby":d,"aria-owns":d,"aria-rowindex":h,role:"row"},y),on:lu({},g,{auxclick:function(i){2===i.which&&n.middleMouseRowClicked(i,t,e)},contextmenu:function(i){n.rowContextmenu(i,t,e)},dblclick:function(i){n.rowDblClicked(i,t,e)},mouseenter:function(i){n.rowHovered(i,t,e)},mouseleave:function(i){n.rowUnhovered(i,t,e)}})},f)),u){var w={id:d,role:"row"},S=i("td",{attrs:{colspan:String(o.length),role:"cell"}},[l({item:t,index:e,fields:o,toggleDetails:function(){l&&n.$set(t,"_showDetails",!t._showDetails)}})]);a&&c.push(i("tr",{key:"__b-table-details-".concat(e,"-stripe__"),staticClass:"d-none",attrs:{"aria-hidden":"true",role:"presentation"}})),c.push(i("tr",{key:"__b-table-details-".concat(e,"__"),staticClass:"b-table-details",class:[W(this.tbodyTrClass)?this.tbodyTrClass(t,"row-details"):this.tbodyTrClass],attrs:w},[S]))}else l&&(c.push(i(!1)),a&&c.push(i(!1)));return c}}}],props:{tbodyClass:{type:[String,Array],default:null},tbodyTransitionProps:{type:Object},tbodyTransitionHandlers:{type:Object}},methods:{renderTbody:function(){var t=this,e=this.$createElement,n=this.computedItems,i=[],r=this.renderBusy?this.renderBusy():null;r?i.push(r):(i.push(this.renderTopRow?this.renderTopRow():e(!1)),n.forEach(function(e,n){i.push(t.renderTbodyRow(e,n))}),i.push(this.renderEmpty?this.renderEmpty():e(!1)),i.push(this.renderBottomRow?this.renderBottomRow():e(!1)));var o=this.tbodyTransitionProps||this.tbodyTransitionHandlers,a={},s={};return o&&(s=this.tbodyTransitionHandlers||{},a=function(t){for(var e=1;e0){n=m(t)&&m(e)&&t.length===e.length;for(var i=0;n&&i-1&&n.shiftKey){for(var a=Math.min(this.selectedLastRow,e);a<=Math.max(this.selectedLastRow,e);a++)i[a]=!0;r=!0}else n.ctrlKey||n.metaKey||(i=[],r=!0),this.selectedLastRow=r?e:-1;i[e]=r,this.selectedRows=i}else this.clearSelected()}}};function vu(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var yu={mixins:[xi],props:{items:{type:[Array,Function],default:function(){return[]}},noProviderPaging:{type:Boolean,default:!1},noProviderSorting:{type:Boolean,default:!1},noProviderFiltering:{type:Boolean,default:!1},apiUrl:{type:String,default:""}},computed:{hasProvider:function(){return this.items instanceof Function},providerTriggerContext:function(){var t={apiUrl:this.apiUrl,filter:null,sortBy:null,sortDesc:null,perPage:null,currentPage:null};return this.noProviderFiltering||(t.filter=this.localFilter),this.noProviderSorting||(t.sortBy=this.localSortBy,t.sortDesc=this.localSortDesc),this.noProviderPaging||(t.perPage=this.perPage,t.currentPage=this.currentPage),function(t){for(var e=1;e0&&!this.computedBusy,"table-dark":this.dark,"table-bordered":this.bordered,"table-borderless":this.borderless,"table-sm":this.small,border:this.outlined,"b-table-fixed":this.fixed,"b-table-stacked":!0===this.stacked||""===this.stacked},"b-table-stacked-".concat(this.stacked),!0!==this.stacked&&this.stacked),this.selectableTableClasses]},tableAttrs:function(){var t=[(this.$attrs||{})["aria-describedby"],this.captionId].filter(Boolean).join(" ")||null,e=this.computedItems,n=this.computedFields,i=this.selectableTableAttrs||{};return function(t){for(var e=1;ee.length?String(this.filteredItems.length):null},this.$attrs,{id:this.safeId(),role:this.isStacked?"table":null,"aria-busy":this.computedBusy?"true":"false","aria-colcount":String(n.length),"aria-describedby":t},i)}},render:function(t){var e=this.renderCaption?this.renderCaption():null,n=this.renderColgroup?this.renderColgroup():null,i=this.renderThead(),r=this.renderTfoot(),o=this.renderTbody(),a=t("table",{key:"b-table",staticClass:"table b-table",class:this.tableClasses,attrs:this.tableAttrs},[e,n,i,r,o].filter(Boolean));return this.isResponsive?t("div",{key:"b-table-responsive",class:this.responsiveClass},[a]):a}},xu=r.extend({name:"BTable",mixins:[hi,ue,Wl,Su,au,su,du,Kl,Zl,Ql,tu,eu,gu,fu,hu,pu,mu,yu]}),Tu=r.extend({name:"BTableLite",mixins:[hi,ue,Wl,Su,au,su,du,tu,eu]}),ku=st({components:{BTable:xu,BTableLite:Tu}});function Ou(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Bu=A(is,["tabs","isNavBar"]),Cu=function(t){return!t.disabled},_u=r.extend({name:"BTabButtonHelper",inject:{bvTabs:{default:function(){return{}}}},props:{tab:{default:null},tabs:{type:Array,default:function(){return[]}},id:{type:String,default:null},controls:{type:String,default:null},tabIndex:{type:Number,default:null},posInSet:{type:Number,default:null},setSize:{type:Number,default:null},noKeyNav:{type:Boolean,default:!1}},methods:{focus:function(){this.$refs&&this.$refs.link&&this.$refs.link.focus&&this.$refs.link.focus()},handleEvt:function(t){function e(){t.preventDefault(),t.stopPropagation()}if(!this.tab.disabled){var n=t.type,i=t.keyCode,r=t.shiftKey;"click"===n?(e(),this.$emit("click",t)):"keydown"!==n||this.noKeyNav||i!==mn.SPACE?"keydown"!==n||this.noKeyNav||(i===mn.UP||i===mn.LEFT||i===mn.HOME?(e(),r||i===mn.HOME?this.$emit("first",t):this.$emit("prev",t)):i!==mn.DOWN&&i!==mn.RIGHT&&i!==mn.END||(e(),r||i===mn.END?this.$emit("last",t):this.$emit("next",t))):(e(),this.$emit("click",t))}}},render:function(t){var e=t(Ie,{ref:"link",staticClass:"nav-link",class:[{active:this.tab.localActive&&!this.tab.disabled,disabled:this.tab.disabled},this.tab.titleLinkClass,this.tab.localActive?this.bvTabs.activeNavItemClass:null],props:{href:this.tab.href,disabled:this.tab.disabled},attrs:{role:"tab",id:this.id,tabindex:this.tabIndex,"aria-selected":this.tab.localActive&&!this.tab.disabled?"true":"false","aria-setsize":this.setSize,"aria-posinset":this.posInSet,"aria-controls":this.controls},on:{click:this.handleEvt,keydown:this.handleEvt}},[this.tab.normalizeSlot("title")||this.tab.title]);return t("li",{staticClass:"nav-item",class:[this.tab.titleItemClass],attrs:{role:"presentation"}},[e])}}),$u=r.extend({name:"BTabs",mixins:[hi,ue],provide:function(){return{bvTabs:this}},model:{prop:"value",event:"input"},props:function(t){for(var e=1;e0){var n=t.map(function(t){return"#".concat(t.safeId())}).join(", ");e=At(n,this.$el).map(function(t){return t.id}).filter(Boolean)}return Jl(t,function(t,n){return e.indexOf(t.safeId())-e.indexOf(n.safeId())})},updateTabs:function(){var t=this.getTabs(),e=t.indexOf(t.slice().reverse().find(function(t){return t.localActive&&!t.disabled}));if(e<0){var n=this.currentTab;n>=t.length?e=t.indexOf(t.slice().reverse().find(Cu)):t[n]&&!t[n].disabled&&(e=n)}e<0&&(e=t.indexOf(t.find(Cu))),t.forEach(function(t,e){t.localActive=!1}),t[e]&&(t[e].localActive=!0),this.tabs=t,this.currentTab=e},getButtonForTab:function(t){return(this.$refs.buttons||[]).find(function(e){return e.tab===t})},updateButton:function(t){var e=this.getButtonForTab(t);e&&e.$forceUpdate&&e.$forceUpdate()},activateTab:function(t){var e=!1;if(t){var n=this.tabs.indexOf(t);!t.disabled&&n>-1&&(e=!0,this.currentTab=n)}return e||this.$emit("input",this.currentTab),e},deactivateTab:function(t){return!!t&&this.activateTab(this.tabs.filter(function(e){return e!==t}).find(Cu))},focusButton:function(t){var e=this;this.$nextTick(function(){var n=e.getButtonForTab(t);n&&n.focus&&n.focus()})},emitTabClick:function(t,e){e&&e instanceof Event&&t&&t.$emit&&!t.disabled&&t.$emit("click",e)},clickTab:function(t,e){this.activateTab(t),this.emitTabClick(t,e)},firstTab:function(t){var e=this.tabs.find(Cu);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))},previousTab:function(t){var e=Math.max(this.currentTab,0),n=this.tabs.slice(0,e).reverse().find(Cu);this.activateTab(n)&&t&&(this.focusButton(n),this.emitTabClick(n,t))},nextTab:function(t){var e=Math.max(this.currentTab,-1),n=this.tabs.slice(e+1).find(Cu);this.activateTab(n)&&t&&(this.focusButton(n),this.emitTabClick(n,t))},lastTab:function(t){var e=this.tabs.slice().reverse().find(Cu);this.activateTab(e)&&t&&(this.focusButton(e),this.emitTabClick(e,t))}},render:function(t){var e=this,n=this.tabs,i=n.find(function(t){return t.localActive&&!t.disabled}),r=n.find(function(t){return!t.disabled}),o=n.map(function(o,a){var s=null;return e.noKeyNav||(s=-1,(i===o||!i&&r===o)&&(s=null)),t(_u,{key:o._uid||a,ref:"buttons",refInFor:!0,props:{tab:o,tabs:n,id:o.controlledBy||(e.tab&&e.tab.safeId?e.tab.safeId("_BV_tab_button_"):null),controls:e.tab&&e.tab.safeId?e.tab.safeId():null,tabIndex:s,setSize:n.length,posInSet:a+1,noKeyNav:e.noKeyNav},on:{click:function(t){e.clickTab(o,t)},first:e.firstTab,prev:e.previousTab,next:e.nextTab,last:e.lastTab}})}),a=t(rs,{ref:"nav",class:this.localNavClass,attrs:{role:"tablist",id:this.safeId("_BV_tab_controls_")},props:{fill:this.fill,justified:this.justified,align:this.align,tabs:!this.noNavStyle&&!this.pills,pills:!this.noNavStyle&&this.pills,vertical:this.vertical,small:this.small}},[o,this.normalizeSlot("tabs")]);a=t("div",{key:"bv-tabs-nav",class:[{"card-header":this.card&&!this.vertical&&!(this.end||this.bottom),"card-footer":this.card&&!this.vertical&&(this.end||this.bottom),"col-auto":this.vertical},this.navWrapperClass]},[a]);var s=t(!1);n&&0!==n.length||(s=t("div",{key:"bv-empty-tab",class:["tab-pane","active",{"card-body":this.card}]},this.normalizeSlot("empty")));var l=t("div",{ref:"tabsContainer",key:"bv-tabs-container",staticClass:"tab-content",class:[{col:this.vertical},this.contentClass],attrs:{id:this.safeId("_BV_tab_container_")}},g(this.normalizeSlot("default"),s));return t(this.tag,{staticClass:"tabs",class:{row:this.vertical,"no-gutters":this.vertical&&this.card},attrs:{id:this.safeId()}},[this.end||this.bottom?l:t(!1),[a],this.end||this.bottom?t(!1):l])}}),Pu='Setting prop "href" is deprecated. Use the component instead.',Eu=r.extend({name:"BTab",mixins:[hi,ue],inject:{bvTabs:{default:function(){return{noKeyNav:!0}}}},props:{active:{type:Boolean,default:!1},tag:{type:String,default:"div"},buttonId:{type:String,default:""},title:{type:String,default:""},titleItemClass:{type:[String,Array,Object],default:null},titleLinkClass:{type:[String,Array,Object],default:null},headHtml:{type:String,default:null},disabled:{type:Boolean,default:!1},noBody:{type:Boolean,default:!1},href:{type:String,default:"#",deprecated:Pu},lazy:{type:Boolean,default:!1}},data:function(){return{localActive:this.active&&!this.disabled,show:!1}},computed:{tabClasses:function(){return[{active:this.localActive,disabled:this.disabled,"card-body":this.bvTabs.card&&!this.noBody},this.localActive?this.bvTabs.activeTabClass:null]},controlledBy:function(){return this.buttonId||this.safeId("__BV_tab_button__")},computedNoFade:function(){return!this.bvTabs.fade},computedLazy:function(){return this.bvTabs.lazy||this.lazy},_isTab:function(){return!0}},watch:{localActive:function(t,e){this.$emit("update:active",t)},active:function(t,e){t!==e&&(t?this.activate():this.deactivate()||this.$emit("update:active",this.localActive))},disabled:function(t,e){t!==e&&t&&this.localActive&&this.bvTabs.firstTab&&(this.localActive=!1,this.bvTabs.firstTab())}},mounted:function(){this.registerTab(),this.show=this.localActive,this.href&&"#"!==this.href&&u("b-tab: ".concat(Pu))},updated:function(){this.hasNormalizedSlot("title")&&this.bvTabs.updateButton&&this.bvTabs.updateButton(this)},destroyed:function(){this.unregisterTab()},methods:{registerTab:function(){this.bvTabs.registerTab&&this.bvTabs.registerTab(this)},unregisterTab:function(){this.bvTabs.unregisterTab&&this.bvTabs.unregisterTab(this)},activate:function(){return!(!this.bvTabs.activateTab||this.disabled)&&this.bvTabs.activateTab(this)},deactivate:function(){return!(!this.bvTabs.deactivateTab||!this.localActive)&&this.bvTabs.deactivateTab(this)}},render:function(t){var e=t(this.tag,{ref:"panel",staticClass:"tab-pane",class:this.tabClasses,directives:[{name:"show",rawName:"v-show",value:this.localActive,expression:"localActive"}],attrs:{role:"tabpanel",id:this.safeId(),tabindex:this.localActive&&!this.bvTabs.noKeyNav?"-1":null,"aria-hidden":this.localActive?"false":"true","aria-labelledby":this.controlledBy||null}},[this.localActive||!this.computedLazy?this.normalizeSlot("default"):t(!1)]);return t(ae,{props:{mode:"out-in",noFade:this.computedNoFade}},[e])}}),ju=st({components:{BTabs:$u,BTab:Eu}}),Iu=n("K4j9"),Nu={name:{type:String,required:!0},ariaLive:{type:String,default:function(){return bt("BToaster","ariaLive")}},ariaAtomic:{type:String,default:function(){return bt("BToaster","ariaAtomic")}},role:{type:String,default:function(){return bt("BToaster","role")}}},Au=r.extend({data:function(){return{name:"b-toaster"}},methods:{onAfterEnter:function(t){var e=this;Bt(function(){Rt(t,"".concat(e.name,"-enter-to"))})}},render:function(t){return t("transition-group",{props:{tag:"div",name:this.name},on:{afterEnter:this.onAfterEnter}},this.$slots.default)}}),Mu=r.extend({name:"BToaster",props:Nu,data:function(){return{doRender:!1,dead:!1,staticName:this.name}},beforeMount:function(){var t=this;this.staticName=this.name,Iu.Wormhole.hasTarget(this.staticName)?(u("b-toaster: A with name '".concat(this.name,"' already exists in the document.")),this.dead=!0):(this.doRender=!0,this.$once("hook:beforeDestroy",function(){t.$root.$emit("bv::toaster::destroyed",t.staticName)}))},destroyed:function(){this.$el&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el)},render:function(t){var e=t("div",{class:["d-none",{"b-dead-toaster":this.dead}]});if(this.doRender){var n=t(Iu.PortalTarget,{staticClass:"b-toaster-slot",props:{name:this.staticName,multiple:!0,tag:"div",slim:!1,transition:Au}});e=t("div",{staticClass:"b-toaster",class:[this.staticName],attrs:{id:this.staticName,role:this.role||null,"aria-live":this.ariaLive,"aria-atomic":this.ariaAtomic}},[n])}return e}});function Du(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:{};return new Hi(t,Du({cancelable:!1,target:this.$el||null,relatedTarget:null},e,{vueTarget:this,componentId:this.safeId()}))},emitEvent:function(t){var e=t.type;this.$root.$emit("bv::toast:".concat(e),t),this.$emit(e,t)},ensureToaster:function(){if(!this.static&&!Iu.Wormhole.hasTarget(this.computedToaster)){var t=document.createElement("div");document.body.appendChild(t),new Mu({parent:this.$root,propsData:{name:this.computedToaster}}).$mount(t)}},startDismissTimer:function(){this.clearDismissTimer(),this.noAutoHide||(this.timer=setTimeout(this.hide,this.resumeDismiss||this.computedDuration),this.dismissStarted=Date.now(),this.resumeDismiss=0)},clearDismissTimer:function(){clearTimeout(this.timer),this.timer=null},setHoverHandler:function(t){var e=t?$t:Pt;e(this.$refs.btoast,"mouseenter",this.onPause,Lu),e(this.$refs.btoast,"mouseleave",this.onUnPause,Lu)},onPause:function(t){if(!this.noAutoHide&&!this.noHoverPause&&this.timer&&!this.resumeDismiss){var e=Date.now()-this.dismissStarted;e>0&&(this.clearDismissTimer(),this.resumeDismiss=Math.max(this.computedDuration-e,1e3))}},onUnPause:function(t){this.noAutoHide||this.noHoverPause||!this.resumeDismiss?this.resumeDismiss=this.dismissStarted=0:this.startDismissTimer()},onLinkClick:function(){var t=this;this.$nextTick(function(){Bt(function(){t.hide()})})},onBeforeEnter:function(){this.isTransitioning=!0},onAfterEnter:function(){this.isTransitioning=!1;var t=this.buildEvent("shown");this.emitEvent(t),this.startDismissTimer(),this.setHoverHandler(!0)},onBeforeLeave:function(){this.isTransitioning=!0},onAfterLeave:function(){this.isTransitioning=!1,this.order=0,this.resumeDismiss=this.dismissStarted=0;var t=this.buildEvent("hidden");this.emitEvent(t),this.doRender=!1},makeToast:function(t){var e=this,n=[],i=this.normalizeSlot("toast-title",this.slotScope);i?n.push(i):this.title&&n.push(t("strong",{staticClass:"mr-2"},this.title)),this.noCloseButton||n.push(t(de,{staticClass:"ml-auto mb-1",on:{click:function(t){e.hide()}}}));var r=t(!1);n.length>0&&(r=t("header",{staticClass:"toast-header",class:this.headerClass},n));var o=this.href||this.to,a=t(o?Ie:"div",{staticClass:"toast-body",class:this.bodyClass,props:o?{to:this.to,href:this.href}:{},on:o?{click:this.onLinkClick}:{}},[this.normalizeSlot("default",this.slotScope)||t(!1)]);return t("div",{key:"toast-".concat(this._uid),ref:"toast",staticClass:"toast",class:this.toastClass,attrs:Du({},this.$attrs,{tabindex:"0",id:this.safeId()})},[r,a])}},render:function(t){if(!this.doRender||!this.isMounted)return t(!1);var e="b-toast-".concat(this._uid);return t(Iu.Portal,{props:{name:e,to:this.computedToaster,order:this.order,slim:!0,disabled:this.static}},[t("div",{key:e,ref:"btoast",staticClass:"b-toast",class:this.bToastClasses,attrs:{id:this.safeId("_toast_outer"),role:this.isHiding?null:this.isStatus?"status":"alert","aria-live":this.isHiding?null:this.isStatus?"polite":"assertive","aria-atomic":this.isHiding?null:"true"}},[t(ae,{props:{noFade:this.noFade},on:this.transitionHandlers},[this.localShow?this.makeToast(t):t(!1)])])])}});function Hu(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};t&&!s("$bvToast")&&function(t,n){if(!s("$bvToast")){var i=new e({parent:n,propsData:zu({},Yu(bt("BToast")||{}),A(t,B(Wu)),{static:!1,visible:!0})});B(Wu).forEach(function(e){var r=t[e];G(r)||("title"===e&&X(r)&&(r=[n.$createElement("strong",{class:"mr-2"},r)]),i.$slots[Wu[e]]=g(r))});var r=document.createElement("div");document.body.appendChild(r),i.$mount(r)}}(zu({},Yu(n),{toastContent:t}),this._vm)}},{key:"show",value:function(t){t&&this._root.$emit("bv::show::toast",t)}},{key:"hide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._root.$emit("bv::hide::toast",t)}}])&&Hu(n.prototype,i),r&&Hu(n,r),t}();t.mixin({beforeCreate:function(){this._bv__toast=new n(this)}}),t.prototype.hasOwnProperty("$bvToast")||_(t.prototype,"$bvToast",{get:function(){return this&&this._bv__toast||a("'".concat("$bvToast","' must be accessed from a Vue instance 'this' context")),this._bv__toast}})}}}),qu=st({components:{BToast:Ru,BToaster:Mu},plugins:{BVToastPlugin:Xu}}),Ku=r.extend({name:"BTooltip",mixins:[Tl,ue],props:{title:{type:String,default:""},triggers:{type:[String,Array],default:"hover focus"},placement:{type:String,default:"top"},fallbackPlacement:{type:[String,Array],default:"flip",validator:function(t){return m(t)||b(["flip","clockwise","counterclockwise"],t)}},delay:{type:[Number,Object,String],default:function(){return bt("BTooltip","delay")}},boundary:{type:[String,Li],default:function(){return bt("BTooltip","boundary")}},boundaryPadding:{type:Number,default:function(){return bt("BTooltip","boundaryPadding")}}},data:function(){return{}},methods:{createToolpop:function(){var t=this.getTarget();return t?this._toolpop=new al(t,this.getConfig(),this.$root):(this._toolpop=null,u("b-tooltip: 'target' element not found!")),this._toolpop}},render:function(t){return t("div",{class:["d-none"],style:{display:"none"},attrs:{"aria-hidden":!0}},[t("div",{ref:"title"},this.normalizeSlot("default"))])}});function Ju(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Zu="__BV_ToolTip__",Qu={focus:!0,hover:!0,click:!0,blur:!0},tc=function(t){var e="BTooltip",n={delay:bt(e,"delay"),boundary:String(bt(e,"boundary")),boundaryPadding:parseInt(bt(e,"boundaryPadding"),10)||0};X(t.value)?n.title=t.value:W(t.value)?n.title=t.value:I(t.value)&&(n=function(t){for(var e=1;e=n){var i=this.$targets[this.$targets.length-1];this.$activeTarget!==i&&this.activate(i)}else{if(this.$activeTarget&&t0)return this.$activeTarget=null,void this.clear();for(var r=this.$offsets.length;r--;){this.$activeTarget!==this.$targets[r]&&t>=this.$offsets[r]&&(G(this.$offsets[r+1])||t0&&this.$root&&this.$root.$emit("bv::scrollspy::activate",t,n)}},{key:"clear",value:function(){var t=this;At("".concat(this.$selector,", ").concat(hc.NAV_ITEMS),this.$el).filter(function(t){return Ht(t,fc)}).forEach(function(e){return t.setActiveState(e,!1)})}},{key:"setActiveState",value:function(t,e){t&&(e?Vt(t,fc):Rt(t,fc))}}])&&lc(e.prototype,n),i&&lc(e,i),t}(),wc="__BV_ScrollSpy__",Sc=function(t,e,n){if(o.j){var i=function(t){var e={};return t.arg&&(e.element="#".concat(t.arg)),B(t.modifiers).forEach(function(t){/^\d+$/.test(t)?e.offset=parseInt(t,10):/^(auto|position|offset)$/.test(t)&&(e.method=t)}),X(t.value)?e.element=t.value:q(t.value)?e.offset=Math.round(t.value):I(t.value)&&B(t.value).filter(function(t){return Boolean(yc.DefaultType[t])}).forEach(function(n){e[n]=t.value[n]}),e}(e);t[wc]?t[wc].updateConfig(i,n.context.$root):t[wc]=new yc(t,i,n.context.$root)}},xc={bind:function(t,e,n){Sc(t,e,n)},inserted:function(t,e,n){Sc(t,e,n)},update:function(t,e,n){e.value!==e.oldValue&&Sc(t,e,n)},componentUpdated:function(t,e,n){e.value!==e.oldValue&&Sc(t,e,n)},unbind:function(t){!function(t){t[wc]&&(t[wc].dispose(),t[wc]=null,delete t[wc])}(t)}},Tc=st({directives:{VBScrollspy:xc}}),kc=st({directives:{VBToggle:Di}}),Oc=st({directives:{VBTooltip:nc}}),Bc={install:at({plugins:{componentsPlugin:rc,directivesPlugin:st({plugins:{VBModalPlugin:oc,VBPopoverPlugin:ac,VBScrollspyPlugin:Tc,VBTogglePlugin:kc,VBTooltipPlugin:Oc}})}}),setConfig:et},Cc=n("4Wae"),_c=n.n(Cc),$c=n("kGIl"),Pc=n.n($c),Ec=n("YlT8"),jc=n.n(Ec),Ic=function(t,e,n){var i=n.includeSeconds,r=n.addSuffix;return void 0===r&&(r=!0),jc()(t,{locale:e,includeSeconds:i,addSuffix:r})},Nc=function(t,e){if(!t.prototype.$timeago){var n={locale:e.locale};t.prototype.$timeago=t.observable?t.observable(n):new t({data:n});var i=function(t){void 0===t&&(t={});var e=t.locales||{};return{name:t.name||"Timeago",props:{datetime:{required:!0},title:{type:[String,Boolean]},locale:{type:String},autoUpdate:{type:[Number,Boolean]},converter:{type:Function},converterOptions:{type:Object}},data:function(){return{timeago:this.getTimeago()}},computed:{localeName:function(){return this.locale||this.$timeago.locale}},mounted:function(){this.startUpdater()},beforeDestroy:function(){this.stopUpdater()},render:function(t){return t("time",{attrs:{datetime:new Date(this.datetime),title:"string"==typeof this.title?this.title:!1===this.title?null:this.timeago}},[this.timeago])},methods:{getTimeago:function(n){return(this.converter||t.converter||Ic)(n||this.datetime,e[this.locale||this.$timeago.locale],this.converterOptions||{})},convert:function(t){this.timeago=this.getTimeago(t)},startUpdater:function(){var t=this;if(this.autoUpdate){var e=!0===this.autoUpdate?60:this.autoUpdate;this.updater=setInterval(function(){t.convert()},1e3*e)}},stopUpdater:function(){this.updater&&(clearInterval(this.updater),this.updater=null)}},watch:{autoUpdate:function(t){this.stopUpdater(),t&&this.startUpdater()},datetime:function(){this.convert()},localeName:function(){this.convert()},converter:function(){this.convert()},converterOptions:{handler:function(){this.convert()},deep:!0}}}}(e);t.component(i.name,i)}};n("GUC0");function Ac(t){return(Ac="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)}window.Vue=n("XuX8"),Vue.use(Bc),Vue.use(_c.a),Vue.use(Pc.a),Vue.use(Nc,{name:"Timeago",locale:"en"}),pixelfed.readmore=function(){$(".read-more").each(function(t,e){var n=$(this),i=n.attr("data-readmore");"undefined"!==Ac(i)&&!1!==i||n.readmore({collapsedHeight:45,heightMargin:48,moreLink:'Read more ...',lessLink:'Hide'})})};try{document.createEvent("TouchEvent"),$("body").addClass("touch")}catch(t){}window.filesize=n("SdWe"),window.pixelfed.n={},$(document).ready(function(){$(function(){$('[data-toggle="tooltip"]').tooltip()})});console.log("%cStop!","color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;"),console.log('%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or "hack" someone\'s account, it is a scam and will give them access to your Pixelfed account.',"font-size: 18px;")},"A2j+":function(t,e,n){n("y/xV"),t.exports=n("IMlG").Object.is},BMGi:function(t,e,n){var i=n("GUnJ"),r=n("Boo/"),o=n("UaRJ"),a=n("0dze")("IE_PROTO"),s=function(){},l=function(){var t,e=n("XQy5")("iframe"),i=o.length;for(e.style.display="none",n("CBVc").appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write(" + +@endpush + +@push('styles') + +@endpush +@endif \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index 7a861e46c..ee4da9733 100644 --- a/routes/web.php +++ b/routes/web.php @@ -23,6 +23,8 @@ Route::domain(config('pixelfed.domain.admin'))->prefix('i/admin')->group(functio Route::get('settings', 'AdminController@settings')->name('admin.settings'); Route::post('settings', 'AdminController@settingsHomeStore'); Route::get('settings/config', 'AdminController@settingsConfig')->name('admin.settings.config'); + Route::post('settings/config', 'AdminController@settingsConfigStore'); + Route::post('settings/config/restore', 'AdminController@settingsConfigRestore'); Route::get('settings/features', 'AdminController@settingsFeatures')->name('admin.settings.features'); Route::get('settings/pages', 'AdminController@settingsPages')->name('admin.settings.pages'); Route::get('settings/pages/edit', 'PageController@edit')->name('admin.settings.pages.edit'); diff --git a/webpack.mix.js b/webpack.mix.js index 19b787c4c..5aaf91dd8 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -25,6 +25,9 @@ mix.js('resources/assets/js/app.js', 'public/js') .js('resources/assets/js/developers.js', 'public/js') .js('resources/assets/js/loops.js', 'public/js') .js('resources/assets/js/quill.js', 'public/js') +.js('resources/assets/js/lib/ace/ace.js', 'public/js') +.js('resources/assets/js/lib/ace/mode-dot.js', 'public/js') +.js('resources/assets/js/lib/ace/theme-monokai.js', 'public/js') // .js('resources/assets/js/embed.js', 'public') // .js('resources/assets/js/direct.js', 'public/js') .extract([