ace-rails-ap 0.0.3 → 1.0.0
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.
- data/lib/ace/rails/version.rb +1 -1
 - data/vendor/assets/javascripts/ace.js +15680 -1
 - data/vendor/assets/javascripts/keybinding-emacs.js +367 -1
 - data/vendor/assets/javascripts/keybinding-vim.js +1635 -1
 - data/vendor/assets/javascripts/mode-c9search.js +275 -0
 - data/vendor/assets/javascripts/mode-c_cpp.js +744 -1
 - data/vendor/assets/javascripts/mode-clojure.js +364 -1
 - data/vendor/assets/javascripts/mode-coffee.js +527 -1
 - data/vendor/assets/javascripts/mode-coldfusion.js +1966 -1
 - data/vendor/assets/javascripts/mode-csharp.js +633 -1
 - data/vendor/assets/javascripts/mode-css.js +499 -1
 - data/vendor/assets/javascripts/mode-diff.js +250 -0
 - data/vendor/assets/javascripts/{mode-c_cpp-uncompressed.js → mode-glsl.js} +147 -244
 - data/vendor/assets/javascripts/mode-golang.js +681 -1
 - data/vendor/assets/javascripts/mode-groovy.js +1240 -1
 - data/vendor/assets/javascripts/mode-haxe.js +633 -1
 - data/vendor/assets/javascripts/mode-html.js +2064 -1
 - data/vendor/assets/javascripts/mode-java.js +1202 -1
 - data/vendor/assets/javascripts/mode-javascript.js +1069 -1
 - data/vendor/assets/javascripts/mode-json.js +588 -1
 - data/vendor/assets/javascripts/{mode-haxe-uncompressed.js → mode-jsx.js} +189 -312
 - data/vendor/assets/javascripts/mode-latex.js +95 -1
 - data/vendor/assets/javascripts/mode-less.js +512 -1
 - data/vendor/assets/javascripts/mode-liquid.js +1125 -1
 - data/vendor/assets/javascripts/mode-lua.js +551 -1
 - data/vendor/assets/javascripts/{mode-html-uncompressed.js → mode-luahtml.js} +544 -604
 - data/vendor/assets/javascripts/{mode-coldfusion-uncompressed.js → mode-luapage.js} +2326 -2180
 - data/vendor/assets/javascripts/mode-markdown.js +2369 -1
 - data/vendor/assets/javascripts/mode-ocaml.js +464 -1
 - data/vendor/assets/javascripts/mode-perl.js +432 -1
 - data/vendor/assets/javascripts/mode-pgsql.js +970 -1
 - data/vendor/assets/javascripts/mode-php.js +1718 -1
 - data/vendor/assets/javascripts/mode-powershell.js +610 -1
 - data/vendor/assets/javascripts/mode-python.js +397 -1
 - data/vendor/assets/javascripts/mode-ruby.js +318 -1
 - data/vendor/assets/javascripts/mode-scad.js +732 -1
 - data/vendor/assets/javascripts/mode-scala.js +1237 -1
 - data/vendor/assets/javascripts/mode-scss.js +537 -1
 - data/vendor/assets/javascripts/mode-sh.js +250 -1
 - data/vendor/assets/javascripts/mode-sql.js +140 -1
 - data/vendor/assets/javascripts/mode-svg.js +1681 -1
 - data/vendor/assets/javascripts/mode-tcl.js +320 -0
 - data/vendor/assets/javascripts/mode-textile.js +182 -1
 - data/vendor/assets/javascripts/mode-xml.js +829 -1
 - data/vendor/assets/javascripts/mode-xquery.js +605 -1
 - data/vendor/assets/javascripts/mode-yaml.js +189 -0
 - data/vendor/assets/javascripts/theme-chrome.js +213 -1
 - data/vendor/assets/javascripts/theme-clouds.js +167 -1
 - data/vendor/assets/javascripts/theme-clouds_midnight.js +168 -1
 - data/vendor/assets/javascripts/theme-cobalt.js +194 -1
 - data/vendor/assets/javascripts/theme-crimson_editor.js +200 -1
 - data/vendor/assets/javascripts/theme-dawn.js +198 -1
 - data/vendor/assets/javascripts/theme-dreamweaver.js +230 -1
 - data/vendor/assets/javascripts/theme-eclipse.js +157 -1
 - data/vendor/assets/javascripts/theme-github.js +182 -0
 - data/vendor/assets/javascripts/theme-idle_fingers.js +186 -1
 - data/vendor/assets/javascripts/theme-kr_theme.js +189 -1
 - data/vendor/assets/javascripts/theme-merbivore.js +189 -1
 - data/vendor/assets/javascripts/theme-merbivore_soft.js +195 -1
 - data/vendor/assets/javascripts/theme-mono_industrial.js +197 -1
 - data/vendor/assets/javascripts/theme-monokai.js +194 -1
 - data/vendor/assets/javascripts/theme-pastel_on_dark.js +199 -1
 - data/vendor/assets/javascripts/theme-solarized_dark.js +180 -1
 - data/vendor/assets/javascripts/theme-solarized_light.js +179 -1
 - data/vendor/assets/javascripts/theme-textmate.js +216 -0
 - data/vendor/assets/javascripts/theme-tomorrow.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright.js +213 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties.js +209 -1
 - data/vendor/assets/javascripts/theme-twilight.js +211 -1
 - data/vendor/assets/javascripts/theme-vibrant_ink.js +190 -1
 - data/vendor/assets/javascripts/worker-coffee.js +83 -893
 - data/vendor/assets/javascripts/worker-css.js +88 -1402
 - data/vendor/assets/javascripts/worker-javascript.js +97 -812
 - data/vendor/assets/javascripts/worker-json.js +84 -761
 - data/vendor/assets/javascripts/worker-xquery.js +66464 -0
 - metadata +12 -195
 - data/vendor/assets/javascripts/ace-compat-noconflict.js +0 -1
 - data/vendor/assets/javascripts/ace-compat-uncompressed-noconflict.js +0 -480
 - data/vendor/assets/javascripts/ace-compat-uncompressed.js +0 -480
 - data/vendor/assets/javascripts/ace-compat.js +0 -1
 - data/vendor/assets/javascripts/ace-noconflict.js +0 -10
 - data/vendor/assets/javascripts/ace-uncompressed-noconflict.js +0 -19976
 - data/vendor/assets/javascripts/ace-uncompressed.js +0 -19976
 - data/vendor/assets/javascripts/keybinding-emacs-noconflict.js +0 -1
 - data/vendor/assets/javascripts/keybinding-emacs-uncompressed-noconflict.js +0 -150
 - data/vendor/assets/javascripts/keybinding-emacs-uncompressed.js +0 -150
 - data/vendor/assets/javascripts/keybinding-vim-noconflict.js +0 -1
 - data/vendor/assets/javascripts/keybinding-vim-uncompressed-noconflict.js +0 -138
 - data/vendor/assets/javascripts/keybinding-vim-uncompressed.js +0 -138
 - data/vendor/assets/javascripts/mode-c_cpp-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-c_cpp-uncompressed-noconflict.js +0 -919
 - data/vendor/assets/javascripts/mode-clojure-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-clojure-uncompressed-noconflict.js +0 -422
 - data/vendor/assets/javascripts/mode-clojure-uncompressed.js +0 -422
 - data/vendor/assets/javascripts/mode-coffee-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-coffee-uncompressed-noconflict.js +0 -607
 - data/vendor/assets/javascripts/mode-coffee-uncompressed.js +0 -607
 - data/vendor/assets/javascripts/mode-coldfusion-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-coldfusion-uncompressed-noconflict.js +0 -2458
 - data/vendor/assets/javascripts/mode-csharp-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-csharp-uncompressed-noconflict.js +0 -769
 - data/vendor/assets/javascripts/mode-csharp-uncompressed.js +0 -769
 - data/vendor/assets/javascripts/mode-css-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-css-uncompressed-noconflict.js +0 -641
 - data/vendor/assets/javascripts/mode-css-uncompressed.js +0 -641
 - data/vendor/assets/javascripts/mode-golang-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-golang-uncompressed-noconflict.js +0 -378
 - data/vendor/assets/javascripts/mode-golang-uncompressed.js +0 -378
 - data/vendor/assets/javascripts/mode-groovy-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-groovy-uncompressed-noconflict.js +0 -1393
 - data/vendor/assets/javascripts/mode-groovy-uncompressed.js +0 -1393
 - data/vendor/assets/javascripts/mode-haxe-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-haxe-uncompressed-noconflict.js +0 -769
 - data/vendor/assets/javascripts/mode-html-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-html-uncompressed-noconflict.js +0 -2475
 - data/vendor/assets/javascripts/mode-java-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-java-uncompressed-noconflict.js +0 -1395
 - data/vendor/assets/javascripts/mode-java-uncompressed.js +0 -1395
 - data/vendor/assets/javascripts/mode-javascript-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-javascript-uncompressed-noconflict.js +0 -1226
 - data/vendor/assets/javascripts/mode-javascript-uncompressed.js +0 -1226
 - data/vendor/assets/javascripts/mode-json-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-json-uncompressed-noconflict.js +0 -701
 - data/vendor/assets/javascripts/mode-json-uncompressed.js +0 -701
 - data/vendor/assets/javascripts/mode-latex-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-latex-uncompressed-noconflict.js +0 -95
 - data/vendor/assets/javascripts/mode-latex-uncompressed.js +0 -95
 - data/vendor/assets/javascripts/mode-less-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-less-uncompressed-noconflict.js +0 -655
 - data/vendor/assets/javascripts/mode-less-uncompressed.js +0 -655
 - data/vendor/assets/javascripts/mode-liquid-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-liquid-uncompressed-noconflict.js +0 -1353
 - data/vendor/assets/javascripts/mode-liquid-uncompressed.js +0 -1353
 - data/vendor/assets/javascripts/mode-lua-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-lua-uncompressed-noconflict.js +0 -523
 - data/vendor/assets/javascripts/mode-lua-uncompressed.js +0 -523
 - data/vendor/assets/javascripts/mode-markdown-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-markdown-uncompressed-noconflict.js +0 -2925
 - data/vendor/assets/javascripts/mode-markdown-uncompressed.js +0 -2925
 - data/vendor/assets/javascripts/mode-ocaml-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-ocaml-uncompressed-noconflict.js +0 -539
 - data/vendor/assets/javascripts/mode-ocaml-uncompressed.js +0 -539
 - data/vendor/assets/javascripts/mode-perl-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-perl-uncompressed-noconflict.js +0 -574
 - data/vendor/assets/javascripts/mode-perl-uncompressed.js +0 -574
 - data/vendor/assets/javascripts/mode-pgsql-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-pgsql-uncompressed-noconflict.js +0 -1104
 - data/vendor/assets/javascripts/mode-pgsql-uncompressed.js +0 -1104
 - data/vendor/assets/javascripts/mode-php-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-php-uncompressed-noconflict.js +0 -1885
 - data/vendor/assets/javascripts/mode-php-uncompressed.js +0 -1885
 - data/vendor/assets/javascripts/mode-powershell-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-powershell-uncompressed-noconflict.js +0 -710
 - data/vendor/assets/javascripts/mode-powershell-uncompressed.js +0 -710
 - data/vendor/assets/javascripts/mode-python-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-python-uncompressed-noconflict.js +0 -507
 - data/vendor/assets/javascripts/mode-python-uncompressed.js +0 -507
 - data/vendor/assets/javascripts/mode-ruby-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-ruby-uncompressed-noconflict.js +0 -391
 - data/vendor/assets/javascripts/mode-ruby-uncompressed.js +0 -391
 - data/vendor/assets/javascripts/mode-scad-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scad-uncompressed-noconflict.js +0 -907
 - data/vendor/assets/javascripts/mode-scad-uncompressed.js +0 -907
 - data/vendor/assets/javascripts/mode-scala-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scala-uncompressed-noconflict.js +0 -1395
 - data/vendor/assets/javascripts/mode-scala-uncompressed.js +0 -1395
 - data/vendor/assets/javascripts/mode-scss-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-scss-uncompressed-noconflict.js +0 -679
 - data/vendor/assets/javascripts/mode-scss-uncompressed.js +0 -679
 - data/vendor/assets/javascripts/mode-sh-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-sh-uncompressed-noconflict.js +0 -289
 - data/vendor/assets/javascripts/mode-sh-uncompressed.js +0 -289
 - data/vendor/assets/javascripts/mode-sql-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-sql-uncompressed-noconflict.js +0 -159
 - data/vendor/assets/javascripts/mode-sql-uncompressed.js +0 -159
 - data/vendor/assets/javascripts/mode-svg-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-svg-uncompressed-noconflict.js +0 -2137
 - data/vendor/assets/javascripts/mode-svg-uncompressed.js +0 -2137
 - data/vendor/assets/javascripts/mode-text-noconflict.js +0 -0
 - data/vendor/assets/javascripts/mode-text-uncompressed-noconflict.js +0 -0
 - data/vendor/assets/javascripts/mode-text-uncompressed.js +0 -0
 - data/vendor/assets/javascripts/mode-textile-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-textile-uncompressed-noconflict.js +0 -254
 - data/vendor/assets/javascripts/mode-textile-uncompressed.js +0 -254
 - data/vendor/assets/javascripts/mode-xml-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-xml-uncompressed-noconflict.js +0 -1012
 - data/vendor/assets/javascripts/mode-xml-uncompressed.js +0 -1012
 - data/vendor/assets/javascripts/mode-xquery-noconflict.js +0 -1
 - data/vendor/assets/javascripts/mode-xquery-uncompressed-noconflict.js +0 -540
 - data/vendor/assets/javascripts/mode-xquery-uncompressed.js +0 -540
 - data/vendor/assets/javascripts/theme-chrome-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-chrome-uncompressed-noconflict.js +0 -207
 - data/vendor/assets/javascripts/theme-chrome-uncompressed.js +0 -207
 - data/vendor/assets/javascripts/theme-clouds-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-clouds-uncompressed-noconflict.js +0 -160
 - data/vendor/assets/javascripts/theme-clouds-uncompressed.js +0 -160
 - data/vendor/assets/javascripts/theme-clouds_midnight-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed-noconflict.js +0 -161
 - data/vendor/assets/javascripts/theme-clouds_midnight-uncompressed.js +0 -161
 - data/vendor/assets/javascripts/theme-cobalt-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-cobalt-uncompressed-noconflict.js +0 -187
 - data/vendor/assets/javascripts/theme-cobalt-uncompressed.js +0 -187
 - data/vendor/assets/javascripts/theme-crimson_editor-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-crimson_editor-uncompressed-noconflict.js +0 -198
 - data/vendor/assets/javascripts/theme-crimson_editor-uncompressed.js +0 -198
 - data/vendor/assets/javascripts/theme-dawn-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-dawn-uncompressed-noconflict.js +0 -191
 - data/vendor/assets/javascripts/theme-dawn-uncompressed.js +0 -191
 - data/vendor/assets/javascripts/theme-dreamweaver-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-dreamweaver-uncompressed-noconflict.js +0 -227
 - data/vendor/assets/javascripts/theme-dreamweaver-uncompressed.js +0 -227
 - data/vendor/assets/javascripts/theme-eclipse-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-eclipse-uncompressed-noconflict.js +0 -147
 - data/vendor/assets/javascripts/theme-eclipse-uncompressed.js +0 -147
 - data/vendor/assets/javascripts/theme-idle_fingers-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-idle_fingers-uncompressed-noconflict.js +0 -179
 - data/vendor/assets/javascripts/theme-idle_fingers-uncompressed.js +0 -179
 - data/vendor/assets/javascripts/theme-kr_theme-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-kr_theme-uncompressed-noconflict.js +0 -182
 - data/vendor/assets/javascripts/theme-kr_theme-uncompressed.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-merbivore-uncompressed-noconflict.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore-uncompressed.js +0 -182
 - data/vendor/assets/javascripts/theme-merbivore_soft-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed-noconflict.js +0 -188
 - data/vendor/assets/javascripts/theme-merbivore_soft-uncompressed.js +0 -188
 - data/vendor/assets/javascripts/theme-mono_industrial-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-mono_industrial-uncompressed-noconflict.js +0 -190
 - data/vendor/assets/javascripts/theme-mono_industrial-uncompressed.js +0 -190
 - data/vendor/assets/javascripts/theme-monokai-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-monokai-uncompressed-noconflict.js +0 -191
 - data/vendor/assets/javascripts/theme-monokai-uncompressed.js +0 -191
 - data/vendor/assets/javascripts/theme-pastel_on_dark-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed-noconflict.js +0 -192
 - data/vendor/assets/javascripts/theme-pastel_on_dark-uncompressed.js +0 -192
 - data/vendor/assets/javascripts/theme-solarized_dark-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-solarized_dark-uncompressed-noconflict.js +0 -176
 - data/vendor/assets/javascripts/theme-solarized_dark-uncompressed.js +0 -176
 - data/vendor/assets/javascripts/theme-solarized_light-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-solarized_light-uncompressed-noconflict.js +0 -172
 - data/vendor/assets/javascripts/theme-solarized_light-uncompressed.js +0 -172
 - data/vendor/assets/javascripts/theme-textmate-noconflict.js +0 -0
 - data/vendor/assets/javascripts/theme-textmate-uncompressed-noconflict.js +0 -0
 - data/vendor/assets/javascripts/theme-textmate-uncompressed.js +0 -0
 - data/vendor/assets/javascripts/theme-tomorrow-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed-noconflict.js +0 -209
 - data/vendor/assets/javascripts/theme-tomorrow_night_blue-uncompressed.js +0 -209
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed-noconflict.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_bright-uncompressed.js +0 -206
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed-noconflict.js +0 -202
 - data/vendor/assets/javascripts/theme-tomorrow_night_eighties-uncompressed.js +0 -202
 - data/vendor/assets/javascripts/theme-twilight-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-twilight-uncompressed-noconflict.js +0 -204
 - data/vendor/assets/javascripts/theme-twilight-uncompressed.js +0 -204
 - data/vendor/assets/javascripts/theme-vibrant_ink-noconflict.js +0 -1
 - data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed-noconflict.js +0 -183
 - data/vendor/assets/javascripts/theme-vibrant_ink-uncompressed.js +0 -183
 
| 
         @@ -35,8 +35,8 @@ var require = function(parentId, id) { 
     | 
|
| 
       35 
35 
     | 
    
         
             
                var module = require.modules[id];
         
     | 
| 
       36 
36 
     | 
    
         
             
                if (module) {
         
     | 
| 
       37 
37 
     | 
    
         
             
                    if (!module.initialized) {
         
     | 
| 
       38 
     | 
    
         
            -
                        module.exports = module.factory().exports;
         
     | 
| 
       39 
38 
     | 
    
         
             
                        module.initialized = true;
         
     | 
| 
      
 39 
     | 
    
         
            +
                        module.exports = module.factory().exports;
         
     | 
| 
       40 
40 
     | 
    
         
             
                    }
         
     | 
| 
       41 
41 
     | 
    
         
             
                    return module.exports;
         
     | 
| 
       42 
42 
     | 
    
         
             
                }
         
     | 
| 
         @@ -56,6 +56,10 @@ require.tlns = {}; 
     | 
|
| 
       56 
56 
     | 
    
         
             
            var define = function(id, deps, factory) {
         
     | 
| 
       57 
57 
     | 
    
         
             
                if (arguments.length == 2) {
         
     | 
| 
       58 
58 
     | 
    
         
             
                    factory = deps;
         
     | 
| 
      
 59 
     | 
    
         
            +
                    if (typeof id != "string") {
         
     | 
| 
      
 60 
     | 
    
         
            +
                        deps = id;
         
     | 
| 
      
 61 
     | 
    
         
            +
                        id = require.id;
         
     | 
| 
      
 62 
     | 
    
         
            +
                    }
         
     | 
| 
       59 
63 
     | 
    
         
             
                } else if (arguments.length == 1) {
         
     | 
| 
       60 
64 
     | 
    
         
             
                    factory = id;
         
     | 
| 
       61 
65 
     | 
    
         
             
                    id = require.id;
         
     | 
| 
         @@ -149,25 +153,15 @@ onmessage = function(e) { 
     | 
|
| 
       149 
153 
     | 
    
         
             
            */
         
     | 
| 
       150 
154 
     | 
    
         | 
| 
       151 
155 
     | 
    
         
             
            define('ace/lib/fixoldbrowsers', ['require', 'exports', 'module' , 'ace/lib/regexp', 'ace/lib/es5-shim'], function(require, exports, module) {
         
     | 
| 
       152 
     | 
    
         
            -
             
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
       153 
157 
     | 
    
         | 
| 
       154 
158 
     | 
    
         
             
            require("./regexp");
         
     | 
| 
       155 
159 
     | 
    
         
             
            require("./es5-shim");
         
     | 
| 
       156 
160 
     | 
    
         | 
| 
       157 
161 
     | 
    
         
             
            });
         
     | 
| 
       158 
     | 
    
         
            -
            /*
         
     | 
| 
       159 
     | 
    
         
            -
             *  Based on code from:
         
     | 
| 
       160 
     | 
    
         
            -
             *
         
     | 
| 
       161 
     | 
    
         
            -
             * XRegExp 1.5.0
         
     | 
| 
       162 
     | 
    
         
            -
             * (c) 2007-2010 Steven Levithan
         
     | 
| 
       163 
     | 
    
         
            -
             * MIT License
         
     | 
| 
       164 
     | 
    
         
            -
             * <http://xregexp.com>
         
     | 
| 
       165 
     | 
    
         
            -
             * Provides an augmented, extensible, cross-browser implementation of regular expressions,
         
     | 
| 
       166 
     | 
    
         
            -
             * including support for additional syntax, flags, and methods
         
     | 
| 
       167 
     | 
    
         
            -
             */
         
     | 
| 
       168 
162 
     | 
    
         | 
| 
       169 
163 
     | 
    
         
             
            define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       170 
     | 
    
         
            -
             
     | 
| 
      
 164 
     | 
    
         
            +
             
     | 
| 
       171 
165 
     | 
    
         | 
| 
       172 
166 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
       173 
167 
     | 
    
         
             
                //  Private variables
         
     | 
| 
         @@ -187,6 +181,9 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       187 
181 
     | 
    
         
             
                        return !x.lastIndex;
         
     | 
| 
       188 
182 
     | 
    
         
             
                    }();
         
     | 
| 
       189 
183 
     | 
    
         | 
| 
      
 184 
     | 
    
         
            +
                if (compliantLastIndexIncrement && compliantExecNpcg)
         
     | 
| 
      
 185 
     | 
    
         
            +
                    return;
         
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
       190 
187 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
       191 
188 
     | 
    
         
             
                //  Overriden native methods
         
     | 
| 
       192 
189 
     | 
    
         
             
                //---------------------------------
         
     | 
| 
         @@ -252,7 +249,7 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       252 
249 
     | 
    
         
             
                           (regex.multiline  ? "m" : "") +
         
     | 
| 
       253 
250 
     | 
    
         
             
                           (regex.extended   ? "x" : "") + // Proposed for ES4; included in AS3
         
     | 
| 
       254 
251 
     | 
    
         
             
                           (regex.sticky     ? "y" : "");
         
     | 
| 
       255 
     | 
    
         
            -
                } 
     | 
| 
      
 252 
     | 
    
         
            +
                }
         
     | 
| 
       256 
253 
     | 
    
         | 
| 
       257 
254 
     | 
    
         
             
                function indexOf (array, item, from) {
         
     | 
| 
       258 
255 
     | 
    
         
             
                    if (Array.prototype.indexOf) // Use the native array method if available
         
     | 
| 
         @@ -262,30 +259,9 @@ define('ace/lib/regexp', ['require', 'exports', 'module' ], function(require, ex 
     | 
|
| 
       262 
259 
     | 
    
         
             
                            return i;
         
     | 
| 
       263 
260 
     | 
    
         
             
                    }
         
     | 
| 
       264 
261 
     | 
    
         
             
                    return -1;
         
     | 
| 
       265 
     | 
    
         
            -
                } 
     | 
| 
      
 262 
     | 
    
         
            +
                }
         
     | 
| 
       266 
263 
     | 
    
         | 
| 
       267 
264 
     | 
    
         
             
            });
         
     | 
| 
       268 
     | 
    
         
            -
            // vim: ts=4 sts=4 sw=4 expandtab
         
     | 
| 
       269 
     | 
    
         
            -
            // -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
         
     | 
| 
       270 
     | 
    
         
            -
            // -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
         
     | 
| 
       271 
     | 
    
         
            -
            // -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
         
     | 
| 
       272 
     | 
    
         
            -
            // -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
         
     | 
| 
       273 
     | 
    
         
            -
            // -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
         
     | 
| 
       274 
     | 
    
         
            -
            // -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
         
     | 
| 
       275 
     | 
    
         
            -
            // -- kossnocorp Sasha Koss XXX TODO License or CLA
         
     | 
| 
       276 
     | 
    
         
            -
            // -- bryanforbes Bryan Forbes XXX TODO License or CLA
         
     | 
| 
       277 
     | 
    
         
            -
            // -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence
         
     | 
| 
       278 
     | 
    
         
            -
            // -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License
         
     | 
| 
       279 
     | 
    
         
            -
            // -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License
         
     | 
| 
       280 
     | 
    
         
            -
            // -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain)
         
     | 
| 
       281 
     | 
    
         
            -
            // -- iwyg XXX TODO License or CLA
         
     | 
| 
       282 
     | 
    
         
            -
            // -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License
         
     | 
| 
       283 
     | 
    
         
            -
            // -- xavierm02 Montillet Xavier XXX TODO License or CLA
         
     | 
| 
       284 
     | 
    
         
            -
            // -- Raynos Raynos XXX TODO License or CLA
         
     | 
| 
       285 
     | 
    
         
            -
            // -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License
         
     | 
| 
       286 
     | 
    
         
            -
            // -- rwldrn Rick Waldron Copyright (C) 2011 MIT License
         
     | 
| 
       287 
     | 
    
         
            -
            // -- lexer Alexey Zakharov XXX TODO License or CLA
         
     | 
| 
       288 
     | 
    
         
            -
             
     | 
| 
       289 
265 
     | 
    
         
             
            /*!
         
     | 
| 
       290 
266 
     | 
    
         
             
                Copyright (c) 2009, 280 North Inc. http://280north.com/
         
     | 
| 
       291 
267 
     | 
    
         
             
                MIT License. http://github.com/280north/narwhal/blob/master/README.md
         
     | 
| 
         @@ -1324,48 +1300,9 @@ var prepareString = "a"[0] != "a", 
     | 
|
| 
       1324 
1300 
     | 
    
         
             
                    return Object(o);
         
     | 
| 
       1325 
1301 
     | 
    
         
             
                };
         
     | 
| 
       1326 
1302 
     | 
    
         
             
            });
         
     | 
| 
       1327 
     | 
    
         
            -
            /* vim:ts=4:sts=4:sw=4:
         
     | 
| 
       1328 
     | 
    
         
            -
             * ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1329 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1330 
     | 
    
         
            -
             *
         
     | 
| 
       1331 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1332 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1333 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1334 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1335 
     | 
    
         
            -
             *
         
     | 
| 
       1336 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1337 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1338 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1339 
     | 
    
         
            -
             * License.
         
     | 
| 
       1340 
     | 
    
         
            -
             *
         
     | 
| 
       1341 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1342 
     | 
    
         
            -
             *
         
     | 
| 
       1343 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1344 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1345 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1346 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1347 
     | 
    
         
            -
             *
         
     | 
| 
       1348 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1349 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1350 
     | 
    
         
            -
             *      Irakli Gozalishvili <rfobic@gmail.com> (http://jeditoolkit.com)
         
     | 
| 
       1351 
     | 
    
         
            -
             *      Mike de Boer <mike AT ajax DOT org>
         
     | 
| 
       1352 
     | 
    
         
            -
             *
         
     | 
| 
       1353 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1354 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1355 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1356 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1357 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1358 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1359 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1360 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1361 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1362 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1363 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1364 
     | 
    
         
            -
             *
         
     | 
| 
       1365 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1366 
1303 
     | 
    
         | 
| 
       1367 
1304 
     | 
    
         
             
            define('ace/lib/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       1368 
     | 
    
         
            -
             
     | 
| 
      
 1305 
     | 
    
         
            +
             
     | 
| 
       1369 
1306 
     | 
    
         | 
| 
       1370 
1307 
     | 
    
         
             
            var EventEmitter = {};
         
     | 
| 
       1371 
1308 
     | 
    
         | 
| 
         @@ -1380,7 +1317,8 @@ EventEmitter._dispatchEvent = function(eventName, e) { 
     | 
|
| 
       1380 
1317 
     | 
    
         
             
                    return;
         
     | 
| 
       1381 
1318 
     | 
    
         | 
| 
       1382 
1319 
     | 
    
         
             
                e = e || {};
         
     | 
| 
       1383 
     | 
    
         
            -
                e.type 
     | 
| 
      
 1320 
     | 
    
         
            +
                if (!e.type)
         
     | 
| 
      
 1321 
     | 
    
         
            +
                    e.type = eventName;
         
     | 
| 
       1384 
1322 
     | 
    
         | 
| 
       1385 
1323 
     | 
    
         
             
                if (!e.stopPropagation) {
         
     | 
| 
       1386 
1324 
     | 
    
         
             
                    e.stopPropagation = function() {
         
     | 
| 
         @@ -1419,7 +1357,7 @@ EventEmitter.addEventListener = function(eventName, callback) { 
     | 
|
| 
       1419 
1357 
     | 
    
         | 
| 
       1420 
1358 
     | 
    
         
             
                var listeners = this._eventRegistry[eventName];
         
     | 
| 
       1421 
1359 
     | 
    
         
             
                if (!listeners)
         
     | 
| 
       1422 
     | 
    
         
            -
                     
     | 
| 
      
 1360 
     | 
    
         
            +
                    listeners = this._eventRegistry[eventName] = [];
         
     | 
| 
       1423 
1361 
     | 
    
         | 
| 
       1424 
1362 
     | 
    
         
             
                if (listeners.indexOf(callback) == -1)
         
     | 
| 
       1425 
1363 
     | 
    
         
             
                    listeners.push(callback);
         
     | 
| 
         @@ -1445,45 +1383,9 @@ EventEmitter.removeAllListeners = function(eventName) { 
     | 
|
| 
       1445 
1383 
     | 
    
         
             
            exports.EventEmitter = EventEmitter;
         
     | 
| 
       1446 
1384 
     | 
    
         | 
| 
       1447 
1385 
     | 
    
         
             
            });
         
     | 
| 
       1448 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1449 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1450 
     | 
    
         
            -
             *
         
     | 
| 
       1451 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1452 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1453 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1454 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1455 
     | 
    
         
            -
             *
         
     | 
| 
       1456 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1457 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1458 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1459 
     | 
    
         
            -
             * License.
         
     | 
| 
       1460 
     | 
    
         
            -
             *
         
     | 
| 
       1461 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1462 
     | 
    
         
            -
             *
         
     | 
| 
       1463 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1464 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1465 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1466 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1467 
     | 
    
         
            -
             *
         
     | 
| 
       1468 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1469 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1470 
     | 
    
         
            -
             *
         
     | 
| 
       1471 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1472 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1473 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1474 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1475 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1476 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1477 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1478 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1479 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1480 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1481 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1482 
     | 
    
         
            -
             *
         
     | 
| 
       1483 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1484 
1386 
     | 
    
         | 
| 
       1485 
1387 
     | 
    
         
             
            define('ace/lib/oop', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       1486 
     | 
    
         
            -
             
     | 
| 
      
 1388 
     | 
    
         
            +
             
     | 
| 
       1487 
1389 
     | 
    
         | 
| 
       1488 
1390 
     | 
    
         
             
            exports.inherits = (function() {
         
     | 
| 
       1489 
1391 
     | 
    
         
             
                var tempCtor = function() {};
         
     | 
| 
         @@ -1506,45 +1408,9 @@ exports.implement = function(proto, mixin) { 
     | 
|
| 
       1506 
1408 
     | 
    
         
             
            };
         
     | 
| 
       1507 
1409 
     | 
    
         | 
| 
       1508 
1410 
     | 
    
         
             
            });
         
     | 
| 
       1509 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1510 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1511 
     | 
    
         
            -
             *
         
     | 
| 
       1512 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1513 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1514 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1515 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1516 
     | 
    
         
            -
             *
         
     | 
| 
       1517 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1518 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1519 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1520 
     | 
    
         
            -
             * License.
         
     | 
| 
       1521 
     | 
    
         
            -
             *
         
     | 
| 
       1522 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1523 
     | 
    
         
            -
             *
         
     | 
| 
       1524 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1525 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1526 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1527 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1528 
     | 
    
         
            -
             *
         
     | 
| 
       1529 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1530 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1531 
     | 
    
         
            -
             *
         
     | 
| 
       1532 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1533 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1534 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1535 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1536 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1537 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1538 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1539 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1540 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1541 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1542 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1543 
     | 
    
         
            -
             *
         
     | 
| 
       1544 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1545 
1411 
     | 
    
         | 
| 
       1546 
1412 
     | 
    
         
             
            define('ace/mode/javascript_worker', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/worker/mirror', 'ace/worker/jshint', 'ace/narcissus/parser'], function(require, exports, module) {
         
     | 
| 
       1547 
     | 
    
         
            -
             
     | 
| 
      
 1413 
     | 
    
         
            +
             
     | 
| 
       1548 
1414 
     | 
    
         | 
| 
       1549 
1415 
     | 
    
         
             
            var oop = require("../lib/oop");
         
     | 
| 
       1550 
1416 
     | 
    
         
             
            var Mirror = require("../worker/mirror").Mirror;
         
     | 
| 
         @@ -1595,7 +1461,7 @@ oop.inherits(JavaScriptWorker, Mirror); 
     | 
|
| 
       1595 
1461 
     | 
    
         | 
| 
       1596 
1462 
     | 
    
         
             
            });
         
     | 
| 
       1597 
1463 
     | 
    
         
             
            define('ace/worker/mirror', ['require', 'exports', 'module' , 'ace/document', 'ace/lib/lang'], function(require, exports, module) {
         
     | 
| 
       1598 
     | 
    
         
            -
             
     | 
| 
      
 1464 
     | 
    
         
            +
             
     | 
| 
       1599 
1465 
     | 
    
         | 
| 
       1600 
1466 
     | 
    
         
             
            var Document = require("../document").Document;
         
     | 
| 
       1601 
1467 
     | 
    
         
             
            var lang = require("../lib/lang");
         
     | 
| 
         @@ -1637,59 +1503,15 @@ var Mirror = exports.Mirror = function(sender) { 
     | 
|
| 
       1637 
1503 
     | 
    
         
             
            }).call(Mirror.prototype);
         
     | 
| 
       1638 
1504 
     | 
    
         | 
| 
       1639 
1505 
     | 
    
         
             
            });
         
     | 
| 
       1640 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       1641 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       1642 
     | 
    
         
            -
             *
         
     | 
| 
       1643 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       1644 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       1645 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       1646 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       1647 
     | 
    
         
            -
             *
         
     | 
| 
       1648 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       1649 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       1650 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       1651 
     | 
    
         
            -
             * License.
         
     | 
| 
       1652 
     | 
    
         
            -
             *
         
     | 
| 
       1653 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       1654 
     | 
    
         
            -
             *
         
     | 
| 
       1655 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       1656 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       1657 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       1658 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       1659 
     | 
    
         
            -
             *
         
     | 
| 
       1660 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       1661 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       1662 
     | 
    
         
            -
             *
         
     | 
| 
       1663 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       1664 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       1665 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       1666 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       1667 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       1668 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       1669 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       1670 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       1671 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       1672 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       1673 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       1674 
     | 
    
         
            -
             *
         
     | 
| 
       1675 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       1676 
1506 
     | 
    
         | 
| 
       1677 
1507 
     | 
    
         
             
            define('ace/document', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) {
         
     | 
| 
       1678 
     | 
    
         
            -
             
     | 
| 
      
 1508 
     | 
    
         
            +
             
     | 
| 
       1679 
1509 
     | 
    
         | 
| 
       1680 
1510 
     | 
    
         
             
            var oop = require("./lib/oop");
         
     | 
| 
       1681 
1511 
     | 
    
         
             
            var EventEmitter = require("./lib/event_emitter").EventEmitter;
         
     | 
| 
       1682 
1512 
     | 
    
         
             
            var Range = require("./range").Range;
         
     | 
| 
       1683 
1513 
     | 
    
         
             
            var Anchor = require("./anchor").Anchor;
         
     | 
| 
       1684 
1514 
     | 
    
         | 
| 
       1685 
     | 
    
         
            -
            /**
         
     | 
| 
       1686 
     | 
    
         
            -
             * class Document
         
     | 
| 
       1687 
     | 
    
         
            -
             *
         
     | 
| 
       1688 
     | 
    
         
            -
             * Contains the text of the document. Documents are controlled by a single [[EditSession `EditSession`]]. At its core, `Document`s are just an array of strings, with each row in the document matching up to the array index.
         
     | 
| 
       1689 
     | 
    
         
            -
             *
         
     | 
| 
       1690 
     | 
    
         
            -
             *
         
     | 
| 
       1691 
     | 
    
         
            -
             **/
         
     | 
| 
       1692 
     | 
    
         
            -
             
     | 
| 
       1693 
1515 
     | 
    
         
             
             /**
         
     | 
| 
       1694 
1516 
     | 
    
         
             
             * new Document([text])
         
     | 
| 
       1695 
1517 
     | 
    
         
             
             * - text (String | Array): The starting text
         
     | 
| 
         @@ -1697,16 +1519,16 @@ var Anchor = require("./anchor").Anchor; 
     | 
|
| 
       1697 
1519 
     | 
    
         
             
             * Creates a new `Document`. If `text` is included, the `Document` contains those strings; otherwise, it's empty.
         
     | 
| 
       1698 
1520 
     | 
    
         
             
             *
         
     | 
| 
       1699 
1521 
     | 
    
         
             
             **/
         
     | 
| 
      
 1522 
     | 
    
         
            +
             
     | 
| 
       1700 
1523 
     | 
    
         
             
            var Document = function(text) {
         
     | 
| 
       1701 
1524 
     | 
    
         
             
                this.$lines = [];
         
     | 
| 
       1702 
1525 
     | 
    
         | 
| 
       1703 
     | 
    
         
            -
                if (Array.isArray(text)) {
         
     | 
| 
       1704 
     | 
    
         
            -
                    this.insertLines(0, text);
         
     | 
| 
       1705 
     | 
    
         
            -
                }
         
     | 
| 
       1706 
1526 
     | 
    
         
             
                // There has to be one line at least in the document. If you pass an empty
         
     | 
| 
       1707 
1527 
     | 
    
         
             
                // string to the insert function, nothing will happen. Workaround.
         
     | 
| 
       1708 
     | 
    
         
            -
                 
     | 
| 
      
 1528 
     | 
    
         
            +
                if (text.length == 0) {
         
     | 
| 
       1709 
1529 
     | 
    
         
             
                    this.$lines = [""];
         
     | 
| 
      
 1530 
     | 
    
         
            +
                } else if (Array.isArray(text)) {
         
     | 
| 
      
 1531 
     | 
    
         
            +
                    this.insertLines(0, text);
         
     | 
| 
       1710 
1532 
     | 
    
         
             
                } else {
         
     | 
| 
       1711 
1533 
     | 
    
         
             
                    this.insert({row: 0, column:0}, text);
         
     | 
| 
       1712 
1534 
     | 
    
         
             
                }
         
     | 
| 
         @@ -1715,49 +1537,18 @@ var Document = function(text) { 
     | 
|
| 
       1715 
1537 
     | 
    
         
             
            (function() {
         
     | 
| 
       1716 
1538 
     | 
    
         | 
| 
       1717 
1539 
     | 
    
         
             
                oop.implement(this, EventEmitter);
         
     | 
| 
       1718 
     | 
    
         
            -
             
     | 
| 
       1719 
     | 
    
         
            -
                /**
         
     | 
| 
       1720 
     | 
    
         
            -
                * Document.setValue(text) -> Void
         
     | 
| 
       1721 
     | 
    
         
            -
                * - text (String): The text to use
         
     | 
| 
       1722 
     | 
    
         
            -
                *
         
     | 
| 
       1723 
     | 
    
         
            -
                * Replaces all the lines in the current `Document` with the value of `text`.
         
     | 
| 
       1724 
     | 
    
         
            -
                **/
         
     | 
| 
       1725 
1540 
     | 
    
         
             
                this.setValue = function(text) {
         
     | 
| 
       1726 
1541 
     | 
    
         
             
                    var len = this.getLength();
         
     | 
| 
       1727 
1542 
     | 
    
         
             
                    this.remove(new Range(0, 0, len, this.getLine(len-1).length));
         
     | 
| 
       1728 
1543 
     | 
    
         
             
                    this.insert({row: 0, column:0}, text);
         
     | 
| 
       1729 
1544 
     | 
    
         
             
                };
         
     | 
| 
       1730 
     | 
    
         
            -
             
     | 
| 
       1731 
     | 
    
         
            -
                /**
         
     | 
| 
       1732 
     | 
    
         
            -
                * Document.getValue() -> String
         
     | 
| 
       1733 
     | 
    
         
            -
                * 
         
     | 
| 
       1734 
     | 
    
         
            -
                * Returns all the lines in the document as a single string, split by the new line character.
         
     | 
| 
       1735 
     | 
    
         
            -
                **/
         
     | 
| 
       1736 
1545 
     | 
    
         
             
                this.getValue = function() {
         
     | 
| 
       1737 
1546 
     | 
    
         
             
                    return this.getAllLines().join(this.getNewLineCharacter());
         
     | 
| 
       1738 
1547 
     | 
    
         
             
                };
         
     | 
| 
       1739 
     | 
    
         
            -
             
     | 
| 
       1740 
     | 
    
         
            -
                /** 
         
     | 
| 
       1741 
     | 
    
         
            -
                * Document.createAnchor(row, column) -> Anchor
         
     | 
| 
       1742 
     | 
    
         
            -
                * - row (Number): The row number to use
         
     | 
| 
       1743 
     | 
    
         
            -
                * - column (Number): The column number to use
         
     | 
| 
       1744 
     | 
    
         
            -
                *
         
     | 
| 
       1745 
     | 
    
         
            -
                * Creates a new `Anchor` to define a floating point in the document.
         
     | 
| 
       1746 
     | 
    
         
            -
                **/
         
     | 
| 
       1747 
1548 
     | 
    
         
             
                this.createAnchor = function(row, column) {
         
     | 
| 
       1748 
1549 
     | 
    
         
             
                    return new Anchor(this, row, column);
         
     | 
| 
       1749 
1550 
     | 
    
         
             
                };
         
     | 
| 
       1750 
1551 
     | 
    
         | 
| 
       1751 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1752 
     | 
    
         
            -
                * Document.$split(text) -> [String]
         
     | 
| 
       1753 
     | 
    
         
            -
                * - text (String): The text to work with
         
     | 
| 
       1754 
     | 
    
         
            -
                * + ([String]): A String array, with each index containing a piece of the original `text` string.
         
     | 
| 
       1755 
     | 
    
         
            -
                * 
         
     | 
| 
       1756 
     | 
    
         
            -
                * Splits a string of text on any newline (`\n`) or carriage-return ('\r') characters.
         
     | 
| 
       1757 
     | 
    
         
            -
                *
         
     | 
| 
       1758 
     | 
    
         
            -
                *
         
     | 
| 
       1759 
     | 
    
         
            -
                **/
         
     | 
| 
       1760 
     | 
    
         
            -
             
     | 
| 
       1761 
1552 
     | 
    
         
             
                // check for IE split bug
         
     | 
| 
       1762 
1553 
     | 
    
         
             
                if ("aaa".split(/a/).length == 0)
         
     | 
| 
       1763 
1554 
     | 
    
         
             
                    this.$split = function(text) {
         
     | 
| 
         @@ -1767,13 +1558,6 @@ var Document = function(text) { 
     | 
|
| 
       1767 
1558 
     | 
    
         
             
                    this.$split = function(text) {
         
     | 
| 
       1768 
1559 
     | 
    
         
             
                        return text.split(/\r\n|\r|\n/);
         
     | 
| 
       1769 
1560 
     | 
    
         
             
                    };
         
     | 
| 
       1770 
     | 
    
         
            -
             
     | 
| 
       1771 
     | 
    
         
            -
             
     | 
| 
       1772 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1773 
     | 
    
         
            -
                * Document.$detectNewLine(text) -> Void
         
     | 
| 
       1774 
     | 
    
         
            -
                * 
         
     | 
| 
       1775 
     | 
    
         
            -
                * 
         
     | 
| 
       1776 
     | 
    
         
            -
                **/
         
     | 
| 
       1777 
1561 
     | 
    
         
             
                this.$detectNewLine = function(text) {
         
     | 
| 
       1778 
1562 
     | 
    
         
             
                    var match = text.match(/^.*?(\r\n|\r|\n)/m);
         
     | 
| 
       1779 
1563 
     | 
    
         
             
                    if (match) {
         
     | 
| 
         @@ -1782,18 +1566,6 @@ var Document = function(text) { 
     | 
|
| 
       1782 
1566 
     | 
    
         
             
                        this.$autoNewLine = "\n";
         
     | 
| 
       1783 
1567 
     | 
    
         
             
                    }
         
     | 
| 
       1784 
1568 
     | 
    
         
             
                };
         
     | 
| 
       1785 
     | 
    
         
            -
             
     | 
| 
       1786 
     | 
    
         
            -
                /**
         
     | 
| 
       1787 
     | 
    
         
            -
                * Document.getNewLineCharacter() -> String
         
     | 
| 
       1788 
     | 
    
         
            -
                * + (String): If `newLineMode == windows`, `\r\n` is returned.<br/>
         
     | 
| 
       1789 
     | 
    
         
            -
                *  If `newLineMode == unix`, `\n` is returned.<br/>
         
     | 
| 
       1790 
     | 
    
         
            -
                *  If `newLineMode == auto`, the value of `autoNewLine` is returned.
         
     | 
| 
       1791 
     | 
    
         
            -
                * 
         
     | 
| 
       1792 
     | 
    
         
            -
                * Returns the newline character that's being used, depending on the value of `newLineMode`. 
         
     | 
| 
       1793 
     | 
    
         
            -
                *
         
     | 
| 
       1794 
     | 
    
         
            -
                * 
         
     | 
| 
       1795 
     | 
    
         
            -
                * 
         
     | 
| 
       1796 
     | 
    
         
            -
                **/
         
     | 
| 
       1797 
1569 
     | 
    
         
             
                this.getNewLineCharacter = function() {
         
     | 
| 
       1798 
1570 
     | 
    
         
             
                  switch (this.$newLineMode) {
         
     | 
| 
       1799 
1571 
     | 
    
         
             
                      case "windows":
         
     | 
| 
         @@ -1809,87 +1581,30 @@ var Document = function(text) { 
     | 
|
| 
       1809 
1581 
     | 
    
         | 
| 
       1810 
1582 
     | 
    
         
             
                this.$autoNewLine = "\n";
         
     | 
| 
       1811 
1583 
     | 
    
         
             
                this.$newLineMode = "auto";
         
     | 
| 
       1812 
     | 
    
         
            -
                /**
         
     | 
| 
       1813 
     | 
    
         
            -
                 * Document.setNewLineMode(newLineMode) -> Void
         
     | 
| 
       1814 
     | 
    
         
            -
                 * - newLineMode(String): [The newline mode to use; can be either `windows`, `unix`, or `auto`]{: #Document.setNewLineMode.param}
         
     | 
| 
       1815 
     | 
    
         
            -
                 * 
         
     | 
| 
       1816 
     | 
    
         
            -
                 * [Sets the new line mode.]{: #Document.setNewLineMode.desc}
         
     | 
| 
       1817 
     | 
    
         
            -
                 **/
         
     | 
| 
       1818 
1584 
     | 
    
         
             
                this.setNewLineMode = function(newLineMode) {
         
     | 
| 
       1819 
1585 
     | 
    
         
             
                    if (this.$newLineMode === newLineMode)
         
     | 
| 
       1820 
1586 
     | 
    
         
             
                        return;
         
     | 
| 
       1821 
1587 
     | 
    
         | 
| 
       1822 
1588 
     | 
    
         
             
                    this.$newLineMode = newLineMode;
         
     | 
| 
       1823 
1589 
     | 
    
         
             
                };
         
     | 
| 
       1824 
     | 
    
         
            -
             
     | 
| 
       1825 
     | 
    
         
            -
                /**
         
     | 
| 
       1826 
     | 
    
         
            -
                * Document.getNewLineMode() -> String
         
     | 
| 
       1827 
     | 
    
         
            -
                * 
         
     | 
| 
       1828 
     | 
    
         
            -
                * [Returns the type of newlines being used; either `windows`, `unix`, or `auto`]{: #Document.getNewLineMode}
         
     | 
| 
       1829 
     | 
    
         
            -
                *
         
     | 
| 
       1830 
     | 
    
         
            -
                **/
         
     | 
| 
       1831 
1590 
     | 
    
         
             
                this.getNewLineMode = function() {
         
     | 
| 
       1832 
1591 
     | 
    
         
             
                    return this.$newLineMode;
         
     | 
| 
       1833 
1592 
     | 
    
         
             
                };
         
     | 
| 
       1834 
     | 
    
         
            -
             
     | 
| 
       1835 
     | 
    
         
            -
                /**
         
     | 
| 
       1836 
     | 
    
         
            -
                * Document.isNewLine(text) -> Boolean
         
     | 
| 
       1837 
     | 
    
         
            -
                * - text (String): The text to check
         
     | 
| 
       1838 
     | 
    
         
            -
                *
         
     | 
| 
       1839 
     | 
    
         
            -
                * Returns `true` if `text` is a newline character (either `\r\n`, `\r`, or `\n`).
         
     | 
| 
       1840 
     | 
    
         
            -
                *
         
     | 
| 
       1841 
     | 
    
         
            -
                **/
         
     | 
| 
       1842 
1593 
     | 
    
         
             
                this.isNewLine = function(text) {
         
     | 
| 
       1843 
1594 
     | 
    
         
             
                    return (text == "\r\n" || text == "\r" || text == "\n");
         
     | 
| 
       1844 
1595 
     | 
    
         
             
                };
         
     | 
| 
       1845 
     | 
    
         
            -
             
     | 
| 
       1846 
     | 
    
         
            -
                /**
         
     | 
| 
       1847 
     | 
    
         
            -
                * Document.getLine(row) -> String
         
     | 
| 
       1848 
     | 
    
         
            -
                * - row (Number): The row index to retrieve
         
     | 
| 
       1849 
     | 
    
         
            -
                * 
         
     | 
| 
       1850 
     | 
    
         
            -
                * Returns a verbatim copy of the given line as it is in the document
         
     | 
| 
       1851 
     | 
    
         
            -
                *
         
     | 
| 
       1852 
     | 
    
         
            -
                **/
         
     | 
| 
       1853 
1596 
     | 
    
         
             
                this.getLine = function(row) {
         
     | 
| 
       1854 
1597 
     | 
    
         
             
                    return this.$lines[row] || "";
         
     | 
| 
       1855 
1598 
     | 
    
         
             
                };
         
     | 
| 
       1856 
     | 
    
         
            -
             
     | 
| 
       1857 
     | 
    
         
            -
                /**
         
     | 
| 
       1858 
     | 
    
         
            -
                * Document.getLines(firstRow, lastRow) -> [String]
         
     | 
| 
       1859 
     | 
    
         
            -
                * - firstRow (Number): The first row index to retrieve
         
     | 
| 
       1860 
     | 
    
         
            -
                * - lastRow (Number): The final row index to retrieve
         
     | 
| 
       1861 
     | 
    
         
            -
                * 
         
     | 
| 
       1862 
     | 
    
         
            -
                * Returns an array of strings of the rows between `firstRow` and `lastRow`. This function is inclusive of `lastRow`.
         
     | 
| 
       1863 
     | 
    
         
            -
                *
         
     | 
| 
       1864 
     | 
    
         
            -
                **/
         
     | 
| 
       1865 
1599 
     | 
    
         
             
                this.getLines = function(firstRow, lastRow) {
         
     | 
| 
       1866 
1600 
     | 
    
         
             
                    return this.$lines.slice(firstRow, lastRow + 1);
         
     | 
| 
       1867 
1601 
     | 
    
         
             
                };
         
     | 
| 
       1868 
     | 
    
         
            -
             
     | 
| 
       1869 
     | 
    
         
            -
                /**
         
     | 
| 
       1870 
     | 
    
         
            -
                * Document.getAllLines() -> [String]
         
     | 
| 
       1871 
     | 
    
         
            -
                * 
         
     | 
| 
       1872 
     | 
    
         
            -
                * Returns all lines in the document as string array. Warning: The caller should not modify this array!
         
     | 
| 
       1873 
     | 
    
         
            -
                **/
         
     | 
| 
       1874 
1602 
     | 
    
         
             
                this.getAllLines = function() {
         
     | 
| 
       1875 
1603 
     | 
    
         
             
                    return this.getLines(0, this.getLength());
         
     | 
| 
       1876 
1604 
     | 
    
         
             
                };
         
     | 
| 
       1877 
     | 
    
         
            -
             
     | 
| 
       1878 
     | 
    
         
            -
                /**
         
     | 
| 
       1879 
     | 
    
         
            -
                * Document.getLength() -> Number
         
     | 
| 
       1880 
     | 
    
         
            -
                * 
         
     | 
| 
       1881 
     | 
    
         
            -
                * Returns the number of rows in the document.
         
     | 
| 
       1882 
     | 
    
         
            -
                **/
         
     | 
| 
       1883 
1605 
     | 
    
         
             
                this.getLength = function() {
         
     | 
| 
       1884 
1606 
     | 
    
         
             
                    return this.$lines.length;
         
     | 
| 
       1885 
1607 
     | 
    
         
             
                };
         
     | 
| 
       1886 
     | 
    
         
            -
             
     | 
| 
       1887 
     | 
    
         
            -
                /**
         
     | 
| 
       1888 
     | 
    
         
            -
                * Document.getTextRange(range) -> String
         
     | 
| 
       1889 
     | 
    
         
            -
                * - range (Range): The range to work with
         
     | 
| 
       1890 
     | 
    
         
            -
                * 
         
     | 
| 
       1891 
     | 
    
         
            -
                * [Given a range within the document, this function returns all the text within that range as a single string.]{: #Document.getTextRange.desc}
         
     | 
| 
       1892 
     | 
    
         
            -
                **/
         
     | 
| 
       1893 
1608 
     | 
    
         
             
                this.getTextRange = function(range) {
         
     | 
| 
       1894 
1609 
     | 
    
         
             
                    if (range.start.row == range.end.row) {
         
     | 
| 
       1895 
1610 
     | 
    
         
             
                        return this.$lines[range.start.row].substring(range.start.column,
         
     | 
| 
         @@ -1902,12 +1617,6 @@ var Document = function(text) { 
     | 
|
| 
       1902 
1617 
     | 
    
         
             
                        return lines.join(this.getNewLineCharacter());
         
     | 
| 
       1903 
1618 
     | 
    
         
             
                    }
         
     | 
| 
       1904 
1619 
     | 
    
         
             
                };
         
     | 
| 
       1905 
     | 
    
         
            -
             
     | 
| 
       1906 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       1907 
     | 
    
         
            -
                * Document.$clipPosition(position) -> Number
         
     | 
| 
       1908 
     | 
    
         
            -
                * 
         
     | 
| 
       1909 
     | 
    
         
            -
                * 
         
     | 
| 
       1910 
     | 
    
         
            -
                **/
         
     | 
| 
       1911 
1620 
     | 
    
         
             
                this.$clipPosition = function(position) {
         
     | 
| 
       1912 
1621 
     | 
    
         
             
                    var length = this.getLength();
         
     | 
| 
       1913 
1622 
     | 
    
         
             
                    if (position.row >= length) {
         
     | 
| 
         @@ -1916,16 +1625,6 @@ var Document = function(text) { 
     | 
|
| 
       1916 
1625 
     | 
    
         
             
                    }
         
     | 
| 
       1917 
1626 
     | 
    
         
             
                    return position;
         
     | 
| 
       1918 
1627 
     | 
    
         
             
                };
         
     | 
| 
       1919 
     | 
    
         
            -
             
     | 
| 
       1920 
     | 
    
         
            -
                /**
         
     | 
| 
       1921 
     | 
    
         
            -
                * Document.insert(position, text) -> Number
         
     | 
| 
       1922 
     | 
    
         
            -
                * - position (Number): The position to start inserting at 
         
     | 
| 
       1923 
     | 
    
         
            -
                * - text (String): A chunk of text to insert
         
     | 
| 
       1924 
     | 
    
         
            -
                * + (Number): The position of the last line of `text`. If the length of `text` is 0, this function simply returns `position`. 
         
     | 
| 
       1925 
     | 
    
         
            -
                * Inserts a block of `text` and the indicated `position`.
         
     | 
| 
       1926 
     | 
    
         
            -
                *
         
     | 
| 
       1927 
     | 
    
         
            -
                * 
         
     | 
| 
       1928 
     | 
    
         
            -
                **/
         
     | 
| 
       1929 
1628 
     | 
    
         
             
                this.insert = function(position, text) {
         
     | 
| 
       1930 
1629 
     | 
    
         
             
                    if (!text || text.length === 0)
         
     | 
| 
       1931 
1630 
     | 
    
         
             
                        return position;
         
     | 
| 
         @@ -1948,24 +1647,40 @@ var Document = function(text) { 
     | 
|
| 
       1948 
1647 
     | 
    
         
             
                    }
         
     | 
| 
       1949 
1648 
     | 
    
         
             
                    return position;
         
     | 
| 
       1950 
1649 
     | 
    
         
             
                };
         
     | 
| 
       1951 
     | 
    
         
            -
             
     | 
| 
       1952 
1650 
     | 
    
         
             
                /**
         
     | 
| 
       1953 
     | 
    
         
            -
             
     | 
| 
       1954 
     | 
    
         
            -
             
     | 
| 
       1955 
     | 
    
         
            -
             
     | 
| 
       1956 
     | 
    
         
            -
             
     | 
| 
       1957 
     | 
    
         
            -
             
     | 
| 
       1958 
     | 
    
         
            -
             
     | 
| 
       1959 
     | 
    
         
            -
             
     | 
| 
       1960 
     | 
    
         
            -
             
     | 
| 
       1961 
     | 
    
         
            -
                *  
     | 
| 
       1962 
     | 
    
         
            -
                *
         
     | 
| 
       1963 
     | 
    
         
            -
             
     | 
| 
       1964 
     | 
    
         
            -
                 
     | 
| 
      
 1651 
     | 
    
         
            +
                 * Document@change(e)
         
     | 
| 
      
 1652 
     | 
    
         
            +
                 * - e (Object): Contains at least one property called `"action"`. `"action"` indicates the action that triggered the change. Each action also has a set of additional properties.
         
     | 
| 
      
 1653 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1654 
     | 
    
         
            +
                 * Fires whenever the document changes.
         
     | 
| 
      
 1655 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1656 
     | 
    
         
            +
                 * Several methods trigger different `"change"` events. Below is a list of each action type, followed by each property that's also available:
         
     | 
| 
      
 1657 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1658 
     | 
    
         
            +
                 *  * `"insertLines"` (emitted by [[Document.insertLines]])
         
     | 
| 
      
 1659 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1660 
     | 
    
         
            +
                 *    * `lines`: the lines in the document that are changing
         
     | 
| 
      
 1661 
     | 
    
         
            +
                 *  * `"insertText"` (emitted by [[Document.insertNewLine]])
         
     | 
| 
      
 1662 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1663 
     | 
    
         
            +
                 *    * `text`: the text that's being added
         
     | 
| 
      
 1664 
     | 
    
         
            +
                 *  * `"removeLines"` (emitted by [[Document.insertLines]])
         
     | 
| 
      
 1665 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1666 
     | 
    
         
            +
                 *    * `lines`: the lines in the document that were removed
         
     | 
| 
      
 1667 
     | 
    
         
            +
                 *    * `nl`: the new line character (as defined by [[Document.getNewLineCharacter]])
         
     | 
| 
      
 1668 
     | 
    
         
            +
                 *  * `"removeText"` (emitted by [[Document.removeInLine]] and [[Document.removeNewLine]])
         
     | 
| 
      
 1669 
     | 
    
         
            +
                 *    * `range`: the [[Range]] of the change within the document
         
     | 
| 
      
 1670 
     | 
    
         
            +
                 *    * `text`: the text that's being removed
         
     | 
| 
      
 1671 
     | 
    
         
            +
                 *
         
     | 
| 
      
 1672 
     | 
    
         
            +
                 **/
         
     | 
| 
       1965 
1673 
     | 
    
         
             
                this.insertLines = function(row, lines) {
         
     | 
| 
       1966 
1674 
     | 
    
         
             
                    if (lines.length == 0)
         
     | 
| 
       1967 
1675 
     | 
    
         
             
                        return {row: row, column: 0};
         
     | 
| 
       1968 
1676 
     | 
    
         | 
| 
      
 1677 
     | 
    
         
            +
                    // apply doesn't work for big arrays (smallest threshold is on safari 0xFFFF)
         
     | 
| 
      
 1678 
     | 
    
         
            +
                    // to circumvent that we have to break huge inserts into smaller chunks here
         
     | 
| 
      
 1679 
     | 
    
         
            +
                    if (lines.length > 0xFFFF) {
         
     | 
| 
      
 1680 
     | 
    
         
            +
                        var end = this.insertLines(row, lines.slice(0xFFFF));
         
     | 
| 
      
 1681 
     | 
    
         
            +
                        lines = lines.slice(0, 0xFFFF);
         
     | 
| 
      
 1682 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1683 
     | 
    
         
            +
             
     | 
| 
       1969 
1684 
     | 
    
         
             
                    var args = [row, 0];
         
     | 
| 
       1970 
1685 
     | 
    
         
             
                    args.push.apply(args, lines);
         
     | 
| 
       1971 
1686 
     | 
    
         
             
                    this.$lines.splice.apply(this.$lines, args);
         
     | 
| 
         @@ -1977,20 +1692,8 @@ var Document = function(text) { 
     | 
|
| 
       1977 
1692 
     | 
    
         
             
                        lines: lines
         
     | 
| 
       1978 
1693 
     | 
    
         
             
                    };
         
     | 
| 
       1979 
1694 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       1980 
     | 
    
         
            -
                    return range.end;
         
     | 
| 
      
 1695 
     | 
    
         
            +
                    return end || range.end;
         
     | 
| 
       1981 
1696 
     | 
    
         
             
                };
         
     | 
| 
       1982 
     | 
    
         
            -
             
     | 
| 
       1983 
     | 
    
         
            -
                /**
         
     | 
| 
       1984 
     | 
    
         
            -
                * Document.insertNewLine(position) -> Object
         
     | 
| 
       1985 
     | 
    
         
            -
                * - position (String): The position to insert at
         
     | 
| 
       1986 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:<br/>
         
     | 
| 
       1987 
     | 
    
         
            -
                *    ```{row: endRow, column: 0}```
         
     | 
| 
       1988 
     | 
    
         
            -
                * 
         
     | 
| 
       1989 
     | 
    
         
            -
                * Inserts a new line into the document at the current row's `position`. This method also triggers the `'change'` event. 
         
     | 
| 
       1990 
     | 
    
         
            -
                *
         
     | 
| 
       1991 
     | 
    
         
            -
                *   
         
     | 
| 
       1992 
     | 
    
         
            -
                *
         
     | 
| 
       1993 
     | 
    
         
            -
                **/
         
     | 
| 
       1994 
1697 
     | 
    
         
             
                this.insertNewLine = function(position) {
         
     | 
| 
       1995 
1698 
     | 
    
         
             
                    position = this.$clipPosition(position);
         
     | 
| 
       1996 
1699 
     | 
    
         
             
                    var line = this.$lines[position.row] || "";
         
     | 
| 
         @@ -2012,20 +1715,6 @@ var Document = function(text) { 
     | 
|
| 
       2012 
1715 
     | 
    
         | 
| 
       2013 
1716 
     | 
    
         
             
                    return end;
         
     | 
| 
       2014 
1717 
     | 
    
         
             
                };
         
     | 
| 
       2015 
     | 
    
         
            -
             
     | 
| 
       2016 
     | 
    
         
            -
                /**
         
     | 
| 
       2017 
     | 
    
         
            -
                * Document.insertInLine(position, text) -> Object | Number
         
     | 
| 
       2018 
     | 
    
         
            -
                * - position (Number): The position to insert at
         
     | 
| 
       2019 
     | 
    
         
            -
                * - text (String): A chunk of text
         
     | 
| 
       2020 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:<br/>
         
     | 
| 
       2021 
     | 
    
         
            -
                *     ```{row: endRow, column: 0}```
         
     | 
| 
       2022 
     | 
    
         
            -
                * + (Number): If `text` is empty, this function returns the value of `position`
         
     | 
| 
       2023 
     | 
    
         
            -
                * 
         
     | 
| 
       2024 
     | 
    
         
            -
                * Inserts `text` into the `position` at the current row. This method also triggers the `'change'` event.
         
     | 
| 
       2025 
     | 
    
         
            -
                *
         
     | 
| 
       2026 
     | 
    
         
            -
                *
         
     | 
| 
       2027 
     | 
    
         
            -
                *
         
     | 
| 
       2028 
     | 
    
         
            -
                **/
         
     | 
| 
       2029 
1718 
     | 
    
         
             
                this.insertInLine = function(position, text) {
         
     | 
| 
       2030 
1719 
     | 
    
         
             
                    if (text.length == 0)
         
     | 
| 
       2031 
1720 
     | 
    
         
             
                        return position;
         
     | 
| 
         @@ -2049,16 +1738,6 @@ var Document = function(text) { 
     | 
|
| 
       2049 
1738 
     | 
    
         | 
| 
       2050 
1739 
     | 
    
         
             
                    return end;
         
     | 
| 
       2051 
1740 
     | 
    
         
             
                };
         
     | 
| 
       2052 
     | 
    
         
            -
             
     | 
| 
       2053 
     | 
    
         
            -
                /**
         
     | 
| 
       2054 
     | 
    
         
            -
                * Document.remove(range) -> Object
         
     | 
| 
       2055 
     | 
    
         
            -
                * - range (Range): A specified Range to remove
         
     | 
| 
       2056 
     | 
    
         
            -
                * + (Object): Returns the new `start` property of the range, which contains `startRow` and `startColumn`. If `range` is empty, this function returns the unmodified value of `range.start`.
         
     | 
| 
       2057 
     | 
    
         
            -
                * 
         
     | 
| 
       2058 
     | 
    
         
            -
                * Removes the `range` from the document.
         
     | 
| 
       2059 
     | 
    
         
            -
                *
         
     | 
| 
       2060 
     | 
    
         
            -
                *
         
     | 
| 
       2061 
     | 
    
         
            -
                **/
         
     | 
| 
       2062 
1741 
     | 
    
         
             
                this.remove = function(range) {
         
     | 
| 
       2063 
1742 
     | 
    
         
             
                    // clip to document
         
     | 
| 
       2064 
1743 
     | 
    
         
             
                    range.start = this.$clipPosition(range.start);
         
     | 
| 
         @@ -2090,18 +1769,6 @@ var Document = function(text) { 
     | 
|
| 
       2090 
1769 
     | 
    
         
             
                    }
         
     | 
| 
       2091 
1770 
     | 
    
         
             
                    return range.start;
         
     | 
| 
       2092 
1771 
     | 
    
         
             
                };
         
     | 
| 
       2093 
     | 
    
         
            -
             
     | 
| 
       2094 
     | 
    
         
            -
                /**
         
     | 
| 
       2095 
     | 
    
         
            -
                * Document.removeInLine(row, startColumn, endColumn) -> Object
         
     | 
| 
       2096 
     | 
    
         
            -
                * - row (Number): The row to remove from
         
     | 
| 
       2097 
     | 
    
         
            -
                * - startColumn (Number): The column to start removing at 
         
     | 
| 
       2098 
     | 
    
         
            -
                * - endColumn (Number): The column to stop removing at
         
     | 
| 
       2099 
     | 
    
         
            -
                * + (Object): Returns an object containing `startRow` and `startColumn`, indicating the new row and column values.<br/>If `startColumn` is equal to `endColumn`, this function returns nothing.
         
     | 
| 
       2100 
     | 
    
         
            -
                *
         
     | 
| 
       2101 
     | 
    
         
            -
                * Removes the specified columns from the `row`. This method also triggers the `'change'` event.
         
     | 
| 
       2102 
     | 
    
         
            -
                *
         
     | 
| 
       2103 
     | 
    
         
            -
                * 
         
     | 
| 
       2104 
     | 
    
         
            -
                **/
         
     | 
| 
       2105 
1772 
     | 
    
         
             
                this.removeInLine = function(row, startColumn, endColumn) {
         
     | 
| 
       2106 
1773 
     | 
    
         
             
                    if (startColumn == endColumn)
         
     | 
| 
       2107 
1774 
     | 
    
         
             
                        return;
         
     | 
| 
         @@ -2120,17 +1787,6 @@ var Document = function(text) { 
     | 
|
| 
       2120 
1787 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2121 
1788 
     | 
    
         
             
                    return range.start;
         
     | 
| 
       2122 
1789 
     | 
    
         
             
                };
         
     | 
| 
       2123 
     | 
    
         
            -
             
     | 
| 
       2124 
     | 
    
         
            -
                /**
         
     | 
| 
       2125 
     | 
    
         
            -
                * Document.removeLines(firstRow, lastRow) -> [String]
         
     | 
| 
       2126 
     | 
    
         
            -
                * - firstRow (Number): The first row to be removed
         
     | 
| 
       2127 
     | 
    
         
            -
                * - lastRow (Number): The last row to be removed
         
     | 
| 
       2128 
     | 
    
         
            -
                * + ([String]): Returns all the removed lines.
         
     | 
| 
       2129 
     | 
    
         
            -
                * 
         
     | 
| 
       2130 
     | 
    
         
            -
                * Removes a range of full lines. This method also triggers the `'change'` event.
         
     | 
| 
       2131 
     | 
    
         
            -
                * 
         
     | 
| 
       2132 
     | 
    
         
            -
                *
         
     | 
| 
       2133 
     | 
    
         
            -
                **/
         
     | 
| 
       2134 
1790 
     | 
    
         
             
                this.removeLines = function(firstRow, lastRow) {
         
     | 
| 
       2135 
1791 
     | 
    
         
             
                    var range = new Range(firstRow, 0, lastRow + 1, 0);
         
     | 
| 
       2136 
1792 
     | 
    
         
             
                    var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1);
         
     | 
| 
         @@ -2144,14 +1800,6 @@ var Document = function(text) { 
     | 
|
| 
       2144 
1800 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2145 
1801 
     | 
    
         
             
                    return removed;
         
     | 
| 
       2146 
1802 
     | 
    
         
             
                };
         
     | 
| 
       2147 
     | 
    
         
            -
             
     | 
| 
       2148 
     | 
    
         
            -
                /**
         
     | 
| 
       2149 
     | 
    
         
            -
                * Document.removeNewLine(row) -> Void
         
     | 
| 
       2150 
     | 
    
         
            -
                * - row (Number): The row to check
         
     | 
| 
       2151 
     | 
    
         
            -
                * 
         
     | 
| 
       2152 
     | 
    
         
            -
                * Removes the new line between `row` and the row immediately following it. This method also triggers the `'change'` event.
         
     | 
| 
       2153 
     | 
    
         
            -
                *
         
     | 
| 
       2154 
     | 
    
         
            -
                **/
         
     | 
| 
       2155 
1803 
     | 
    
         
             
                this.removeNewLine = function(row) {
         
     | 
| 
       2156 
1804 
     | 
    
         
             
                    var firstLine = this.getLine(row);
         
     | 
| 
       2157 
1805 
     | 
    
         
             
                    var secondLine = this.getLine(row+1);
         
     | 
| 
         @@ -2168,19 +1816,6 @@ var Document = function(text) { 
     | 
|
| 
       2168 
1816 
     | 
    
         
             
                    };
         
     | 
| 
       2169 
1817 
     | 
    
         
             
                    this._emit("change", { data: delta });
         
     | 
| 
       2170 
1818 
     | 
    
         
             
                };
         
     | 
| 
       2171 
     | 
    
         
            -
             
     | 
| 
       2172 
     | 
    
         
            -
                /**
         
     | 
| 
       2173 
     | 
    
         
            -
                * Document.replace(range, text) -> Object
         
     | 
| 
       2174 
     | 
    
         
            -
                * - range (Range): A specified Range to replace
         
     | 
| 
       2175 
     | 
    
         
            -
                * - text (String): The new text to use as a replacement
         
     | 
| 
       2176 
     | 
    
         
            -
                * + (Object): Returns an object containing the final row and column, like this:
         
     | 
| 
       2177 
     | 
    
         
            -
                *     {row: endRow, column: 0}
         
     | 
| 
       2178 
     | 
    
         
            -
                * If the text and range are empty, this function returns an object containing the current `range.start` value.
         
     | 
| 
       2179 
     | 
    
         
            -
                * If the text is the exact same as what currently exists, this function returns an object containing the current `range.end` value.
         
     | 
| 
       2180 
     | 
    
         
            -
                *
         
     | 
| 
       2181 
     | 
    
         
            -
                * Replaces a range in the document with the new `text`.
         
     | 
| 
       2182 
     | 
    
         
            -
                *
         
     | 
| 
       2183 
     | 
    
         
            -
                **/
         
     | 
| 
       2184 
1819 
     | 
    
         
             
                this.replace = function(range, text) {
         
     | 
| 
       2185 
1820 
     | 
    
         
             
                    if (text.length == 0 && range.isEmpty())
         
     | 
| 
       2186 
1821 
     | 
    
         
             
                        return range.start;
         
     | 
| 
         @@ -2200,12 +1835,6 @@ var Document = function(text) { 
     | 
|
| 
       2200 
1835 
     | 
    
         | 
| 
       2201 
1836 
     | 
    
         
             
                    return end;
         
     | 
| 
       2202 
1837 
     | 
    
         
             
                };
         
     | 
| 
       2203 
     | 
    
         
            -
             
     | 
| 
       2204 
     | 
    
         
            -
                /**
         
     | 
| 
       2205 
     | 
    
         
            -
                * Document.applyDeltas(deltas) -> Void
         
     | 
| 
       2206 
     | 
    
         
            -
                * 
         
     | 
| 
       2207 
     | 
    
         
            -
                * Applies all the changes previously accumulated. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2208 
     | 
    
         
            -
                **/
         
     | 
| 
       2209 
1838 
     | 
    
         
             
                this.applyDeltas = function(deltas) {
         
     | 
| 
       2210 
1839 
     | 
    
         
             
                    for (var i=0; i<deltas.length; i++) {
         
     | 
| 
       2211 
1840 
     | 
    
         
             
                        var delta = deltas[i];
         
     | 
| 
         @@ -2221,12 +1850,6 @@ var Document = function(text) { 
     | 
|
| 
       2221 
1850 
     | 
    
         
             
                            this.remove(range);
         
     | 
| 
       2222 
1851 
     | 
    
         
             
                    }
         
     | 
| 
       2223 
1852 
     | 
    
         
             
                };
         
     | 
| 
       2224 
     | 
    
         
            -
             
     | 
| 
       2225 
     | 
    
         
            -
                /**
         
     | 
| 
       2226 
     | 
    
         
            -
                * Document.revertDeltas(deltas) -> Void
         
     | 
| 
       2227 
     | 
    
         
            -
                * 
         
     | 
| 
       2228 
     | 
    
         
            -
                * Reverts any changes previously applied. These can be either `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2229 
     | 
    
         
            -
                **/
         
     | 
| 
       2230 
1853 
     | 
    
         
             
                this.revertDeltas = function(deltas) {
         
     | 
| 
       2231 
1854 
     | 
    
         
             
                    for (var i=deltas.length-1; i>=0; i--) {
         
     | 
| 
       2232 
1855 
     | 
    
         
             
                        var delta = deltas[i];
         
     | 
| 
         @@ -2237,56 +1860,20 @@ var Document = function(text) { 
     | 
|
| 
       2237 
1860 
     | 
    
         
             
                            this.removeLines(range.start.row, range.end.row - 1);
         
     | 
| 
       2238 
1861 
     | 
    
         
             
                        else if (delta.action == "insertText")
         
     | 
| 
       2239 
1862 
     | 
    
         
             
                            this.remove(range);
         
     | 
| 
       2240 
     | 
    
         
            -
                        else if (delta.action == "removeLines")
         
     | 
| 
       2241 
     | 
    
         
            -
                            this.insertLines(range.start.row, delta.lines);
         
     | 
| 
       2242 
     | 
    
         
            -
                        else if (delta.action == "removeText")
         
     | 
| 
       2243 
     | 
    
         
            -
                            this.insert(range.start, delta.text);
         
     | 
| 
       2244 
     | 
    
         
            -
                    }
         
     | 
| 
       2245 
     | 
    
         
            -
                };
         
     | 
| 
       2246 
     | 
    
         
            -
             
     | 
| 
       2247 
     | 
    
         
            -
            }).call(Document.prototype);
         
     | 
| 
       2248 
     | 
    
         
            -
             
     | 
| 
       2249 
     | 
    
         
            -
            exports.Document = Document;
         
     | 
| 
       2250 
     | 
    
         
            -
            });
         
     | 
| 
       2251 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       2252 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       2253 
     | 
    
         
            -
             *
         
     | 
| 
       2254 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       2255 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       2256 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       2257 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       2258 
     | 
    
         
            -
             *
         
     | 
| 
       2259 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       2260 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       2261 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       2262 
     | 
    
         
            -
             * License.
         
     | 
| 
       2263 
     | 
    
         
            -
             *
         
     | 
| 
       2264 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       2265 
     | 
    
         
            -
             *
         
     | 
| 
       2266 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       2267 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       2268 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       2269 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       2270 
     | 
    
         
            -
             *
         
     | 
| 
       2271 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       2272 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       2273 
     | 
    
         
            -
             *
         
     | 
| 
       2274 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       2275 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       2276 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       2277 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       2278 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       2279 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       2280 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       2281 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       2282 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       2283 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       2284 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       2285 
     | 
    
         
            -
             *
         
     | 
| 
       2286 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
      
 1863 
     | 
    
         
            +
                        else if (delta.action == "removeLines")
         
     | 
| 
      
 1864 
     | 
    
         
            +
                            this.insertLines(range.start.row, delta.lines);
         
     | 
| 
      
 1865 
     | 
    
         
            +
                        else if (delta.action == "removeText")
         
     | 
| 
      
 1866 
     | 
    
         
            +
                            this.insert(range.start, delta.text);
         
     | 
| 
      
 1867 
     | 
    
         
            +
                    }
         
     | 
| 
      
 1868 
     | 
    
         
            +
                };
         
     | 
| 
      
 1869 
     | 
    
         
            +
             
     | 
| 
      
 1870 
     | 
    
         
            +
            }).call(Document.prototype);
         
     | 
| 
      
 1871 
     | 
    
         
            +
             
     | 
| 
      
 1872 
     | 
    
         
            +
            exports.Document = Document;
         
     | 
| 
      
 1873 
     | 
    
         
            +
            });
         
     | 
| 
       2287 
1874 
     | 
    
         | 
| 
       2288 
1875 
     | 
    
         
             
            define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       2289 
     | 
    
         
            -
             
     | 
| 
      
 1876 
     | 
    
         
            +
             
     | 
| 
       2290 
1877 
     | 
    
         | 
| 
       2291 
1878 
     | 
    
         
             
            /**
         
     | 
| 
       2292 
1879 
     | 
    
         
             
             * class Range
         
     | 
| 
         @@ -2330,53 +1917,15 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2330 
1917 
     | 
    
         
             
                        this.end.row == range.end.row &&
         
     | 
| 
       2331 
1918 
     | 
    
         
             
                        this.start.column == range.start.column &&
         
     | 
| 
       2332 
1919 
     | 
    
         
             
                        this.end.column == range.end.column
         
     | 
| 
       2333 
     | 
    
         
            -
                };
         
     | 
| 
       2334 
     | 
    
         
            -
             
     | 
| 
       2335 
     | 
    
         
            -
                /**
         
     | 
| 
       2336 
     | 
    
         
            -
                 * Range.toString() -> String
         
     | 
| 
       2337 
     | 
    
         
            -
                 *
         
     | 
| 
       2338 
     | 
    
         
            -
                 * Returns a string containing the range's row and column information, given like this:
         
     | 
| 
       2339 
     | 
    
         
            -
                 *
         
     | 
| 
       2340 
     | 
    
         
            -
                 *    [start.row/start.column] -> [end.row/end.column]
         
     | 
| 
       2341 
     | 
    
         
            -
                 *
         
     | 
| 
       2342 
     | 
    
         
            -
                 **/ 
         
     | 
| 
       2343 
     | 
    
         
            -
             
     | 
| 
      
 1920 
     | 
    
         
            +
                }; 
         
     | 
| 
       2344 
1921 
     | 
    
         
             
                this.toString = function() {
         
     | 
| 
       2345 
1922 
     | 
    
         
             
                    return ("Range: [" + this.start.row + "/" + this.start.column +
         
     | 
| 
       2346 
1923 
     | 
    
         
             
                        "] -> [" + this.end.row + "/" + this.end.column + "]");
         
     | 
| 
       2347 
     | 
    
         
            -
                };
         
     | 
| 
       2348 
     | 
    
         
            -
             
     | 
| 
       2349 
     | 
    
         
            -
                /** related to: Range.compare
         
     | 
| 
       2350 
     | 
    
         
            -
                 * Range.contains(row, column) -> Boolean
         
     | 
| 
       2351 
     | 
    
         
            -
                 * - row (Number): A row to check for
         
     | 
| 
       2352 
     | 
    
         
            -
                 * - column (Number): A column to check for
         
     | 
| 
       2353 
     | 
    
         
            -
                 *
         
     | 
| 
       2354 
     | 
    
         
            -
                 * Returns `true` if the `row` and `column` provided are within the given range. This can better be expressed as returning `true` if:
         
     | 
| 
       2355 
     | 
    
         
            -
                 *
         
     | 
| 
       2356 
     | 
    
         
            -
                 *    this.start.row <= row <= this.end.row &&
         
     | 
| 
       2357 
     | 
    
         
            -
                 *    this.start.column <= column <= this.end.column
         
     | 
| 
       2358 
     | 
    
         
            -
                 *
         
     | 
| 
       2359 
     | 
    
         
            -
                 **/ 
         
     | 
| 
      
 1924 
     | 
    
         
            +
                }; 
         
     | 
| 
       2360 
1925 
     | 
    
         | 
| 
       2361 
1926 
     | 
    
         
             
                this.contains = function(row, column) {
         
     | 
| 
       2362 
1927 
     | 
    
         
             
                    return this.compare(row, column) == 0;
         
     | 
| 
       2363 
     | 
    
         
            -
                };
         
     | 
| 
       2364 
     | 
    
         
            -
             
     | 
| 
       2365 
     | 
    
         
            -
                /** related to: Range.compare
         
     | 
| 
       2366 
     | 
    
         
            -
                 * Range.compareRange(range) -> Number
         
     | 
| 
       2367 
     | 
    
         
            -
                 * - range (Range): A range to compare with
         
     | 
| 
       2368 
     | 
    
         
            -
                 * + (Number): This method returns one of the following numbers:<br/>
         
     | 
| 
       2369 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2370 
     | 
    
         
            -
                 * * `-2`: (B) is in front of (A), and doesn't intersect with (A)<br/>
         
     | 
| 
       2371 
     | 
    
         
            -
                 * * `-1`: (B) begins before (A) but ends inside of (A)<br/>
         
     | 
| 
       2372 
     | 
    
         
            -
                 * * `0`: (B) is completely inside of (A) OR (A) is completely inside of (B)<br/>
         
     | 
| 
       2373 
     | 
    
         
            -
                 * * `+1`: (B) begins inside of (A) but ends outside of (A)<br/>
         
     | 
| 
       2374 
     | 
    
         
            -
                 * * `+2`: (B) is after (A) and doesn't intersect with (A)<br/>
         
     | 
| 
       2375 
     | 
    
         
            -
                 * * `42`: FTW state: (B) ends in (A) but starts outside of (A)
         
     | 
| 
       2376 
     | 
    
         
            -
                 * 
         
     | 
| 
       2377 
     | 
    
         
            -
                 * Compares `this` range (A) with another range (B).
         
     | 
| 
       2378 
     | 
    
         
            -
                 *
         
     | 
| 
       2379 
     | 
    
         
            -
                 **/ 
         
     | 
| 
      
 1928 
     | 
    
         
            +
                }; 
         
     | 
| 
       2380 
1929 
     | 
    
         
             
                this.compareRange = function(range) {
         
     | 
| 
       2381 
1930 
     | 
    
         
             
                    var cmp,
         
     | 
| 
       2382 
1931 
     | 
    
         
             
                        end = range.end,
         
     | 
| 
         @@ -2613,30 +2162,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2613 
2162 
     | 
    
         | 
| 
       2614 
2163 
     | 
    
         
             
                    return 0;
         
     | 
| 
       2615 
2164 
     | 
    
         
             
                };
         
     | 
| 
       2616 
     | 
    
         
            -
             
     | 
| 
       2617 
     | 
    
         
            -
                /**
         
     | 
| 
       2618 
     | 
    
         
            -
                 * Range.compareStart(row, column) -> Number
         
     | 
| 
       2619 
     | 
    
         
            -
                 * - row (Number): A row point to compare with
         
     | 
| 
       2620 
     | 
    
         
            -
                 * - column (Number): A column point to compare with
         
     | 
| 
       2621 
     | 
    
         
            -
                 * + (Number): This method returns one of the following numbers:<br/>
         
     | 
| 
       2622 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2623 
     | 
    
         
            -
                 * * `0` if the two points are exactly equal<br/>
         
     | 
| 
       2624 
     | 
    
         
            -
                 * * `-1` if `p.row` is less then the calling range<br/>
         
     | 
| 
       2625 
     | 
    
         
            -
                 * * `1` if `p.row` is greater than the calling range, or if `isStart` is `true`.<br/>
         
     | 
| 
       2626 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2627 
     | 
    
         
            -
                 * If the starting row of the calling range is equal to `p.row`, and:<br/>
         
     | 
| 
       2628 
     | 
    
         
            -
                 * * `p.column` is greater than or equal to the calling range's starting column, this returns `0`<br/>
         
     | 
| 
       2629 
     | 
    
         
            -
                 * * Otherwise, it returns -1<br/>
         
     | 
| 
       2630 
     | 
    
         
            -
                 * <br/>
         
     | 
| 
       2631 
     | 
    
         
            -
                 * If the ending row of the calling range is equal to `p.row`, and:<br/>
         
     | 
| 
       2632 
     | 
    
         
            -
                 * * `p.column` is less than or equal to the calling range's ending column, this returns `0`<br/>
         
     | 
| 
       2633 
     | 
    
         
            -
                 * * Otherwise, it returns 1
         
     | 
| 
       2634 
     | 
    
         
            -
                 *
         
     | 
| 
       2635 
     | 
    
         
            -
                 * Checks the row and column points with the row and column points of the calling range.
         
     | 
| 
       2636 
     | 
    
         
            -
                 *
         
     | 
| 
       2637 
     | 
    
         
            -
                 *
         
     | 
| 
       2638 
     | 
    
         
            -
                 *
         
     | 
| 
       2639 
     | 
    
         
            -
                 **/
         
     | 
| 
       2640 
2165 
     | 
    
         
             
                this.compareStart = function(row, column) {
         
     | 
| 
       2641 
2166 
     | 
    
         
             
                    if (this.start.row == row && this.start.column == column) {
         
     | 
| 
       2642 
2167 
     | 
    
         
             
                        return -1;
         
     | 
| 
         @@ -2674,7 +2199,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2674 
2199 
     | 
    
         
             
                    }
         
     | 
| 
       2675 
2200 
     | 
    
         
             
                }
         
     | 
| 
       2676 
2201 
     | 
    
         | 
| 
       2677 
     | 
    
         
            -
             
     | 
| 
      
 2202 
     | 
    
         
            +
                /** 
         
     | 
| 
       2678 
2203 
     | 
    
         
             
                 * Range.compareInside(row, column) -> Number
         
     | 
| 
       2679 
2204 
     | 
    
         
             
                 * - row (Number): A row point to compare with
         
     | 
| 
       2680 
2205 
     | 
    
         
             
                 * - column (Number): A column point to compare with
         
     | 
| 
         @@ -2699,7 +2224,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2699 
2224 
     | 
    
         
             
                    }
         
     | 
| 
       2700 
2225 
     | 
    
         
             
                }
         
     | 
| 
       2701 
2226 
     | 
    
         | 
| 
       2702 
     | 
    
         
            -
             
     | 
| 
      
 2227 
     | 
    
         
            +
                /** 
         
     | 
| 
       2703 
2228 
     | 
    
         
             
                 * Range.clipRows(firstRow, lastRow) -> Range
         
     | 
| 
       2704 
2229 
     | 
    
         
             
                 * - firstRow (Number): The starting row
         
     | 
| 
       2705 
2230 
     | 
    
         
             
                 * - lastRow (Number): The ending row
         
     | 
| 
         @@ -2737,15 +2262,6 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2737 
2262 
     | 
    
         
             
                    }
         
     | 
| 
       2738 
2263 
     | 
    
         
             
                    return Range.fromPoints(start || this.start, end || this.end);
         
     | 
| 
       2739 
2264 
     | 
    
         
             
                };
         
     | 
| 
       2740 
     | 
    
         
            -
             
     | 
| 
       2741 
     | 
    
         
            -
               /** 
         
     | 
| 
       2742 
     | 
    
         
            -
                 * Range.extend(row, column) -> Range
         
     | 
| 
       2743 
     | 
    
         
            -
                 * - row (Number): A new row to extend to
         
     | 
| 
       2744 
     | 
    
         
            -
                 * - column (Number): A new column to extend to
         
     | 
| 
       2745 
     | 
    
         
            -
                 *
         
     | 
| 
       2746 
     | 
    
         
            -
                 *  Changes the row and column points for the calling range for both the starting and ending points. This method returns that range with a new row.
         
     | 
| 
       2747 
     | 
    
         
            -
                 *
         
     | 
| 
       2748 
     | 
    
         
            -
                **/
         
     | 
| 
       2749 
2265 
     | 
    
         
             
                this.extend = function(row, column) {
         
     | 
| 
       2750 
2266 
     | 
    
         
             
                    var cmp = this.compare(row, column);
         
     | 
| 
       2751 
2267 
     | 
    
         | 
| 
         @@ -2762,46 +2278,18 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2762 
2278 
     | 
    
         
             
                this.isEmpty = function() {
         
     | 
| 
       2763 
2279 
     | 
    
         
             
                    return (this.start.row == this.end.row && this.start.column == this.end.column);
         
     | 
| 
       2764 
2280 
     | 
    
         
             
                };
         
     | 
| 
       2765 
     | 
    
         
            -
             
     | 
| 
       2766 
     | 
    
         
            -
               /** 
         
     | 
| 
       2767 
     | 
    
         
            -
                 * Range.isMultiLine() -> Boolean
         
     | 
| 
       2768 
     | 
    
         
            -
                 *
         
     | 
| 
       2769 
     | 
    
         
            -
                 * Returns true if the range spans across multiple lines.
         
     | 
| 
       2770 
     | 
    
         
            -
                 *
         
     | 
| 
       2771 
     | 
    
         
            -
                **/
         
     | 
| 
       2772 
2281 
     | 
    
         
             
                this.isMultiLine = function() {
         
     | 
| 
       2773 
2282 
     | 
    
         
             
                    return (this.start.row !== this.end.row);
         
     | 
| 
       2774 
2283 
     | 
    
         
             
                };
         
     | 
| 
       2775 
     | 
    
         
            -
             
     | 
| 
       2776 
     | 
    
         
            -
               /** 
         
     | 
| 
       2777 
     | 
    
         
            -
                 * Range.clone() -> Range
         
     | 
| 
       2778 
     | 
    
         
            -
                 *
         
     | 
| 
       2779 
     | 
    
         
            -
                 * Returns a duplicate of the calling range.
         
     | 
| 
       2780 
     | 
    
         
            -
                 *
         
     | 
| 
       2781 
     | 
    
         
            -
                **/
         
     | 
| 
       2782 
2284 
     | 
    
         
             
                this.clone = function() {
         
     | 
| 
       2783 
2285 
     | 
    
         
             
                    return Range.fromPoints(this.start, this.end);
         
     | 
| 
       2784 
2286 
     | 
    
         
             
                };
         
     | 
| 
       2785 
     | 
    
         
            -
             
     | 
| 
       2786 
     | 
    
         
            -
               /** 
         
     | 
| 
       2787 
     | 
    
         
            -
                 * Range.collapseRows() -> Range
         
     | 
| 
       2788 
     | 
    
         
            -
                 *
         
     | 
| 
       2789 
     | 
    
         
            -
                 * Returns a range containing the starting and ending rows of the original range, but with a column value of `0`.
         
     | 
| 
       2790 
     | 
    
         
            -
                 *
         
     | 
| 
       2791 
     | 
    
         
            -
                **/
         
     | 
| 
       2792 
2287 
     | 
    
         
             
                this.collapseRows = function() {
         
     | 
| 
       2793 
2288 
     | 
    
         
             
                    if (this.end.column == 0)
         
     | 
| 
       2794 
2289 
     | 
    
         
             
                        return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0)
         
     | 
| 
       2795 
2290 
     | 
    
         
             
                    else
         
     | 
| 
       2796 
2291 
     | 
    
         
             
                        return new Range(this.start.row, 0, this.end.row, 0)
         
     | 
| 
       2797 
2292 
     | 
    
         
             
                };
         
     | 
| 
       2798 
     | 
    
         
            -
             
     | 
| 
       2799 
     | 
    
         
            -
               /** 
         
     | 
| 
       2800 
     | 
    
         
            -
                 * Range.toScreenRange(session) -> Range
         
     | 
| 
       2801 
     | 
    
         
            -
                 * - session (EditSession): The `EditSession` to retrieve coordinates from
         
     | 
| 
       2802 
     | 
    
         
            -
                 * 
         
     | 
| 
       2803 
     | 
    
         
            -
                 * Given the current `Range`, this function converts those starting and ending points into screen positions, and then returns a new `Range` object.
         
     | 
| 
       2804 
     | 
    
         
            -
                **/
         
     | 
| 
       2805 
2293 
     | 
    
         
             
                this.toScreenRange = function(session) {
         
     | 
| 
       2806 
2294 
     | 
    
         
             
                    var screenPosStart =
         
     | 
| 
       2807 
2295 
     | 
    
         
             
                        session.documentToScreenPosition(this.start);
         
     | 
| 
         @@ -2815,71 +2303,19 @@ var Range = function(startRow, startColumn, endRow, endColumn) { 
     | 
|
| 
       2815 
2303 
     | 
    
         
             
                };
         
     | 
| 
       2816 
2304 
     | 
    
         | 
| 
       2817 
2305 
     | 
    
         
             
            }).call(Range.prototype);
         
     | 
| 
       2818 
     | 
    
         
            -
             
     | 
| 
       2819 
     | 
    
         
            -
            /** 
         
     | 
| 
       2820 
     | 
    
         
            -
             * Range.fromPoints(start, end) -> Range
         
     | 
| 
       2821 
     | 
    
         
            -
             * - start (Range): A starting point to use
         
     | 
| 
       2822 
     | 
    
         
            -
             * - end (Range): An ending point to use
         
     | 
| 
       2823 
     | 
    
         
            -
             * 
         
     | 
| 
       2824 
     | 
    
         
            -
             * Creates and returns a new `Range` based on the row and column of the given parameters.
         
     | 
| 
       2825 
     | 
    
         
            -
             *
         
     | 
| 
       2826 
     | 
    
         
            -
            **/
         
     | 
| 
       2827 
2306 
     | 
    
         
             
            Range.fromPoints = function(start, end) {
         
     | 
| 
       2828 
2307 
     | 
    
         
             
                return new Range(start.row, start.column, end.row, end.column);
         
     | 
| 
       2829 
2308 
     | 
    
         
             
            };
         
     | 
| 
       2830 
2309 
     | 
    
         | 
| 
       2831 
2310 
     | 
    
         
             
            exports.Range = Range;
         
     | 
| 
       2832 
2311 
     | 
    
         
             
            });
         
     | 
| 
       2833 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       2834 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       2835 
     | 
    
         
            -
             *
         
     | 
| 
       2836 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       2837 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       2838 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       2839 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       2840 
     | 
    
         
            -
             *
         
     | 
| 
       2841 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       2842 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       2843 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       2844 
     | 
    
         
            -
             * License.
         
     | 
| 
       2845 
     | 
    
         
            -
             *
         
     | 
| 
       2846 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       2847 
     | 
    
         
            -
             *
         
     | 
| 
       2848 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       2849 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       2850 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       2851 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       2852 
     | 
    
         
            -
             *
         
     | 
| 
       2853 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       2854 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       2855 
     | 
    
         
            -
             *
         
     | 
| 
       2856 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       2857 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       2858 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       2859 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       2860 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       2861 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       2862 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       2863 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       2864 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       2865 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       2866 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       2867 
     | 
    
         
            -
             *
         
     | 
| 
       2868 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       2869 
2312 
     | 
    
         | 
| 
       2870 
2313 
     | 
    
         
             
            define('ace/anchor', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/lib/event_emitter'], function(require, exports, module) {
         
     | 
| 
       2871 
     | 
    
         
            -
             
     | 
| 
      
 2314 
     | 
    
         
            +
             
     | 
| 
       2872 
2315 
     | 
    
         | 
| 
       2873 
2316 
     | 
    
         
             
            var oop = require("./lib/oop");
         
     | 
| 
       2874 
2317 
     | 
    
         
             
            var EventEmitter = require("./lib/event_emitter").EventEmitter;
         
     | 
| 
       2875 
2318 
     | 
    
         | 
| 
       2876 
     | 
    
         
            -
            /**
         
     | 
| 
       2877 
     | 
    
         
            -
             * class Anchor
         
     | 
| 
       2878 
     | 
    
         
            -
             *
         
     | 
| 
       2879 
     | 
    
         
            -
             * Defines the floating pointer in the document. Whenever text is inserted or deleted before the cursor, the position of the cursor is updated
         
     | 
| 
       2880 
     | 
    
         
            -
             *
         
     | 
| 
       2881 
     | 
    
         
            -
             **/
         
     | 
| 
       2882 
     | 
    
         
            -
             
     | 
| 
       2883 
2319 
     | 
    
         
             
            /**
         
     | 
| 
       2884 
2320 
     | 
    
         
             
             * new Anchor(doc, row, column)
         
     | 
| 
       2885 
2321 
     | 
    
         
             
             * - doc (Document): The document to associate with the anchor
         
     | 
| 
         @@ -2905,36 +2341,14 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       2905 
2341 
     | 
    
         
             
            (function() {
         
     | 
| 
       2906 
2342 
     | 
    
         | 
| 
       2907 
2343 
     | 
    
         
             
                oop.implement(this, EventEmitter);
         
     | 
| 
       2908 
     | 
    
         
            -
                
         
     | 
| 
       2909 
     | 
    
         
            -
                /**
         
     | 
| 
       2910 
     | 
    
         
            -
                 * Anchor.getPosition() -> Object
         
     | 
| 
       2911 
     | 
    
         
            -
                 *
         
     | 
| 
       2912 
     | 
    
         
            -
                 * Returns an object identifying the `row` and `column` position of the current anchor.
         
     | 
| 
       2913 
     | 
    
         
            -
                 *
         
     | 
| 
       2914 
     | 
    
         
            -
                 **/
         
     | 
| 
       2915 
2344 
     | 
    
         | 
| 
       2916 
2345 
     | 
    
         
             
                this.getPosition = function() {
         
     | 
| 
       2917 
2346 
     | 
    
         
             
                    return this.$clipPositionToDocument(this.row, this.column);
         
     | 
| 
       2918 
2347 
     | 
    
         
             
                };
         
     | 
| 
       2919 
     | 
    
         
            -
             
         
     | 
| 
       2920 
     | 
    
         
            -
                 /**
         
     | 
| 
       2921 
     | 
    
         
            -
                 * Anchor.getDocument() -> Document
         
     | 
| 
       2922 
     | 
    
         
            -
                 *
         
     | 
| 
       2923 
     | 
    
         
            -
                 * Returns the current document.
         
     | 
| 
       2924 
     | 
    
         
            -
                 *
         
     | 
| 
       2925 
     | 
    
         
            -
                 **/
         
     | 
| 
       2926 
2348 
     | 
    
         | 
| 
       2927 
2349 
     | 
    
         
             
                this.getDocument = function() {
         
     | 
| 
       2928 
2350 
     | 
    
         
             
                    return this.document;
         
     | 
| 
       2929 
2351 
     | 
    
         
             
                };
         
     | 
| 
       2930 
     | 
    
         
            -
                
         
     | 
| 
       2931 
     | 
    
         
            -
                 /**
         
     | 
| 
       2932 
     | 
    
         
            -
                 * Anchor@onChange(e)
         
     | 
| 
       2933 
     | 
    
         
            -
                 * - e (Event): Contains data about the event
         
     | 
| 
       2934 
     | 
    
         
            -
                 *
         
     | 
| 
       2935 
     | 
    
         
            -
                 * Fires whenever the anchor position changes. Events that can trigger this function include `'includeText'`, `'insertLines'`, `'removeText'`, and `'removeLines'`.
         
     | 
| 
       2936 
     | 
    
         
            -
                 *
         
     | 
| 
       2937 
     | 
    
         
            -
                 **/
         
     | 
| 
       2938 
2352 
     | 
    
         | 
| 
       2939 
2353 
     | 
    
         
             
                this.onChange = function(e) {
         
     | 
| 
       2940 
2354 
     | 
    
         
             
                    var delta = e.data;
         
     | 
| 
         @@ -3001,16 +2415,6 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3001 
2415 
     | 
    
         
             
                    this.setPosition(row, column, true);
         
     | 
| 
       3002 
2416 
     | 
    
         
             
                };
         
     | 
| 
       3003 
2417 
     | 
    
         | 
| 
       3004 
     | 
    
         
            -
                 /**
         
     | 
| 
       3005 
     | 
    
         
            -
                 * Anchor.setPosition(row, column, noClip)
         
     | 
| 
       3006 
     | 
    
         
            -
                 * - row (Number): The row index to move the anchor to
         
     | 
| 
       3007 
     | 
    
         
            -
                 * - column (Number): The column index to move the anchor to
         
     | 
| 
       3008 
     | 
    
         
            -
                 * - noClip (Boolean): Identifies if you want the position to be clipped
         
     | 
| 
       3009 
     | 
    
         
            -
                 *
         
     | 
| 
       3010 
     | 
    
         
            -
                 * Sets the anchor position to the specified row and column. If `noClip` is `true`, the position is not clipped.
         
     | 
| 
       3011 
     | 
    
         
            -
                 *
         
     | 
| 
       3012 
     | 
    
         
            -
                 **/
         
     | 
| 
       3013 
     | 
    
         
            -
             
     | 
| 
       3014 
2418 
     | 
    
         
             
                this.setPosition = function(row, column, noClip) {
         
     | 
| 
       3015 
2419 
     | 
    
         
             
                    var pos;
         
     | 
| 
       3016 
2420 
     | 
    
         
             
                    if (noClip) {
         
     | 
| 
         @@ -3038,26 +2442,10 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3038 
2442 
     | 
    
         
             
                        value: pos
         
     | 
| 
       3039 
2443 
     | 
    
         
             
                    });
         
     | 
| 
       3040 
2444 
     | 
    
         
             
                };
         
     | 
| 
       3041 
     | 
    
         
            -
                
         
     | 
| 
       3042 
     | 
    
         
            -
                /**
         
     | 
| 
       3043 
     | 
    
         
            -
                 * Anchor.detach()
         
     | 
| 
       3044 
     | 
    
         
            -
                 *
         
     | 
| 
       3045 
     | 
    
         
            -
                 * When called, the `'change'` event listener is removed.
         
     | 
| 
       3046 
     | 
    
         
            -
                 *
         
     | 
| 
       3047 
     | 
    
         
            -
                 **/
         
     | 
| 
       3048 
2445 
     | 
    
         | 
| 
       3049 
2446 
     | 
    
         
             
                this.detach = function() {
         
     | 
| 
       3050 
2447 
     | 
    
         
             
                    this.document.removeEventListener("change", this.$onChange);
         
     | 
| 
       3051 
2448 
     | 
    
         
             
                };
         
     | 
| 
       3052 
     | 
    
         
            -
                
         
     | 
| 
       3053 
     | 
    
         
            -
                /** internal, hide
         
     | 
| 
       3054 
     | 
    
         
            -
                 * Anchor.clipPositionToDocument(row, column)
         
     | 
| 
       3055 
     | 
    
         
            -
                 * - row (Number): The row index to clip the anchor to
         
     | 
| 
       3056 
     | 
    
         
            -
                 * - column (Number): The column index to clip the anchor to
         
     | 
| 
       3057 
     | 
    
         
            -
                 *
         
     | 
| 
       3058 
     | 
    
         
            -
                 * Clips the anchor position to the specified row and column.
         
     | 
| 
       3059 
     | 
    
         
            -
                 *
         
     | 
| 
       3060 
     | 
    
         
            -
                 **/
         
     | 
| 
       3061 
2449 
     | 
    
         | 
| 
       3062 
2450 
     | 
    
         
             
                this.$clipPositionToDocument = function(row, column) {
         
     | 
| 
       3063 
2451 
     | 
    
         
             
                    var pos = {};
         
     | 
| 
         @@ -3084,45 +2472,9 @@ var Anchor = exports.Anchor = function(doc, row, column) { 
     | 
|
| 
       3084 
2472 
     | 
    
         
             
            }).call(Anchor.prototype);
         
     | 
| 
       3085 
2473 
     | 
    
         | 
| 
       3086 
2474 
     | 
    
         
             
            });
         
     | 
| 
       3087 
     | 
    
         
            -
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       3088 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       3089 
     | 
    
         
            -
             *
         
     | 
| 
       3090 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       3091 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       3092 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       3093 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       3094 
     | 
    
         
            -
             *
         
     | 
| 
       3095 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       3096 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       3097 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       3098 
     | 
    
         
            -
             * License.
         
     | 
| 
       3099 
     | 
    
         
            -
             *
         
     | 
| 
       3100 
     | 
    
         
            -
             * The Original Code is Ajax.org Code Editor (ACE).
         
     | 
| 
       3101 
     | 
    
         
            -
             *
         
     | 
| 
       3102 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       3103 
     | 
    
         
            -
             * Ajax.org B.V.
         
     | 
| 
       3104 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2010
         
     | 
| 
       3105 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       3106 
     | 
    
         
            -
             *
         
     | 
| 
       3107 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       3108 
     | 
    
         
            -
             *      Fabian Jakobs <fabian AT ajax DOT org>
         
     | 
| 
       3109 
     | 
    
         
            -
             *
         
     | 
| 
       3110 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       3111 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       3112 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       3113 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       3114 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       3115 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       3116 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       3117 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       3118 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       3119 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       3120 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       3121 
     | 
    
         
            -
             *
         
     | 
| 
       3122 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       3123 
2475 
     | 
    
         | 
| 
       3124 
2476 
     | 
    
         
             
            define('ace/lib/lang', ['require', 'exports', 'module' ], function(require, exports, module) {
         
     | 
| 
       3125 
     | 
    
         
            -
             
     | 
| 
      
 2477 
     | 
    
         
            +
             
     | 
| 
       3126 
2478 
     | 
    
         | 
| 
       3127 
2479 
     | 
    
         
             
            exports.stringReverse = function(string) {
         
     | 
| 
       3128 
2480 
     | 
    
         
             
                return string.split("").reverse().join("");
         
     | 
| 
         @@ -3187,9 +2539,13 @@ exports.arrayToMap = function(arr) { 
     | 
|
| 
       3187 
2539 
     | 
    
         | 
| 
       3188 
2540 
     | 
    
         
             
            };
         
     | 
| 
       3189 
2541 
     | 
    
         | 
| 
       3190 
     | 
    
         
            -
             
     | 
| 
       3191 
     | 
    
         
            -
              
     | 
| 
       3192 
     | 
    
         
            -
              
     | 
| 
      
 2542 
     | 
    
         
            +
            exports.createMap = function(props) {
         
     | 
| 
      
 2543 
     | 
    
         
            +
                var map = Object.create(null);
         
     | 
| 
      
 2544 
     | 
    
         
            +
                for (var i in props) {
         
     | 
| 
      
 2545 
     | 
    
         
            +
                    map[i] = props[i];
         
     | 
| 
      
 2546 
     | 
    
         
            +
                }
         
     | 
| 
      
 2547 
     | 
    
         
            +
                return map;
         
     | 
| 
      
 2548 
     | 
    
         
            +
            };
         
     | 
| 
       3193 
2549 
     | 
    
         
             
            exports.arrayRemove = function(array, value) {
         
     | 
| 
       3194 
2550 
     | 
    
         
             
              for (var i = 0; i <= array.length; i++) {
         
     | 
| 
       3195 
2551 
     | 
    
         
             
                if (value === array[i]) {
         
     | 
| 
         @@ -3202,6 +2558,20 @@ exports.escapeRegExp = function(str) { 
     | 
|
| 
       3202 
2558 
     | 
    
         
             
                return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
         
     | 
| 
       3203 
2559 
     | 
    
         
             
            };
         
     | 
| 
       3204 
2560 
     | 
    
         | 
| 
      
 2561 
     | 
    
         
            +
            exports.getMatchOffsets = function(string, regExp) {
         
     | 
| 
      
 2562 
     | 
    
         
            +
                var matches = [];
         
     | 
| 
      
 2563 
     | 
    
         
            +
             
     | 
| 
      
 2564 
     | 
    
         
            +
                string.replace(regExp, function(str) {
         
     | 
| 
      
 2565 
     | 
    
         
            +
                    matches.push({
         
     | 
| 
      
 2566 
     | 
    
         
            +
                        offset: arguments[arguments.length-2],
         
     | 
| 
      
 2567 
     | 
    
         
            +
                        length: str.length
         
     | 
| 
      
 2568 
     | 
    
         
            +
                    });
         
     | 
| 
      
 2569 
     | 
    
         
            +
                });
         
     | 
| 
      
 2570 
     | 
    
         
            +
             
     | 
| 
      
 2571 
     | 
    
         
            +
                return matches;
         
     | 
| 
      
 2572 
     | 
    
         
            +
            };
         
     | 
| 
      
 2573 
     | 
    
         
            +
             
     | 
| 
      
 2574 
     | 
    
         
            +
             
     | 
| 
       3205 
2575 
     | 
    
         
             
            exports.deferredCall = function(fcn) {
         
     | 
| 
       3206 
2576 
     | 
    
         | 
| 
       3207 
2577 
     | 
    
         
             
                var timer = null;
         
     | 
| 
         @@ -3469,7 +2839,7 @@ define('ace/worker/jshint', ['require', 'exports', 'module' ], function(require, 
     | 
|
| 
       3469 
2839 
     | 
    
         
             
            // value is the JSHINT function itself.
         
     | 
| 
       3470 
2840 
     | 
    
         | 
| 
       3471 
2841 
     | 
    
         
             
            var JSHINT = (function () {
         
     | 
| 
       3472 
     | 
    
         
            -
                 
     | 
| 
      
 2842 
     | 
    
         
            +
                
         
     | 
| 
       3473 
2843 
     | 
    
         | 
| 
       3474 
2844 
     | 
    
         
             
                var anonname,       // The guessed name for anonymous functions.
         
     | 
| 
       3475 
2845 
     | 
    
         | 
| 
         @@ -3511,7 +2881,7 @@ var JSHINT = (function () { 
     | 
|
| 
       3511 
2881 
     | 
    
         
             
                        expr        : true, // if ExpressionStatement should be allowed as Programs
         
     | 
| 
       3512 
2882 
     | 
    
         
             
                        forin       : true, // if for in statements must filter
         
     | 
| 
       3513 
2883 
     | 
    
         
             
                        funcscope   : true, // if only function scope should be used for scope tests
         
     | 
| 
       3514 
     | 
    
         
            -
                        globalstrict: true, // if global 
     | 
| 
      
 2884 
     | 
    
         
            +
                        globalstrict: true, // if global  should be allowed (also
         
     | 
| 
       3515 
2885 
     | 
    
         
             
                                            // enables 'strict')
         
     | 
| 
       3516 
2886 
     | 
    
         
             
                        immed       : true, // if immediate invocations must be wrapped in parens
         
     | 
| 
       3517 
2887 
     | 
    
         
             
                        iterator    : true, // if the `__iterator__` property should be allowed
         
     | 
| 
         @@ -3552,7 +2922,7 @@ var JSHINT = (function () { 
     | 
|
| 
       3552 
2922 
     | 
    
         
             
                        shadow      : true, // if variable shadowing should be tolerated
         
     | 
| 
       3553 
2923 
     | 
    
         
             
                        smarttabs   : true, // if smarttabs should be tolerated
         
     | 
| 
       3554 
2924 
     | 
    
         
             
                                            // (http://www.emacswiki.org/emacs/SmartTabs)
         
     | 
| 
       3555 
     | 
    
         
            -
                        strict      : true, // require the 
     | 
| 
      
 2925 
     | 
    
         
            +
                        strict      : true, // require the  pragma
         
     | 
| 
       3556 
2926 
     | 
    
         
             
                        sub         : true, // if all forms of subscript notation are tolerated
         
     | 
| 
       3557 
2927 
     | 
    
         
             
                        supernew    : true, // if `new function () { ... };` and `new Object;`
         
     | 
| 
       3558 
2928 
     | 
    
         
             
                                            // should be tolerated
         
     | 
| 
         @@ -7703,50 +7073,6 @@ if (typeof exports === 'object' && exports) 
     | 
|
| 
       7703 
7073 
     | 
    
         
             
                exports.JSHINT = JSHINT;
         
     | 
| 
       7704 
7074 
     | 
    
         | 
| 
       7705 
7075 
     | 
    
         
             
            });
         
     | 
| 
       7706 
     | 
    
         
            -
            /* -*- Mode: JS; tab-width: 4; indent-tabs-mode: nil; -*-
         
     | 
| 
       7707 
     | 
    
         
            -
             * vim: set sw=4 ts=4 et tw=78:
         
     | 
| 
       7708 
     | 
    
         
            -
             * ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       7709 
     | 
    
         
            -
             *
         
     | 
| 
       7710 
     | 
    
         
            -
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       7711 
     | 
    
         
            -
             *
         
     | 
| 
       7712 
     | 
    
         
            -
             * The contents of this file are subject to the Mozilla Public License Version
         
     | 
| 
       7713 
     | 
    
         
            -
             * 1.1 (the "License"); you may not use this file except in compliance with
         
     | 
| 
       7714 
     | 
    
         
            -
             * the License. You may obtain a copy of the License at
         
     | 
| 
       7715 
     | 
    
         
            -
             * http://www.mozilla.org/MPL/
         
     | 
| 
       7716 
     | 
    
         
            -
             *
         
     | 
| 
       7717 
     | 
    
         
            -
             * Software distributed under the License is distributed on an "AS IS" basis,
         
     | 
| 
       7718 
     | 
    
         
            -
             * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
         
     | 
| 
       7719 
     | 
    
         
            -
             * for the specific language governing rights and limitations under the
         
     | 
| 
       7720 
     | 
    
         
            -
             * License.
         
     | 
| 
       7721 
     | 
    
         
            -
             *
         
     | 
| 
       7722 
     | 
    
         
            -
             * The Original Code is the Narcissus JavaScript engine.
         
     | 
| 
       7723 
     | 
    
         
            -
             *
         
     | 
| 
       7724 
     | 
    
         
            -
             * The Initial Developer of the Original Code is
         
     | 
| 
       7725 
     | 
    
         
            -
             * Brendan Eich <brendan@mozilla.org>.
         
     | 
| 
       7726 
     | 
    
         
            -
             * Portions created by the Initial Developer are Copyright (C) 2004
         
     | 
| 
       7727 
     | 
    
         
            -
             * the Initial Developer. All Rights Reserved.
         
     | 
| 
       7728 
     | 
    
         
            -
             *
         
     | 
| 
       7729 
     | 
    
         
            -
             * Contributor(s):
         
     | 
| 
       7730 
     | 
    
         
            -
             *   Tom Austin <taustin@ucsc.edu>
         
     | 
| 
       7731 
     | 
    
         
            -
             *   Brendan Eich <brendan@mozilla.org>
         
     | 
| 
       7732 
     | 
    
         
            -
             *   Shu-Yu Guo <shu@rfrn.org>
         
     | 
| 
       7733 
     | 
    
         
            -
             *   Dave Herman <dherman@mozilla.com>
         
     | 
| 
       7734 
     | 
    
         
            -
             *   Dimitris Vardoulakis <dimvar@ccs.neu.edu>
         
     | 
| 
       7735 
     | 
    
         
            -
             *   Patrick Walton <pcwalton@mozilla.com>
         
     | 
| 
       7736 
     | 
    
         
            -
             *
         
     | 
| 
       7737 
     | 
    
         
            -
             * Alternatively, the contents of this file may be used under the terms of
         
     | 
| 
       7738 
     | 
    
         
            -
             * either the GNU General Public License Version 2 or later (the "GPL"), or
         
     | 
| 
       7739 
     | 
    
         
            -
             * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
         
     | 
| 
       7740 
     | 
    
         
            -
             * in which case the provisions of the GPL or the LGPL are applicable instead
         
     | 
| 
       7741 
     | 
    
         
            -
             * of those above. If you wish to allow use of your version of this file only
         
     | 
| 
       7742 
     | 
    
         
            -
             * under the terms of either the GPL or the LGPL, and not to allow others to
         
     | 
| 
       7743 
     | 
    
         
            -
             * use your version of this file under the terms of the MPL, indicate your
         
     | 
| 
       7744 
     | 
    
         
            -
             * decision by deleting the provisions above and replace them with the notice
         
     | 
| 
       7745 
     | 
    
         
            -
             * and other provisions required by the GPL or the LGPL. If you do not delete
         
     | 
| 
       7746 
     | 
    
         
            -
             * the provisions above, a recipient may use your version of this file under
         
     | 
| 
       7747 
     | 
    
         
            -
             * the terms of any one of the MPL, the GPL or the LGPL.
         
     | 
| 
       7748 
     | 
    
         
            -
             *
         
     | 
| 
       7749 
     | 
    
         
            -
             * ***** END LICENSE BLOCK ***** */
         
     | 
| 
       7750 
7076 
     | 
    
         | 
| 
       7751 
7077 
     | 
    
         
             
            /*
         
     | 
| 
       7752 
7078 
     | 
    
         
             
             * Narcissus - JS implemented in JS.
         
     | 
| 
         @@ -7766,12 +7092,6 @@ var Stack = definitions.Stack; 
     | 
|
| 
       7766 
7092 
     | 
    
         | 
| 
       7767 
7093 
     | 
    
         
             
            // Set constants in the local scope.
         
     | 
| 
       7768 
7094 
     | 
    
         
             
            eval(definitions.consts);
         
     | 
| 
       7769 
     | 
    
         
            -
             
     | 
| 
       7770 
     | 
    
         
            -
            /*
         
     | 
| 
       7771 
     | 
    
         
            -
             * pushDestructuringVarDecls :: (node, hoisting node) -> void
         
     | 
| 
       7772 
     | 
    
         
            -
             *
         
     | 
| 
       7773 
     | 
    
         
            -
             * Recursively add all destructured declarations to varDecls.
         
     | 
| 
       7774 
     | 
    
         
            -
             */
         
     | 
| 
       7775 
7095 
     | 
    
         
             
            function pushDestructuringVarDecls(n, s) {
         
     | 
| 
       7776 
7096 
     | 
    
         
             
                for (var i in n) {
         
     | 
| 
       7777 
7097 
     | 
    
         
             
                    var sub = n[i];
         
     | 
| 
         @@ -7907,12 +7227,6 @@ Pp.peekOnSameLine = function peekOnSameLine(scanOperand) { 
     | 
|
| 
       7907 
7227 
     | 
    
         
             
            Pp.done = function done() {
         
     | 
| 
       7908 
7228 
     | 
    
         
             
                return this.t.done;
         
     | 
| 
       7909 
7229 
     | 
    
         
             
            };
         
     | 
| 
       7910 
     | 
    
         
            -
             
     | 
| 
       7911 
     | 
    
         
            -
            /*
         
     | 
| 
       7912 
     | 
    
         
            -
             * Script :: (boolean, boolean, boolean) -> node
         
     | 
| 
       7913 
     | 
    
         
            -
             *
         
     | 
| 
       7914 
     | 
    
         
            -
             * Parses the toplevel and module/function bodies.
         
     | 
| 
       7915 
     | 
    
         
            -
             */
         
     | 
| 
       7916 
7230 
     | 
    
         
             
            Pp.Script = function Script(inModule, inFunction, expectEnd) {
         
     | 
| 
       7917 
7231 
     | 
    
         
             
                var node = this.newNode(scriptInit());
         
     | 
| 
       7918 
7232 
     | 
    
         
             
                var x2 = new StaticContext(node, node, inModule, inFunction);
         
     | 
| 
         @@ -7923,12 +7237,6 @@ Pp.Script = function Script(inModule, inFunction, expectEnd) { 
     | 
|
| 
       7923 
7237 
     | 
    
         
             
                    this.fail("expected end of input");
         
     | 
| 
       7924 
7238 
     | 
    
         
             
                return node;
         
     | 
| 
       7925 
7239 
     | 
    
         
             
            };
         
     | 
| 
       7926 
     | 
    
         
            -
             
     | 
| 
       7927 
     | 
    
         
            -
            /*
         
     | 
| 
       7928 
     | 
    
         
            -
             * Pragma :: (expression statement node) -> boolean
         
     | 
| 
       7929 
     | 
    
         
            -
             *
         
     | 
| 
       7930 
     | 
    
         
            -
             * Checks whether a node is a pragma and annotates it.
         
     | 
| 
       7931 
     | 
    
         
            -
             */
         
     | 
| 
       7932 
7240 
     | 
    
         
             
            function Pragma(n) {
         
     | 
| 
       7933 
7241 
     | 
    
         
             
                if (n.type === SEMICOLON) {
         
     | 
| 
       7934 
7242 
     | 
    
         
             
                    var e = n.expression;
         
     | 
| 
         @@ -8070,10 +7378,6 @@ Np.synth = function(init) { 
     | 
|
| 
       8070 
7378 
     | 
    
         
             
                return node;
         
     | 
| 
       8071 
7379 
     | 
    
         
             
            };
         
     | 
| 
       8072 
7380 
     | 
    
         | 
| 
       8073 
     | 
    
         
            -
            /*
         
     | 
| 
       8074 
     | 
    
         
            -
             * Helper init objects for common nodes.
         
     | 
| 
       8075 
     | 
    
         
            -
             */
         
     | 
| 
       8076 
     | 
    
         
            -
             
     | 
| 
       8077 
7381 
     | 
    
         
             
            var LOOP_INIT = { isLoop: true };
         
     | 
| 
       8078 
7382 
     | 
    
         | 
| 
       8079 
7383 
     | 
    
         
             
            function blockInit() {
         
     | 
| 
         @@ -8160,12 +7464,6 @@ Pp.Block = function Block() { 
     | 
|
| 
       8160 
7464 
     | 
    
         
             
            }
         
     | 
| 
       8161 
7465 
     | 
    
         | 
| 
       8162 
7466 
     | 
    
         
             
            var DECLARED_FORM = 0, EXPRESSED_FORM = 1, STATEMENT_FORM = 2;
         
     | 
| 
       8163 
     | 
    
         
            -
             
     | 
| 
       8164 
     | 
    
         
            -
            /*
         
     | 
| 
       8165 
     | 
    
         
            -
             * Export :: (binding node, boolean) -> Export
         
     | 
| 
       8166 
     | 
    
         
            -
             *
         
     | 
| 
       8167 
     | 
    
         
            -
             * Static semantic representation of a module export.
         
     | 
| 
       8168 
     | 
    
         
            -
             */
         
     | 
| 
       8169 
7467 
     | 
    
         
             
            function Export(node, isDefinition) {
         
     | 
| 
       8170 
7468 
     | 
    
         
             
                this.node = node;                 // the AST node declaring this individual export
         
     | 
| 
       8171 
7469 
     | 
    
         
             
                this.isDefinition = isDefinition; // is the node an 'export'-annotated definition?
         
     | 
| 
         @@ -9298,11 +8596,6 @@ Pp.ConditionalExpression = function ConditionalExpression() { 
     | 
|
| 
       9298 
8596 
     | 
    
         
             
                    n2 = n;
         
     | 
| 
       9299 
8597 
     | 
    
         
             
                    n = this.newNode({ type: HOOK });
         
     | 
| 
       9300 
8598 
     | 
    
         
             
                    n.push(n2);
         
     | 
| 
       9301 
     | 
    
         
            -
                    /*
         
     | 
| 
       9302 
     | 
    
         
            -
                     * Always accept the 'in' operator in the middle clause of a ternary,
         
     | 
| 
       9303 
     | 
    
         
            -
                     * where it's unambiguous, even if we might be parsing the init of a
         
     | 
| 
       9304 
     | 
    
         
            -
                     * for statement.
         
     | 
| 
       9305 
     | 
    
         
            -
                     */
         
     | 
| 
       9306 
8599 
     | 
    
         
             
                    var x2 = this.x.update({ inForLoopInit: false });
         
     | 
| 
       9307 
8600 
     | 
    
         
             
                    this.withContext(x2, function() {
         
     | 
| 
       9308 
8601 
     | 
    
         
             
                        n.push(this.AssignExpression());
         
     | 
| 
         @@ -9402,11 +8695,6 @@ Pp.EqualityExpression = function EqualityExpression() { 
     | 
|
| 
       9402 
8695 
     | 
    
         | 
| 
       9403 
8696 
     | 
    
         
             
            Pp.RelationalExpression = function RelationalExpression() {
         
     | 
| 
       9404 
8697 
     | 
    
         
             
                var n, n2;
         
     | 
| 
       9405 
     | 
    
         
            -
             
     | 
| 
       9406 
     | 
    
         
            -
                /*
         
     | 
| 
       9407 
     | 
    
         
            -
                 * Uses of the in operator in shiftExprs are always unambiguous,
         
     | 
| 
       9408 
     | 
    
         
            -
                 * so unset the flag that prohibits recognizing it.
         
     | 
| 
       9409 
     | 
    
         
            -
                 */
         
     | 
| 
       9410 
8698 
     | 
    
         
             
                var x2 = this.x.update({ inForLoopInit: false });
         
     | 
| 
       9411 
8699 
     | 
    
         
             
                this.withContext(x2, function() {
         
     | 
| 
       9412 
8700 
     | 
    
         
             
                    n = this.ShiftExpression();
         
     | 
| 
         @@ -9775,7 +9063,6 @@ exports.Module = Module; 
     | 
|
| 
       9775 
9063 
     | 
    
         
             
            exports.Export = Export;
         
     | 
| 
       9776 
9064 
     | 
    
         | 
| 
       9777 
9065 
     | 
    
         
             
            });
         
     | 
| 
       9778 
     | 
    
         
            -
            /* vim: set sw=4 ts=4 et tw=78: */
         
     | 
| 
       9779 
9066 
     | 
    
         
             
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       9780 
9067 
     | 
    
         
             
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       9781 
9068 
     | 
    
         
             
             *
         
     | 
| 
         @@ -10373,7 +9660,6 @@ exports.isIdentifier = isIdentifier; 
     | 
|
| 
       10373 
9660 
     | 
    
         
             
            exports.Tokenizer = Tokenizer;
         
     | 
| 
       10374 
9661 
     | 
    
         | 
| 
       10375 
9662 
     | 
    
         
             
            });
         
     | 
| 
       10376 
     | 
    
         
            -
            /* vim: set sw=4 ts=4 et tw=78: */
         
     | 
| 
       10377 
9663 
     | 
    
         
             
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       10378 
9664 
     | 
    
         
             
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       10379 
9665 
     | 
    
         
             
             *
         
     | 
| 
         @@ -11069,7 +10355,6 @@ exports.WeakMap = _WeakMap; 
     | 
|
| 
       11069 
10355 
     | 
    
         
             
            exports.Stack = Stack;
         
     | 
| 
       11070 
10356 
     | 
    
         | 
| 
       11071 
10357 
     | 
    
         
             
            });
         
     | 
| 
       11072 
     | 
    
         
            -
            /* vim: set sw=4 ts=4 et tw=78: */
         
     | 
| 
       11073 
10358 
     | 
    
         
             
            /* ***** BEGIN LICENSE BLOCK *****
         
     | 
| 
       11074 
10359 
     | 
    
         
             
             * Version: MPL 1.1/GPL 2.0/LGPL 2.1
         
     | 
| 
       11075 
10360 
     | 
    
         
             
             *
         
     |