tocco-admin 1.0.14 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/changelog.md +24 -0
  2. package/dist/0b923a43967ff893ec63b92dc4f19017.js +1 -0
  3. package/dist/25894751679e07fd95b21d0d3f6c8c8b.js +1 -0
  4. package/dist/54560f13b36626237959e93b7771a484.js +1 -0
  5. package/dist/58c35e5c73bbc1664bbd67c570342aa0.js +1 -0
  6. package/dist/637e363c105dce85c12fb99d7ef2fa7d.js +1 -0
  7. package/dist/8423f61a6b43ebee39273fd08e332d47.js +1 -0
  8. package/dist/8f5997c65fc8937aa89d15d9a7237f63.js +1 -0
  9. package/dist/a2d3450d9a39c72312a0afa486269a02.js +1 -0
  10. package/dist/a4d638b976f02f35740be031f996e088.js +1 -0
  11. package/dist/aa0619cbb003e1dd873d027494aa84c4.js +1 -0
  12. package/dist/cf26dd07f19bcb5b7efbf057a6cfeb8f.js +1 -0
  13. package/dist/cf9c7cbfc2b609b9ae59daeab82719c4.js +1 -0
  14. package/dist/chunk-163.c0d9544ec345494b1a2e.js +7 -0
  15. package/dist/chunk-163.c0d9544ec345494b1a2e.js.map +1 -0
  16. package/dist/chunk-314.06fbc31e051912aa797d.js +2 -0
  17. package/dist/chunk-314.06fbc31e051912aa797d.js.map +1 -0
  18. package/dist/chunk-368.fdad57fbc3465d09373f.js +2 -0
  19. package/dist/chunk-368.fdad57fbc3465d09373f.js.map +1 -0
  20. package/dist/chunk-378.d89c9e1aceb1eda54046.js +2 -0
  21. package/dist/chunk-378.d89c9e1aceb1eda54046.js.map +1 -0
  22. package/dist/chunk-395.e670367a30bd131e5c51.js +2 -0
  23. package/dist/chunk-395.e670367a30bd131e5c51.js.map +1 -0
  24. package/dist/chunk-413.a87d7653543f87fb986b.js +46 -0
  25. package/dist/chunk-413.a87d7653543f87fb986b.js.map +1 -0
  26. package/dist/chunk-51.6b8c9d2c2b4f89de46ce.js +10 -0
  27. package/dist/chunk-51.6b8c9d2c2b4f89de46ce.js.map +1 -0
  28. package/dist/chunk-696.c28466168bbf1bd96ac6.js +14 -0
  29. package/dist/chunk-696.c28466168bbf1bd96ac6.js.map +1 -0
  30. package/dist/chunk-82.31084b7daa6e3ae23a98.js +14 -0
  31. package/dist/chunk-82.31084b7daa6e3ae23a98.js.map +1 -0
  32. package/dist/chunk-actions.3b4aac3f72ded7dcb505.js +2 -0
  33. package/dist/chunk-actions.3b4aac3f72ded7dcb505.js.map +1 -0
  34. package/dist/chunk-code-editor.73b0f627952f5dd27561.js +2 -0
  35. package/dist/chunk-code-editor.73b0f627952f5dd27561.js.map +1 -0
  36. package/dist/chunk-docs-actions.f33942c4f1459f1d1376.js +2 -0
  37. package/dist/chunk-docs-actions.f33942c4f1459f1d1376.js.map +1 -0
  38. package/dist/chunk-vendor-fontawesome.f71ea56f6b7b560a21a4.js +7 -0
  39. package/dist/chunk-vendor-icons.dafd17ccd5a526750a0a.js +1 -0
  40. package/dist/chunk-vendor-libphonenumber-js.58c7063367df4c40d4fd.js +1 -0
  41. package/dist/e56fe7e8042772742953d0daa47cd621.js +1 -0
  42. package/dist/f9891d13237b59ce53f07874ab7a711b.js +1 -0
  43. package/dist/fc00657a30e4c8d53e47374ba0b1e8bf.js +1 -0
  44. package/dist/index.js +10 -10
  45. package/dist/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/18e63e724098792b95b076412a860636.js +0 -1
  48. package/dist/6fe3f0823e345813c2084b243cb6650b.js +0 -1
  49. package/dist/77dd68f6396b8ab4ce2c238d6ddb5354.js +0 -1
  50. package/dist/chunk-140.e4b48d2a60e4ffb79b25.js +0 -7
  51. package/dist/chunk-140.e4b48d2a60e4ffb79b25.js.map +0 -1
  52. package/dist/chunk-172.34f7d09fbb39a8bfaad0.js +0 -2
  53. package/dist/chunk-172.34f7d09fbb39a8bfaad0.js.map +0 -1
  54. package/dist/chunk-368.5dbec2003b9218243ca8.js +0 -2
  55. package/dist/chunk-368.5dbec2003b9218243ca8.js.map +0 -1
  56. package/dist/chunk-378.06f86218d0e45f44b03c.js +0 -2
  57. package/dist/chunk-378.06f86218d0e45f44b03c.js.map +0 -1
  58. package/dist/chunk-389.6ecc00ac9d83836cb8c6.js +0 -40
  59. package/dist/chunk-389.6ecc00ac9d83836cb8c6.js.map +0 -1
  60. package/dist/chunk-404.f8ad6cf6a723845e5b91.js +0 -2
  61. package/dist/chunk-404.f8ad6cf6a723845e5b91.js.map +0 -1
  62. package/dist/chunk-51.77155794b021526c7990.js +0 -10
  63. package/dist/chunk-51.77155794b021526c7990.js.map +0 -1
  64. package/dist/chunk-669.ad98eead076fee71513a.js +0 -18
  65. package/dist/chunk-669.ad98eead076fee71513a.js.map +0 -1
  66. package/dist/chunk-696.c012472cdaa912891efd.js +0 -2
  67. package/dist/chunk-696.c012472cdaa912891efd.js.map +0 -1
  68. package/dist/chunk-82.0465ca7e3a44c02472ed.js +0 -2
  69. package/dist/chunk-82.0465ca7e3a44c02472ed.js.map +0 -1
  70. package/dist/chunk-actions.f00bc3c79c7659be2bba.js +0 -2
  71. package/dist/chunk-actions.f00bc3c79c7659be2bba.js.map +0 -1
  72. package/dist/chunk-code-editor.0707d1cc0d9121bacb47.js +0 -7
  73. package/dist/chunk-code-editor.0707d1cc0d9121bacb47.js.map +0 -1
  74. package/dist/chunk-docs-actions.7bfb324834008bb82144.js +0 -2
  75. package/dist/chunk-docs-actions.7bfb324834008bb82144.js.map +0 -1
  76. package/dist/chunk-vendor-icons.2670990a07a225d51243.js +0 -1
  77. package/dist/chunk-vendor-libphonenumber-js.6c24244e4bcd727f64d5.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tocco-admin",
3
- "version": "1.0.14",
3
+ "version": "1.0.18",
4
4
  "description": "Alpha version of new tocco admin.",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1 +0,0 @@
1
- ace.define("ace/mode/vhdl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,n=function(){var e=this.createKeywordMapper({"keyword.operator":"abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|srasrl|xnor|xor",keyword:"access|after|ailas|all|architecture|assert|attribute|begin|block|buffer|bus|case|component|configuration|disconnect|downto|else|elsif|end|entity|file|for|function|generate|generic|guarded|if|impure|in|inertial|inout|is|label|linkage|literal|loop|mapnew|next|of|on|open|others|out|port|process|pure|range|record|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|united|until|wait|when|while|with","constant.language":"true|false|null","storage.modifier":"array|constant","storage.type":"bit|bit_vector|boolean|character|integer|line|natural|positive|real|register|signed|std_logic|std_logic_vector|string||text|time|unsigned|variable"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"keyword",regex:"\\s*(?:library|package|use)\\b"},{token:e,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"},{token:"punctuation.operator",regex:"\\'|\\:|\\,|\\;|\\."},{token:"paren.lparen",regex:"[[(]"},{token:"paren.rparen",regex:"[\\])]"},{token:"text",regex:"\\s+"}]}};o.inherits(n,i),t.VHDLHighlightRules=n})),ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"],(function(e,t,r){"use strict";var o=e("../lib/oop"),i=e("./text").Mode,n=e("./vhdl_highlight_rules").VHDLHighlightRules,a=function(){this.HighlightRules=n,this.$behaviour=this.$defaultBehaviour};o.inherits(a,i),function(){this.lineCommentStart="--",this.$id="ace/mode/vhdl"}.call(a.prototype),t.Mode=a})),ace.require(["ace/mode/vhdl"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1 +0,0 @@
1
- ace.define("ace/ext/hardwrap",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var r=e("../range").Range;t.hardWrap=function(e,t){for(var n=t.column||e.getOption("printMarginColumn"),o=Math.min(t.startRow,t.endRow),i=Math.max(t.startRow,t.endRow),a=e.session;o<=i;){var s=a.getLine(o);if(s.length>n)(l=f(s,n,5))&&a.replace(new r(o,l.start,o,l.end),"\n"),i++;else if(/\S/.test(s)&&o!=i){var c=a.getLine(o+1);if(c&&/\S/.test(c)){var l,u=s.replace(/\s+$/,""),h=c.replace(/^\s+/,""),d=u+" "+h;if((l=f(d,n,5))&&l.start>u.length||d.length<n){var p=new r(o,u.length,o+1,c.length-h.length);a.replace(p," "),o--,i--}}}o++}function f(e,t,n){if(!(e.length<t)){var r=e.slice(0,t),o=e.slice(t),i=/^(?:(\s+)|(\S+)(\s+))/.exec(o),a=/(?:(\s+)|(\s+)(\S+))$/.exec(r),s=0,c=0;return a&&!a[2]&&(s=t-a[1].length,c=t),i&&!i[2]&&(s||(s=t),c=t+i[1].length),s?{start:s,end:c}:a&&a[2]&&a.index>n?{start:a.index,end:a.index+a[3].length}:void 0}}}})),ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/ext/hardwrap","ace/multi_select"],(function(e,t,n){"use strict";var r=e("../range").Range,o=e("../lib/event_emitter").EventEmitter,i=e("../lib/dom"),a=e("../lib/oop"),s=e("../lib/keys"),c=e("../lib/event"),l=e("../search").Search,u=e("../lib/useragent"),h=e("../search_highlight").SearchHighlight,d=e("../commands/multi_select_commands"),p=e("../mode/text").Mode.prototype.tokenRe,f=e("../ext/hardwrap").hardWrap;e("../multi_select");var m=function(e){this.ace=e,this.state={},this.marks={},this.$uid=0,this.onChange=this.onChange.bind(this),this.onSelectionChange=this.onSelectionChange.bind(this),this.onBeforeEndOperation=this.onBeforeEndOperation.bind(this),this.ace.on("change",this.onChange),this.ace.on("changeSelection",this.onSelectionChange),this.ace.on("beforeEndOperation",this.onBeforeEndOperation)};function g(e){return{row:e.line,column:e.ch}}function v(e){return new w(e.row,e.column)}m.Pos=function(e,t){if(!(this instanceof w))return new w(e,t);this.line=e,this.ch=t},m.defineOption=function(e,t,n){},m.commands={redo:function(e){e.ace.redo()},undo:function(e){e.ace.undo()},newlineAndIndent:function(e){e.ace.insert("\n")}},m.keyMap={},m.addClass=m.rmClass=function(){},m.e_stop=m.e_preventDefault=c.stopEvent,m.keyName=function(e){var t=s[e.keyCode]||e.key||"";return 1==t.length&&(t=t.toUpperCase()),t=c.getModifierString(e).replace(/(^|-)\w/g,(function(e){return e.toUpperCase()}))+t},m.keyMap.default=function(e){return function(t){var n=t.ace.commands.commandKeyBinding[e.toLowerCase()];return n&&!1!==t.ace.execCommand(n)}},m.lookupKey=function e(t,n,r){n||(n="default"),"string"==typeof n&&(n=m.keyMap[n]);var o="function"==typeof n?n(t):n[t];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&r(o))return"handled";if(n.fallthrough){if(!Array.isArray(n.fallthrough))return e(t,n.fallthrough,r);for(var i=0;i<n.fallthrough.length;i++){var a=e(t,n.fallthrough[i],r);if(a)return a}}},m.findMatchingTag=function(e,t){},m.signal=function(e,t,n){return e._signal(t,n)},m.on=c.addListener,m.off=c.removeListener,m.isWordChar=function(e){return e<""?/^\w$/.test(e):(p.lastIndex=0,p.test(e))},function(){a.implement(m.prototype,o),this.destroy=function(){this.ace.off("change",this.onChange),this.ace.off("changeSelection",this.onSelectionChange),this.ace.off("beforeEndOperation",this.onBeforeEndOperation),this.removeOverlay()},this.virtualSelectionMode=function(){return this.ace.inVirtualSelectionMode&&this.ace.selection.index},this.onChange=function(e){var t={text:"i"==e.action[0]?e.lines:[]},n=this.curOp=this.curOp||{};n.changeHandlers||(n.changeHandlers=this._eventRegistry.change&&this._eventRegistry.change.slice()),n.lastChange?n.lastChange.next=n.lastChange=t:n.lastChange=n.change=t,this.$updateMarkers(e)},this.onSelectionChange=function(){var e=this.curOp=this.curOp||{};e.cursorActivityHandlers||(e.cursorActivityHandlers=this._eventRegistry.cursorActivity&&this._eventRegistry.cursorActivity.slice()),this.curOp.cursorActivity=!0,this.ace.inMultiSelectMode&&this.ace.keyBinding.removeKeyboardHandler(d.keyboardHandler)},this.operation=function(e,t){if(!t&&this.curOp||t&&this.curOp&&this.curOp.force)return e();if(!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),!this.ace.curOp){var n=this.ace.prevOp;this.ace.startOperation({command:{name:"vim",scrollIntoView:"cursor"}})}var r=this.curOp=this.curOp||{};this.curOp.force=t;var o=e();return this.ace.curOp&&"vim"==this.ace.curOp.command.name&&(this.state.dialog&&(this.ace.curOp.command.scrollIntoView=!1),this.ace.endOperation(),r.cursorActivity||r.lastChange||!n||(this.ace.prevOp=n)),!t&&this.ace.curOp||this.curOp&&this.onBeforeEndOperation(),o},this.onBeforeEndOperation=function(){var e=this.curOp;e&&(e.change&&this.signal("change",e.change,e),e&&e.cursorActivity&&this.signal("cursorActivity",null,e),this.curOp=null)},this.signal=function(e,t,n){var r=n?n[e+"Handlers"]:(this._eventRegistry||{})[e];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](this,t)}},this.firstLine=function(){return 0},this.lastLine=function(){return this.ace.session.getLength()-1},this.lineCount=function(){return this.ace.session.getLength()},this.setCursor=function(e,t){"object"==typeof e&&(t=e.ch,e=e.line);var n=!this.curOp&&!this.ace.inVirtualSelectionMode;this.ace.inVirtualSelectionMode||this.ace.exitMultiSelectMode(),this.ace.session.unfold({row:e,column:t}),this.ace.selection.moveTo(e,t),n&&(this.ace.renderer.scrollCursorIntoView(),this.ace.endOperation())},this.getCursor=function(e){var t=this.ace.selection;return v("anchor"==e?t.isEmpty()?t.lead:t.anchor:"head"!=e&&e?t.getRange()[e]:t.lead)},this.listSelections=function(e){var t=this.ace.multiSelect.rangeList.ranges;return!t.length||this.ace.inVirtualSelectionMode?[{anchor:this.getCursor("anchor"),head:this.getCursor("head")}]:t.map((function(e){return{anchor:this.clipPos(v(e.cursor==e.end?e.start:e.end)),head:this.clipPos(v(e.cursor))}}),this)},this.setSelections=function(e,t){var n=this.ace.multiSelect,o=e.map((function(e){var t=g(e.anchor),n=g(e.head),o=r.comparePoints(t,n)<0?new r.fromPoints(t,n):new r.fromPoints(n,t);return o.cursor=r.comparePoints(o.start,n)?o.end:o.start,o}));if(this.ace.inVirtualSelectionMode)this.ace.selection.fromOrientedRange(o[0]);else{t?o[t]&&o.push(o.splice(t,1)[0]):o=o.reverse(),n.toSingleRange(o[0].clone());for(var i=this.ace.session,a=0;a<o.length;a++){var s=i.$clipRangeToDocument(o[a]);n.addRange(s)}}},this.setSelection=function(e,t,n){var r=this.ace.selection;r.moveTo(e.line,e.ch),r.selectTo(t.line,t.ch),n&&"*mouse"==n.origin&&this.onBeforeEndOperation()},this.somethingSelected=function(e){return!this.ace.selection.isEmpty()},this.clipPos=function(e){return v(this.ace.session.$clipPositionToDocument(e.line,e.ch))},this.foldCode=function(e){this.ace.session.$toggleFoldWidget(e.line,{})},this.markText=function(e){return{clear:function(){},find:function(){}}},this.$updateMarkers=function(e){var t="insert"==e.action,n=e.start,o=e.end,i=(o.row-n.row)*(t?1:-1),a=(o.column-n.column)*(t?1:-1);for(var s in t&&(o=n),this.marks){var c=this.marks[s],l=r.comparePoints(c,n);if(!(l<0)){if(0===l&&t){if(1!=c.bias){c.bias=-1;continue}l=1}var u=t?l:r.comparePoints(c,o);u>0?(c.row+=i,c.column+=c.row==o.row?a:0):!t&&u<=0&&(c.row=n.row,c.column=n.column,0===u&&(c.bias=1))}}};var e=function(e,t,n,r){this.cm=e,this.id=t,this.row=n,this.column=r,e.marks[this.id]=this};e.prototype.clear=function(){delete this.cm.marks[this.id]},e.prototype.find=function(){return v(this)},this.setBookmark=function(t,n){var r=new e(this,this.$uid++,t.line,t.ch);return n&&n.insertLeft||(r.$insertRight=!0),this.marks[r.id]=r,r},this.moveH=function(e,t){if("char"==t){var n=this.ace.selection;n.clearSelection(),n.moveCursorBy(0,e)}},this.findPosV=function(e,t,n,r){if("page"==n){var o=this.ace.renderer.layerConfig;t*=Math.floor(o.height/o.lineHeight),n="line"}if("line"==n){var i=this.ace.session.documentToScreenPosition(e.line,e.ch);return null!=r&&(i.column=r),i.row+=t,i.row=Math.min(Math.max(0,i.row),this.ace.session.getScreenLength()-1),v(this.ace.session.screenToDocumentPosition(i.row,i.column))}},this.charCoords=function(e,t){if("div"==t||!t)return{left:(r=this.ace.session.documentToScreenPosition(e.line,e.ch)).column,top:r.row};if("local"==t){var n=this.ace.renderer,r=this.ace.session.documentToScreenPosition(e.line,e.ch),o=n.layerConfig.lineHeight,i=n.layerConfig.characterWidth,a=o*r.row;return{left:r.column*i,top:a,bottom:a+o}}},this.coordsChar=function(e,t){var n=this.ace.renderer;if("local"==t){var r=Math.max(0,Math.floor(e.top/n.lineHeight)),o=Math.max(0,Math.floor(e.left/n.characterWidth));return v(n.session.screenToDocumentPosition(r,o))}if("div"==t)throw"not implemented"},this.getSearchCursor=function(e,t,n){var r=!1,o=!1;e instanceof RegExp&&!e.global&&(r=!e.ignoreCase,e=e.source,o=!0),"\\n"==e&&(e="\n",o=!1);var i=new l;null==t.ch&&(t.ch=Number.MAX_VALUE);var a={row:t.line,column:t.ch},s=this,c=null;return{findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){i.setOptions({needle:e,caseSensitive:r,wrap:!1,backwards:t,regExp:o,start:c||a});var n=i.find(s.ace.session);return(c=n)&&[!c.isEmpty()]},from:function(){return c&&v(c.start)},to:function(){return c&&v(c.end)},replace:function(e){c&&(c.end=s.ace.session.doc.replace(c,e))}}},this.scrollTo=function(e,t){var n=this.ace.renderer,r=n.layerConfig,o=r.maxHeight;o-=(n.$size.scrollerHeight-n.lineHeight)*n.$scrollPastEnd,null!=t&&this.ace.session.setScrollTop(Math.max(0,Math.min(t,o))),null!=e&&this.ace.session.setScrollLeft(Math.max(0,Math.min(e,r.width)))},this.scrollInfo=function(){return 0},this.scrollIntoView=function(e,t){if(e){var n=this.ace.renderer,r={top:0,bottom:t};n.scrollCursorIntoView(g(e),2*n.lineHeight/n.$size.scrollerHeight,r)}},this.getLine=function(e){return this.ace.session.getLine(e)},this.getRange=function(e,t){return this.ace.session.getTextRange(new r(e.line,e.ch,t.line,t.ch))},this.replaceRange=function(e,t,n){n||(n=t);var o=new r(t.line,t.ch,n.line,n.ch);return this.ace.session.$clipRangeToDocument(o),this.ace.session.replace(o,e)},this.replaceSelection=this.replaceSelections=function(e){var t=this.ace.selection;if(this.ace.inVirtualSelectionMode)this.ace.session.replace(t.getRange(),e[0]||"");else{t.inVirtualSelectionMode=!0;var n=t.rangeList.ranges;n.length||(n=[this.ace.multiSelect.getRange()]);for(var r=n.length;r--;)this.ace.session.replace(n[r],e[r]||"");t.inVirtualSelectionMode=!1}},this.getSelection=function(){return this.ace.getSelectedText()},this.getSelections=function(){return this.listSelections().map((function(e){return this.getRange(e.anchor,e.head)}),this)},this.getInputField=function(){return this.ace.textInput.getElement()},this.getWrapperElement=function(){return this.ace.container};var t={indentWithTabs:"useSoftTabs",indentUnit:"tabSize",tabSize:"tabSize",firstLineNumber:"firstLineNumber",readOnly:"readOnly"};this.setOption=function(e,n){switch(this.state[e]=n,e){case"indentWithTabs":e=t[e],n=!n;break;case"keyMap":return void(this.state.$keyMap=n);default:e=t[e]}e&&this.ace.setOption(e,n)},this.getOption=function(e,n){var r=t[e];switch(r&&(n=this.ace.getOption(r)),e){case"indentWithTabs":return e=t[e],!n;case"keyMap":return this.state.$keyMap}return r?n:this.state[e]},this.toggleOverwrite=function(e){return this.state.overwrite=e,this.ace.setOverwrite(e)},this.addOverlay=function(e){if(!this.$searchHighlight||!this.$searchHighlight.session){var t=new h(null,"ace_highlight-marker","text"),n=this.ace.session.addDynamicMarker(t);t.id=n.id,t.session=this.ace.session,t.destroy=function(e){t.session.off("change",t.updateOnChange),t.session.off("changeEditor",t.destroy),t.session.removeMarker(t.id),t.session=null},t.updateOnChange=function(e){var n=e.start.row;n==e.end.row?t.cache[n]=void 0:t.cache.splice(n,t.cache.length)},t.session.on("changeEditor",t.destroy),t.session.on("change",t.updateOnChange)}var r=new RegExp(e.query.source,"gmi");this.$searchHighlight=e.highlight=t,this.$searchHighlight.setRegexp(r),this.ace.renderer.updateBackMarkers()},this.removeOverlay=function(e){this.$searchHighlight&&this.$searchHighlight.session&&this.$searchHighlight.destroy()},this.getScrollInfo=function(){var e=this.ace.renderer,t=e.layerConfig;return{left:e.scrollLeft,top:e.scrollTop,height:t.maxHeight,width:t.width,clientHeight:t.height,clientWidth:t.width}},this.getValue=function(){return this.ace.getValue()},this.setValue=function(e){return this.ace.setValue(e,-1)},this.getTokenTypeAt=function(e){var t=this.ace.session.getTokenAt(e.line,e.ch);return t&&/comment|string/.test(t.type)?"string":""},this.findMatchingBracket=function(e){var t=this.ace.session.findMatchingBracket(g(e));return{to:t&&v(t)}},this.indentLine=function(e,t){!0===t?this.ace.session.indentRows(e,e,"\t"):!1===t&&this.ace.session.outdentRows(new r(e,0,e,0))},this.indexFromPos=function(e){return this.ace.session.doc.positionToIndex(g(e))},this.posFromIndex=function(e){return v(this.ace.session.doc.indexToPosition(e))},this.focus=function(e){return this.ace.textInput.focus()},this.blur=function(e){return this.ace.blur()},this.defaultTextHeight=function(e){return this.ace.renderer.layerConfig.lineHeight},this.scanForBracket=function(e,t,n,r){var o=r.bracketRegex.source,i=/paren|text|operator|tag/;if(1==t)var a=this.ace.session.$findClosingBracket(o.slice(1,2),g(e),i);else a=this.ace.session.$findOpeningBracket(o.slice(-2,-1),{row:e.line,column:e.ch+1},i);return a&&{pos:v(a)}},this.refresh=function(){return this.ace.resize(!0)},this.getMode=function(){return{name:this.getOption("mode")}},this.execCommand=function(e){"indentAuto"==e?this.ace.execCommand("autoindent"):console.log(e+" is not implemented")},this.getLineNumber=function(e){return e.row},this.getLineHandle=function(e){return{text:this.ace.session.getLine(e),row:e}}}.call(m.prototype),(m.StringStream=function(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0}).prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var n=t==e;else n=t&&(e.test?e.test(t):e(t));if(n)return++this.pos,t},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},backUp:function(e){this.pos-=e},column:function(){throw"not implemented"},indentation:function(){throw"not implemented"},match:function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}}},m.defineExtension=function(e,t){m.prototype[e]=t},i.importCssString(".normal-mode .ace_cursor{ border: none; background-color: rgba(255,0,0,0.5);}.normal-mode .ace_hidden-cursors .ace_cursor{ background-color: transparent; border: 1px solid red; opacity: 0.7}.ace_dialog { position: absolute; left: 0; right: 0; background: inherit; z-index: 15; padding: .1em .8em; overflow: hidden; color: inherit;}.ace_dialog-top { border-bottom: 1px solid #444; top: 0;}.ace_dialog-bottom { border-top: 1px solid #444; bottom: 0;}.ace_dialog input { border: none; outline: none; background: transparent; width: 20em; color: inherit; font-family: monospace;}","vimMode",!1),function(){function e(e,t,n){var r;return(r=e.ace.container.appendChild(document.createElement("div"))).className=n?"ace_dialog ace_dialog-bottom":"ace_dialog ace_dialog-top","string"==typeof t?r.innerHTML=t:r.appendChild(t),r}function t(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}m.defineExtension("openDialog",(function(n,r,o){if(!this.virtualSelectionMode()){o||(o={}),t(this,null);var i=e(this,n,o.bottom),a=!1,s=this;this.state.dialog=i;var c,l=i.getElementsByTagName("input")[0];return l?(o.value&&(l.value=o.value,!1!==o.selectValueOnOpen&&l.select()),o.onInput&&m.on(l,"input",(function(e){o.onInput(e,l.value,u)})),o.onKeyUp&&m.on(l,"keyup",(function(e){o.onKeyUp(e,l.value,u)})),m.on(l,"keydown",(function(e){o&&o.onKeyDown&&o.onKeyDown(e,l.value,u)||(13==e.keyCode&&r(l.value),(27==e.keyCode||!1!==o.closeOnEnter&&13==e.keyCode)&&(l.blur(),m.e_stop(e),u()))})),!1!==o.closeOnBlur&&m.on(l,"blur",u),l.focus()):(c=i.getElementsByTagName("button")[0])&&(m.on(c,"click",(function(){u(),s.focus()})),!1!==o.closeOnBlur&&m.on(c,"blur",u),c.focus()),u}function u(e){if("string"==typeof e)l.value=e;else{if(a)return;if(e&&"blur"==e.type&&document.activeElement===l)return;s.state.dialog=null,a=!0,i.parentNode.removeChild(i),s.focus(),o.onClose&&o.onClose(i);var t=s;t.state.vim&&(t.state.vim.status=null,t.ace._signal("changeStatus"),t.ace.renderer.$loop.schedule(t.ace.renderer.CHANGE_CURSOR))}}})),m.defineExtension("openNotification",(function(n,r){if(!this.virtualSelectionMode()){t(this,c);var o,i=e(this,n,r&&r.bottom),a=!1,s=r&&void 0!==r.duration?r.duration:5e3;return m.on(i,"click",(function(e){m.e_preventDefault(e),c()})),s&&(o=setTimeout(c,s)),c}function c(){a||(a=!0,clearTimeout(o),i.parentNode.removeChild(i))}}))}();var y=[{keys:"<Left>",type:"keyToKey",toKeys:"h"},{keys:"<Right>",type:"keyToKey",toKeys:"l"},{keys:"<Up>",type:"keyToKey",toKeys:"k"},{keys:"<Down>",type:"keyToKey",toKeys:"j"},{keys:"<Space>",type:"keyToKey",toKeys:"l"},{keys:"<BS>",type:"keyToKey",toKeys:"h",context:"normal"},{keys:"<Del>",type:"keyToKey",toKeys:"x",context:"normal"},{keys:"<C-Space>",type:"keyToKey",toKeys:"W"},{keys:"<C-BS>",type:"keyToKey",toKeys:"B",context:"normal"},{keys:"<S-Space>",type:"keyToKey",toKeys:"w"},{keys:"<S-BS>",type:"keyToKey",toKeys:"b",context:"normal"},{keys:"<C-n>",type:"keyToKey",toKeys:"j"},{keys:"<C-p>",type:"keyToKey",toKeys:"k"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-[>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-c>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>"},{keys:"<C-Esc>",type:"keyToKey",toKeys:"<Esc>",context:"insert"},{keys:"s",type:"keyToKey",toKeys:"cl",context:"normal"},{keys:"s",type:"keyToKey",toKeys:"c",context:"visual"},{keys:"S",type:"keyToKey",toKeys:"cc",context:"normal"},{keys:"S",type:"keyToKey",toKeys:"VdO",context:"visual"},{keys:"<Home>",type:"keyToKey",toKeys:"0"},{keys:"<End>",type:"keyToKey",toKeys:"$"},{keys:"<PageUp>",type:"keyToKey",toKeys:"<C-b>"},{keys:"<PageDown>",type:"keyToKey",toKeys:"<C-f>"},{keys:"<CR>",type:"keyToKey",toKeys:"j^",context:"normal"},{keys:"<Ins>",type:"action",action:"toggleOverwrite",context:"insert"},{keys:"H",type:"motion",motion:"moveToTopLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"M",type:"motion",motion:"moveToMiddleLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"L",type:"motion",motion:"moveToBottomLine",motionArgs:{linewise:!0,toJumplist:!0}},{keys:"h",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:"l",type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:"j",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:"k",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:"gj",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!0}},{keys:"gk",type:"motion",motion:"moveByDisplayLines",motionArgs:{forward:!1}},{keys:"w",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:"W",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:"e",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:"E",type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"b",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:"B",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:"ge",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:"gE",type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:"{",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!1,toJumplist:!0}},{keys:"}",type:"motion",motion:"moveByParagraph",motionArgs:{forward:!0,toJumplist:!0}},{keys:"(",type:"motion",motion:"moveBySentence",motionArgs:{forward:!1}},{keys:")",type:"motion",motion:"moveBySentence",motionArgs:{forward:!0}},{keys:"<C-f>",type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:"<C-b>",type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:"<C-d>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!0,explicitRepeat:!0}},{keys:"<C-u>",type:"motion",motion:"moveByScroll",motionArgs:{forward:!1,explicitRepeat:!0}},{keys:"gg",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"G",type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0,toJumplist:!0}},{keys:"0",type:"motion",motion:"moveToStartOfLine"},{keys:"^",type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"+",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0}},{keys:"-",type:"motion",motion:"moveByLines",motionArgs:{forward:!1,toFirstChar:!0}},{keys:"_",type:"motion",motion:"moveByLines",motionArgs:{forward:!0,toFirstChar:!0,repeatOffset:-1}},{keys:"$",type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:"%",type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0,toJumplist:!0}},{keys:"f<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"F<character>",type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:"t<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:"T<character>",type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:";",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!0}},{keys:",",type:"motion",motion:"repeatLastCharacterSearch",motionArgs:{forward:!1}},{keys:"'<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0,linewise:!0}},{keys:"`<character>",type:"motion",motion:"goToMark",motionArgs:{toJumplist:!0}},{keys:"]`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0}},{keys:"[`",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1}},{keys:"]'",type:"motion",motion:"jumpToMark",motionArgs:{forward:!0,linewise:!0}},{keys:"['",type:"motion",motion:"jumpToMark",motionArgs:{forward:!1,linewise:!0}},{keys:"]p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0,matchIndent:!0}},{keys:"[p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0,matchIndent:!0}},{keys:"]<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!0,toJumplist:!0}},{keys:"[<character>",type:"motion",motion:"moveToSymbol",motionArgs:{forward:!1,toJumplist:!0}},{keys:"|",type:"motion",motion:"moveToColumn"},{keys:"o",type:"motion",motion:"moveToOtherHighlightedEnd",context:"visual"},{keys:"O",type:"motion",motion:"moveToOtherHighlightedEnd",motionArgs:{sameLine:!0},context:"visual"},{keys:"d",type:"operator",operator:"delete"},{keys:"y",type:"operator",operator:"yank"},{keys:"c",type:"operator",operator:"change"},{keys:"=",type:"operator",operator:"indentAuto"},{keys:">",type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:"<",type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:"g~",type:"operator",operator:"changeCase"},{keys:"gu",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},isEdit:!0},{keys:"gU",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},isEdit:!0},{keys:"n",type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:!0}},{keys:"N",type:"motion",motion:"findNext",motionArgs:{forward:!1,toJumplist:!0}},{keys:"gn",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!0}},{keys:"gN",type:"motion",motion:"findAndSelectNextInclusive",motionArgs:{forward:!1}},{keys:"x",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:"X",type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:"D",type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"D",type:"operator",operator:"delete",operatorArgs:{linewise:!0},context:"visual"},{keys:"Y",type:"operatorMotion",operator:"yank",motion:"expandToLine",motionArgs:{linewise:!0},context:"normal"},{keys:"Y",type:"operator",operator:"yank",operatorArgs:{linewise:!0},context:"visual"},{keys:"C",type:"operatorMotion",operator:"change",motion:"moveToEol",motionArgs:{inclusive:!0},context:"normal"},{keys:"C",type:"operator",operator:"change",operatorArgs:{linewise:!0},context:"visual"},{keys:"~",type:"operatorMotion",operator:"changeCase",motion:"moveByCharacters",motionArgs:{forward:!0},operatorArgs:{shouldMoveCursor:!0},context:"normal"},{keys:"~",type:"operator",operator:"changeCase",context:"visual"},{keys:"<C-w>",type:"operatorMotion",operator:"delete",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1},context:"insert"},{keys:"<C-w>",type:"idle",context:"normal"},{keys:"<C-i>",type:"action",action:"jumpListWalk",actionArgs:{forward:!0}},{keys:"<C-o>",type:"action",action:"jumpListWalk",actionArgs:{forward:!1}},{keys:"<C-e>",type:"action",action:"scroll",actionArgs:{forward:!0,linewise:!0}},{keys:"<C-y>",type:"action",action:"scroll",actionArgs:{forward:!1,linewise:!0}},{keys:"a",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"charAfter"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"eol"},context:"normal"},{keys:"A",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"endOfSelectedArea"},context:"visual"},{keys:"i",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"inplace"},context:"normal"},{keys:"gi",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"lastEdit"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"firstNonBlank"},context:"normal"},{keys:"gI",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"bol"},context:"normal"},{keys:"I",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{insertAt:"startOfSelectedArea"},context:"visual"},{keys:"o",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!0},context:"normal"},{keys:"O",type:"action",action:"newLineAndEnterInsertMode",isEdit:!0,interlaceInsertRepeat:!0,actionArgs:{after:!1},context:"normal"},{keys:"v",type:"action",action:"toggleVisualMode"},{keys:"V",type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:"<C-v>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"<C-q>",type:"action",action:"toggleVisualMode",actionArgs:{blockwise:!0}},{keys:"gv",type:"action",action:"reselectLastSelection"},{keys:"J",type:"action",action:"joinLines",isEdit:!0},{keys:"gJ",type:"action",action:"joinLines",actionArgs:{keepSpaces:!0},isEdit:!0},{keys:"p",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!0,isEdit:!0}},{keys:"P",type:"action",action:"paste",isEdit:!0,actionArgs:{after:!1,isEdit:!0}},{keys:"r<character>",type:"action",action:"replace",isEdit:!0},{keys:"@<character>",type:"action",action:"replayMacro"},{keys:"q<character>",type:"action",action:"enterMacroRecordMode"},{keys:"R",type:"action",action:"enterInsertMode",isEdit:!0,actionArgs:{replace:!0},context:"normal"},{keys:"R",type:"operator",operator:"change",operatorArgs:{linewise:!0,fullLine:!0},context:"visual",exitVisualBlock:!0},{keys:"u",type:"action",action:"undo",context:"normal"},{keys:"u",type:"operator",operator:"changeCase",operatorArgs:{toLower:!0},context:"visual",isEdit:!0},{keys:"U",type:"operator",operator:"changeCase",operatorArgs:{toLower:!1},context:"visual",isEdit:!0},{keys:"<C-r>",type:"action",action:"redo"},{keys:"m<character>",type:"action",action:"setMark"},{keys:'"<character>',type:"action",action:"setRegister"},{keys:"zz",type:"action",action:"scrollToCursor",actionArgs:{position:"center"}},{keys:"z.",type:"action",action:"scrollToCursor",actionArgs:{position:"center"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"zt",type:"action",action:"scrollToCursor",actionArgs:{position:"top"}},{keys:"z<CR>",type:"action",action:"scrollToCursor",actionArgs:{position:"top"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:"z-",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"}},{keys:"zb",type:"action",action:"scrollToCursor",actionArgs:{position:"bottom"},motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:".",type:"action",action:"repeatLastEdit"},{keys:"<C-a>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!0,backtrack:!1}},{keys:"<C-x>",type:"action",action:"incrementNumberToken",isEdit:!0,actionArgs:{increase:!1,backtrack:!1}},{keys:"<C-t>",type:"action",action:"indent",actionArgs:{indentRight:!0},context:"insert"},{keys:"<C-d>",type:"action",action:"indent",actionArgs:{indentRight:!1},context:"insert"},{keys:"a<character>",type:"motion",motion:"textObjectManipulation"},{keys:"i<character>",type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:"/",type:"search",searchArgs:{forward:!0,querySrc:"prompt",toJumplist:!0}},{keys:"?",type:"search",searchArgs:{forward:!1,querySrc:"prompt",toJumplist:!0}},{keys:"*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",wholeWordOnly:!0,toJumplist:!0}},{keys:"g*",type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:"g#",type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor",toJumplist:!0}},{keys:":",type:"ex"}],C=y.length,k=[{name:"colorscheme",shortName:"colo"},{name:"map"},{name:"imap",shortName:"im"},{name:"nmap",shortName:"nm"},{name:"vmap",shortName:"vm"},{name:"unmap"},{name:"write",shortName:"w"},{name:"undo",shortName:"u"},{name:"redo",shortName:"red"},{name:"set",shortName:"se"},{name:"setlocal",shortName:"setl"},{name:"setglobal",shortName:"setg"},{name:"sort",shortName:"sor"},{name:"substitute",shortName:"s",possiblyAsync:!0},{name:"nohlsearch",shortName:"noh"},{name:"yank",shortName:"y"},{name:"delmarks",shortName:"delm"},{name:"registers",shortName:"reg",excludeFromCommandHistory:!0},{name:"vglobal",shortName:"v"},{name:"global",shortName:"g"}],w=m.Pos,x=function(){return ne};function S(e,t){this==m.keyMap.vim&&m.rmClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==M||function(e){e.setOption("disableInput",!1),e.off("cursorActivity",mt),m.off(e.getInputField(),"paste",O(e)),e.state.vim=null}(e)}function M(e,t){this==m.keyMap.vim&&m.addClass(e.getWrapperElement(),"cm-fat-cursor"),t&&t.attach==M||function(e){e.setOption("disableInput",!0),e.setOption("showCursorWhenSelecting",!1),m.signal(e,"vim-mode-change",{mode:"normal"}),e.on("cursorActivity",mt),ee(e),m.on(e.getInputField(),"paste",O(e))}(e)}function A(e,t){if(t){if(this[e])return this[e];var n=function(e){if("'"==e.charAt(0))return e.charAt(1);var t=e.split(/-(?!$)/),n=t[t.length-1];if(1==t.length&&1==t[0].length)return!1;if(2==t.length&&"Shift"==t[0]&&1==n.length)return!1;for(var r=!1,o=0;o<t.length;o++){var i=t[o];i in b?t[o]=b[i]:r=!0,i in L&&(t[o]=L[i])}if(!r)return!1;j(n)&&(t[t.length-1]=n.toLowerCase());return"<"+t.join("-")+">"}(e);if(!n)return!1;var r=m.Vim.findKey(t,n);return"function"==typeof r&&m.signal(t,"vim-keypress",n),r}}m.defineOption("vimMode",!1,(function(e,t,n){t&&"vim"!=e.getOption("keyMap")?e.setOption("keyMap","vim"):!t&&n!=m.Init&&/^vim/.test(e.getOption("keyMap"))&&e.setOption("keyMap","default")}));var b={Shift:"S",Ctrl:"C",Alt:"A",Cmd:"D",Mod:"A",CapsLock:""},L={Enter:"CR",Backspace:"BS",Delete:"Del",Insert:"Ins"};function O(e){var t=e.state.vim;return t.onPasteFn||(t.onPasteFn=function(){t.insertMode||(e.setCursor(me(e.getCursor(),0,1)),de.enterInsertMode(e,{},t))}),t.onPasteFn}var T=/[\d]/,E=[m.isWordChar,function(e){return e&&!m.isWordChar(e)&&!/\s/.test(e)}],R=[function(e){return/\S/.test(e)}];function B(e,t){for(var n=[],r=e;r<e+t;r++)n.push(String.fromCharCode(r));return n}var I,K=B(65,26),N=B(97,26),P=B(48,10),_=[].concat(K,N,P,["<",">"]),H=[].concat(K,N,P,["-",'"',".",":","_","/"]);try{I=new RegExp("^[\\p{Lu}]$","u")}catch(e){I=/^[A-Z]$/}function V(e,t){return t>=e.firstLine()&&t<=e.lastLine()}function $(e){return/^[a-z]$/.test(e)}function j(e){return I.test(e)}function W(e){return/^\s*$/.test(e)}function D(e){return-1!=".?!".indexOf(e)}function F(e,t){for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1}var U={};function z(e,t,n,r,o){if(void 0===t&&!o)throw Error("defaultValue is required unless callback is provided");if(n||(n="string"),U[e]={type:n,defaultValue:t,callback:o},r)for(var i=0;i<r.length;i++)U[r[i]]=U[e];t&&J(e,t)}function J(e,t,n,r){var o=U[e],i=(r=r||{}).scope;if(!o)return new Error("Unknown option: "+e);if("boolean"==o.type){if(t&&!0!==t)return new Error("Invalid argument: "+e+"="+t);!1!==t&&(t=!0)}o.callback?("local"!==i&&o.callback(t,void 0),"global"!==i&&n&&o.callback(t,n)):("local"!==i&&(o.value="boolean"==o.type?!!t:t),"global"!==i&&n&&(n.state.vim.options[e]={value:t}))}function q(e,t,n){var r=U[e],o=(n=n||{}).scope;if(!r)return new Error("Unknown option: "+e);if(r.callback){var i=t&&r.callback(void 0,t);return"global"!==o&&void 0!==i?i:"local"!==o?r.callback():void 0}return((i="global"!==o&&t&&t.state.vim.options[e])||"local"!==o&&r||{}).value}z("filetype",void 0,"string",["ft"],(function(e,t){if(void 0!==t){if(void 0===e)return"null"==(n=t.getOption("mode"))?"":n;var n=""==e?"null":e;t.setOption("mode",n)}}));var Q,G,X=function(){var e=-1,t=0,n=0,r=new Array(100);function o(o,i){(e+=i)>t?e=t:e<n&&(e=n);var a=r[(100+e)%100];if(a&&!a.find()){var s,c=i>0?1:-1,l=o.getCursor();do{if((a=r[(100+(e+=c))%100])&&(s=a.find())&&!Ce(l,s))break}while(e<t&&e>n)}return a}return{cachedCursor:void 0,add:function(o,i,a){var s=r[e%100];function c(t){var n=++e%100,i=r[n];i&&i.clear(),r[n]=o.setBookmark(t)}if(s){var l=s.find();l&&!Ce(l,i)&&c(i)}else c(i);c(a),t=e,(n=e-100+1)<0&&(n=0)},find:function(t,n){var r=e,i=o(t,n);return e=r,i&&i.find()},move:o}},Z=function(e){return e?{changes:e.changes,expectCursorActivityForChange:e.expectCursorActivityForChange}:{changes:[],expectCursorActivityForChange:!1}};function Y(){this.latestRegister=void 0,this.isPlaying=!1,this.isRecording=!1,this.replaySearchQueries=[],this.onRecordingDone=void 0,this.lastInsertModeChanges=Z()}function ee(e){return e.state.vim||(e.state.vim={inputState:new re,lastEditInputState:void 0,lastEditActionCommand:void 0,lastHPos:-1,lastHSPos:-1,lastMotion:null,marks:{},fakeCursor:null,insertMode:!1,insertModeRepeat:void 0,visualMode:!1,visualLine:!1,visualBlock:!1,lastSelection:null,lastPastedText:null,sel:{},options:{}}),e.state.vim}function te(){for(var e in Q={searchQuery:null,searchIsReversed:!1,lastSubstituteReplacePart:void 0,jumpList:X(),macroModeState:new Y,lastCharacterSearch:{increment:0,forward:!0,selectedCharacter:""},registerController:new ae({}),searchHistoryController:new se,exCommandHistoryController:new se},U){var t=U[e];t.value=t.defaultValue}}Y.prototype={exitMacroRecordMode:function(){var e=Q.macroModeState;e.onRecordingDone&&e.onRecordingDone(),e.onRecordingDone=void 0,e.isRecording=!1},enterMacroRecordMode:function(e,t){var n=Q.registerController.getRegister(t);n&&(n.clear(),this.latestRegister=t,e.openDialog&&(this.onRecordingDone=e.openDialog(document.createTextNode("(recording)["+t+"]"),null,{bottom:!0})),this.isRecording=!0)}};var ne={buildKeyMap:function(){},getRegisterController:function(){return Q.registerController},resetVimGlobalState_:te,getVimGlobalState_:function(){return Q},maybeInitVimState_:ee,suppressErrorLogging:!1,InsertModeKey:vt,map:function(e,t,n){ut.map(e,t,n)},unmap:function(e,t){ut.unmap(e,t)},noremap:function(e,t,n){function r(e){return e?[e]:["normal","insert","visual"]}for(var o=r(n),i=y.length,a=i-C;a<i&&o.length;a++){var s=y[a];if(!(s.keys!=t||n&&s.context&&s.context!==n||"ex"===s.type.substr(0,2)||"key"===s.type.substr(0,3))){var c={};for(var l in s)c[l]=s[l];c.keys=e,n&&!c.context&&(c.context=n),this._mapCommand(c);var u=r(s.context);o=o.filter((function(e){return-1===u.indexOf(e)}))}}},mapclear:function(e){var t=y.length,n=C,r=y.slice(0,t-n);if(y=y.slice(t-n),e)for(var o=r.length-1;o>=0;o--){var i=r[o];if(e!==i.context)if(i.context)this._mapCommand(i);else{var a=["normal","insert","visual"];for(var s in a)if(a[s]!==e){var c={};for(var l in i)c[l]=i[l];c.context=a[s],this._mapCommand(c)}}}},setOption:J,getOption:q,defineOption:z,defineEx:function(e,t,n){if(t){if(0!==e.indexOf(t))throw new Error('(Vim.defineEx) "'+t+'" is not a prefix of "'+e+'", command not registered')}else t=e;lt[e]=n,ut.commandMap_[t]={name:e,shortName:t,type:"api"}},handleKey:function(e,t,n){var r=this.findKey(e,t,n);if("function"==typeof r)return r()},findKey:function(e,t,n){var r,o=ee(e);function i(){var r=Q.macroModeState;if(r.isRecording){if("q"==t)return r.exitMacroRecordMode(),oe(e),!0;"mapping"!=n&&function(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushText(t)}(r,t)}}function a(){if("<Esc>"==t)return oe(e),o.visualMode?Be(e):o.insertMode&&ht(e),!0}return!1===(r=o.insertMode?function(){if(a())return!0;for(var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t,r=1==t.length,i=ce.matchCommand(n,y,o.inputState,"insert");n.length>1&&"full"!=i.type;){n=o.inputState.keyBuffer=n.slice(1);var s=ce.matchCommand(n,y,o.inputState,"insert");"none"!=s.type&&(i=s)}if("none"==i.type)return oe(e),!1;if("partial"==i.type)return G&&window.clearTimeout(G),G=window.setTimeout((function(){o.insertMode&&o.inputState.keyBuffer&&oe(e)}),q("insertModeEscKeysTimeout")),!r;if(G&&window.clearTimeout(G),r){for(var c=e.listSelections(),l=0;l<c.length;l++){var u=c[l].head;e.replaceRange("",me(u,0,-(n.length-1)),u,"+input")}Q.macroModeState.lastInsertModeChanges.changes.pop()}return oe(e),i.command}():function(){if(i()||a())return!0;var n=o.inputState.keyBuffer=o.inputState.keyBuffer+t;if(/^[1-9]\d*$/.test(n))return!0;if(!(c=/^(\d*)(.*)$/.exec(n)))return oe(e),!1;var r=o.visualMode?"visual":"normal",s=c[2]||c[1];o.inputState.operatorShortcut&&o.inputState.operatorShortcut.slice(-1)==s&&(s=o.inputState.operatorShortcut);var c,l=ce.matchCommand(s,y,o.inputState,r);return"none"==l.type?(oe(e),!1):"partial"==l.type||(o.inputState.keyBuffer="",(c=/^(\d*)(.*)$/.exec(n))[1]&&"0"!=c[1]&&o.inputState.pushRepeatDigit(c[1]),l.command)}())?void 0:!0===r?function(){return!0}:function(){if(!r.operator&&!r.isEdit||!e.getOption("readOnly"))return e.operation((function(){e.curOp.isVimOp=!0;try{"keyToKey"==r.type?function(n){for(var r;n;)r=/<\w+-.+?>|<\w+>|./.exec(n),t=r[0],n=n.substring(r.index+t.length),m.Vim.handleKey(e,t,"mapping")}(r.toKeys):ce.processCommand(e,o,r)}catch(t){throw e.state.vim=void 0,ee(e),m.Vim.suppressErrorLogging||console.log(t),t}return!0}))}},handleEx:function(e,t){ut.processCommand(e,t)},defineMotion:function(e,t){le[e]=t},defineAction:function(e,t){de[e]=t},defineOperator:function(e,t){he[e]=t},mapCommand:function(e,t,n,r,o){var i={keys:e,type:t};for(var a in i[t]=n,i[t+"Args"]=r,o)i[a]=o[a];dt(i)},_mapCommand:dt,defineRegister:function(e,t){var n=Q.registerController.registers;if(!e||1!=e.length)throw Error("Register name must be 1 character");n[e]=t,H.push(e)},exitVisualMode:Be,exitInsertMode:ht};function re(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null}function oe(e,t){e.state.vim.inputState=new re,m.signal(e,"vim-command-done",t)}function ie(e,t,n){this.clear(),this.keyBuffer=[e||""],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!!t,this.blockwise=!!n}function ae(e){this.registers=e,this.unnamedRegister=e['"']=new ie,e["."]=new ie,e[":"]=new ie,e["/"]=new ie}function se(){this.historyBuffer=[],this.iterator=0,this.initialPrefix=null}re.prototype.pushRepeatDigit=function(e){this.operator?this.motionRepeat=this.motionRepeat.concat(e):this.prefixRepeat=this.prefixRepeat.concat(e)},re.prototype.getRepeat=function(){var e=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(e=1,this.prefixRepeat.length>0&&(e*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(e*=parseInt(this.motionRepeat.join(""),10))),e},ie.prototype={setText:function(e,t,n){this.keyBuffer=[e||""],this.linewise=!!t,this.blockwise=!!n},pushText:function(e,t){t&&(this.linewise||this.keyBuffer.push("\n"),this.linewise=!0),this.keyBuffer.push(e)},pushInsertModeChanges:function(e){this.insertModeChanges.push(Z(e))},pushSearchQuery:function(e){this.searchQueries.push(e)},clear:function(){this.keyBuffer=[],this.insertModeChanges=[],this.searchQueries=[],this.linewise=!1},toString:function(){return this.keyBuffer.join("")}},ae.prototype={pushText:function(e,t,n,r,o){if("_"!==e){r&&"\n"!==n.charAt(n.length-1)&&(n+="\n");var i=this.isValidRegister(e)?this.getRegister(e):null;if(i){j(e)?i.pushText(n,r):i.setText(n,r,o),this.unnamedRegister.setText(i.toString(),r)}else{switch(t){case"yank":this.registers[0]=new ie(n,r,o);break;case"delete":case"change":-1==n.indexOf("\n")?this.registers["-"]=new ie(n,r):(this.shiftNumericRegisters_(),this.registers[1]=new ie(n,r))}this.unnamedRegister.setText(n,r,o)}}},getRegister:function(e){return this.isValidRegister(e)?(e=e.toLowerCase(),this.registers[e]||(this.registers[e]=new ie),this.registers[e]):this.unnamedRegister},isValidRegister:function(e){return e&&F(e,H)},shiftNumericRegisters_:function(){for(var e=9;e>=2;e--)this.registers[e]=this.getRegister(""+(e-1))}},se.prototype={nextMatch:function(e,t){var n=this.historyBuffer,r=t?-1:1;null===this.initialPrefix&&(this.initialPrefix=e);for(var o=this.iterator+r;t?o>=0:o<n.length;o+=r)for(var i=n[o],a=0;a<=i.length;a++)if(this.initialPrefix==i.substring(0,a))return this.iterator=o,i;return o>=n.length?(this.iterator=n.length,this.initialPrefix):o<0?e:void 0},pushInput:function(e){var t=this.historyBuffer.indexOf(e);t>-1&&this.historyBuffer.splice(t,1),e.length&&this.historyBuffer.push(e)},reset:function(){this.initialPrefix=null,this.iterator=this.historyBuffer.length}};var ce={matchCommand:function(e,t,n,r){var o,i=function(e,t,n,r){for(var o,i=[],a=[],s=0;s<t.length;s++){var c=t[s];"insert"==n&&"insert"!=c.context||c.context&&c.context!=n||r.operator&&"action"==c.type||!(o=ge(e,c.keys))||("partial"==o&&i.push(c),"full"==o&&a.push(c))}return{partial:i.length&&i,full:a.length&&a}}(e,t,r,n);if(!i.full&&!i.partial)return{type:"none"};if(!i.full&&i.partial)return{type:"partial"};for(var a=0;a<i.full.length;a++){var s=i.full[a];o||(o=s)}if("<character>"==o.keys.slice(-11)){var c=function(e){var t=/^.*(<[^>]+>)$/.exec(e),n=t?t[1]:e.slice(-1);if(n.length>1)switch(n){case"<CR>":n="\n";break;case"<Space>":n=" ";break;default:n=""}return n}(e);if(/<C-.>/.test(c)||!c)return{type:"none"};n.selectedCharacter=c}return{type:"full",command:o}},processCommand:function(e,t,n){switch(t.inputState.repeatOverride=n.repeatOverride,n.type){case"motion":this.processMotion(e,t,n);break;case"operator":this.processOperator(e,t,n);break;case"operatorMotion":this.processOperatorMotion(e,t,n);break;case"action":this.processAction(e,t,n);break;case"search":this.processSearch(e,t,n);break;case"ex":case"keyToEx":this.processEx(e,t,n)}},processMotion:function(e,t,n){t.inputState.motion=n.motion,t.inputState.motionArgs=fe(n.motionArgs),this.evalInput(e,t)},processOperator:function(e,t,n){var r=t.inputState;if(r.operator){if(r.operator==n.operator)return r.motion="expandToLine",r.motionArgs={linewise:!0},void this.evalInput(e,t);oe(e)}r.operator=n.operator,r.operatorArgs=fe(n.operatorArgs),n.keys.length>1&&(r.operatorShortcut=n.keys),n.exitVisualBlock&&(t.visualBlock=!1,Ee(e)),t.visualMode&&this.evalInput(e,t)},processOperatorMotion:function(e,t,n){var r=t.visualMode,o=fe(n.operatorMotionArgs);o&&r&&o.visualLine&&(t.visualLine=!0),this.processOperator(e,t,n),r||this.processMotion(e,t,n)},processAction:function(e,t,n){var r=t.inputState,o=r.getRepeat(),i=!!o,a=fe(n.actionArgs)||{};r.selectedCharacter&&(a.selectedCharacter=r.selectedCharacter),n.operator&&this.processOperator(e,t,n),n.motion&&this.processMotion(e,t,n),(n.motion||n.operator)&&this.evalInput(e,t),a.repeat=o||1,a.repeatIsExplicit=i,a.registerName=r.registerName,oe(e),t.lastMotion=null,n.isEdit&&this.recordLastEdit(t,r,n),de[n.action](e,a,t)},processSearch:function(e,t,n){if(e.getSearchCursor){var r=n.searchArgs.forward,o=n.searchArgs.wholeWordOnly;ze(e).setReversed(!r);var i=r?"/":"?",a=ze(e).getQuery(),s=e.getScrollInfo();switch(n.searchArgs.querySrc){case"prompt":var c=Q.macroModeState;if(c.isPlaying)d(h=c.replaySearchQueries.shift(),!0,!1);else et(e,{onClose:function(e){d(e,!0,!0);var t=Q.macroModeState;t.isRecording&&function(e,t){if(e.isPlaying)return;var n=e.latestRegister,r=Q.registerController.getRegister(n);r&&r.pushSearchQuery&&r.pushSearchQuery(t)}(t,e)},prefix:i,desc:"(JavaScript regexp)",onKeyUp:function(t,n,o){var i,a,c,l=m.keyName(t);"Up"==l||"Down"==l?(i="Up"==l,a=t.target?t.target.selectionEnd:0,o(n=Q.searchHistoryController.nextMatch(n,i)||""),a&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(a,t.target.value.length))):"Left"!=l&&"Right"!=l&&"Ctrl"!=l&&"Alt"!=l&&"Shift"!=l&&Q.searchHistoryController.reset();try{c=tt(e,n,!0,!0)}catch(t){}c?e.scrollIntoView(rt(e,!r,c),30):(ot(e),e.scrollTo(s.left,s.top))},onKeyDown:function(t,n,r){var o=m.keyName(t);"Esc"==o||"Ctrl-C"==o||"Ctrl-["==o||"Backspace"==o&&""==n?(Q.searchHistoryController.pushInput(n),Q.searchHistoryController.reset(),tt(e,a),ot(e),e.scrollTo(s.left,s.top),m.e_stop(t),oe(e),r(),e.focus()):"Up"==o||"Down"==o?m.e_stop(t):"Ctrl-U"==o&&(m.e_stop(t),r(""))}});break;case"wordUnderCursor":var l=Ke(e,!1,!0,!1,!0),u=!0;if(l||(l=Ke(e,!1,!0,!1,!1),u=!1),!l)return;var h=e.getLine(l.start.line).substring(l.start.ch,l.end.ch);h=u&&o?"\\b"+h+"\\b":h.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1"),Q.jumpList.cachedCursor=e.getCursor(),e.setCursor(l.start),d(h,!0,!1)}}function d(r,o,i){Q.searchHistoryController.pushInput(r),Q.searchHistoryController.reset();try{tt(e,r,o,i)}catch(t){return Ye(e,"Invalid regex: "+r),void oe(e)}ce.processMotion(e,t,{type:"motion",motion:"findNext",motionArgs:{forward:!0,toJumplist:n.searchArgs.toJumplist}})}},processEx:function(e,t,n){function r(t){Q.exCommandHistoryController.pushInput(t),Q.exCommandHistoryController.reset(),ut.processCommand(e,t)}function o(t,n,r){var o,i,a=m.keyName(t);("Esc"==a||"Ctrl-C"==a||"Ctrl-["==a||"Backspace"==a&&""==n)&&(Q.exCommandHistoryController.pushInput(n),Q.exCommandHistoryController.reset(),m.e_stop(t),oe(e),r(),e.focus()),"Up"==a||"Down"==a?(m.e_stop(t),o="Up"==a,i=t.target?t.target.selectionEnd:0,r(n=Q.exCommandHistoryController.nextMatch(n,o)||""),i&&t.target&&(t.target.selectionEnd=t.target.selectionStart=Math.min(i,t.target.value.length))):"Ctrl-U"==a?(m.e_stop(t),r("")):"Left"!=a&&"Right"!=a&&"Ctrl"!=a&&"Alt"!=a&&"Shift"!=a&&Q.exCommandHistoryController.reset()}"keyToEx"==n.type?ut.processCommand(e,n.exArgs.input):t.visualMode?et(e,{onClose:r,prefix:":",value:"'<,'>",onKeyDown:o,selectValueOnOpen:!1}):et(e,{onClose:r,prefix:":",onKeyDown:o})},evalInput:function(e,t){var n,r,o,i=t.inputState,a=i.motion,s=i.motionArgs||{},c=i.operator,l=i.operatorArgs||{},u=i.registerName,h=t.sel,d=ye(t.visualMode?pe(e,h.head):e.getCursor("head")),p=ye(t.visualMode?pe(e,h.anchor):e.getCursor("anchor")),f=ye(d),m=ye(p);if(c&&this.recordLastEdit(t,i),(o=void 0!==i.repeatOverride?i.repeatOverride:i.getRepeat())>0&&s.explicitRepeat?s.repeatIsExplicit=!0:(s.noRepeat||!s.explicitRepeat&&0===o)&&(o=1,s.repeatIsExplicit=!1),i.selectedCharacter&&(s.selectedCharacter=l.selectedCharacter=i.selectedCharacter),s.repeat=o,oe(e),a){var g=le[a](e,d,s,t,i);if(t.lastMotion=le[a],!g)return;if(s.toJumplist){c||null==e.ace.curOp||(e.ace.curOp.command.scrollIntoView="center-animate");var v=Q.jumpList,y=v.cachedCursor;y?(Ne(e,y,g),delete v.cachedCursor):Ne(e,d,g)}g instanceof Array?(r=g[0],n=g[1]):n=g,n||(n=ye(d)),t.visualMode?(t.visualBlock&&n.ch===1/0||(n=pe(e,n)),r&&(r=pe(e,r)),r=r||m,h.anchor=r,h.head=n,Ee(e),We(e,t,"<",ke(r,n)?r:n),We(e,t,">",ke(r,n)?n:r)):c||(n=pe(e,n),e.setCursor(n.line,n.ch))}if(c){if(l.lastSel){r=m;var C=l.lastSel,k=Math.abs(C.head.line-C.anchor.line),x=Math.abs(C.head.ch-C.anchor.ch);n=C.visualLine?w(m.line+k,m.ch):C.visualBlock?w(m.line+k,m.ch+x):C.head.line==C.anchor.line?w(m.line,m.ch+x):w(m.line+k,m.ch),t.visualMode=!0,t.visualLine=C.visualLine,t.visualBlock=C.visualBlock,h=t.sel={anchor:r,head:n},Ee(e)}else t.visualMode&&(l.lastSel={anchor:ye(h.anchor),head:ye(h.head),visualBlock:t.visualBlock,visualLine:t.visualLine});var S,M,A,b,L;if(t.visualMode){if(S=we(h.head,h.anchor),M=xe(h.head,h.anchor),A=t.visualLine||l.linewise,L=Re(e,{anchor:S,head:M},b=t.visualBlock?"block":A?"line":"char"),A){var O=L.ranges;if("block"==b)for(var T=0;T<O.length;T++)O[T].head.ch=Me(e,O[T].head.line);else"line"==b&&(O[0].head=w(O[0].head.line+1,0))}}else{if(S=ye(r||m),ke(M=ye(n||f),S)){var E=S;S=M,M=E}(A=s.linewise||l.linewise)?function(e,t,n){t.ch=0,n.ch=0,n.line++}(0,S,M):s.forward&&function(e,t,n){var r=e.getRange(t,n);if(/\n\s*$/.test(r)){var o=r.split("\n");o.pop();for(var i=o.pop();o.length>0&&i&&W(i);i=o.pop())n.line--,n.ch=0;i?(n.line--,n.ch=Me(e,n.line)):n.ch=0}}(e,S,M),L=Re(e,{anchor:S,head:M},b="char",!s.inclusive||A)}e.setSelections(L.ranges,L.primary),t.lastMotion=null,l.repeat=o,l.registerName=u,l.linewise=A;var R=he[c](e,l,L.ranges,m,n);t.visualMode&&Be(e,null!=R),R&&e.setCursor(R)}},recordLastEdit:function(e,t,n){var r=Q.macroModeState;r.isPlaying||(e.lastEditInputState=t,e.lastEditActionCommand=n,r.lastInsertModeChanges.changes=[],r.lastInsertModeChanges.expectCursorActivityForChange=!1,r.lastInsertModeChanges.visualBlock=e.visualBlock?e.sel.head.line-e.sel.anchor.line:0)}},le={moveToTopLine:function(e,t,n){var r=it(e).top+n.repeat-1;return w(r,Ie(e.getLine(r)))},moveToMiddleLine:function(e){var t=it(e),n=Math.floor(.5*(t.top+t.bottom));return w(n,Ie(e.getLine(n)))},moveToBottomLine:function(e,t,n){var r=it(e).bottom-n.repeat+1;return w(r,Ie(e.getLine(r)))},expandToLine:function(e,t,n){return w(t.line+n.repeat-1,1/0)},findNext:function(e,t,n){var r=ze(e),o=r.getQuery();if(o){var i=!n.forward;return i=r.isReversed()?!i:i,nt(e,o),rt(e,i,o,n.repeat)}},findAndSelectNextInclusive:function(e,t,n,r,o){var i=ze(e),a=i.getQuery();if(a){var s=!n.forward,c=function(e,t,n,r,o){void 0===r&&(r=1);return e.operation((function(){var i=e.getCursor(),a=e.getSearchCursor(n,i),s=a.find(!t);!o.visualMode&&s&&Ce(a.from(),i)&&a.find(!t);for(var c=0;c<r;c++)if(!(s=a.find(t))&&!(a=e.getSearchCursor(n,t?w(e.lastLine()):w(e.firstLine(),0))).find(t))return;return[a.from(),a.to()]}))}(e,s=i.isReversed()?!s:s,a,n.repeat,r);if(c){if(o.operator)return c;var l=c[0],u=w(c[1].line,c[1].ch-1);if(r.visualMode){(r.visualLine||r.visualBlock)&&(r.visualLine=!1,r.visualBlock=!1,m.signal(e,"vim-mode-change",{mode:"visual",subMode:""}));var h=r.sel.anchor;if(h)return i.isReversed()?n.forward?[h,l]:[h,u]:n.forward?[h,u]:[h,l]}else r.visualMode=!0,r.visualLine=!1,r.visualBlock=!1,m.signal(e,"vim-mode-change",{mode:"visual",subMode:""});return s?[u,l]:[l,u]}}},goToMark:function(e,t,n,r){var o=at(e,r,n.selectedCharacter);return o?n.linewise?{line:o.line,ch:Ie(e.getLine(o.line))}:o:null},moveToOtherHighlightedEnd:function(e,t,n,r){if(r.visualBlock&&n.sameLine){var o=r.sel;return[pe(e,w(o.anchor.line,o.head.ch)),pe(e,w(o.head.line,o.anchor.ch))]}return[r.sel.head,r.sel.anchor]},jumpToMark:function(e,t,n,r){for(var o=t,i=0;i<n.repeat;i++){var a=o;for(var s in r.marks)if($(s)){var c=r.marks[s].find();if(!((n.forward?ke(c,a):ke(a,c))||n.linewise&&c.line==a.line)){var l=Ce(a,o),u=n.forward?Se(a,c,o):Se(o,c,a);(l||u)&&(o=c)}}}return n.linewise&&(o=w(o.line,Ie(e.getLine(o.line)))),o},moveByCharacters:function(e,t,n){var r=t,o=n.repeat,i=n.forward?r.ch+o:r.ch-o;return w(r.line,i)},moveByLines:function(e,t,n,r){var o=t,i=o.ch;switch(r.lastMotion){case this.moveByLines:case this.moveByDisplayLines:case this.moveByScroll:case this.moveToColumn:case this.moveToEol:i=r.lastHPos;break;default:r.lastHPos=i}var a=n.repeat+(n.repeatOffset||0),s=n.forward?o.line+a:o.line-a,c=e.firstLine(),l=e.lastLine();if(s<c&&o.line==c)return this.moveToStartOfLine(e,t,n,r);if(s>l&&o.line==l)return $e(e,t,n,r,!0);var u=e.ace.session.getFoldLine(s);return u&&(n.forward?s>u.start.row&&(s=u.end.row+1):s=u.start.row),n.toFirstChar&&(i=Ie(e.getLine(s)),r.lastHPos=i),r.lastHSPos=e.charCoords(w(s,i),"div").left,w(s,i)},moveByDisplayLines:function(e,t,n,r){var o=t;switch(r.lastMotion){case this.moveByDisplayLines:case this.moveByScroll:case this.moveByLines:case this.moveToColumn:case this.moveToEol:break;default:r.lastHSPos=e.charCoords(o,"div").left}var i=n.repeat;if((s=e.findPosV(o,n.forward?i:-i,"line",r.lastHSPos)).hitSide)if(n.forward)var a={top:e.charCoords(s,"div").top+8,left:r.lastHSPos},s=e.coordsChar(a,"div");else{var c=e.charCoords(w(e.firstLine(),0),"div");c.left=r.lastHSPos,s=e.coordsChar(c,"div")}return r.lastHPos=s.ch,s},moveByPage:function(e,t,n){var r=t,o=n.repeat;return e.findPosV(r,n.forward?o:-o,"page")},moveByParagraph:function(e,t,n){var r=n.forward?1:-1;return Fe(e,t,n.repeat,r)},moveBySentence:function(e,t,n){var r=n.forward?1:-1;return function(e,t,n,r){function o(e,t){if(t.pos+t.dir<0||t.pos+t.dir>=t.line.length){if(t.ln+=t.dir,!V(e,t.ln))return t.line=null,t.ln=null,void(t.pos=null);t.line=e.getLine(t.ln),t.pos=t.dir>0?0:t.line.length-1}else t.pos+=t.dir}function i(e,t,n,r){var i=""===(l=e.getLine(t)),a={line:l,ln:t,pos:n,dir:r},s={ln:a.ln,pos:a.pos},c=""===a.line;for(o(e,a);null!==a.line;){if(s.ln=a.ln,s.pos=a.pos,""===a.line&&!c)return{ln:a.ln,pos:a.pos};if(i&&""!==a.line&&!W(a.line[a.pos]))return{ln:a.ln,pos:a.pos};!D(a.line[a.pos])||i||a.pos!==a.line.length-1&&!W(a.line[a.pos+1])||(i=!0),o(e,a)}var l=e.getLine(s.ln);s.pos=0;for(var u=l.length-1;u>=0;--u)if(!W(l[u])){s.pos=u;break}return s}function a(e,t,n,r){var i={line:c=e.getLine(t),ln:t,pos:n,dir:r},a={ln:i.ln,pos:null},s=""===i.line;for(o(e,i);null!==i.line;){if(""===i.line&&!s)return null!==a.pos?a:{ln:i.ln,pos:i.pos};if(D(i.line[i.pos])&&null!==a.pos&&(i.ln!==a.ln||i.pos+1!==a.pos))return a;""===i.line||W(i.line[i.pos])||(s=!1,a={ln:i.ln,pos:i.pos}),o(e,i)}var c=e.getLine(a.ln);a.pos=0;for(var l=0;l<c.length;++l)if(!W(c[l])){a.pos=l;break}return a}var s={ln:t.line,pos:t.ch};for(;n>0;)s=r<0?a(e,s.ln,s.pos,r):i(e,s.ln,s.pos,r),n--;return w(s.ln,s.pos)}(e,t,n.repeat,r)},moveByScroll:function(e,t,n,r){var o=e.getScrollInfo(),i=null,a=n.repeat;a||(a=o.clientHeight/(2*e.defaultTextHeight()));var s=e.charCoords(t,"local");if(n.repeat=a,!(i=le.moveByDisplayLines(e,t,n,r)))return null;var c=e.charCoords(i,"local");return e.scrollTo(null,o.top+c.top-s.top),i},moveByWords:function(e,t,n){return function(e,t,n,r,o,i){var a=ye(t),s=[];(r&&!o||!r&&o)&&n++;for(var c=!(r&&o),l=0;l<n;l++){var u=Ve(e,t,r,i,c);if(!u){var h=Me(e,e.lastLine());s.push(r?{line:e.lastLine(),from:h,to:h}:{line:0,from:0,to:0});break}s.push(u),t=w(u.line,r?u.to-1:u.from)}var d=s.length!=n,p=s[0],f=s.pop();return r&&!o?(d||p.from==a.ch&&p.line==a.line||(f=s.pop()),w(f.line,f.from)):r&&o?w(f.line,f.to-1):!r&&o?(d||p.to==a.ch&&p.line==a.line||(f=s.pop()),w(f.line,f.to)):w(f.line,f.from)}(e,t,n.repeat,!!n.forward,!!n.wordEnd,!!n.bigWord)},moveTillCharacter:function(e,t,n){var r=je(e,n.repeat,n.forward,n.selectedCharacter),o=n.forward?-1:1;return Pe(o,n),r?(r.ch+=o,r):null},moveToCharacter:function(e,t,n){var r=n.repeat;return Pe(0,n),je(e,r,n.forward,n.selectedCharacter)||t},moveToSymbol:function(e,t,n){return function(e,t,n,r){var o=ye(e.getCursor()),i=n?1:-1,a=n?e.lineCount():-1,s=o.ch,c=o.line,l=e.getLine(c),u={lineText:l,nextCh:l.charAt(s),lastCh:null,index:s,symb:r,reverseSymb:(n?{")":"(","}":"{"}:{"(":")","{":"}"})[r],forward:n,depth:0,curMoveThrough:!1},h=_e[r];if(!h)return o;var d=He[h].init,p=He[h].isComplete;d&&d(u);for(;c!==a&&t;){if(u.index+=i,u.nextCh=u.lineText.charAt(u.index),!u.nextCh){if(c+=i,u.lineText=e.getLine(c)||"",i>0)u.index=0;else{var f=u.lineText.length;u.index=f>0?f-1:0}u.nextCh=u.lineText.charAt(u.index)}p(u)&&(o.line=c,o.ch=u.index,t--)}if(u.nextCh||u.curMoveThrough)return w(c,u.index);return o}(e,n.repeat,n.forward,n.selectedCharacter)||t},moveToColumn:function(e,t,n,r){var o=n.repeat;return r.lastHPos=o-1,r.lastHSPos=e.charCoords(t,"div").left,function(e,t){var n=e.getCursor().line;return pe(e,w(n,t-1))}(e,o)},moveToEol:function(e,t,n,r){return $e(e,t,n,r,!1)},moveToFirstNonWhiteSpaceCharacter:function(e,t){var n=t;return w(n.line,Ie(e.getLine(n.line)))},moveToMatchedSymbol:function(e,t){for(var n,r=t,o=r.line,i=r.ch,a=e.getLine(o);i<a.length;i++)if((n=a.charAt(i))&&-1!="()[]{}".indexOf(n)){var s=e.getTokenTypeAt(w(o,i+1));if("string"!==s&&"comment"!==s)break}if(i<a.length){var c=/[<>]/.test(a[i])?/[(){}[\]<>]/:/[(){}[\]]/;return e.findMatchingBracket(w(o,i+1),{bracketRegex:c}).to}return r},moveToStartOfLine:function(e,t){return w(t.line,0)},moveToLineOrEdgeOfDocument:function(e,t,n){var r=n.forward?e.lastLine():e.firstLine();return n.repeatIsExplicit&&(r=n.repeat-e.getOption("firstLineNumber")),w(r,Ie(e.getLine(r)))},textObjectManipulation:function(e,t,n,r){var o=n.selectedCharacter;"b"==o?o="(":"B"==o&&(o="{");var i,a=!n.textObjectInner;if({"(":")",")":"(","{":"}","}":"{","[":"]","]":"[","<":">",">":"<"}[o])i=function(e,t,n,r){var o,i,a=t,s={"(":/[()]/,")":/[()]/,"[":/[[\]]/,"]":/[[\]]/,"{":/[{}]/,"}":/[{}]/,"<":/[<>]/,">":/[<>]/}[n],c={"(":"(",")":"(","[":"[","]":"[","{":"{","}":"{","<":"<",">":"<"}[n],l=e.getLine(a.line).charAt(a.ch)===c?1:0;if(o=e.scanForBracket(w(a.line,a.ch+l),-1,void 0,{bracketRegex:s}),i=e.scanForBracket(w(a.line,a.ch+l),1,void 0,{bracketRegex:s}),!o||!i)return{start:a,end:a};if(o=o.pos,i=i.pos,o.line==i.line&&o.ch>i.ch||o.line>i.line){var u=o;o=i,i=u}r?i.ch+=1:o.ch+=1;return{start:o,end:i}}(e,t,o,a);else if({"'":!0,'"':!0,"`":!0}[o])i=function(e,t,n,r){var o,i,a,s,c=ye(t),l=e.getLine(c.line).split(""),u=l.indexOf(n);c.ch<u?c.ch=u:u<c.ch&&l[c.ch]==n&&(i=c.ch,--c.ch);if(l[c.ch]!=n||i)for(a=c.ch;a>-1&&!o;a--)l[a]==n&&(o=a+1);else o=c.ch+1;if(o&&!i)for(a=o,s=l.length;a<s&&!i;a++)l[a]==n&&(i=a);if(!o||!i)return{start:c,end:c};r&&(--o,++i);return{start:w(c.line,o),end:w(c.line,i)}}(e,t,o,a);else if("W"===o)i=Ke(e,a,!0,!0);else if("w"===o)i=Ke(e,a,!0,!1);else if("p"===o)if(i=Fe(e,t,n.repeat,0,a),n.linewise=!0,r.visualMode)r.visualLine||(r.visualLine=!0);else{var s=r.inputState.operatorArgs;s&&(s.linewise=!0),i.end.line--}else{if("t"!==o)return null;i=function(e,t,n){var r=t;if(!m.findMatchingTag||!m.findEnclosingTag)return{start:r,end:r};var o=m.findMatchingTag(e,t)||m.findEnclosingTag(e,t);if(!o||!o.open||!o.close)return{start:r,end:r};if(n)return{start:o.open.from,end:o.close.to};return{start:o.open.to,end:o.close.from}}(e,t,a)}return e.state.vim.visualMode?function(e,t,n){var r,o=e.state.vim.sel,i=o.head,a=o.anchor;ke(n,t)&&(r=n,n=t,t=r);ke(i,a)?(i=we(t,i),a=xe(a,n)):(a=we(t,a),-1==(i=me(i=xe(i,n),0,-1)).ch&&i.line!=e.firstLine()&&(i=w(i.line-1,Me(e,i.line-1))));return[a,i]}(e,i.start,i.end):[i.start,i.end]},repeatLastCharacterSearch:function(e,t,n){var r=Q.lastCharacterSearch,o=n.repeat,i=n.forward===r.forward,a=(r.increment?1:0)*(i?-1:1);e.moveH(-a,"char"),n.inclusive=!!i;var s=je(e,o,i,r.selectedCharacter);return s?(s.ch+=a,s):(e.moveH(a,"char"),t)}};function ue(e,t){for(var n=[],r=0;r<t;r++)n.push(e);return n}var he={change:function(e,t,n){var r,o,i=e.state.vim,a=n[0].anchor,s=n[0].head;if(i.visualMode)if(t.fullLine)s.ch=Number.MAX_VALUE,s.line--,e.setSelection(a,s),o=e.getSelection(),e.replaceSelection(""),r=a;else{o=e.getSelection();var c=ue("",n.length);e.replaceSelections(c),r=we(n[0].head,n[0].anchor)}else{o=e.getRange(a,s);var l=i.lastEditInputState||{};if("moveByWords"==l.motion&&!W(o)){var u=/\s+$/.exec(o);u&&l.motionArgs&&l.motionArgs.forward&&(s=me(s,0,-u[0].length),o=o.slice(0,-u[0].length))}var h=new w(a.line-1,Number.MAX_VALUE),d=e.firstLine()==e.lastLine();s.line>e.lastLine()&&t.linewise&&!d?e.replaceRange("",h,s):e.replaceRange("",a,s),t.linewise&&(d||(e.setCursor(h),m.commands.newlineAndIndent(e)),a.ch=Number.MAX_VALUE),r=a}Q.registerController.pushText(t.registerName,"change",o,t.linewise,n.length>1),de.enterInsertMode(e,{head:r},e.state.vim)},delete:function(e,t,n){var r,o,i=e.state.vim;if(i.visualBlock){o=e.getSelection();var a=ue("",n.length);e.replaceSelections(a),r=n[0].anchor}else{var s=n[0].anchor,c=n[0].head;t.linewise&&c.line!=e.firstLine()&&s.line==e.lastLine()&&s.line==c.line-1&&(s.line==e.firstLine()?s.ch=0:s=w(s.line-1,Me(e,s.line-1))),o=e.getRange(s,c),e.replaceRange("",s,c),r=s,t.linewise&&(r=le.moveToFirstNonWhiteSpaceCharacter(e,s))}return Q.registerController.pushText(t.registerName,"delete",o,t.linewise,i.visualBlock),pe(e,r)},indent:function(e,t,n){var r=e.state.vim,o=n[0].anchor.line,i=r.visualBlock?n[n.length-1].anchor.line:n[0].head.line,a=r.visualMode?t.repeat:1;t.linewise&&i--;for(var s=o;s<=i;s++)for(var c=0;c<a;c++)e.indentLine(s,t.indentRight);return le.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},indentAuto:function(e,t,n){return n.length>1&&e.setSelection(n[0].anchor,n[n.length-1].head),e.execCommand("indentAuto"),le.moveToFirstNonWhiteSpaceCharacter(e,n[0].anchor)},changeCase:function(e,t,n,r,o){for(var i=e.getSelections(),a=[],s=t.toLower,c=0;c<i.length;c++){var l=i[c],u="";if(!0===s)u=l.toLowerCase();else if(!1===s)u=l.toUpperCase();else for(var h=0;h<l.length;h++){var d=l.charAt(h);u+=j(d)?d.toLowerCase():d.toUpperCase()}a.push(u)}return e.replaceSelections(a),t.shouldMoveCursor?o:!e.state.vim.visualMode&&t.linewise&&n[0].anchor.line+1==n[0].head.line?le.moveToFirstNonWhiteSpaceCharacter(e,r):t.linewise?r:we(n[0].anchor,n[0].head)},yank:function(e,t,n,r){var o=e.state.vim,i=e.getSelection(),a=o.visualMode?we(o.sel.anchor,o.sel.head,n[0].head,n[0].anchor):r;return Q.registerController.pushText(t.registerName,"yank",i,t.linewise,o.visualBlock),a}};var de={jumpListWalk:function(e,t,n){if(!n.visualMode){var r=t.repeat,o=t.forward,i=Q.jumpList.move(e,o?r:-r),a=i?i.find():void 0;a=a||e.getCursor(),e.setCursor(a),e.ace.curOp.command.scrollIntoView="center-animate"}},scroll:function(e,t,n){if(!n.visualMode){var r=t.repeat||1,o=e.defaultTextHeight(),i=e.getScrollInfo().top,a=o*r,s=t.forward?i+a:i-a,c=ye(e.getCursor()),l=e.charCoords(c,"local");if(t.forward)s>l.top?(c.line+=(s-l.top)/o,c.line=Math.ceil(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.top)):e.scrollTo(null,s);else{var u=s+e.getScrollInfo().clientHeight;u<l.bottom?(c.line-=(l.bottom-u)/o,c.line=Math.floor(c.line),e.setCursor(c),l=e.charCoords(c,"local"),e.scrollTo(null,l.bottom-e.getScrollInfo().clientHeight)):e.scrollTo(null,s)}}},scrollToCursor:function(e,t){var n=e.getCursor().line,r=e.charCoords(w(n,0),"local"),o=e.getScrollInfo().clientHeight,i=r.top,a=r.bottom-i;switch(t.position){case"center":i=i-o/2+a;break;case"bottom":i=i-o+a}e.scrollTo(null,i)},replayMacro:function(e,t,n){var r=t.selectedCharacter,o=t.repeat,i=Q.macroModeState;for("@"==r?r=i.latestRegister:i.latestRegister=r;o--;)pt(e,n,i,r)},enterMacroRecordMode:function(e,t){var n=Q.macroModeState,r=t.selectedCharacter;Q.registerController.isValidRegister(r)&&n.enterMacroRecordMode(e,r)},toggleOverwrite:function(e){e.state.overwrite?(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})):(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"}))},enterInsertMode:function(e,t,n){if(!e.getOption("readOnly")){n.insertMode=!0,n.insertModeRepeat=t&&t.repeat||1;var r=t?t.insertAt:null,o=n.sel,i=t.head||e.getCursor("head"),a=e.listSelections().length;if("eol"==r)i=w(i.line,Me(e,i.line));else if("bol"==r)i=w(i.line,0);else if("charAfter"==r)i=me(i,0,1);else if("firstNonBlank"==r)i=le.moveToFirstNonWhiteSpaceCharacter(e,i);else if("startOfSelectedArea"==r){if(!n.visualMode)return;n.visualBlock?(i=w(Math.min(o.head.line,o.anchor.line),Math.min(o.head.ch,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line<o.anchor.line?o.head:w(o.anchor.line,0)}else if("endOfSelectedArea"==r){if(!n.visualMode)return;n.visualBlock?(i=w(Math.min(o.head.line,o.anchor.line),Math.max(o.head.ch+1,o.anchor.ch)),a=Math.abs(o.head.line-o.anchor.line)+1):i=o.head.line>=o.anchor.line?me(o.head,0,1):w(o.anchor.line,0)}else if("inplace"==r){if(n.visualMode)return}else"lastEdit"==r&&(i=st(e)||i);e.setOption("disableInput",!1),t&&t.replace?(e.toggleOverwrite(!0),e.setOption("keyMap","vim-replace"),m.signal(e,"vim-mode-change",{mode:"replace"})):(e.toggleOverwrite(!1),e.setOption("keyMap","vim-insert"),m.signal(e,"vim-mode-change",{mode:"insert"})),Q.macroModeState.isPlaying||(e.on("change",ft),m.on(e.getInputField(),"keydown",yt)),n.visualMode&&Be(e),Oe(e,i,a)}},toggleVisualMode:function(e,t,n){var r,o=t.repeat,i=e.getCursor();n.visualMode?n.visualLine^t.linewise||n.visualBlock^t.blockwise?(n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ee(e)):Be(e):(n.visualMode=!0,n.visualLine=!!t.linewise,n.visualBlock=!!t.blockwise,r=pe(e,w(i.line,i.ch+o-1)),n.sel={anchor:i,head:r},m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""}),Ee(e),We(e,n,"<",we(i,r)),We(e,n,">",xe(i,r)))},reselectLastSelection:function(e,t,n){var r=n.lastSelection;if(n.visualMode&&Te(e,n),r){var o=r.anchorMark.find(),i=r.headMark.find();if(!o||!i)return;n.sel={anchor:o,head:i},n.visualMode=!0,n.visualLine=r.visualLine,n.visualBlock=r.visualBlock,Ee(e),We(e,n,"<",we(o,i)),We(e,n,">",xe(o,i)),m.signal(e,"vim-mode-change",{mode:"visual",subMode:n.visualLine?"linewise":n.visualBlock?"blockwise":""})}},joinLines:function(e,t,n){var r,o;if(n.visualMode){if(r=e.getCursor("anchor"),ke(o=e.getCursor("head"),r)){var i=o;o=r,r=i}o.ch=Me(e,o.line)-1}else{var a=Math.max(t.repeat,2);r=e.getCursor(),o=pe(e,w(r.line+a-1,1/0))}for(var s=0,c=r.line;c<o.line;c++){s=Me(e,r.line);i=w(r.line+1,Me(e,r.line+1));var l=e.getRange(r,i);l=t.keepSpaces?l.replace(/\n\r?/g,""):l.replace(/\n\s*/g," "),e.replaceRange(l,r,i)}var u=w(r.line,s);n.visualMode&&Be(e,!1),e.setCursor(u)},newLineAndEnterInsertMode:function(e,t,n){n.insertMode=!0;var r=ye(e.getCursor());r.line!==e.firstLine()||t.after?(r.line=t.after?r.line:r.line-1,r.ch=Me(e,r.line),e.setCursor(r),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e)):(e.replaceRange("\n",w(e.firstLine(),0)),e.setCursor(e.firstLine(),0));this.enterInsertMode(e,{repeat:t.repeat},n)},paste:function(e,t,n){var r=ye(e.getCursor()),o=Q.registerController.getRegister(t.registerName);if(d=o.toString()){if(t.matchIndent){var i=e.getOption("tabSize"),a=function(e){var t=e.split("\t").length-1,n=e.split(" ").length-1;return t*i+1*n},s=e.getLine(e.getCursor().line),c=a(s.match(/^\s*/)[0]),l=d.replace(/\n$/,""),u=d!==l,h=a(d.match(/^\s*/)[0]),d=l.replace(/^\s*/gm,(function(t){var n=c+(a(t)-h);if(n<0)return"";if(e.getOption("indentWithTabs")){var r=Math.floor(n/i);return Array(r+1).join("\t")}return Array(n+1).join(" ")}));d+=u?"\n":""}if(t.repeat>1)d=Array(t.repeat+1).join(d);var p,f,m=o.linewise,g=o.blockwise;if(g){d=d.split("\n"),m&&d.pop();for(var v=0;v<d.length;v++)d[v]=""==d[v]?" ":d[v];r.ch+=t.after?1:0,r.ch=Math.min(Me(e,r.line),r.ch)}else m?n.visualMode?d=n.visualLine?d.slice(0,-1):"\n"+d.slice(0,d.length-1)+"\n":t.after?(d="\n"+d.slice(0,d.length-1),r.ch=Me(e,r.line)):r.ch=0:r.ch+=t.after?1:0;if(n.visualMode){var y;n.lastPastedText=d;var C=function(e,t){var n=t.lastSelection;return t.visualMode?function(){var t=e.listSelections(),n=t[0],r=t[t.length-1];return[ke(n.anchor,n.head)?n.anchor:n.head,ke(r.anchor,r.head)?r.head:r.anchor]}():function(){var t=e.getCursor(),r=e.getCursor(),o=n.visualBlock;if(o){var i=o.width,a=o.height;r=w(t.line+a,t.ch+i);for(var s=[],c=t.line;c<r.line;c++){var l={anchor:w(c,t.ch),head:w(c,r.ch)};s.push(l)}e.setSelections(s)}else{var u=n.anchorMark.find(),h=n.headMark.find(),d=h.line-u.line,p=h.ch-u.ch;r={line:r.line+d,ch:d?r.ch:p+r.ch},n.visualLine&&(t=w(t.line,0),r=w(r.line,Me(e,r.line))),e.setSelection(t,r)}return[t,r]}()}(e,n),k=C[0],x=C[1],S=e.getSelection(),M=e.listSelections(),A=new Array(M.length).join("1").split("1");n.lastSelection&&(y=n.lastSelection.headMark.find()),Q.registerController.unnamedRegister.setText(S),g?(e.replaceSelections(A),x=w(k.line+d.length-1,k.ch),e.setCursor(k),Le(e,x),e.replaceSelections(d),p=k):n.visualBlock?(e.replaceSelections(A),e.setCursor(k),e.replaceRange(d,k,k),p=k):(e.replaceRange(d,k,x),p=e.posFromIndex(e.indexFromPos(k)+d.length-1)),y&&(n.lastSelection.headMark=e.setBookmark(y)),m&&(p.ch=0)}else if(g){e.setCursor(r);for(v=0;v<d.length;v++){var b=r.line+v;b>e.lastLine()&&e.replaceRange("\n",w(b,0)),Me(e,b)<r.ch&&be(e,b,r.ch)}e.setCursor(r),Le(e,w(r.line+d.length-1,r.ch)),e.replaceSelections(d),p=r}else e.replaceRange(d,r),m&&t.after?p=w(r.line+1,Ie(e.getLine(r.line+1))):m&&!t.after?p=w(r.line,Ie(e.getLine(r.line))):!m&&t.after?(f=e.indexFromPos(r),p=e.posFromIndex(f+d.length-1)):(f=e.indexFromPos(r),p=e.posFromIndex(f+d.length));n.visualMode&&Be(e,!1),e.setCursor(p)}},undo:function(e,t){e.operation((function(){ve(e,m.commands.undo,t.repeat)(),e.setCursor(e.getCursor("anchor"))}))},redo:function(e,t){ve(e,m.commands.redo,t.repeat)()},setRegister:function(e,t,n){n.inputState.registerName=t.selectedCharacter},setMark:function(e,t,n){We(e,n,t.selectedCharacter,e.getCursor())},replace:function(e,t,n){var r,o,i=t.selectedCharacter,a=e.getCursor(),s=e.listSelections();if(n.visualMode)a=e.getCursor("start"),o=e.getCursor("end");else{var c=e.getLine(a.line);(r=a.ch+t.repeat)>c.length&&(r=c.length),o=w(a.line,r)}if("\n"==i)n.visualMode||e.replaceRange("",a,o),(m.commands.newlineAndIndentContinueComment||m.commands.newlineAndIndent)(e);else{var l=e.getRange(a,o);if(l=l.replace(/[^\n]/g,i),n.visualBlock){var u=new Array(e.getOption("tabSize")+1).join(" ");l=(l=e.getSelection()).replace(/\t/g,u).replace(/[^\n]/g,i).split("\n"),e.replaceSelections(l)}else e.replaceRange(l,a,o);n.visualMode?(a=ke(s[0].anchor,s[0].head)?s[0].anchor:s[0].head,e.setCursor(a),Be(e,!1)):e.setCursor(me(o,0,-1))}},incrementNumberToken:function(e,t){for(var n,r,o,i,a=e.getCursor(),s=e.getLine(a.line),c=/(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi;null!==(n=c.exec(s))&&(o=(r=n.index)+n[0].length,!(a.ch<o)););if((t.backtrack||!(o<=a.ch))&&n){var l=n[2]||n[4],u=n[3]||n[5],h=t.increase?1:-1,d={"0b":2,0:8,"":10,"0x":16}[l.toLowerCase()];i=(parseInt(n[1]+u,d)+h*t.repeat).toString(d);var p=l?new Array(u.length-i.length+1+n[1].length).join("0"):"";i="-"===i.charAt(0)?"-"+l+p+i.substr(1):l+p+i;var f=w(a.line,r),m=w(a.line,o);e.replaceRange(i,f,m),e.setCursor(w(a.line,r+i.length-1))}},repeatLastEdit:function(e,t,n){if(n.lastEditInputState){var r=t.repeat;r&&t.repeatIsExplicit?n.lastEditInputState.repeatOverride=r:r=n.lastEditInputState.repeatOverride||r,Ct(e,n,r,!1)}},indent:function(e,t){e.indentLine(e.getCursor().line,t.indentRight)},exitInsertMode:ht};function pe(e,t){var n=e.state.vim,r=n.insertMode||n.visualMode,o=Math.min(Math.max(e.firstLine(),t.line),e.lastLine()),i=Me(e,o)-1+!!r,a=Math.min(Math.max(0,t.ch),i);return w(o,a)}function fe(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function me(e,t,n){return"object"==typeof t&&(n=t.ch,t=t.line),w(e.line+t,e.ch+n)}function ge(e,t){if("<character>"==t.slice(-11)){var n=t.length-11,r=e.slice(0,n),o=t.slice(0,n);return r==o&&e.length>n?"full":0==o.indexOf(r)&&"partial"}return e==t?"full":0==t.indexOf(e)&&"partial"}function ve(e,t,n){return function(){for(var r=0;r<n;r++)t(e)}}function ye(e){return w(e.line,e.ch)}function Ce(e,t){return e.ch==t.ch&&e.line==t.line}function ke(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function we(e,t){return arguments.length>2&&(t=we.apply(void 0,Array.prototype.slice.call(arguments,1))),ke(e,t)?e:t}function xe(e,t){return arguments.length>2&&(t=xe.apply(void 0,Array.prototype.slice.call(arguments,1))),ke(e,t)?t:e}function Se(e,t,n){var r=ke(e,t),o=ke(t,n);return r&&o}function Me(e,t){return e.getLine(t).length}function Ae(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function be(e,t,n){var r=Me(e,t),o=new Array(n-r+1).join(" ");e.setCursor(w(t,r)),e.replaceRange(o,e.getCursor())}function Le(e,t){var n=[],r=e.listSelections(),o=ye(e.clipPos(t)),i=!Ce(t,o),a=function(e,t,n){for(var r=0;r<e.length;r++){var o="head"!=n&&Ce(e[r].anchor,t),i="anchor"!=n&&Ce(e[r].head,t);if(o||i)return r}return-1}(r,e.getCursor("head")),s=Ce(r[a].head,r[a].anchor),c=r.length-1,l=c-a>a?c:0,u=r[l].anchor,h=Math.min(u.line,o.line),d=Math.max(u.line,o.line),p=u.ch,f=o.ch,m=r[l].head.ch-p,g=f-p;m>0&&g<=0?(p++,i||f--):m<0&&g>=0?(p--,s||f++):m<0&&-1==g&&(p--,f++);for(var v=h;v<=d;v++){var y={anchor:new w(v,p),head:new w(v,f)};n.push(y)}return e.setSelections(n),t.ch=f,u.ch=p,u}function Oe(e,t,n){for(var r=[],o=0;o<n;o++){var i=me(t,o,0);r.push({anchor:i,head:i})}e.setSelections(r,0)}function Te(e,t){var n=t.sel.anchor,r=t.sel.head;t.lastPastedText&&(r=e.posFromIndex(e.indexFromPos(n)+t.lastPastedText.length),t.lastPastedText=null),t.lastSelection={anchorMark:e.setBookmark(n),headMark:e.setBookmark(r),anchor:ye(n),head:ye(r),visualMode:t.visualMode,visualLine:t.visualLine,visualBlock:t.visualBlock}}function Ee(e,t,n){var r=e.state.vim,o=Re(e,t=t||r.sel,n=n||r.visualLine?"line":r.visualBlock?"block":"char");e.setSelections(o.ranges,o.primary)}function Re(e,t,n,r){var o=ye(t.head),i=ye(t.anchor);if("char"==n){var a=r||ke(t.head,t.anchor)?0:1,s=ke(t.head,t.anchor)?1:0;return o=me(t.head,0,a),{ranges:[{anchor:i=me(t.anchor,0,s),head:o}],primary:0}}if("line"==n){if(ke(t.head,t.anchor))o.ch=0,i.ch=Me(e,i.line);else{i.ch=0;var c=e.lastLine();o.line>c&&(o.line=c),o.ch=Me(e,o.line)}return{ranges:[{anchor:i,head:o}],primary:0}}if("block"==n){for(var l=Math.min(i.line,o.line),u=Math.min(i.ch,o.ch),h=Math.max(i.line,o.line),d=Math.max(i.ch,o.ch)+1,p=h-l+1,f=o.line==l?0:p-1,m=[],g=0;g<p;g++)m.push({anchor:w(l+g,u),head:w(l+g,d)});return{ranges:m,primary:f}}}function Be(e,t){var n=e.state.vim;!1!==t&&e.setCursor(pe(e,n.sel.head)),Te(e,n),n.visualMode=!1,n.visualLine=!1,n.visualBlock=!1,n.insertMode||m.signal(e,"vim-mode-change",{mode:"normal"})}function Ie(e){if(!e)return 0;var t=e.search(/\S/);return-1==t?e.length:t}function Ke(e,t,n,r,o){for(var i=function(e){var t=e.getCursor("head");return 1==e.getSelection().length&&(t=we(t,e.getCursor("anchor"))),t}(e),a=e.getLine(i.line),s=i.ch,c=o?E[0]:R[0];!c(a.charAt(s));)if(++s>=a.length)return null;r?c=R[0]:(c=E[0])(a.charAt(s))||(c=E[1]);for(var l=s,u=s;c(a.charAt(l))&&l<a.length;)l++;for(;c(a.charAt(u))&&u>=0;)u--;if(u++,t){for(var h=l;/\s/.test(a.charAt(l))&&l<a.length;)l++;if(h==l){for(var d=u;/\s/.test(a.charAt(u-1))&&u>0;)u--;u||(u=d)}}return{start:w(i.line,u),end:w(i.line,l)}}function Ne(e,t,n){Ce(t,n)||Q.jumpList.add(e,t,n)}function Pe(e,t){Q.lastCharacterSearch.increment=e,Q.lastCharacterSearch.forward=t.forward,Q.lastCharacterSearch.selectedCharacter=t.selectedCharacter}var _e={"(":"bracket",")":"bracket","{":"bracket","}":"bracket","[":"section","]":"section","*":"comment","/":"comment",m:"method",M:"method","#":"preprocess"},He={bracket:{isComplete:function(e){if(e.nextCh===e.symb){if(e.depth++,e.depth>=1)return!0}else e.nextCh===e.reverseSymb&&e.depth--;return!1}},section:{init:function(e){e.curMoveThrough=!0,e.symb=(e.forward?"]":"[")===e.symb?"{":"}"},isComplete:function(e){return 0===e.index&&e.nextCh===e.symb}},comment:{isComplete:function(e){var t="*"===e.lastCh&&"/"===e.nextCh;return e.lastCh=e.nextCh,t}},method:{init:function(e){e.symb="m"===e.symb?"{":"}",e.reverseSymb="{"===e.symb?"}":"{"},isComplete:function(e){return e.nextCh===e.symb}},preprocess:{init:function(e){e.index=0},isComplete:function(e){if("#"===e.nextCh){var t=e.lineText.match(/^#(\w+)/)[1];if("endif"===t){if(e.forward&&0===e.depth)return!0;e.depth++}else if("if"===t){if(!e.forward&&0===e.depth)return!0;e.depth--}if("else"===t&&0===e.depth)return!0}return!1}}};function Ve(e,t,n,r,o){var i=t.line,a=t.ch,s=e.getLine(i),c=n?1:-1,l=r?R:E;if(o&&""==s){if(i+=c,s=e.getLine(i),!V(e,i))return null;a=n?0:s.length}for(;;){if(o&&""==s)return{from:0,to:0,line:i};for(var u=c>0?s.length:-1,h=u,d=u;a!=u;){for(var p=!1,f=0;f<l.length&&!p;++f)if(l[f](s.charAt(a))){for(h=a;a!=u&&l[f](s.charAt(a));)a+=c;if(p=h!=(d=a),h==t.ch&&i==t.line&&d==h+c)continue;return{from:Math.min(h,d+1),to:Math.max(h,d),line:i}}p||(a+=c)}if(!V(e,i+=c))return null;s=e.getLine(i),a=c>0?0:s.length}}function $e(e,t,n,r,o){var i=w(t.line+n.repeat-1,1/0),a=e.clipPos(i);return a.ch--,o||(r.lastHPos=1/0,r.lastHSPos=e.charCoords(a,"div").left),i}function je(e,t,n,r){for(var o,i=e.getCursor(),a=i.ch,s=0;s<t;s++){if(-1==(o=De(a,e.getLine(i.line),r,n,!0)))return null;a=o}return w(e.getCursor().line,o)}function We(e,t,n,r){F(n,_)&&(t.marks[n]&&t.marks[n].clear(),t.marks[n]=e.setBookmark(r))}function De(e,t,n,r,o){var i;return r?-1==(i=t.indexOf(n,e+1))||o||(i-=1):-1==(i=t.lastIndexOf(n,e-1))||o||(i+=1),i}function Fe(e,t,n,r,o){var i,a=t.line,s=e.firstLine(),c=e.lastLine(),l=a;function u(t){return!/\S/.test(e.getLine(t))}function h(e,t,n){return n?u(e)!=u(e+t):!u(e)&&u(e+t)}function d(t){r=r>0?1:-1;var n=e.ace.session.getFoldLine(t);n&&t+r>n.start.row&&t+r<n.end.row&&(r=(r>0?n.end.row:n.start.row)-t)}if(r){for(;s<=l&&l<=c&&n>0;)d(l),h(l,r)&&n--,l+=r;return new w(l,0)}var p=e.state.vim;if(p.visualLine&&h(a,1,!0)){var f=p.sel.anchor;h(f.line,-1,!0)&&(o&&f.line==a||(a+=1))}var m=u(a);for(l=a;l<=c&&n;l++)h(l,1,!0)&&(o&&u(l)==m||n--);for(i=new w(l,0),l>c&&!m?m=!0:o=!1,l=a;l>s&&(o&&u(l)!=m&&l!=a||!h(l,-1,!0));l--);return{start:new w(l,0),end:i}}function Ue(){}function ze(e){var t=e.state.vim;return t.searchState_||(t.searchState_=new Ue)}function Je(e,t){var n=qe(e,t)||[];if(!n.length)return[];var r=[];if(0===n[0]){for(var o=0;o<n.length;o++)"number"==typeof n[o]&&r.push(e.substring(n[o]+1,n[o+1]));return r}}function qe(e,t){t||(t="/");for(var n=!1,r=[],o=0;o<e.length;o++){var i=e.charAt(o);n||i!=t||r.push(o),n=!n&&"\\"==i}return r}z("pcre",!0,"boolean"),Ue.prototype={getQuery:function(){return Q.query},setQuery:function(e){Q.query=e},getOverlay:function(){return this.searchOverlay},setOverlay:function(e){this.searchOverlay=e},isReversed:function(){return Q.isReversed},setReversed:function(e){Q.isReversed=e},getScrollbarAnnotate:function(){return this.annotate},setScrollbarAnnotate:function(e){this.annotate=e}};var Qe={"\\n":"\n","\\r":"\r","\\t":"\t"};var Ge={"\\/":"/","\\\\":"\\","\\n":"\n","\\r":"\r","\\t":"\t","\\&":"&"};function Xe(e,t,n){if(Q.registerController.getRegister("/").setText(e),e instanceof RegExp)return e;var r,o,i=qe(e,"/");i.length?(r=e.substring(0,i[0]),o=-1!=e.substring(i[0]).indexOf("i")):r=e;return r?(q("pcre")||(r=function(e){for(var t=!1,n=[],r=-1;r<e.length;r++){var o=e.charAt(r)||"",i=e.charAt(r+1)||"",a=i&&-1!="|(){".indexOf(i);t?("\\"===o&&a||n.push(o),t=!1):"\\"===o?(t=!0,i&&-1!="}".indexOf(i)&&(a=!0),a&&"\\"!==i||n.push(o)):(n.push(o),a&&"\\"!==i&&n.push("\\"))}return n.join("")}(r)),n&&(t=/^[^A-Z]*$/.test(r)),new RegExp(r,t||o?"im":"m")):null}function Ze(e){"string"==typeof e&&(e=document.createElement(e));for(var t,n=1;n<arguments.length;n++)if(t=arguments[n])if("object"!=typeof t&&(t=document.createTextNode(t)),t.nodeType)e.appendChild(t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&("$"===r[0]?e.style[r.slice(1)]=t[r]:e.setAttribute(r,t[r]));return e}function Ye(e,t){var n=Ze("span",{$color:"red",$whiteSpace:"pre"},t);e.openNotification?e.openNotification(n,{bottom:!0,duration:5e3}):alert(n.innerText)}function et(e,t){var n,r,o=(t.prefix||"")+" "+(t.desc||""),i=(n=t.prefix,r=t.desc,Ze(document.createDocumentFragment(),Ze("span",{$fontFamily:"monospace",$whiteSpace:"pre"},n,Ze("input",{type:"text",autocorrect:"off",autocapitalize:"off",spellcheck:"false"})),r&&Ze("span",{$color:"#888"},r)));e.openDialog?e.openDialog(i,t.onClose,{onKeyDown:t.onKeyDown,onKeyUp:t.onKeyUp,bottom:!0,selectValueOnOpen:!1,value:t.value}):t.onClose(prompt(o,""))}function tt(e,t,n,r){if(t){var o=ze(e),i=Xe(t,!!n,!!r);if(i)return nt(e,i),function(e,t){if(e instanceof RegExp&&t instanceof RegExp){for(var n=["global","multiline","ignoreCase","source"],r=0;r<n.length;r++){var o=n[r];if(e[o]!==t[o])return!1}return!0}return!1}(i,o.getQuery())||o.setQuery(i),i}}function nt(e,t){var n=ze(e),r=n.getOverlay();r&&t==r.query||(r&&e.removeOverlay(r),r=function(e){if("^"==e.source.charAt(0))var t=!0;return{token:function(n){if(!t||n.sol()){var r=n.match(e,!1);if(r)return 0==r[0].length?(n.next(),"searching"):n.sol()||(n.backUp(1),e.exec(n.next()+r[0]))?(n.match(e),"searching"):(n.next(),null);for(;!n.eol()&&(n.next(),!n.match(e,!1)););}else n.skipToEnd()},query:e}}(t),e.addOverlay(r),e.showMatchesOnScrollbar&&(n.getScrollbarAnnotate()&&n.getScrollbarAnnotate().clear(),n.setScrollbarAnnotate(e.showMatchesOnScrollbar(t))),n.setOverlay(r))}function rt(e,t,n,r){return void 0===r&&(r=1),e.operation((function(){for(var o=e.getCursor(),i=e.getSearchCursor(n,o),a=0;a<r;a++){var s=i.find(t);if(0==a&&s&&Ce(i.from(),o)){var c=t?i.from():i.to();(s=i.find(t))&&!s[0]&&Ce(i.from(),c)&&e.getLine(c.line).length==c.ch&&(s=i.find(t))}if(!s&&!(i=e.getSearchCursor(n,t?w(e.lastLine()):w(e.firstLine(),0))).find(t))return}return i.from()}))}function ot(e){var t=ze(e);e.removeOverlay(ze(e).getOverlay()),t.setOverlay(null),t.getScrollbarAnnotate()&&(t.getScrollbarAnnotate().clear(),t.setScrollbarAnnotate(null))}function it(e){var t=e.ace.renderer;return{top:t.getFirstFullyVisibleRow(),bottom:t.getLastFullyVisibleRow()}}function at(e,t,n){if("'"==n||"`"==n)return Q.jumpList.find(e,-1)||w(0,0);if("."==n)return st(e);var r=t.marks[n];return r&&r.find()}function st(e){var t=e.ace.session.$undoManager;if(t&&t.$lastDelta)return v(t.$lastDelta.end)}var ct=function(){this.buildCommandMap_()};ct.prototype={processCommand:function(e,t,n){var r=this;e.operation((function(){e.curOp.isVimOp=!0,r._processCommand(e,t,n)}))},_processCommand:function(e,t,n){var r=e.state.vim,o=Q.registerController.getRegister(":"),i=o.toString();r.visualMode&&Be(e);var a=new m.StringStream(t);o.setText(t);var s,c,l=n||{};l.input=t;try{this.parseInput_(e,a,l)}catch(t){throw Ye(e,t.toString()),t}if(l.commandName){if(s=this.matchCommand_(l.commandName)){if(c=s.name,s.excludeFromCommandHistory&&o.setText(i),this.parseCommandArgs_(a,l,s),"exToKey"==s.type){for(var u=0;u<s.toKeys.length;u++)m.Vim.handleKey(e,s.toKeys[u],"mapping");return}if("exToEx"==s.type)return void this.processCommand(e,s.toInput)}}else void 0!==l.line&&(c="move");if(c)try{lt[c](e,l),s&&s.possiblyAsync||!l.callback||l.callback()}catch(t){throw Ye(e,t.toString()),t}else Ye(e,'Not an editor command ":'+t+'"')},parseInput_:function(e,t,n){t.eatWhile(":"),t.eat("%")?(n.line=e.firstLine(),n.lineEnd=e.lastLine()):(n.line=this.parseLineSpec_(e,t),void 0!==n.line&&t.eat(",")&&(n.lineEnd=this.parseLineSpec_(e,t)));var r=t.match(/^(\w+|!!|@@|[!#&*<=>@~])/);return n.commandName=r?r[1]:t.match(/.*/)[0],n},parseLineSpec_:function(e,t){var n=t.match(/^(\d+)/);if(n)return parseInt(n[1],10)-1;switch(t.next()){case".":return this.parseLineSpecOffset_(t,e.getCursor().line);case"$":return this.parseLineSpecOffset_(t,e.lastLine());case"'":var r=t.next(),o=at(e,e.state.vim,r);if(!o)throw new Error("Mark not set");return this.parseLineSpecOffset_(t,o.line);case"-":case"+":return t.backUp(1),this.parseLineSpecOffset_(t,e.getCursor().line);default:return void t.backUp(1)}},parseLineSpecOffset_:function(e,t){var n=e.match(/^([+-])?(\d+)/);if(n){var r=parseInt(n[2],10);"-"==n[1]?t-=r:t+=r}return t},parseCommandArgs_:function(e,t,n){if(!e.eol()){t.argString=e.match(/.*/)[0];var r=n.argDelimiter||/\s+/,o=Ae(t.argString).split(r);o.length&&o[0]&&(t.args=o)}},matchCommand_:function(e){for(var t=e.length;t>0;t--){var n=e.substring(0,t);if(this.commandMap_[n]){var r=this.commandMap_[n];if(0===r.name.indexOf(e))return r}}return null},buildCommandMap_:function(){this.commandMap_={};for(var e=0;e<k.length;e++){var t=k[e],n=t.shortName||t.name;this.commandMap_[n]=t}},map:function(e,t,n){if(":"!=e&&":"==e.charAt(0)){if(n)throw Error("Mode not supported for ex mappings");var r=e.substring(1);":"!=t&&":"==t.charAt(0)?this.commandMap_[r]={name:r,type:"exToEx",toInput:t.substring(1),user:!0}:this.commandMap_[r]={name:r,type:"exToKey",toKeys:t,user:!0}}else if(":"!=t&&":"==t.charAt(0)){var o={keys:e,type:"keyToEx",exArgs:{input:t.substring(1)}};n&&(o.context=n),y.unshift(o)}else{o={keys:e,type:"keyToKey",toKeys:t};n&&(o.context=n),y.unshift(o)}},unmap:function(e,t){if(":"!=e&&":"==e.charAt(0)){if(t)throw Error("Mode not supported for ex mappings");var n=e.substring(1);if(this.commandMap_[n]&&this.commandMap_[n].user)return void delete this.commandMap_[n]}else for(var r=e,o=0;o<y.length;o++)if(r==y[o].keys&&y[o].context===t)return void y.splice(o,1)}};var lt={colorscheme:function(e,t){!t.args||t.args.length<1?Ye(e,e.getOption("theme")):e.setOption("theme",t.args[0])},map:function(e,t,n){var r=t.args;!r||r.length<2?e&&Ye(e,"Invalid mapping: "+t.input):ut.map(r[0],r[1],n)},imap:function(e,t){this.map(e,t,"insert")},nmap:function(e,t){this.map(e,t,"normal")},vmap:function(e,t){this.map(e,t,"visual")},unmap:function(e,t,n){var r=t.args;!r||r.length<1?e&&Ye(e,"No such mapping: "+t.input):ut.unmap(r[0],n)},move:function(e,t){ce.processCommand(e,e.state.vim,{type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0},repeatOverride:t.line+1})},set:function(e,t){var n=t.args,r=t.setCfg||{};if(!n||n.length<1)e&&Ye(e,"Invalid mapping: "+t.input);else{var o=n[0].split("="),i=o[0],a=o[1],s=!1;if("?"==i.charAt(i.length-1)){if(a)throw Error("Trailing characters: "+t.argString);i=i.substring(0,i.length-1),s=!0}void 0===a&&"no"==i.substring(0,2)&&(i=i.substring(2),a=!1);var c=U[i]&&"boolean"==U[i].type;if(c&&null==a&&(a=!0),!c&&void 0===a||s){var l=q(i,e,r);l instanceof Error?Ye(e,l.message):Ye(e,!0===l||!1===l?" "+(l?"":"no")+i:" "+i+"="+l)}else{var u=J(i,a,e,r);u instanceof Error&&Ye(e,u.message)}}},setlocal:function(e,t){t.setCfg={scope:"local"},this.set(e,t)},setglobal:function(e,t){t.setCfg={scope:"global"},this.set(e,t)},registers:function(e,t){var n=t.args,r=Q.registerController.registers,o="----------Registers----------\n\n";if(n){n=n.join("");for(var i=0;i<n.length;i++){if(a=n.charAt(i),Q.registerController.isValidRegister(a))o+='"'+a+" "+(r[a]||new ie).toString()+"\n"}}else for(var a in r){var s=r[a].toString();s.length&&(o+='"'+a+" "+s+"\n")}Ye(e,o)},sort:function(e,t){var n,r,o,i,a;var s=function(){if(t.argString){var e=new m.StringStream(t.argString);if(e.eat("!")&&(n=!0),e.eol())return;if(!e.eatSpace())return"Invalid arguments";var s=e.match(/([dinuox]+)?\s*(\/.+\/)?\s*/);if(!s&&!e.eol())return"Invalid arguments";if(s[1]){r=-1!=s[1].indexOf("i"),o=-1!=s[1].indexOf("u");var c=-1!=s[1].indexOf("d")||-1!=s[1].indexOf("n")&&1,l=-1!=s[1].indexOf("x")&&1,u=-1!=s[1].indexOf("o")&&1;if(c+l+u>1)return"Invalid arguments";i=(c?"decimal":l&&"hex")||u&&"octal"}s[2]&&(a=new RegExp(s[2].substr(1,s[2].length-2),r?"i":""))}}();if(s)Ye(e,s+": "+t.argString);else{var c=t.line||e.firstLine(),l=t.lineEnd||t.line||e.lastLine();if(c!=l){var u=w(c,0),h=w(l,Me(e,l)),d=e.getRange(u,h).split("\n"),p=a||("decimal"==i?/(-?)([\d]+)/:"hex"==i?/(-?)(?:0x)?([0-9a-f]+)/i:"octal"==i?/([0-7]+)/:null),f="decimal"==i?10:"hex"==i?16:"octal"==i?8:null,g=[],v=[];if(i||a)for(var y=0;y<d.length;y++){var C=a?d[y].match(a):null;C&&""!=C[0]?g.push(C):!a&&p.exec(d[y])?g.push(d[y]):v.push(d[y])}else v=d;if(g.sort(a?function(e,t){var o;return n&&(o=e,e=t,t=o),r&&(e[0]=e[0].toLowerCase(),t[0]=t[0].toLowerCase()),e[0]<t[0]?-1:1}:S),a)for(y=0;y<g.length;y++)g[y]=g[y].input;else i||v.sort(S);if(d=n?g.concat(v):v.concat(g),o){var k,x=d;d=[];for(y=0;y<x.length;y++)x[y]!=k&&d.push(x[y]),k=x[y]}e.replaceRange(d.join("\n"),u,h)}}function S(e,t){var o;n&&(o=e,e=t,t=o);r&&(e=e.toLowerCase(),t=t.toLowerCase());var a=i&&p.exec(e),s=i&&p.exec(t);return a?(a=parseInt((a[1]+a[2]).toLowerCase(),f))-(s=parseInt((s[1]+s[2]).toLowerCase(),f)):e<t?-1:1}},vglobal:function(e,t){this.global(e,t)},global:function(e,t){var n=t.argString;if(n){var r,o="v"===t.commandName[0],i=void 0!==t.line?t.line:e.firstLine(),a=t.lineEnd||t.line||e.lastLine(),s=function(e){return Je(e,"/")}(n),c=n;if(s.length&&(c=s[0],r=s.slice(1,s.length).join("/")),c)try{tt(e,c,!0,!0)}catch(t){return void Ye(e,"Invalid regex: "+c)}for(var l=ze(e).getQuery(),u=[],h=i;h<=a;h++){var d=e.getLineHandle(h);l.test(d.text)!==o&&u.push(r?d:d.text)}if(r){var p=0,f=function(){if(p<u.length){var t=u[p++],n=e.getLineNumber(t);if(null==n)return void f();var o=n+1+r;ut.processCommand(e,o,{callback:f})}};f()}else Ye(e,u.join("\n"))}else Ye(e,"Regular Expression missing from global")},substitute:function(e,t){if(!e.getSearchCursor)throw new Error("Search feature not available. Requires searchcursor.js or any other getSearchCursor implementation.");var n,r,o,i,a=t.argString,s=a?Je(a,a[0]):[],c="",l=!1,u=!1;if(s.length)n=s[0],q("pcre")&&""!==n&&(n=new RegExp(n).source),void 0!==(c=s[1])&&(c=q("pcre")?function(e){for(var t=new m.StringStream(e),n=[];!t.eol();){for(;t.peek()&&"\\"!=t.peek();)n.push(t.next());var r=!1;for(var o in Ge)if(t.match(o,!0)){r=!0,n.push(Ge[o]);break}r||n.push(t.next())}return n.join("")}(c.replace(/([^\\])&/g,"$1$$&")):function(e){for(var t,n=!1,r=[],o=-1;o<e.length;o++){var i=e.charAt(o)||"",a=e.charAt(o+1)||"";Qe[i+a]?(r.push(Qe[i+a]),o++):n?(r.push(i),n=!1):"\\"===i?(n=!0,t=a,T.test(t)||"$"===a?r.push("$"):"/"!==a&&"\\"!==a&&r.push("\\")):("$"===i&&r.push("$"),r.push(i),"/"===a&&r.push("\\"))}return r.join("")}(c),Q.lastSubstituteReplacePart=c),r=s[2]?s[2].split(" "):[];else if(a&&a.length)return void Ye(e,"Substitutions should be of the form :s/pattern/replace/");if(r&&(o=r[0],i=parseInt(r[1]),o&&(-1!=o.indexOf("c")&&(l=!0),-1!=o.indexOf("g")&&(u=!0),n=q("pcre")?n+"/"+o:n.replace(/\//g,"\\/")+"/"+o)),n)try{tt(e,n,!0,!0)}catch(t){return void Ye(e,"Invalid regex: "+n)}if(void 0!==(c=c||Q.lastSubstituteReplacePart)){var h=ze(e).getQuery(),d=void 0!==t.line?t.line:e.getCursor().line,p=t.lineEnd||d;d==e.firstLine()&&p==e.lastLine()&&(p=1/0),i&&(p=(d=p)+i-1);var f=pe(e,w(d,0)),g=e.getSearchCursor(h,f);!function(e,t,n,r,o,i,a,s,c){e.state.vim.exMode=!0;var l,u,h,d=!1;function p(){e.operation((function(){for(;!d;)f(),g();v()}))}function f(){var t=e.getRange(i.from(),i.to()).replace(a,s),n=i.to().line;i.replace(t),u=i.to().line,o+=u-n,h=u<n}function g(){for(;c=void 0,p=void 0,c=l&&ye(i.to()),(p=i.findNext())&&!p[0]&&c&&Ce(i.from(),c)&&(p=i.findNext()),p&&(t=i.from(),a=r,s=o,"number"!=typeof t&&(t=t.line),a instanceof Array?F(t,a):"number"==typeof s?t>=a&&t<=s:t==a);)if(n||i.from().line!=u||h)return e.scrollIntoView(i.from(),30),e.setSelection(i.from(),i.to()),l=i.from(),void(d=!1);var t,a,s,c,p;d=!0}function v(t){if(t&&t(),e.focus(),l){e.setCursor(l);var n=e.state.vim;n.exMode=!1,n.lastHPos=n.lastHSPos=l.ch}c&&c()}if(g(),d)return void Ye(e,"No matches for "+a.source);if(!t)return p(),void(c&&c());et(e,{prefix:Ze("span","replace with ",Ze("strong",s)," (y/n/a/q/l)"),onKeyDown:function(t,n,r){switch(m.e_stop(t),m.keyName(t)){case"Y":f(),g();break;case"N":g();break;case"A":var o=c;c=void 0,e.operation(p),c=o;break;case"L":f();case"Q":case"Esc":case"Ctrl-C":case"Ctrl-[":v(r)}return d&&v(r),!0}})}(e,l,u,d,p,g,h,c,t.callback)}else Ye(e,"No previous substitute regular expression")},redo:m.commands.redo,undo:m.commands.undo,write:function(e){m.commands.save?m.commands.save(e):e.save&&e.save()},nohlsearch:function(e){ot(e)},yank:function(e){var t=ye(e.getCursor()).line,n=e.getLine(t);Q.registerController.pushText("0","yank",n,!0,!0)},delmarks:function(e,t){if(t.argString&&Ae(t.argString))for(var n=e.state.vim,r=new m.StringStream(Ae(t.argString));!r.eol();){r.eatSpace();var o=r.pos;if(!r.match(/[a-zA-Z]/,!1))return void Ye(e,"Invalid argument: "+t.argString.substring(o));var i=r.next();if(r.match("-",!0)){if(!r.match(/[a-zA-Z]/,!1))return void Ye(e,"Invalid argument: "+t.argString.substring(o));var a=i,s=r.next();if(!($(a)&&$(s)||j(a)&&j(s)))return void Ye(e,"Invalid argument: "+a+"-");var c=a.charCodeAt(0),l=s.charCodeAt(0);if(c>=l)return void Ye(e,"Invalid argument: "+t.argString.substring(o));for(var u=0;u<=l-c;u++){var h=String.fromCharCode(c+u);delete n.marks[h]}}else delete n.marks[i]}else Ye(e,"Argument required")}},ut=new ct;function ht(e){var t=e.state.vim,n=Q.macroModeState,r=Q.registerController.getRegister("."),o=n.isPlaying,i=n.lastInsertModeChanges;o||(e.off("change",ft),m.off(e.getInputField(),"keydown",yt)),!o&&t.insertModeRepeat>1&&(Ct(e,t,t.insertModeRepeat-1,!0),t.lastEditInputState.repeatOverride=t.insertModeRepeat),delete t.insertModeRepeat,t.insertMode=!1,e.setCursor(e.getCursor().line,e.getCursor().ch-1),e.setOption("keyMap","vim"),e.setOption("disableInput",!0),e.toggleOverwrite(!1),r.setText(i.changes.join("")),m.signal(e,"vim-mode-change",{mode:"normal"}),n.isRecording&&function(e){if(e.isPlaying)return;var t=e.latestRegister,n=Q.registerController.getRegister(t);n&&n.pushInsertModeChanges&&n.pushInsertModeChanges(e.lastInsertModeChanges)}(n)}function dt(e){y.unshift(e)}function pt(e,t,n,r){var o=Q.registerController.getRegister(r);if(":"==r)return o.keyBuffer[0]&&ut.processCommand(e,o.keyBuffer[0]),void(n.isPlaying=!1);var i=o.keyBuffer,a=0;n.isPlaying=!0,n.replaySearchQueries=o.searchQueries.slice(0);for(var s=0;s<i.length;s++)for(var c,l,u=i[s];u;)if(l=(c=/<\w+-.+?>|<\w+>|./.exec(u))[0],u=u.substring(c.index+l.length),m.Vim.handleKey(e,l,"macro"),t.insertMode){var h=o.insertModeChanges[a++].changes;Q.macroModeState.lastInsertModeChanges.changes=h,kt(e,h,1),ht(e)}n.isPlaying=!1}function ft(e,t){var n=Q.macroModeState,r=n.lastInsertModeChanges;if(!n.isPlaying)for(;t;){if(r.expectCursorActivityForChange=!0,r.ignoreCount>1)r.ignoreCount--;else if("+input"==t.origin||"paste"==t.origin||void 0===t.origin){var o=e.listSelections().length;o>1&&(r.ignoreCount=o);var i=t.text.join("\n");r.maybeReset&&(r.changes=[],r.maybeReset=!1),i&&(e.state.overwrite&&!/\n/.test(i)?r.changes.push([i]):r.changes.push(i))}t=t.next}}function mt(e){var t=e.state.vim;if(t.insertMode){var n=Q.macroModeState;if(n.isPlaying)return;var r=n.lastInsertModeChanges;r.expectCursorActivityForChange?r.expectCursorActivityForChange=!1:r.maybeReset=!0}else e.curOp.isVimOp||gt(e,t);t.visualMode}function gt(e,t,n){var r=e.getCursor("anchor"),o=e.getCursor("head");if(t.visualMode&&!e.somethingSelected()?Be(e,!1):t.visualMode||t.insertMode||!e.somethingSelected()||(t.visualMode=!0,t.visualLine=!1,m.signal(e,"vim-mode-change",{mode:"visual"})),t.visualMode){var i=ke(o,r)?0:-1,a=ke(o,r)?-1:0;o=me(o,0,i),r=me(r,0,a),t.sel={anchor:r,head:o},We(e,t,"<",we(o,r)),We(e,t,">",xe(o,r))}else t.insertMode||n||(t.lastHPos=e.getCursor().ch)}function vt(e){this.keyName=e}function yt(e){var t=Q.macroModeState.lastInsertModeChanges,n=m.keyName(e);n&&(-1==n.indexOf("Delete")&&-1==n.indexOf("Backspace")||m.lookupKey(n,"vim-insert",(function(){return t.maybeReset&&(t.changes=[],t.maybeReset=!1),t.changes.push(new vt(n)),!0})))}function Ct(e,t,n,r){var o=Q.macroModeState;o.isPlaying=!0;var i=!!t.lastEditActionCommand,a=t.inputState;function s(){i?ce.processAction(e,t,t.lastEditActionCommand):ce.evalInput(e,t)}function c(n){if(o.lastInsertModeChanges.changes.length>0){n=t.lastEditActionCommand?n:1;var r=o.lastInsertModeChanges;kt(e,r.changes,n)}}if(t.inputState=t.lastEditInputState,i&&t.lastEditActionCommand.interlaceInsertRepeat)for(var l=0;l<n;l++)s(),c(1);else r||s(),c(n);t.inputState=a,t.insertMode&&!r&&ht(e),o.isPlaying=!1}function kt(e,t,n){function r(t){return"string"==typeof t?m.commands[t](e):t(e),!0}var o=e.getCursor("head"),i=Q.macroModeState.lastInsertModeChanges.visualBlock;i&&(Oe(e,o,i+1),n=e.listSelections().length,e.setCursor(o));for(var a=0;a<n;a++){i&&e.setCursor(me(o,a,0));for(var s=0;s<t.length;s++){var c=t[s];if(c instanceof vt)m.lookupKey(c.keyName,"vim-insert",r);else if("string"==typeof c){var l=e.getCursor();e.replaceRange(c,l,l)}else{var u=e.getCursor(),h=me(u,0,c[0].length);e.replaceRange(c[0],u,h)}}}i&&e.setCursor(me(o,0,1))}m.keyMap.vim={attach:M,detach:S,call:A},z("insertModeEscKeysTimeout",200,"number"),m.keyMap["vim-insert"]={fallthrough:["default"],attach:M,detach:S,call:A},m.keyMap["vim-replace"]={Backspace:"goCharLeft",fallthrough:["vim-insert"],attach:M,detach:S,call:A},te(),m.Vim=x();var wt={return:"CR",backspace:"BS",delete:"Del",esc:"Esc",left:"Left",right:"Right",up:"Up",down:"Down",space:"Space",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",enter:"CR"};var xt=(x=m.Vim).handleKey.bind(x);function St(e){var t=new e.constructor;return Object.keys(e).forEach((function(n){var r=e[n];Array.isArray(r)?r=r.slice():r&&"object"==typeof r&&r.constructor!=Object&&(r=St(r)),t[n]=r})),e.sel&&(t.sel={head:e.sel.head&&ye(e.sel.head),anchor:e.sel.anchor&&ye(e.sel.anchor)}),t}x.handleKey=function(e,t,n){return e.operation((function(){return xt(e,t,n)}),!0)},t.CodeMirror=m;var Mt=x.maybeInitVimState_;function At(e,t){t.off("beforeEndOperation",At);var n=t.state.cm.vimCmd;n&&t.execCommand(n.exec?n:n.name,n.args),t.curOp=t.prevOp}t.handler={$id:"ace/keyboard/vim",drawCursor:function(e,t,n,o,a){var s=this.state.vim||{},c=n.characterWidth,l=n.lineHeight,u=t.top,h=t.left;s.insertMode||!(o.cursor?r.comparePoints(o.cursor,o.start)<=0:a.selection.isBackwards()||a.selection.isEmpty())&&h>c&&(h-=c);!s.insertMode&&s.status&&(u+=l/=2),i.translate(e,h,u),i.setStyle(e.style,"width",c+"px"),i.setStyle(e.style,"height",l+"px")},handleKeyboard:function(e,t,n,r,o){var i=e.editor,a=i.state.cm,s=Mt(a);if(-1!=r){if(s.insertMode||(-1==t?(n.charCodeAt(0)>255&&e.inputKey&&(n=e.inputKey)&&4==e.inputHash&&(n=n.toUpperCase()),e.inputChar=n):4==t||0==t?e.inputKey==n&&e.inputHash==t&&e.inputChar?(n=e.inputChar,t=-1):(e.inputChar=null,e.inputKey=n,e.inputHash=t):e.inputChar=e.inputKey=null),"c"==n&&1==t&&!u.isMac&&i.getCopyText())return i.once("copy",(function(){i.selection.clearSelection()})),{command:"null",passEvent:!0};if("esc"==n&&!s.insertMode&&!s.visualMode&&!a.ace.inMultiSelectMode){var c=ze(a).getOverlay();c&&a.removeOverlay(c)}if(-1==t||1&t||0===t&&n.length>1){var l=s.insertMode,h=function(e,t,n){t.length>1&&"n"==t[0]&&(t=t.replace("numpad","")),t=wt[t]||t;var r="";return n.ctrlKey&&(r+="C-"),n.altKey&&(r+="A-"),(r||t.length>1)&&n.shiftKey&&(r+="S-"),(r+=t).length>1&&(r="<"+r+">"),r}(0,n,o||{});null==s.status&&(s.status="");var d=function(e,t,n){var r=!1,o=x.maybeInitVimState_(e),i=o.visualBlock||o.wasInVisualBlock,a=e.ace.inMultiSelectMode;if(o.wasInVisualBlock&&!a?o.wasInVisualBlock=!1:a&&o.visualBlock&&(o.wasInVisualBlock=!0),"<Esc>"!=t||o.insertMode||o.visualMode||!a)if(i||!a||e.ace.inVirtualSelectionMode)r=x.handleKey(e,t,n);else{var s=St(o);e.operation((function(){e.ace.forEachSelection((function(){var o=e.ace.selection;e.state.vim.lastHPos=null==o.$desiredColumn?o.lead.column:o.$desiredColumn;var i=e.getCursor("head"),a=e.getCursor("anchor"),c=ke(i,a)?0:-1,l=ke(i,a)?-1:0;i=me(i,0,c),a=me(a,0,l),e.state.vim.sel.head=i,e.state.vim.sel.anchor=a,r=xt(e,t,n),o.$desiredColumn=-1==e.state.vim.lastHPos?null:e.state.vim.lastHPos,e.virtualSelectionMode()&&(e.state.vim=St(s))})),e.curOp.cursorActivity&&!r&&(e.curOp.cursorActivity=!1)}),!0)}else e.ace.exitMultiSelectMode();return!r||o.visualMode||o.insert||o.visualMode==e.somethingSelected()||gt(e,o,!0),r}(a,h,"user");if(s=Mt(a),d&&null!=s.status?s.status+=h:null==s.status&&(s.status=""),a._signal("changeStatus"),!d&&(-1!=t||l))return;return{command:"null",passEvent:!d}}}},attach:function(e){e.state||(e.state={});var t=new m(e);function n(){var n=Mt(t).insertMode;t.ace.renderer.setStyle("normal-mode",!n),e.textInput.setCommandMode(!n),e.renderer.$keepTextAreaAtCursor=n,e.renderer.$blockCursor=!n}e.state.cm=t,e.$vimModeHandler=this,m.keyMap.vim.attach(t),Mt(t).status=null,t.on("vim-command-done",(function(){t.virtualSelectionMode()||(Mt(t).status=null,t.ace._signal("changeStatus"),t.ace.session.markUndoGroup())})),t.on("changeStatus",(function(){t.ace.renderer.updateCursor(),t.ace._signal("changeStatus")})),t.on("vim-mode-change",(function(){t.virtualSelectionMode()||(n(),t._signal("changeStatus"))})),n(),e.renderer.$cursorLayer.drawCursor=this.drawCursor.bind(t)},detach:function(e){var t=e.state.cm;m.keyMap.vim.detach(t),t.destroy(),e.state.cm=null,e.$vimModeHandler=null,e.renderer.$cursorLayer.drawCursor=null,e.renderer.setStyle("normal-mode",!1),e.textInput.setCommandMode(!1),e.renderer.$keepTextAreaAtCursor=!0},getStatusText:function(e){var t=e.state.cm,n=Mt(t);if(n.insertMode)return"INSERT";var r="";return n.visualMode&&(r+="VISUAL",n.visualLine&&(r+=" LINE"),n.visualBlock&&(r+=" BLOCK")),n.status&&(r+=(r?" ":"")+n.status),r}},x.defineOption({name:"wrap",set:function(e,t){t&&t.ace.setOption("wrap",e)},type:"boolean"},!1),x.defineEx("write","w",(function(){console.log(":write is not implemented")})),y.push({keys:"zc",type:"action",action:"fold",actionArgs:{open:!1}},{keys:"zC",type:"action",action:"fold",actionArgs:{open:!1,all:!0}},{keys:"zo",type:"action",action:"fold",actionArgs:{open:!0}},{keys:"zO",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"za",type:"action",action:"fold",actionArgs:{toggle:!0}},{keys:"zA",type:"action",action:"fold",actionArgs:{toggle:!0,all:!0}},{keys:"zf",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"zd",type:"action",action:"fold",actionArgs:{open:!0,all:!0}},{keys:"<C-A-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAbove"}},{keys:"<C-A-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelow"}},{keys:"<C-A-S-k>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorAboveSkipCurrent"}},{keys:"<C-A-S-j>",type:"action",action:"aceCommand",actionArgs:{name:"addCursorBelowSkipCurrent"}},{keys:"<C-A-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreBefore"}},{keys:"<C-A-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectMoreAfter"}},{keys:"<C-A-S-h>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextBefore"}},{keys:"<C-A-S-l>",type:"action",action:"aceCommand",actionArgs:{name:"selectNextAfter"}}),y.push({keys:"gq",type:"operator",operator:"hardWrap"}),x.defineOperator("hardWrap",(function(e,t,n,r,o){var i=n[0].anchor.line,a=n[0].head.line;return t.linewise&&a--,f(e.ace,{startRow:i,endRow:a}),w(a,0)})),z("textwidth",void 0,"number",["tw"],(function(e,t){if(void 0!==t){if(void 0===e)return t.ace.getOption("printMarginColumn");var n=Math.round(e);n>1&&t.ace.setOption("printMarginColumn",n)}})),de.aceCommand=function(e,t,n){e.vimCmd=t,e.ace.inVirtualSelectionMode?e.ace.on("beforeEndOperation",At):At(null,e.ace)},de.fold=function(e,t,n){e.ace.execCommand(["toggleFoldWidget","toggleFoldWidget","foldOther","unfoldall"][(t.all?2:0)+(t.open?1:0)])},t.handler.defaultKeymap=y,t.handler.actions=de,t.Vim=x})),ace.require(["ace/keyboard/vim"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1 +0,0 @@
1
- ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],(function(e,t,r){"use strict";var a=e("../token_iterator").TokenIterator;function o(e,t){return e.type.lastIndexOf(t+".xml")>-1}t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.beautify=function(e){for(var r,s,n,i=new a(e,0,0),c=i.getCurrentToken(),u=e.getTabString(),l=t.singletonTags,m=t.blockTags,p=!1,f=!1,h=!1,y="",d="",b="",g=0,$=0,k=0,w=0,x=0,v=0,T=0,R=0,O=0,q=!1,C=!1,I=!1,_=!1,j={0:0},B=[],F=!1,S=function(){r&&r.value&&"string.regexp"!==r.type&&(r.value=r.value.replace(/^\s*/,""))},K=function(){y=y.replace(/ +$/,"")},L=function(){y=y.trimRight(),p=!1};null!==c;){if(R=i.getCurrentTokenRow(),i.$rowTokens,r=i.stepForward(),void 0!==c){if(d=c.value,x=0,I="style"===b||"ace/mode/css"===e.$modeId,o(c,"tag-open")?(C=!0,r&&(_=-1!==m.indexOf(r.value)),"</"===d&&(_&&!p&&O<1&&O++,I&&(O=1),x=1,_=!1)):o(c,"tag-close")?C=!1:o(c,"comment.start")?_=!0:o(c,"comment.end")&&(_=!1),C||O||"paren.rparen"!==c.type||"}"!==c.value.substr(0,1)||O++,R!==s&&(O=R,s&&(O-=s)),O){for(L();O>0;O--)y+="\n";p=!0,o(c,"comment")||c.type.match(/^(comment|string)$/)||(d=d.trimLeft())}if(d){if("keyword"===c.type&&d.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(B[g]=d,S(),h=!0,d.match(/^(else|elseif)$/)&&y.match(/\}[\s]*$/)&&(L(),f=!0)):"paren.lparen"===c.type?(S(),"{"===d.substr(-1)&&(h=!0,q=!1,C||(O=1)),"{"===d.substr(0,1)&&(f=!0,"["!==y.substr(-1)&&"["===y.trimRight().substr(-1)?(L(),f=!1):")"===y.trimRight().substr(-1)?L():K())):"paren.rparen"===c.type?(x=1,"}"===d.substr(0,1)&&("case"===B[g-1]&&x++,"{"===y.trimRight().substr(-1)?L():(f=!0,I&&(O+=2))),"]"===d.substr(0,1)&&"}"!==y.substr(-1)&&"}"===y.trimRight().substr(-1)&&(f=!1,w++,L()),")"===d.substr(0,1)&&"("!==y.substr(-1)&&"("===y.trimRight().substr(-1)&&(f=!1,w++,L()),K()):"keyword.operator"!==c.type&&"keyword"!==c.type||!d.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?"punctuation.operator"===c.type&&";"===d?(L(),S(),h=!0,I&&O++):"punctuation.operator"===c.type&&d.match(/^(:|,)$/)?(L(),S(),d.match(/^(,)$/)&&T>0&&0===v?O++:(h=!0,p=!1)):"support.php_tag"!==c.type||"?>"!==d||p?o(c,"attribute-name")&&y.substr(-1).match(/^\s$/)?f=!0:o(c,"attribute-equals")?(K(),S()):o(c,"tag-close")?(K(),"/>"===d&&(f=!0)):"keyword"===c.type&&d.match(/^(case|default)$/)&&F&&(x=1):(L(),f=!0):(L(),S(),f=!0,h=!0),p&&(!c.type.match(/^(comment)$/)||d.substr(0,1).match(/^[/#]$/))&&(!c.type.match(/^(string)$/)||d.substr(0,1).match(/^['"]$/))){if(w=k,g>$)for(w++,n=g;n>$;n--)j[n]=w;else g<$&&(w=j[g]);for($=g,k=w,x&&(w-=x),q&&!v&&(w++,q=!1),n=0;n<w;n++)y+=u}if("keyword"===c.type&&d.match(/^(case|default)$/)?!1===F&&(B[g]=d,g++,F=!0):"keyword"===c.type&&d.match(/^(break)$/)&&B[g-1]&&B[g-1].match(/^(case|default)$/)&&(g--,F=!1),"paren.lparen"===c.type&&(v+=(d.match(/\(/g)||[]).length,T+=(d.match(/\{/g)||[]).length,g+=d.length),"keyword"===c.type&&d.match(/^(if|else|elseif|for|while)$/)?(q=!0,v=0):!v&&d.trim()&&"comment"!==c.type&&(q=!1),"paren.rparen"===c.type)for(v-=(d.match(/\)/g)||[]).length,T-=(d.match(/\}/g)||[]).length,n=0;n<d.length;n++)g--,"}"===d.substr(n,1)&&"case"===B[g]&&g--;"text"==c.type&&(d=d.replace(/\s+$/," ")),f&&!p&&(K(),"\n"!==y.substr(-1)&&(y+=" ")),y+=d,h&&(y+=" "),p=!1,f=!1,h=!1,(o(c,"tag-close")&&(_||-1!==m.indexOf(b))||o(c,"doctype")&&">"===d)&&(O=_&&r&&"</"===r.value?-1:1),o(c,"tag-open")&&"</"===d?g--:o(c,"tag-open")&&"<"===d&&-1===l.indexOf(r.value)?g++:o(c,"tag-name")?b=d:o(c,"tag-close")&&"/>"===d&&-1===l.indexOf(b)&&g--,s=R}}c=r}y=y.trim(),e.doc.setValue(y)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]})),ace.require(["ace/ext/beautify"],(function(e){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=e)}));
@@ -1,7 +0,0 @@
1
- (self.webpackChunktocco_admin=self.webpackChunktocco_admin||[]).push([[140],{75597:t=>{"use strict";t.exports=function(){}},41143:t=>{"use strict";t.exports=function(t,e,n,r,o,i,a,c){if(!t){var u;if(void 0===e)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[n,r,o,i,a,c],f=0;(u=new Error(e.replace(/%s/g,(function(){return s[f++]})))).name="Invariant Violation"}throw u.framesToPop=1,u}}},280:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},41609:(t,e,n)=>{var r=n(280),o=n(64160),i=n(35694),a=n(1469),c=n(98612),u=n(44144),s=n(25726),f=n(36719),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(c(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||f(t)||i(t)))return!t.length;var e=o(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(s(t))return!r(t).length;for(var n in t)if(l.call(t,n))return!1;return!0}},35937:(t,e,n)=>{var r=n(29932),o=n(67206),i=n(63012),a=n(46904);t.exports=function(t,e){if(null==t)return{};var n=r(a(t),(function(t){return[t]}));return e=o(e),i(t,n,(function(t,n){return e(t,n[0])}))}},27418:t=>{"use strict";
2
- /*
3
- object-assign
4
- (c) Sindre Sorhus
5
- @license MIT
6
- */var e=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,i){for(var a,c,u=o(t),s=1;s<arguments.length;s++){for(var f in a=Object(arguments[s]))n.call(a,f)&&(u[f]=a[f]);if(e){c=e(a);for(var l=0;l<c.length;l++)r.call(a,c[l])&&(u[c[l]]=a[c[l]])}}return u}},14779:(t,e,n)=>{var r=n(96173);t.exports=h,t.exports.parse=i,t.exports.compile=function(t,e){return c(i(t,e),e)},t.exports.tokensToFunction=c,t.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(t,e){for(var n,r=[],i=0,a=0,c="",f=e&&e.delimiter||"/";null!=(n=o.exec(t));){var l=n[0],p=n[1],h=n.index;if(c+=t.slice(a,h),a=h+l.length,p)c+=p[1];else{var d=t[a],v=n[2],T=n[3],y=n[4],m=n[5],E=n[6],A=n[7];c&&(r.push(c),c="");var g=null!=v&&null!=d&&d!==v,b="+"===E||"*"===E,S="?"===E||"*"===E,O=n[2]||f,w=y||m;r.push({name:T||i++,prefix:v||"",delimiter:O,optional:S,repeat:b,partial:g,asterisk:!!A,pattern:w?s(w):A?".*":"[^"+u(O)+"]+?"})}}return a<t.length&&(c+=t.substr(a)),c&&r.push(c),r}function a(t){return encodeURI(t).replace(/[\/?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()}))}function c(t,e){for(var n=new Array(t.length),o=0;o<t.length;o++)"object"==typeof t[o]&&(n[o]=new RegExp("^(?:"+t[o].pattern+")$",l(e)));return function(e,o){for(var i="",c=e||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<t.length;s++){var f=t[s];if("string"!=typeof f){var l,p=c[f.name];if(null==p){if(f.optional){f.partial&&(i+=f.prefix);continue}throw new TypeError('Expected "'+f.name+'" to be defined')}if(r(p)){if(!f.repeat)throw new TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(f.optional)continue;throw new TypeError('Expected "'+f.name+'" to not be empty')}for(var h=0;h<p.length;h++){if(l=u(p[h]),!n[s].test(l))throw new TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");i+=(0===h?f.prefix:f.delimiter)+l}}else{if(l=f.asterisk?encodeURI(p).replace(/[?#]/g,(function(t){return"%"+t.charCodeAt(0).toString(16).toUpperCase()})):u(p),!n[s].test(l))throw new TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');i+=f.prefix+l}}else i+=f}return i}}function u(t){return t.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(t){return t.replace(/([=!:$\/()])/g,"\\$1")}function f(t,e){return t.keys=e,t}function l(t){return t&&t.sensitive?"":"i"}function p(t,e,n){r(e)||(n=e||n,e=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",c=0;c<t.length;c++){var s=t[c];if("string"==typeof s)a+=u(s);else{var p=u(s.prefix),h="(?:"+s.pattern+")";e.push(s),s.repeat&&(h+="(?:"+p+h+")*"),a+=h=s.optional?s.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var d=u(n.delimiter||"/"),v=a.slice(-d.length)===d;return o||(a=(v?a.slice(0,-d.length):a)+"(?:"+d+"(?=$))?"),a+=i?"$":o&&v?"":"(?="+d+"|$)",f(new RegExp("^"+a,l(n)),e)}function h(t,e,n){return r(e)||(n=e||n,e=[]),n=n||{},t instanceof RegExp?function(t,e){var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return f(t,e)}(t,e):r(t)?function(t,e,n){for(var r=[],o=0;o<t.length;o++)r.push(h(t[o],e,n).source);return f(new RegExp("(?:"+r.join("|")+")",l(n)),e)}(t,e,n):function(t,e,n){return p(i(t,n),e,n)}(t,e,n)}},96173:t=>{t.exports=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)}},15482:(t,e,n)=>{e.ql=void 0;var r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),i=l(n(1024)),a=l(n(45697)),c=l(n(83524)),u=l(n(96909)),s=n(62994),f=n(74455);function l(t){return t&&t.__esModule?t:{default:t}}function p(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}function h(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function d(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}var v,T,y,m=(0,c.default)(s.reducePropsToState,s.handleClientStateChange,s.mapStateOnServer)((function(){return null})),E=(v=m,y=T=function(t){function e(){return h(this,e),d(this,t.apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,t),e.prototype.shouldComponentUpdate=function(t){return!(0,u.default)(this.props,t)},e.prototype.mapNestedChildrenToProps=function(t,e){if(!e)return null;switch(t.type){case f.TAG_NAMES.SCRIPT:case f.TAG_NAMES.NOSCRIPT:return{innerHTML:e};case f.TAG_NAMES.STYLE:return{cssText:e}}throw new Error("<"+t.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},e.prototype.flattenArrayTypeChildren=function(t){var e,n=t.child,o=t.arrayTypeChildren,i=t.newChildProps,a=t.nestedChildren;return r({},o,((e={})[n.type]=[].concat(o[n.type]||[],[r({},i,this.mapNestedChildrenToProps(n,a))]),e))},e.prototype.mapObjectTypeChildren=function(t){var e,n,o=t.child,i=t.newProps,a=t.newChildProps,c=t.nestedChildren;switch(o.type){case f.TAG_NAMES.TITLE:return r({},i,((e={})[o.type]=c,e.titleAttributes=r({},a),e));case f.TAG_NAMES.BODY:return r({},i,{bodyAttributes:r({},a)});case f.TAG_NAMES.HTML:return r({},i,{htmlAttributes:r({},a)})}return r({},i,((n={})[o.type]=r({},a),n))},e.prototype.mapArrayTypeChildrenToProps=function(t,e){var n=r({},e);return Object.keys(t).forEach((function(e){var o;n=r({},n,((o={})[e]=t[e],o))})),n},e.prototype.warnOnInvalidChildren=function(t,e){return!0},e.prototype.mapChildrenToProps=function(t,e){var n=this,r={};return i.default.Children.forEach(t,(function(t){if(t&&t.props){var o=t.props,i=o.children,a=p(o,["children"]),c=(0,s.convertReactPropstoHtmlAttributes)(a);switch(n.warnOnInvalidChildren(t,i),t.type){case f.TAG_NAMES.LINK:case f.TAG_NAMES.META:case f.TAG_NAMES.NOSCRIPT:case f.TAG_NAMES.SCRIPT:case f.TAG_NAMES.STYLE:r=n.flattenArrayTypeChildren({child:t,arrayTypeChildren:r,newChildProps:c,nestedChildren:i});break;default:e=n.mapObjectTypeChildren({child:t,newProps:e,newChildProps:c,nestedChildren:i})}}})),e=this.mapArrayTypeChildrenToProps(r,e)},e.prototype.render=function(){var t=this.props,e=t.children,n=p(t,["children"]),o=r({},n);return e&&(o=this.mapChildrenToProps(e,o)),i.default.createElement(v,o)},o(e,null,[{key:"canUseDOM",set:function(t){v.canUseDOM=t}}]),e}(i.default.Component),T.propTypes={base:a.default.object,bodyAttributes:a.default.object,children:a.default.oneOfType([a.default.arrayOf(a.default.node),a.default.node]),defaultTitle:a.default.string,defer:a.default.bool,encodeSpecialCharacters:a.default.bool,htmlAttributes:a.default.object,link:a.default.arrayOf(a.default.object),meta:a.default.arrayOf(a.default.object),noscript:a.default.arrayOf(a.default.object),onChangeClientState:a.default.func,script:a.default.arrayOf(a.default.object),style:a.default.arrayOf(a.default.object),title:a.default.string,titleAttributes:a.default.object,titleTemplate:a.default.string},T.defaultProps={defer:!0,encodeSpecialCharacters:!0},T.peek=v.peek,T.rewind=function(){var t=v.rewind();return t||(t=(0,s.mapStateOnServer)({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),t},y);E.renderStatic=E.rewind,e.ql=E},74455:(t,e)=>{e.__esModule=!0;e.ATTRIBUTE_NAMES={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"};var n=e.TAG_NAMES={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"},r=(e.VALID_TAG_NAMES=Object.keys(n).map((function(t){return n[t]})),e.TAG_PROPERTIES={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src"},e.REACT_TAG_MAP={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"});e.HELMET_PROPS={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},e.HTML_TAG_MAP=Object.keys(r).reduce((function(t,e){return t[r[e]]=e,t}),{}),e.SELF_CLOSING_TAGS=[n.NOSCRIPT,n.SCRIPT,n.STYLE],e.HELMET_ATTRIBUTE="data-react-helmet"},62994:(t,e,n)=>{e.__esModule=!0,e.warn=e.requestAnimationFrame=e.reducePropsToState=e.mapStateOnServer=e.handleClientStateChange=e.convertReactPropstoHtmlAttributes=void 0;var 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},o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},i=u(n(1024)),a=u(n(27418)),c=n(74455);function u(t){return t&&t.__esModule?t:{default:t}}var s,f=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return!1===e?String(t):String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},l=function(t){var e=T(t,c.TAG_NAMES.TITLE),n=T(t,c.HELMET_PROPS.TITLE_TEMPLATE);if(n&&e)return n.replace(/%s/g,(function(){return e}));var r=T(t,c.HELMET_PROPS.DEFAULT_TITLE);return e||r||void 0},p=function(t){return T(t,c.HELMET_PROPS.ON_CHANGE_CLIENT_STATE)||function(){}},h=function(t,e){return e.filter((function(e){return void 0!==e[t]})).map((function(e){return e[t]})).reduce((function(t,e){return o({},t,e)}),{})},d=function(t,e){return e.filter((function(t){return void 0!==t[c.TAG_NAMES.BASE]})).map((function(t){return t[c.TAG_NAMES.BASE]})).reverse().reduce((function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o].toLowerCase();if(-1!==t.indexOf(i)&&n[i])return e.concat(n)}return e}),[])},v=function(t,e,n){var o={};return n.filter((function(e){return!!Array.isArray(e[t])||(void 0!==e[t]&&g("Helmet: "+t+' should be of type "Array". Instead found type "'+r(e[t])+'"'),!1)})).map((function(e){return e[t]})).reverse().reduce((function(t,n){var r={};n.filter((function(t){for(var n=void 0,i=Object.keys(t),a=0;a<i.length;a++){var u=i[a],s=u.toLowerCase();-1===e.indexOf(s)||n===c.TAG_PROPERTIES.REL&&"canonical"===t[n].toLowerCase()||s===c.TAG_PROPERTIES.REL&&"stylesheet"===t[s].toLowerCase()||(n=s),-1===e.indexOf(u)||u!==c.TAG_PROPERTIES.INNER_HTML&&u!==c.TAG_PROPERTIES.CSS_TEXT&&u!==c.TAG_PROPERTIES.ITEM_PROP||(n=u)}if(!n||!t[n])return!1;var f=t[n].toLowerCase();return o[n]||(o[n]={}),r[n]||(r[n]={}),!o[n][f]&&(r[n][f]=!0,!0)})).reverse().forEach((function(e){return t.push(e)}));for(var i=Object.keys(r),u=0;u<i.length;u++){var s=i[u],f=(0,a.default)({},o[s],r[s]);o[s]=f}return t}),[]).reverse()},T=function(t,e){for(var n=t.length-1;n>=0;n--){var r=t[n];if(r.hasOwnProperty(e))return r[e]}return null},y=(s=Date.now(),function(t){var e=Date.now();e-s>16?(s=e,t(e)):setTimeout((function(){y(t)}),0)}),m=function(t){return clearTimeout(t)},E="undefined"!=typeof window?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||y:n.g.requestAnimationFrame||y,A="undefined"!=typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||m:n.g.cancelAnimationFrame||m,g=function(t){return console&&"function"==typeof console.warn&&console.warn(t)},b=null,S=function(t,e){var n=t.baseTag,r=t.bodyAttributes,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,u=t.noscriptTags,s=t.onChangeClientState,f=t.scriptTags,l=t.styleTags,p=t.title,h=t.titleAttributes;_(c.TAG_NAMES.BODY,r),_(c.TAG_NAMES.HTML,o),w(p,h);var d={baseTag:P(c.TAG_NAMES.BASE,n),linkTags:P(c.TAG_NAMES.LINK,i),metaTags:P(c.TAG_NAMES.META,a),noscriptTags:P(c.TAG_NAMES.NOSCRIPT,u),scriptTags:P(c.TAG_NAMES.SCRIPT,f),styleTags:P(c.TAG_NAMES.STYLE,l)},v={},T={};Object.keys(d).forEach((function(t){var e=d[t],n=e.newTags,r=e.oldTags;n.length&&(v[t]=n),r.length&&(T[t]=d[t].oldTags)})),e&&e(),s(t,v,T)},O=function(t){return Array.isArray(t)?t.join(""):t},w=function(t,e){void 0!==t&&document.title!==t&&(document.title=O(t)),_(c.TAG_NAMES.TITLE,e)},_=function(t,e){var n=document.getElementsByTagName(t)[0];if(n){for(var r=n.getAttribute(c.HELMET_ATTRIBUTE),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(e),u=0;u<a.length;u++){var s=a[u],f=e[s]||"";n.getAttribute(s)!==f&&n.setAttribute(s,f),-1===o.indexOf(s)&&o.push(s);var l=i.indexOf(s);-1!==l&&i.splice(l,1)}for(var p=i.length-1;p>=0;p--)n.removeAttribute(i[p]);o.length===i.length?n.removeAttribute(c.HELMET_ATTRIBUTE):n.getAttribute(c.HELMET_ATTRIBUTE)!==a.join(",")&&n.setAttribute(c.HELMET_ATTRIBUTE,a.join(","))}},P=function(t,e){var n=document.head||document.querySelector(c.TAG_NAMES.HEAD),r=n.querySelectorAll(t+"["+c.HELMET_ATTRIBUTE+"]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return e&&e.length&&e.forEach((function(e){var n=document.createElement(t);for(var r in e)if(e.hasOwnProperty(r))if(r===c.TAG_PROPERTIES.INNER_HTML)n.innerHTML=e.innerHTML;else if(r===c.TAG_PROPERTIES.CSS_TEXT)n.styleSheet?n.styleSheet.cssText=e.cssText:n.appendChild(document.createTextNode(e.cssText));else{var u=void 0===e[r]?"":e[r];n.setAttribute(r,u)}n.setAttribute(c.HELMET_ATTRIBUTE,"true"),o.some((function(t,e){return a=e,n.isEqualNode(t)}))?o.splice(a,1):i.push(n)})),o.forEach((function(t){return t.parentNode.removeChild(t)})),i.forEach((function(t){return n.appendChild(t)})),{oldTags:o,newTags:i}},R=function(t){return Object.keys(t).reduce((function(e,n){var r=void 0!==t[n]?n+'="'+t[n]+'"':""+n;return e?e+" "+r:r}),"")},C=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[c.REACT_TAG_MAP[n]||n]=t[n],e}),e)},M=function(t,e,n){switch(t){case c.TAG_NAMES.TITLE:return{toComponent:function(){return t=e.title,n=e.titleAttributes,(r={key:t})[c.HELMET_ATTRIBUTE]=!0,o=C(n,r),[i.default.createElement(c.TAG_NAMES.TITLE,o,t)];var t,n,r,o},toString:function(){return function(t,e,n,r){var o=R(n),i=O(e);return o?"<"+t+" "+c.HELMET_ATTRIBUTE+'="true" '+o+">"+f(i,r)+"</"+t+">":"<"+t+" "+c.HELMET_ATTRIBUTE+'="true">'+f(i,r)+"</"+t+">"}(t,e.title,e.titleAttributes,n)}};case c.ATTRIBUTE_NAMES.BODY:case c.ATTRIBUTE_NAMES.HTML:return{toComponent:function(){return C(e)},toString:function(){return R(e)}};default:return{toComponent:function(){return function(t,e){return e.map((function(e,n){var r,o=((r={key:n})[c.HELMET_ATTRIBUTE]=!0,r);return Object.keys(e).forEach((function(t){var n=c.REACT_TAG_MAP[t]||t;if(n===c.TAG_PROPERTIES.INNER_HTML||n===c.TAG_PROPERTIES.CSS_TEXT){var r=e.innerHTML||e.cssText;o.dangerouslySetInnerHTML={__html:r}}else o[n]=e[t]})),i.default.createElement(t,o)}))}(t,e)},toString:function(){return function(t,e,n){return e.reduce((function(e,r){var o=Object.keys(r).filter((function(t){return!(t===c.TAG_PROPERTIES.INNER_HTML||t===c.TAG_PROPERTIES.CSS_TEXT)})).reduce((function(t,e){var o=void 0===r[e]?e:e+'="'+f(r[e],n)+'"';return t?t+" "+o:o}),""),i=r.innerHTML||r.cssText||"",a=-1===c.SELF_CLOSING_TAGS.indexOf(t);return e+"<"+t+" "+c.HELMET_ATTRIBUTE+'="true" '+o+(a?"/>":">"+i+"</"+t+">")}),"")}(t,e,n)}}}};e.convertReactPropstoHtmlAttributes=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).reduce((function(e,n){return e[c.HTML_TAG_MAP[n]||n]=t[n],e}),e)},e.handleClientStateChange=function(t){b&&A(b),t.defer?b=E((function(){S(t,(function(){b=null}))})):(S(t),b=null)},e.mapStateOnServer=function(t){var e=t.baseTag,n=t.bodyAttributes,r=t.encode,o=t.htmlAttributes,i=t.linkTags,a=t.metaTags,u=t.noscriptTags,s=t.scriptTags,f=t.styleTags,l=t.title,p=void 0===l?"":l,h=t.titleAttributes;return{base:M(c.TAG_NAMES.BASE,e,r),bodyAttributes:M(c.ATTRIBUTE_NAMES.BODY,n,r),htmlAttributes:M(c.ATTRIBUTE_NAMES.HTML,o,r),link:M(c.TAG_NAMES.LINK,i,r),meta:M(c.TAG_NAMES.META,a,r),noscript:M(c.TAG_NAMES.NOSCRIPT,u,r),script:M(c.TAG_NAMES.SCRIPT,s,r),style:M(c.TAG_NAMES.STYLE,f,r),title:M(c.TAG_NAMES.TITLE,{title:p,titleAttributes:h},r)}},e.reducePropsToState=function(t){return{baseTag:d([c.TAG_PROPERTIES.HREF],t),bodyAttributes:h(c.ATTRIBUTE_NAMES.BODY,t),defer:T(t,c.HELMET_PROPS.DEFER),encode:T(t,c.HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:h(c.ATTRIBUTE_NAMES.HTML,t),linkTags:v(c.TAG_NAMES.LINK,[c.TAG_PROPERTIES.REL,c.TAG_PROPERTIES.HREF],t),metaTags:v(c.TAG_NAMES.META,[c.TAG_PROPERTIES.NAME,c.TAG_PROPERTIES.CHARSET,c.TAG_PROPERTIES.HTTPEQUIV,c.TAG_PROPERTIES.PROPERTY,c.TAG_PROPERTIES.ITEM_PROP],t),noscriptTags:v(c.TAG_NAMES.NOSCRIPT,[c.TAG_PROPERTIES.INNER_HTML],t),onChangeClientState:p(t),scriptTags:v(c.TAG_NAMES.SCRIPT,[c.TAG_PROPERTIES.SRC,c.TAG_PROPERTIES.INNER_HTML],t),styleTags:v(c.TAG_NAMES.STYLE,[c.TAG_PROPERTIES.CSS_TEXT],t),title:l(t),titleAttributes:h(c.ATTRIBUTE_NAMES.TITLE,t)}},e.requestAnimationFrame=E,e.warn=g},96909:t=>{"use strict";var e=Array.isArray,n=Object.keys,r=Object.prototype.hasOwnProperty,o="undefined"!=typeof Element;t.exports=function(t,i){try{return function t(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var c,u,s,f=e(i),l=e(a);if(f&&l){if((u=i.length)!=a.length)return!1;for(c=u;0!=c--;)if(!t(i[c],a[c]))return!1;return!0}if(f!=l)return!1;var p=i instanceof Date,h=a instanceof Date;if(p!=h)return!1;if(p&&h)return i.getTime()==a.getTime();var d=i instanceof RegExp,v=a instanceof RegExp;if(d!=v)return!1;if(d&&v)return i.toString()==a.toString();var T=n(i);if((u=T.length)!==n(a).length)return!1;for(c=u;0!=c--;)if(!r.call(a,T[c]))return!1;if(o&&i instanceof Element&&a instanceof Element)return i===a;for(c=u;0!=c--;)if(!("_owner"===(s=T[c])&&i.$$typeof||t(i[s],a[s])))return!1;return!0}return i!=i&&a!=a}(t,i)}catch(t){if(t.message&&t.message.match(/stack|recursion/i)||-2146828260===t.number)return console.warn("Warning: react-fast-compare does not handle circular references.",t.name,t.message),!1;throw t}}},96559:(t,e,n)=>{"use strict";n.d(e,{rU:()=>j});var r=n(97610);function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}var a=n(1024),c=n.n(a);function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function s(t){return"/"===t.charAt(0)}function f(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}const l=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],o=e&&e.split("/")||[],i=t&&s(t),a=e&&s(e),c=i||a;if(t&&s(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var l=0,p=o.length;p>=0;p--){var h=o[p];"."===h?f(o,p):".."===h?(f(o,p),l++):l&&(f(o,p),l--)}if(!c)for(;l--;l)o.unshift("..");!c||""===o[0]||o[0]&&s(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var p=n(2177);function h(t){return"/"===t.charAt(0)?t:"/"+t}function d(t){return"/"===t.charAt(0)?t.substr(1):t}function v(t,e){return function(t,e){return 0===t.toLowerCase().indexOf(e.toLowerCase())&&-1!=="/?#".indexOf(t.charAt(e.length))}(t,e)?t.substr(e.length):t}function T(t){return"/"===t.charAt(t.length-1)?t.slice(0,-1):t}function y(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function m(t,e,n,r){var o;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=u({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=l(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function E(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}var A=!("undefined"==typeof window||!window.document||!window.document.createElement);function g(t,e){e(window.confirm(t))}function b(){try{return window.history.state||{}}catch(t){return{}}}function S(t){void 0===t&&(t={}),A||(0,p.Z)(!1);var e,n=window.history,r=(-1===(e=window.navigator.userAgent).indexOf("Android 2.")&&-1===e.indexOf("Android 4.0")||-1===e.indexOf("Mobile Safari")||-1!==e.indexOf("Chrome")||-1!==e.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,o=!(-1===window.navigator.userAgent.indexOf("Trident")),i=t,a=i.forceRefresh,c=void 0!==a&&a,s=i.getUserConfirmation,f=void 0===s?g:s,l=i.keyLength,d=void 0===l?6:l,S=t.basename?T(h(t.basename)):"";function O(t){var e=t||{},n=e.key,r=e.state,o=window.location,i=o.pathname+o.search+o.hash;return S&&(i=v(i,S)),m(i,r,n)}function w(){return Math.random().toString(36).substr(2,d)}var _=E();function P(t){u(U,t),U.length=n.length,_.notifyListeners(U.location,U.action)}function R(t){(function(t){return void 0===t.state&&-1===navigator.userAgent.indexOf("CriOS")})(t)||x(O(t.state))}function C(){x(O(b()))}var M=!1;function x(t){if(M)M=!1,P();else{_.confirmTransitionTo(t,"POP",f,(function(e){e?P({action:"POP",location:t}):function(t){var e=U.location,n=I.indexOf(e.key);-1===n&&(n=0);var r=I.indexOf(t.key);-1===r&&(r=0);var o=n-r;o&&(M=!0,j(o))}(t)}))}}var L=O(b()),I=[L.key];function N(t){return S+y(t)}function j(t){n.go(t)}var k=0;function G(t){1===(k+=t)&&1===t?(window.addEventListener("popstate",R),o&&window.addEventListener("hashchange",C)):0===k&&(window.removeEventListener("popstate",R),o&&window.removeEventListener("hashchange",C))}var H=!1;var U={length:n.length,action:"POP",location:L,createHref:N,push:function(t,e){var o=m(t,e,w(),U.location);_.confirmTransitionTo(o,"PUSH",f,(function(t){if(t){var e=N(o),i=o.key,a=o.state;if(r)if(n.pushState({key:i,state:a},null,e),c)window.location.href=e;else{var u=I.indexOf(U.location.key),s=I.slice(0,u+1);s.push(o.key),I=s,P({action:"PUSH",location:o})}else window.location.href=e}}))},replace:function(t,e){var o=m(t,e,w(),U.location);_.confirmTransitionTo(o,"REPLACE",f,(function(t){if(t){var e=N(o),i=o.key,a=o.state;if(r)if(n.replaceState({key:i,state:a},null,e),c)window.location.replace(e);else{var u=I.indexOf(U.location.key);-1!==u&&(I[u]=o.key),P({action:"REPLACE",location:o})}else window.location.replace(e)}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(t){void 0===t&&(t=!1);var e=_.setPrompt(t);return H||(G(1),H=!0),function(){return H&&(H=!1,G(-1)),e()}},listen:function(t){var e=_.appendListener(t);return G(1),function(){G(-1),e()}}};return U}var O={hashbang:{encodePath:function(t){return"!"===t.charAt(0)?t:"!/"+d(t)},decodePath:function(t){return"!"===t.charAt(0)?t.substr(1):t}},noslash:{encodePath:d,decodePath:h},slash:{encodePath:h,decodePath:h}};function w(t){var e=t.indexOf("#");return-1===e?t:t.slice(0,e)}function _(){var t=window.location.href,e=t.indexOf("#");return-1===e?"":t.substring(e+1)}function P(t){window.location.replace(w(window.location.href)+"#"+t)}function R(t){void 0===t&&(t={}),A||(0,p.Z)(!1);var e=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),t),r=n.getUserConfirmation,o=void 0===r?g:r,i=n.hashType,a=void 0===i?"slash":i,c=t.basename?T(h(t.basename)):"",s=O[a],f=s.encodePath,l=s.decodePath;function d(){var t=l(_());return c&&(t=v(t,c)),m(t)}var b=E();function S(t){u(U,t),U.length=e.length,b.notifyListeners(U.location,U.action)}var R=!1,C=null;function M(){var t,e,n=_(),r=f(n);if(n!==r)P(r);else{var i=d(),a=U.location;if(!R&&(e=i,(t=a).pathname===e.pathname&&t.search===e.search&&t.hash===e.hash))return;if(C===y(i))return;C=null,function(t){if(R)R=!1,S();else{b.confirmTransitionTo(t,"POP",o,(function(e){e?S({action:"POP",location:t}):function(t){var e=U.location,n=N.lastIndexOf(y(e));-1===n&&(n=0);var r=N.lastIndexOf(y(t));-1===r&&(r=0);var o=n-r;o&&(R=!0,j(o))}(t)}))}}(i)}}var x=_(),L=f(x);x!==L&&P(L);var I=d(),N=[y(I)];function j(t){e.go(t)}var k=0;function G(t){1===(k+=t)&&1===t?window.addEventListener("hashchange",M):0===k&&window.removeEventListener("hashchange",M)}var H=!1;var U={length:e.length,action:"POP",location:I,createHref:function(t){var e=document.querySelector("base"),n="";return e&&e.getAttribute("href")&&(n=w(window.location.href)),n+"#"+f(c+y(t))},push:function(t,e){var n=m(t,void 0,void 0,U.location);b.confirmTransitionTo(n,"PUSH",o,(function(t){if(t){var e=y(n),r=f(c+e);if(_()!==r){C=e,function(t){window.location.hash=t}(r);var o=N.lastIndexOf(y(U.location)),i=N.slice(0,o+1);i.push(e),N=i,S({action:"PUSH",location:n})}else S()}}))},replace:function(t,e){var n=m(t,void 0,void 0,U.location);b.confirmTransitionTo(n,"REPLACE",o,(function(t){if(t){var e=y(n),r=f(c+e);_()!==r&&(C=e,P(r));var o=N.indexOf(y(U.location));-1!==o&&(N[o]=e),S({action:"REPLACE",location:n})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(t){void 0===t&&(t=!1);var e=b.setPrompt(t);return H||(G(1),H=!0),function(){return H&&(H=!1,G(-1)),e()}},listen:function(t){var e=b.appendListener(t);return G(1),function(){G(-1),e()}}};return U}n(45697);function C(t,e){if(null==t)return{};var n,r,o={},i=Object.keys(t);for(r=0;r<i.length;r++)n=i[r],e.indexOf(n)>=0||(o[n]=t[n]);return o}c().Component;c().Component;var M=function(t,e){return"function"==typeof t?t(e):t},x=function(t,e){return"string"==typeof t?m(t,null,null,e):t},L=function(t){return t},I=c().forwardRef;void 0===I&&(I=L);var N=I((function(t,e){var n=t.innerRef,r=t.navigate,o=t.onClick,i=C(t,["innerRef","navigate","onClick"]),a=i.target,s=u({},i,{onClick:function(t){try{o&&o(t)}catch(e){throw t.preventDefault(),e}t.defaultPrevented||0!==t.button||a&&"_self"!==a||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(t)||(t.preventDefault(),r())}});return s.ref=L!==I&&e||n,c().createElement("a",s)}));var j=I((function(t,e){var n=t.component,o=void 0===n?N:n,i=t.replace,a=t.to,s=t.innerRef,f=C(t,["component","replace","to","innerRef"]);return c().createElement(r.s6.Consumer,null,(function(t){t||(0,p.Z)(!1);var n=t.history,r=x(M(a,t.location),t.location),l=r?n.createHref(r):"",h=u({},f,{href:l,navigate:function(){var e=M(a,t.location),r=y(t.location)===y(x(e));(i||r?n.replace:n.push)(e)}});return L!==I?h.ref=e||s:h.innerRef=s,c().createElement(o,h)}))})),k=function(t){return t},G=c().forwardRef;void 0===G&&(G=k);G((function(t,e){var n=t["aria-current"],o=void 0===n?"page":n,i=t.activeClassName,a=void 0===i?"active":i,s=t.activeStyle,f=t.className,l=t.exact,h=t.isActive,d=t.location,v=t.sensitive,T=t.strict,y=t.style,m=t.to,E=t.innerRef,A=C(t,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return c().createElement(r.s6.Consumer,null,(function(t){t||(0,p.Z)(!1);var n=d||t.location,i=x(M(m,n),n),g=i.pathname,b=g&&g.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),S=b?(0,r.LX)(n.pathname,{path:b,exact:l,sensitive:v,strict:T}):null,O=!!(h?h(S,n):S),w="function"==typeof f?f(O):f,_="function"==typeof y?y(O):y;O&&(w=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.filter((function(t){return t})).join(" ")}(w,a),_=u({},_,s));var P=u({"aria-current":O&&o||null,className:w,style:_,to:i},A);return k!==G?P.ref=e||E:P.innerRef=E,c().createElement(j,P)}))}))},97610:(t,e,n)=>{"use strict";function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}n.d(e,{NL:()=>I,l_:()=>G,AW:()=>D,F0:()=>x,rs:()=>K,s6:()=>M,LX:()=>B,TH:()=>V});var i=n(1024),a=n.n(i),c=n(45697),u=n.n(c);function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function f(t){return"/"===t.charAt(0)}function l(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}const p=function(t,e){void 0===e&&(e="");var n,r=t&&t.split("/")||[],o=e&&e.split("/")||[],i=t&&f(t),a=e&&f(e),c=i||a;if(t&&f(t)?o=r:r.length&&(o.pop(),o=o.concat(r)),!o.length)return"/";if(o.length){var u=o[o.length-1];n="."===u||".."===u||""===u}else n=!1;for(var s=0,p=o.length;p>=0;p--){var h=o[p];"."===h?l(o,p):".."===h?(l(o,p),s++):s&&(l(o,p),s--)}if(!c)for(;s--;s)o.unshift("..");!c||""===o[0]||o[0]&&f(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};function h(t){return t.valueOf?t.valueOf():Object.prototype.valueOf.call(t)}const d=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));if("object"==typeof e||"object"==typeof n){var r=h(e),o=h(n);return r!==e||o!==n?t(r,o):Object.keys(Object.assign({},e,n)).every((function(r){return t(e[r],n[r])}))}return!1};function v(t){var e=t.pathname,n=t.search,r=t.hash,o=e||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function T(t,e,n,r){var o;"string"==typeof t?(o=function(t){var e=t||"/",n="",r="",o=e.indexOf("#");-1!==o&&(r=e.substr(o),e=e.substr(0,o));var i=e.indexOf("?");return-1!==i&&(n=e.substr(i),e=e.substr(0,i)),{pathname:e,search:"?"===n?"":n,hash:"#"===r?"":r}}(t)).state=e:(void 0===(o=s({},t)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==e&&void 0===o.state&&(o.state=e));try{o.pathname=decodeURI(o.pathname)}catch(t){throw t instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):t}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=p(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function y(){var t=null;var e=[];return{setPrompt:function(e){return t=e,function(){t===e&&(t=null)}},confirmTransitionTo:function(e,n,r,o){if(null!=t){var i="function"==typeof t?t(e,n):t;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(t){var n=!0;function r(){n&&t.apply(void 0,arguments)}return e.push(r),function(){n=!1,e=e.filter((function(t){return t!==r}))}},notifyListeners:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e.forEach((function(t){return t.apply(void 0,n)}))}}}"undefined"==typeof window||!window.document||window.document.createElement;function m(t,e,n){return Math.min(Math.max(t,e),n)}function E(t){void 0===t&&(t={});var e=t,n=e.getUserConfirmation,r=e.initialEntries,o=void 0===r?["/"]:r,i=e.initialIndex,a=void 0===i?0:i,c=e.keyLength,u=void 0===c?6:c,f=y();function l(t){s(g,t),g.length=g.entries.length,f.notifyListeners(g.location,g.action)}function p(){return Math.random().toString(36).substr(2,u)}var h=m(a,0,o.length-1),d=o.map((function(t){return T(t,void 0,"string"==typeof t?p():t.key||p())})),E=v;function A(t){var e=m(g.index+t,0,g.entries.length-1),r=g.entries[e];f.confirmTransitionTo(r,"POP",n,(function(t){t?l({action:"POP",location:r,index:e}):l()}))}var g={length:d.length,action:"POP",location:d[h],index:h,entries:d,createHref:E,push:function(t,e){var r=T(t,e,p(),g.location);f.confirmTransitionTo(r,"PUSH",n,(function(t){if(t){var e=g.index+1,n=g.entries.slice(0);n.length>e?n.splice(e,n.length-e,r):n.push(r),l({action:"PUSH",location:r,index:e,entries:n})}}))},replace:function(t,e){var r=T(t,e,p(),g.location);f.confirmTransitionTo(r,"REPLACE",n,(function(t){t&&(g.entries[g.index]=r,l({action:"REPLACE",location:r}))}))},go:A,goBack:function(){A(-1)},goForward:function(){A(1)},canGo:function(t){var e=g.index+t;return e>=0&&e<g.entries.length},block:function(t){return void 0===t&&(t=!1),f.setPrompt(t)},listen:function(t){return f.appendListener(t)}};return g}function A(t,e){return(A=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,A(t,e)}var b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};function S(t){var e=[];return{on:function(t){e.push(t)},off:function(t){e=e.filter((function(e){return e!==t}))},get:function(){return t},set:function(n,r){t=n,e.forEach((function(e){return e(t,r)}))}}}const O=a().createContext||function(t,e){var n,r,o="__create-react-context-"+function(){var t="__global_unique_id__";return b[t]=(b[t]||0)+1}()+"__",a=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).emitter=S(e.props.value),e}g(n,t);var r=n.prototype;return r.getChildContext=function(){var t;return(t={})[o]=this.emitter,t},r.componentWillReceiveProps=function(t){if(this.props.value!==t.value){var n,r=this.props.value,o=t.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof e?e(r,o):1073741823,0!==(n|=0)&&this.emitter.set(t.value,n))}var i,a},r.render=function(){return this.props.children},n}(i.Component);a.childContextTypes=((n={})[o]=u().object.isRequired,n);var c=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).state={value:t.getValue()},t.onUpdate=function(e,n){0!=((0|t.observedBits)&n)&&t.setState({value:t.getValue()})},t}g(n,e);var r=n.prototype;return r.componentWillReceiveProps=function(t){var e=t.observedBits;this.observedBits=null==e?1073741823:e},r.componentDidMount=function(){this.context[o]&&this.context[o].on(this.onUpdate);var t=this.props.observedBits;this.observedBits=null==t?1073741823:t},r.componentWillUnmount=function(){this.context[o]&&this.context[o].off(this.onUpdate)},r.getValue=function(){return this.context[o]?this.context[o].get():t},r.render=function(){return(t=this.props.children,Array.isArray(t)?t[0]:t)(this.state.value);var t},n}(i.Component);return c.contextTypes=((r={})[o]=u().object,r),{Provider:a,Consumer:c}};var w=n(2177),_=n(14779),P=n.n(_);n(59864);n(8679);var R=function(t){var e=O();return e.displayName=t,e},C=R("Router-History"),M=R("Router"),x=function(t){function e(e){var n;return(n=t.call(this,e)||this).state={location:e.history.location},n._isMounted=!1,n._pendingLocation=null,e.staticContext||(n.unlisten=e.history.listen((function(t){n._isMounted?n.setState({location:t}):n._pendingLocation=t}))),n}o(e,t),e.computeRootMatch=function(t){return{path:"/",url:"/",params:{},isExact:"/"===t}};var n=e.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},n.render=function(){return a().createElement(M.Provider,{value:{history:this.props.history,location:this.state.location,match:e.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},a().createElement(C.Provider,{children:this.props.children||null,value:this.props.history}))},e}(a().Component);a().Component;var L=function(t){function e(){return t.apply(this,arguments)||this}o(e,t);var n=e.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(t){this.props.onUpdate&&this.props.onUpdate.call(this,this,t)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},e}(a().Component);function I(t){var e=t.message,n=t.when,r=void 0===n||n;return a().createElement(M.Consumer,null,(function(t){if(t||(0,w.Z)(!1),!r||t.staticContext)return null;var n=t.history.block;return a().createElement(L,{onMount:function(t){t.release=n(e)},onUpdate:function(t,r){r.message!==e&&(t.release(),t.release=n(e))},onUnmount:function(t){t.release()},message:e})}))}var N={},j=0;function k(t,e){return void 0===t&&(t="/"),void 0===e&&(e={}),"/"===t?t:function(t){if(N[t])return N[t];var e=P().compile(t);return j<1e4&&(N[t]=e,j++),e}(t)(e,{pretty:!0})}function G(t){var e=t.computedMatch,n=t.to,r=t.push,o=void 0!==r&&r;return a().createElement(M.Consumer,null,(function(t){t||(0,w.Z)(!1);var r=t.history,i=t.staticContext,c=o?r.push:r.replace,u=T(e?"string"==typeof n?k(n,e.params):s({},n,{pathname:k(n.pathname,e.params)}):n);return i?(c(u),null):a().createElement(L,{onMount:function(){c(u)},onUpdate:function(t,e){var n,r,o=T(e.to);n=o,r=s({},u,{key:o.key}),n.pathname===r.pathname&&n.search===r.search&&n.hash===r.hash&&n.key===r.key&&d(n.state,r.state)||c(u)},to:n})}))}var H={},U=0;function B(t,e){void 0===e&&(e={}),("string"==typeof e||Array.isArray(e))&&(e={path:e});var n=e,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,c=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(e,n){if(!n&&""!==n)return null;if(e)return e;var r=function(t,e){var n=""+e.end+e.strict+e.sensitive,r=H[n]||(H[n]={});if(r[t])return r[t];var o=[],i={regexp:P()(t,o,e),keys:o};return U<1e4&&(r[t]=i,U++),i}(n,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(t);if(!u)return null;var f=u[0],l=u.slice(1),p=t===f;return i&&!p?null:{path:n,url:"/"===n&&""===f?"/":f,isExact:p,params:a.reduce((function(t,e,n){return t[e.name]=l[n],t}),{})}}),null)}var D=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){var t=this;return a().createElement(M.Consumer,null,(function(e){e||(0,w.Z)(!1);var n=t.props.location||e.location,r=s({},e,{location:n,match:t.props.computedMatch?t.props.computedMatch:t.props.path?B(n.pathname,t.props):e.match}),o=t.props,i=o.children,c=o.component,u=o.render;return Array.isArray(i)&&function(t){return 0===a().Children.count(t)}(i)&&(i=null),a().createElement(M.Provider,{value:r},r.match?i?"function"==typeof i?i(r):i:c?a().createElement(c,r):u?u(r):null:"function"==typeof i?i(r):null)}))},e}(a().Component);function F(t){return"/"===t.charAt(0)?t:"/"+t}function q(t,e){if(!t)return e;var n=F(t);return 0!==e.pathname.indexOf(n)?e:s({},e,{pathname:e.pathname.substr(n.length)})}function Y(t){return"string"==typeof t?t:v(t)}function W(t){return function(){(0,w.Z)(!1)}}function $(){}a().Component;var K=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){var t=this;return a().createElement(M.Consumer,null,(function(e){e||(0,w.Z)(!1);var n,r,o=t.props.location||e.location;return a().Children.forEach(t.props.children,(function(t){if(null==r&&a().isValidElement(t)){n=t;var i=t.props.path||t.props.from;r=i?B(o.pathname,s({},t.props,{path:i})):e.match}})),r?a().cloneElement(n,{location:o,computedMatch:r}):null}))},e}(a().Component);var Z=a().useContext;function V(){return Z(M).location}},83524:(t,e,n)=>{"use strict";function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(1024),i=r(o),a=r(n(96774));function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var u=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=function(t,e,n){if("function"!=typeof t)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof e)throw new Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw new Error("Expected mapStateOnServer to either be undefined or a function.");return function(r){if("function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var s,f=[];function l(){s=t(f.map((function(t){return t.props}))),p.canUseDOM?e(s):n&&(s=n(s))}var p=function(t){var e,n;function o(){return t.apply(this,arguments)||this}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,o.peek=function(){return s},o.rewind=function(){if(o.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var t=s;return s=void 0,f=[],t};var c=o.prototype;return c.shouldComponentUpdate=function(t){return!a(t,this.props)},c.componentWillMount=function(){f.push(this),l()},c.componentDidUpdate=function(){l()},c.componentWillUnmount=function(){var t=f.indexOf(this);f.splice(t,1),l()},c.render=function(){return i.createElement(r,this.props)},o}(o.Component);return c(p,"displayName","SideEffect("+function(t){return t.displayName||t.name||"Component"}(r)+")"),c(p,"canUseDOM",u),p}}},14149:(t,e,n)=>{"use strict";function r(t){return"/"===t.charAt(0)}function o(t,e){for(var n=e,r=n+1,o=t.length;r<o;n+=1,r+=1)t[n]=t[r];t.pop()}n.r(e),n.d(e,{default:()=>i});const i=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=t&&t.split("/")||[],i=e&&e.split("/")||[],a=t&&r(t),c=e&&r(e),u=a||c;if(t&&r(t)?i=n:n.length&&(i.pop(),i=i.concat(n)),!i.length)return"/";var s=void 0;if(i.length){var f=i[i.length-1];s="."===f||".."===f||""===f}else s=!1;for(var l=0,p=i.length;p>=0;p--){var h=i[p];"."===h?o(i,p):".."===h?(o(i,p),l++):l&&(o(i,p),l--)}if(!u)for(;l--;l)i.unshift("..");!u||""===i[0]||i[0]&&r(i[0])||i.unshift("");var d=i.join("/");return s&&"/"!==d.substr(-1)&&(d+="/"),d}},2177:(t,e,n)=>{"use strict";n.d(e,{Z:()=>o});var r="Invariant failed";function o(t,e){if(!t)throw new Error(r)}},54545:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var 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};const o=function t(e,n){if(e===n)return!0;if(null==e||null==n)return!1;if(Array.isArray(e))return Array.isArray(n)&&e.length===n.length&&e.every((function(e,r){return t(e,n[r])}));var o=void 0===e?"undefined":r(e);if(o!==(void 0===n?"undefined":r(n)))return!1;if("object"===o){var i=e.valueOf(),a=n.valueOf();if(i!==e||a!==n)return t(i,a);var c=Object.keys(e),u=Object.keys(n);return c.length===u.length&&c.every((function(r){return t(e[r],n[r])}))}return!1}},13993:(t,e,n)=>{"use strict";var r=n(89349);function o(){}function i(){}i.resetWarningCache=o,t.exports=function(){function t(t,e,n,o,i,a){if(a!==r){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},97985:(t,e,n)=>{t.exports=n(13993)()},89349:t=>{"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6078:(t,e,n)=>{var r=n(43069);t.exports=function(t){if(Array.isArray(t))return r(t)}},91772:t=>{t.exports=function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}},31503:t=>{t.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},292:(t,e,n)=>{var r=n(6078),o=n(91772),i=n(27258),a=n(31503);t.exports=function(t){return r(t)||o(t)||i(t)||a()}}}]);
7
- //# sourceMappingURL=chunk-140.e4b48d2a60e4ffb79b25.js.map