ext-settings_menu-4c604993.js 16 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import{g as P}from"./index-91b358e1.js";function E(S,L){for(var i=0;i<L.length;i++){const u=L[i];if(typeof u!="string"&&!Array.isArray(u)){for(const p in u)if(p!=="default"&&!(p in S)){const l=Object.getOwnPropertyDescriptor(u,p);l&&Object.defineProperty(S,p,l.get?l:{enumerable:!0,get:()=>u[p]})}}}return Object.freeze(Object.defineProperty(S,Symbol.toStringTag,{value:"Module"}))}var w={exports:{}};(function(S,L){ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(i,u,p){p.exports=`#ace_settingsmenu, #kbshortcutmenu {
  2. background-color: #F7F7F7;
  3. color: black;
  4. box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);
  5. padding: 1em 0.5em 2em 1em;
  6. overflow: auto;
  7. position: absolute;
  8. margin: 0;
  9. bottom: 0;
  10. right: 0;
  11. top: 0;
  12. z-index: 9991;
  13. cursor: default;
  14. }
  15. .ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {
  16. box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);
  17. background-color: rgba(255, 255, 255, 0.6);
  18. color: black;
  19. }
  20. .ace_optionsMenuEntry:hover {
  21. background-color: rgba(100, 100, 100, 0.1);
  22. transition: all 0.3s
  23. }
  24. .ace_closeButton {
  25. background: rgba(245, 146, 146, 0.5);
  26. border: 1px solid #F48A8A;
  27. border-radius: 50%;
  28. padding: 7px;
  29. position: absolute;
  30. right: -8px;
  31. top: -8px;
  32. z-index: 100000;
  33. }
  34. .ace_closeButton{
  35. background: rgba(245, 146, 146, 0.9);
  36. }
  37. .ace_optionsMenuKey {
  38. color: darkslateblue;
  39. font-weight: bold;
  40. }
  41. .ace_optionsMenuCommand {
  42. color: darkcyan;
  43. font-weight: normal;
  44. }
  45. .ace_optionsMenuEntry input, .ace_optionsMenuEntry button {
  46. vertical-align: middle;
  47. }
  48. .ace_optionsMenuEntry button[ace_selected_button=true] {
  49. background: #e7e7e7;
  50. box-shadow: 1px 0px 2px 0px #adadad inset;
  51. border-color: #adadad;
  52. }
  53. .ace_optionsMenuEntry button {
  54. background: white;
  55. border: 1px solid lightgray;
  56. margin: 0px;
  57. }
  58. .ace_optionsMenuEntry button:hover{
  59. background: #f0f0f0;
  60. }`}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(i,u,p){var l=i("../../lib/dom"),d=i("./settings_menu.css");l.importCssString(d,"settings_menu.css",!1),p.exports.overlayPage=function(s,m,v){var c=document.createElement("div"),y=!1;function x(a){a.keyCode===27&&f()}function f(){c&&(document.removeEventListener("keydown",x),c.parentNode.removeChild(c),s&&s.focus(),c=null,v&&v())}function k(a){y=a,a&&(c.style.pointerEvents="none",m.style.pointerEvents="auto")}return c.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(s?"background-color: rgba(0, 0, 0, 0.3);":""),c.addEventListener("click",function(a){y||f()}),document.addEventListener("keydown",x),m.addEventListener("click",function(a){a.stopPropagation()}),c.appendChild(m),document.body.appendChild(c),s&&s.blur(),{close:f,setIgnoreFocusOut:k}}}),ace.define("ace/ext/modelist",["require","exports","module"],function(i,u,p){var l=[];function d(a){for(var t=v.text,e=a.split(/[\/\\]/).pop(),r=0;r<l.length;r++)if(l[r].supportsFile(e)){t=l[r];break}return t}var b=function(){function a(t,e,r){this.name=t,this.caption=e,this.mode="ace/mode/"+t,this.extensions=r;var n;/\^/.test(r)?n=r.replace(/\|(\^)?/g,function(g,_){return"$|"+(_?"^":"^.*\\.")})+"$":n="^.*\\.("+r+")$",this.extRe=new RegExp(n,"gi")}return a.prototype.supportsFile=function(t){return t.match(this.extRe)},a}(),s={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_x86:["asm|a"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|vue|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|jsx|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Django:["html"]},m={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},v={};for(var c in s){var y=s[c],x=(m[c]||c).replace(/_/g," "),f=c.toLowerCase(),k=new b(f,x,y[0]);v[f]=k,l.push(k)}p.exports={getModeForPath:d,modes:l,modesByName:v}}),ace.define("ace/ext/themelist",["require","exports","module"],function(i,u,p){var l=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["One Dark","one_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"],["GitHub Dark","github_dark","dark"]];u.themesByName={},u.themes=l.map(function(d){var b=d[1]||d[0].replace(/ /g,"_").toLowerCase(),s={caption:d[0],theme:"ace/theme/"+b,isDark:d[2]=="dark",name:b};return u.themesByName[b]=s,s})}),ace.define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"],function(i,u,p){i("./menu_tools/overlay_page");var l=i("../lib/dom"),d=i("../lib/oop"),b=i("../config"),s=i("../lib/event_emitter").EventEmitter,m=l.buildDom,v=i("./modelist"),c=i("./themelist"),y={Bright:[],Dark:[]};c.themes.forEach(function(a){y[a.isDark?"Dark":"Bright"].push({caption:a.caption,value:a.theme})});var x=v.modes.map(function(a){return{caption:a.caption,value:a.mode}}),f={Main:{Mode:{path:"mode",type:"select",items:x},Theme:{path:"theme",type:"select",items:y},Keybinding:{type:"buttonBar",path:"keyboardHandler",items:[{caption:"Ace",value:null},{caption:"Vim",value:"ace/keyboard/vim"},{caption:"Emacs",value:"ace/keyboard/emacs"},{caption:"Sublime",value:"ace/keyboard/sublime"},{caption:"VSCode",value:"ace/keyboard/vscode"}]},"Font Size":{path:"fontSize",type:"number",defaultValue:12,defaults:[{caption:"12px",value:12},{caption:"24px",value:24}]},"Soft Wrap":{type:"buttonBar",path:"wrap",items:[{caption:"Off",value:"off"},{caption:"View",value:"free"},{caption:"margin",value:"printMargin"},{caption:"40",value:"40"}]},"Cursor Style":{path:"cursorStyle",items:[{caption:"Ace",value:"ace"},{caption:"Slim",value:"slim"},{caption:"Smooth",value:"smooth"},{caption:"Smooth And Slim",value:"smooth slim"},{caption:"Wide",value:"wide"}]},Folding:{path:"foldStyle",items:[{caption:"Manual",value:"manual"},{caption:"Mark begin",value:"markbegin"},{caption:"Mark begin and end",value:"markbeginend"}]},"Soft Tabs":[{path:"useSoftTabs"},{ariaLabel:"Tab Size",path:"tabSize",type:"number",values:[2,3,4,8,16]}],Overscroll:{type:"buttonBar",path:"scrollPastEnd",items:[{caption:"None",value:0},{caption:"Half",value:.5},{caption:"Full",value:1}]}},More:{"Atomic soft tabs":{path:"navigateWithinSoftTabs"},"Enable Behaviours":{path:"behavioursEnabled"},"Wrap with quotes":{path:"wrapBehavioursEnabled"},"Enable Auto Indent":{path:"enableAutoIndent"},"Full Line Selection":{type:"checkbox",values:"text|line",path:"selectionStyle"},"Highlight Active Line":{path:"highlightActiveLine"},"Show Invisibles":{path:"showInvisibles"},"Show Indent Guides":{path:"displayIndentGuides"},"Highlight Indent Guides":{path:"highlightIndentGuides"},"Persistent HScrollbar":{path:"hScrollBarAlwaysVisible"},"Persistent VScrollbar":{path:"vScrollBarAlwaysVisible"},"Animate scrolling":{path:"animatedScroll"},"Show Gutter":{path:"showGutter"},"Show Line Numbers":{path:"showLineNumbers"},"Relative Line Numbers":{path:"relativeLineNumbers"},"Fixed Gutter Width":{path:"fixedWidthGutter"},"Show Print Margin":[{path:"showPrintMargin"},{ariaLabel:"Print Margin",type:"number",path:"printMarginColumn"}],"Indented Soft Wrap":{path:"indentedSoftWrap"},"Highlight selected word":{path:"highlightSelectedWord"},"Fade Fold Widgets":{path:"fadeFoldWidgets"},"Use textarea for IME":{path:"useTextareaForIME"},"Merge Undo Deltas":{path:"mergeUndoDeltas",items:[{caption:"Always",value:"always"},{caption:"Never",value:"false"},{caption:"Timed",value:"true"}]},"Elastic Tabstops":{path:"useElasticTabstops"},"Incremental Search":{path:"useIncrementalSearch"},"Read-only":{path:"readOnly"},"Copy without selection":{path:"copyWithEmptySelection"},"Live Autocompletion":{path:"enableLiveAutocompletion"},"Custom scrollbar":{path:"customScrollbar"},"Use SVG gutter icons":{path:"useSvgGutterIcons"},"Annotations for folded lines":{path:"showFoldedAnnotations"},"Keyboard Accessibility Mode":{path:"enableKeyboardAccessibility"}}},k=function(){function a(t,e){this.editor=t,this.container=e||document.createElement("div"),this.groups=[],this.options={}}return a.prototype.add=function(t){t.Main&&d.mixin(f.Main,t.Main),t.More&&d.mixin(f.More,t.More)},a.prototype.render=function(){this.container.innerHTML="",m(["table",{role:"presentation",id:"controls"},this.renderOptionGroup(f.Main),["tr",null,["td",{colspan:2},["table",{role:"presentation",id:"more-controls"},this.renderOptionGroup(f.More)]]],["tr",null,["td",{colspan:2},"version "+b.version]]],this.container)},a.prototype.renderOptionGroup=function(t){return Object.keys(t).map(function(e,r){var n=t[e];return n.position||(n.position=r/1e4),n.label||(n.label=e),n}).sort(function(e,r){return e.position-r.position}).map(function(e){return this.renderOption(e.label,e)},this)},a.prototype.renderOptionControl=function(t,e){var r=this;if(Array.isArray(e))return e.map(function(o){return r.renderOptionControl(t,o)});var n,g=r.getOption(e);if(e.values&&e.type!="checkbox"&&(typeof e.values=="string"&&(e.values=e.values.split("|")),e.items=e.values.map(function(o){return{value:o,name:o}})),e.type=="buttonBar")n=["div",{role:"group","aria-labelledby":e.path+"-label"},e.items.map(function(o){return["button",{value:o.value,ace_selected_button:g==o.value,"aria-pressed":g==o.value,onclick:function(){r.setOption(e,o.value);for(var h=this.parentNode.querySelectorAll("[ace_selected_button]"),M=0;M<h.length;M++)h[M].removeAttribute("ace_selected_button"),h[M].setAttribute("aria-pressed",!1);this.setAttribute("ace_selected_button",!0),this.setAttribute("aria-pressed",!0)}},o.desc||o.caption||o.name]})];else if(e.type=="number")n=["input",{type:"number",value:g||e.defaultValue,style:"width:3em",oninput:function(){r.setOption(e,parseInt(this.value))}}],e.ariaLabel?n[1]["aria-label"]=e.ariaLabel:n[1].id=t,e.defaults&&(n=[n,e.defaults.map(function(o){return["button",{onclick:function(){var h=this.parentNode.firstChild;h.value=o.value,h.oninput()}},o.caption]})]);else if(e.items){var _=function(o){return o.map(function(h){return["option",{value:h.value||h.name},h.desc||h.caption||h.name]})},A=Array.isArray(e.items)?_(e.items):Object.keys(e.items).map(function(o){return["optgroup",{label:o},_(e.items[o])]});n=["select",{id:t,value:g,onchange:function(){r.setOption(e,this.value)}},A]}else typeof e.values=="string"&&(e.values=e.values.split("|")),e.values&&(g=g==e.values[1]),n=["input",{type:"checkbox",id:t,checked:g||null,onchange:function(){var o=this.checked;e.values&&(o=e.values[o?1:0]),r.setOption(e,o)}}],e.type=="checkedNumber"&&(n=[n,[]]);return n},a.prototype.renderOption=function(t,e){if(!(e.path&&!e.onchange&&!this.editor.$options[e.path])){var r=Array.isArray(e)?e[0].path:e.path;this.options[r]=e;var n="-"+r,g=r+"-label",_=this.renderOptionControl(n,e);return["tr",{class:"ace_optionsMenuEntry"},["td",["label",{for:n,id:g},t]],["td",_]]}},a.prototype.setOption=function(t,e){typeof t=="string"&&(t=this.options[t]),e=="false"&&(e=!1),e=="true"&&(e=!0),e=="null"&&(e=null),e=="undefined"&&(e=void 0),typeof e=="string"&&parseFloat(e).toString()==e&&(e=parseFloat(e)),t.onchange?t.onchange(e):t.path&&this.editor.setOption(t.path,e),this._signal("setOption",{name:t.path,value:e})},a.prototype.getOption=function(t){return t.getValue?t.getValue():this.editor.getOption(t.path)},a}();d.implement(k.prototype,s),u.OptionPanel=k}),ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/options","ace/ext/menu_tools/overlay_page","ace/editor"],function(i,u,p){var l=i("./options").OptionPanel,d=i("./menu_tools/overlay_page").overlayPage;function b(s){if(!document.getElementById("ace_settingsmenu")){var m=new l(s);m.render(),m.container.id="ace_settingsmenu",d(s,m.container),m.container.querySelector("select,input,button,checkbox").focus()}}p.exports.init=function(){var s=i("../editor").Editor;s.prototype.showSettingsMenu=function(){b(this)}}}),function(){ace.require(["ace/ext/settings_menu"],function(i){S&&(S.exports=i)})}()})(w);var C=w.exports;const O=P(C),j=E({__proto__:null,default:O},[C]);export{j as e};
  61. //# sourceMappingURL=ext-settings_menu-4c604993.js.map