File: mode-html.js

package info (click to toggle)
graphite-web 0.9.12%2Bdebian-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 13,464 kB
  • ctags: 3,343
  • sloc: python: 6,713; sh: 79; makefile: 44
file content (932 lines) | stat: -rw-r--r-- 42,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
define("ace/mode/html", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/mode/javascript", "ace/mode/css", "ace/tokenizer", "ace/mode/html_highlight_rules", "ace/mode/behaviour/xml"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text").Mode,
        f = a("ace/mode/javascript").Mode,
        g = a("ace/mode/css").Mode,
        h = a("ace/tokenizer").Tokenizer,
        i = a("ace/mode/html_highlight_rules").HtmlHighlightRules,
        j = a("ace/mode/behaviour/xml").XmlBehaviour,
        k = function() {
            var a = new i;
            this.$tokenizer = new h(a.getRules()), this.$behaviour = new j, this.$embeds = a.getEmbeds(), this.createModeDelegates({
                "js-": f,
                "css-": g
            })
        };
    d.inherits(k, e),
    function() {
        this.toggleCommentLines = function(a, b, c, d) {
            return 0
        }, this.getNextLineIndent = function(a, b, c) {
            return this.$getIndent(b)
        }, this.checkOutdent = function(a, b, c) {
            return !1
        }
    }.call(k.prototype), b.Mode = k
}), define("ace/mode/javascript", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/javascript_highlight_rules", "ace/mode/matching_brace_outdent", "ace/range", "ace/worker/worker_client", "ace/mode/behaviour/cstyle"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text").Mode,
        f = a("ace/tokenizer").Tokenizer,
        g = a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,
        h = a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,
        i = a("ace/range").Range,
        j = a("ace/worker/worker_client").WorkerClient,
        k = a("ace/mode/behaviour/cstyle").CstyleBehaviour,
        l = function() {
            this.$tokenizer = new f((new g).getRules()), this.$outdent = new h, this.$behaviour = new k
        };
    d.inherits(l, e),
    function() {
        this.toggleCommentLines = function(a, b, c, d) {
            var e = !0,
                f = [],
                g = /^(\s*)\/\//;
            for (var h = c; h <= d; h++)
                if (!g.test(b.getLine(h))) {
                    e = !1;
                    break
                }
            if (e) {
                var j = new i(0, 0, 0, 0);
                for (var h = c; h <= d; h++) {
                    var k = b.getLine(h),
                        l = k.match(g);
                    j.start.row = h, j.end.row = h, j.end.column = l[0].length, b.replace(j, l[1])
                }
            } else b.indentRows(c, d, "//")
        }, this.getNextLineIndent = function(a, b, c) {
            var d = this.$getIndent(b),
                e = this.$tokenizer.getLineTokens(b, a),
                f = e.tokens,
                g = e.state;
            if (f.length && f[f.length - 1].type == "comment") return d;
            if (a == "start" || a == "regex_allowed") {
                var h = b.match(/^.*[\{\(\[\:]\s*$/);
                h && (d += c)
            } else if (a == "doc-start") {
                if (g == "start" || a == "regex_allowed") return "";
                var h = b.match(/^\s*(\/?)\*/);
                h && (h[1] && (d += " "), d += "* ")
            }
            return d
        }, this.checkOutdent = function(a, b, c) {
            return this.$outdent.checkOutdent(b, c)
        }, this.autoOutdent = function(a, b, c) {
            this.$outdent.autoOutdent(b, c)
        }, this.createWorker = function(a) {
            var b = new j(["ace", "pilot"], "worker-javascript.js", "ace/mode/javascript_worker", "JavaScriptWorker");
            return b.attachToDocument(a.getDocument()), b.on("jslint", function(b) {
                var c = [];
                for (var d = 0; d < b.data.length; d++) {
                    var e = b.data[d];
                    e && c.push({
                        row: e.line - 1,
                        column: e.character - 1,
                        text: e.reason,
                        type: "warning",
                        lint: e
                    })
                }
                a.setAnnotations(c)
            }), b.on("narcissus", function(b) {
                a.setAnnotations([b.data])
            }), b.on("terminate", function() {
                a.clearAnnotations()
            }), b
        }
    }.call(l.prototype), b.Mode = l
}), define("ace/mode/javascript_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/unicode", "ace/mode/doc_comment_highlight_rules", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/lang"),
        f = a("ace/unicode"),
        g = a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,
        h = a("ace/mode/text_highlight_rules").TextHighlightRules,
        i = function() {
            var a = e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),
                b = e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),
                c = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",
                d = e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),
                h = e.arrayToMap("const|let|var|function".split("|")),
                i = e.arrayToMap("null|Infinity|NaN|undefined".split("|")),
                j = e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),
                k = "[" + f.packages.L + "\\$_][" + f.packages.L + f.packages.Mn + f.packages.Mc + f.packages.Nd + f.packages.Pc + "\\$_]*\\b";
            this.$rules = {
                start: [{
                    token: "comment",
                    regex: "\\/\\/.*$"
                }, (new g).getStartRule("doc-start"), {
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment"
                }, {
                    token: "string",
                    regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
                }, {
                    token: "string",
                    merge: !0,
                    regex: '["].*\\\\$',
                    next: "qqstring"
                }, {
                    token: "string",
                    regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
                }, {
                    token: "string",
                    merge: !0,
                    regex: "['].*\\\\$",
                    next: "qstring"
                }, {
                    token: "constant.numeric",
                    regex: "0[xX][0-9a-fA-F]+\\b"
                }, {
                    token: "constant.numeric",
                    regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
                }, {
                    token: ["keyword.definition", "text", "entity.name.function"],
                    regex: "(function)(\\s+)(" + k + ")"
                }, {
                    token: "constant.language.boolean",
                    regex: "(?:true|false)\\b"
                }, {
                    token: "keyword",
                    regex: "(?:" + c + ")\\b",
                    next: "regex_allowed"
                }, {
                    token: function(c) {
                        return a.hasOwnProperty(c) ? "variable.language" : d.hasOwnProperty(c) ? "invalid.deprecated" : h.hasOwnProperty(c) ? "keyword.definition" : b.hasOwnProperty(c) ? "keyword" : i.hasOwnProperty(c) ? "constant.language" : j.hasOwnProperty(c) ? "invalid.illegal" : c == "debugger" ? "invalid.deprecated" : "identifier"
                    },
                    regex: k
                }, {
                    token: "keyword.operator",
                    regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",
                    next: "regex_allowed"
                }, {
                    token: "punctuation.operator",
                    regex: "\\?|\\:|\\,|\\;|\\.",
                    next: "regex_allowed"
                }, {
                    token: "paren.lparen",
                    regex: "[[({]",
                    next: "regex_allowed"
                }, {
                    token: "paren.rparen",
                    regex: "[\\])}]"
                }, {
                    token: "keyword.operator",
                    regex: "\\/=?",
                    next: "regex_allowed"
                }, {
                    token: "comment",
                    regex: "^#!.*$"
                }, {
                    token: "text",
                    regex: "\\s+"
                }],
                regex_allowed: [{
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment_regex_allowed"
                }, {
                    token: "comment",
                    regex: "\\/\\/.*$"
                }, {
                    token: "string.regexp",
                    regex: "\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",
                    next: "start"
                }, {
                    token: "text",
                    regex: "\\s+"
                }, {
                    token: "empty",
                    regex: "",
                    next: "start"
                }],
                comment_regex_allowed: [{
                    token: "comment",
                    regex: ".*?\\*\\/",
                    merge: !0,
                    next: "regex_allowed"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }],
                comment: [{
                    token: "comment",
                    regex: ".*?\\*\\/",
                    merge: !0,
                    next: "start"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }],
                qqstring: [{
                    token: "string",
                    regex: '(?:(?:\\\\.)|(?:[^"\\\\]))*?"',
                    next: "start"
                }, {
                    token: "string",
                    merge: !0,
                    regex: ".+"
                }],
                qstring: [{
                    token: "string",
                    regex: "(?:(?:\\\\.)|(?:[^'\\\\]))*?'",
                    next: "start"
                }, {
                    token: "string",
                    merge: !0,
                    regex: ".+"
                }]
            }, this.embedRules(g, "doc-", [(new g).getEndRule("start")])
        };
    d.inherits(i, h), b.JavaScriptHighlightRules = i
}), define("ace/mode/doc_comment_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text_highlight_rules").TextHighlightRules,
        f = function() {
            this.$rules = {
                start: [{
                    token: "comment.doc.tag",
                    regex: "@[\\w\\d_]+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "\\s+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "TODO"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "[^@\\*]+"
                }, {
                    token: "comment.doc",
                    merge: !0,
                    regex: "."
                }]
            }
        };
    d.inherits(f, e),
    function() {
        this.getStartRule = function(a) {
            return {
                token: "comment.doc",
                merge: !0,
                regex: "\\/\\*(?=\\*)",
                next: a
            }
        }, this.getEndRule = function(a) {
            return {
                token: "comment.doc",
                merge: !0,
                regex: "\\*\\/",
                next: a
            }
        }
    }.call(f.prototype), b.DocCommentHighlightRules = f
}), define("ace/mode/matching_brace_outdent", ["require", "exports", "module", "ace/range"], function(a, b, c) {
    var d = a("ace/range").Range,
        e = function() {};
    (function() {
        this.checkOutdent = function(a, b) {
            return /^\s+$/.test(a) ? /^\s*\}/.test(b) : !1
        }, this.autoOutdent = function(a, b) {
            var c = a.getLine(b),
                e = c.match(/^(\s*\})/);
            if (!e) return 0;
            var f = e[1].length,
                g = a.findMatchingBracket({
                    row: b,
                    column: f
                });
            if (!g || g.row == b) return 0;
            var h = this.$getIndent(a.getLine(g.row));
            a.replace(new d(b, 0, b, f - 1), h)
        }, this.$getIndent = function(a) {
            var b = a.match(/^(\s+)/);
            return b ? b[1] : ""
        }
    }).call(e.prototype), b.MatchingBraceOutdent = e
}), define("ace/worker/worker_client", ["require", "exports", "module", "pilot/oop", "pilot/event_emitter"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/event_emitter").EventEmitter,
        f = function(b, c, d, e) {
            this.changeListener = this.changeListener.bind(this);
            if (a.packaged) var f = this.$guessBasePath(),
                g = this.$worker = new Worker(f + c);
            else {
                var h = this.$normalizePath(a.nameToUrl("ace/worker/worker", null, "_")),
                    g = this.$worker = new Worker(h),
                    i = {};
                for (var j = 0; j < b.length; j++) {
                    var k = b[j],
                        l = this.$normalizePath(a.nameToUrl(k, null, "_").replace(/.js$/, ""));
                    i[k] = l
                }
            }
            this.$worker.postMessage({
                init: !0,
                tlns: i,
                module: d,
                classname: e
            }), this.callbackId = 1, this.callbacks = {};
            var m = this;
            this.$worker.onerror = function(a) {
                throw window.console && console.log && console.log(a), a
            }, this.$worker.onmessage = function(a) {
                var b = a.data;
                switch (b.type) {
                    case "log":
                        window.console && console.log && console.log(b.data);
                        break;
                    case "event":
                        m._dispatchEvent(b.name, {
                            data: b.data
                        });
                        break;
                    case "call":
                        var c = m.callbacks[b.id];
                        c && (c(b.data), delete m.callbacks[b.id])
                }
            }
        };
    (function() {
        d.implement(this, e), this.$normalizePath = function(a) {
            return a.match(/^\w+:/) || (a = location.protocol + "//" + location.host + (a.charAt(0) == "/" ? "" : location.pathname.replace(/\/[^\/]*$/, "")) + "/" + a.replace(/^[\/]+/, "")), a
        }, this.$guessBasePath = function() {
            if (a.aceBaseUrl) return a.aceBaseUrl;
            var b = document.getElementsByTagName("script");
            for (var c = 0; c < b.length; c++) {
                var d = b[c],
                    e = d.getAttribute("data-ace-base");
                if (e) return e.replace(/\/*$/, "/");
                var f = d.src || d.getAttribute("src");
                if (!f) continue;
                var g = f.match(/^(?:(.*\/)ace\.js|(.*\/)ace-uncompressed\.js)(?:\?|$)/);
                if (g) return g[1] || g[2]
            }
            return ""
        }, this.terminate = function() {
            this._dispatchEvent("terminate", {}), this.$worker.terminate(), this.$worker = null, this.$doc.removeEventListener("change", this.changeListener), this.$doc = null
        }, this.send = function(a, b) {
            this.$worker.postMessage({
                command: a,
                args: b
            })
        }, this.call = function(a, b, c) {
            if (c) {
                var d = this.callbackId++;
                this.callbacks[d] = c, b.push(d)
            }
            this.send(a, b)
        }, this.emit = function(a, b) {
            try {
                this.$worker.postMessage({
                    event: a,
                    data: {
                        data: b.data
                    }
                })
            } catch (c) {}
        }, this.attachToDocument = function(a) {
            this.$doc && this.terminate(), this.$doc = a, this.call("setValue", [a.getValue()]), a.on("change", this.changeListener)
        }, this.changeListener = function(a) {
            a.range = {
                start: a.data.range.start,
                end: a.data.range.end
            }, this.emit("change", a)
        }
    }).call(f.prototype), b.WorkerClient = f
}), define("ace/mode/behaviour/cstyle", ["require", "exports", "module", "pilot/oop", "ace/mode/behaviour"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/behaviour").Behaviour,
        f = function() {
            this.add("braces", "insertion", function(a, b, c, d, e) {
                if (e == "{") {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    return g !== "" ? {
                        text: "{" + g + "}",
                        selection: !1
                    } : {
                        text: "{}",
                        selection: [1, 1]
                    }
                }
                if (e == "}") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == "}") {
                        var k = d.$findOpeningBracket("}", {
                            column: h.column + 1,
                            row: h.row
                        });
                        if (k !== null) return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                } else if (e == "\n") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == "}") {
                        var l = d.findMatchingBracket({
                            row: h.row,
                            column: h.column + 1
                        });
                        if (!l) return null;
                        var m = this.getNextLineIndent(a, i.substring(0, i.length - 1), d.getTabString()),
                            n = this.$getIndent(d.doc.getLine(l.row));
                        return {
                            text: "\n" + m + "\n" + n,
                            selection: [1, m.length, 1, m.length]
                        }
                    }
                }
            }), this.add("braces", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == "{") {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.end.column, e.end.column + 1);
                    if (h == "}") return e.end.column++, e
                }
            }), this.add("parens", "insertion", function(a, b, c, d, e) {
                if (e == "(") {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    return g !== "" ? {
                        text: "(" + g + ")",
                        selection: !1
                    } : {
                        text: "()",
                        selection: [1, 1]
                    }
                }
                if (e == ")") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == ")") {
                        var k = d.$findOpeningBracket(")", {
                            column: h.column + 1,
                            row: h.row
                        });
                        if (k !== null) return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                }
            }), this.add("parens", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == "(") {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.start.column + 1, e.start.column + 2);
                    if (h == ")") return e.end.column++, e
                }
            }), this.add("string_dquotes", "insertion", function(a, b, c, d, e) {
                if (e == '"') {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    if (g !== "") return {
                        text: '"' + g + '"',
                        selection: !1
                    };
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column - 1, h.column);
                    if (j == "\\") return null;
                    var k = d.getTokens(f.start.row, f.start.row)[0].tokens,
                        l = 0,
                        m, n = -1;
                    for (var o = 0; o < k.length; o++) {
                        m = k[o], m.type == "string" ? n = -1 : n < 0 && (n = m.value.indexOf('"'));
                        if (m.value.length + l > f.start.column) break;
                        l += k[o].value.length
                    }
                    if (!m || n < 0 && m.type !== "comment" && (m.type !== "string" || f.start.column !== m.value.length + l - 1 && m.value.lastIndexOf('"') === m.value.length - 1)) return {
                        text: '""',
                        selection: [1, 1]
                    };
                    if (m && m.type === "string") {
                        var p = i.substring(h.column, h.column + 1);
                        if (p == '"') return {
                            text: "",
                            selection: [1, 1]
                        }
                    }
                }
            }), this.add("string_dquotes", "deletion", function(a, b, c, d, e) {
                var f = d.doc.getTextRange(e);
                if (!e.isMultiLine() && f == '"') {
                    var g = d.doc.getLine(e.start.row),
                        h = g.substring(e.start.column + 1, e.start.column + 2);
                    if (h == '"') return e.end.column++, e
                }
            })
        };
    d.inherits(f, e), b.CstyleBehaviour = f
}), define("ace/mode/css", ["require", "exports", "module", "pilot/oop", "ace/mode/text", "ace/tokenizer", "ace/mode/css_highlight_rules", "ace/mode/matching_brace_outdent", "ace/worker/worker_client"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/text").Mode,
        f = a("ace/tokenizer").Tokenizer,
        g = a("ace/mode/css_highlight_rules").CssHighlightRules,
        h = a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,
        i = a("ace/worker/worker_client").WorkerClient,
        j = function() {
            this.$tokenizer = new f((new g).getRules()), this.$outdent = new h
        };
    d.inherits(j, e),
    function() {
        this.getNextLineIndent = function(a, b, c) {
            var d = this.$getIndent(b),
                e = this.$tokenizer.getLineTokens(b, a).tokens;
            if (e.length && e[e.length - 1].type == "comment") return d;
            var f = b.match(/^.*\{\s*$/);
            return f && (d += c), d
        }, this.checkOutdent = function(a, b, c) {
            return this.$outdent.checkOutdent(b, c)
        }, this.autoOutdent = function(a, b, c) {
            this.$outdent.autoOutdent(b, c)
        }, this.createWorker = function(a) {
            var b = new i(["ace", "pilot"], "worker-css.js", "ace/mode/css_worker", "Worker");
            b.attachToDocument(a.getDocument()), b.on("csslint", function(b) {
                var c = [];
                b.data.forEach(function(a) {
                    c.push({
                        row: a.line - 1,
                        column: a.col - 1,
                        text: a.message,
                        type: a.type,
                        lint: a
                    })
                }), a.setAnnotations(c)
            })
        }
    }.call(j.prototype), b.Mode = j
}), define("ace/mode/css_highlight_rules", ["require", "exports", "module", "pilot/oop", "pilot/lang", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("pilot/lang"),
        f = a("ace/mode/text_highlight_rules").TextHighlightRules,
        g = function() {
            function g(a) {
                var b = [],
                    c = a.split("");
                for (var d = 0; d < c.length; d++) b.push("[", c[d].toLowerCase(), c[d].toUpperCase(), "]");
                return b.join("")
            }
            var a = e.arrayToMap("-moz-box-sizing|-webkit-box-sizing|appearance|azimuth|background-attachment|background-color|background-image|background-position|background-repeat|background|border-bottom-color|border-bottom-style|border-bottom-width|border-bottom|border-collapse|border-color|border-left-color|border-left-style|border-left-width|border-left|border-right-color|border-right-style|border-right-width|border-right|border-spacing|border-style|border-top-color|border-top-style|border-top-width|border-top|border-width|border|bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|counter-reset|cue-after|cue-before|cue|cursor|direction|display|elevation|empty-cells|float|font-family|font-size-adjust|font-size|font-stretch|font-style|font-variant|font-weight|font|height|left|letter-spacing|line-height|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|marker-offset|margin|marks|max-height|max-width|min-height|min-width|-moz-border-radius|opacity|orphans|outline-color|outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page|pause-after|pause-before|pause|pitch-range|pitch|play-during|position|quotes|richness|right|size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|stress|table-layout|text-align|text-decoration|text-indent|text-shadow|text-transform|top|unicode-bidi|vertical-align|visibility|voice-family|volume|white-space|widows|width|word-spacing|z-index".split("|")),
                b = e.arrayToMap("rgb|rgba|url|attr|counter|counters".split("|")),
                c = e.arrayToMap("absolute|all-scroll|always|armenian|auto|baseline|below|bidi-override|block|bold|bolder|border-box|both|bottom|break-all|break-word|capitalize|center|char|circle|cjk-ideographic|col-resize|collapse|content-box|crosshair|dashed|decimal-leading-zero|decimal|default|disabled|disc|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ellipsis|fixed|georgian|groove|hand|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|inactive|inherit|inline-block|inline|inset|inside|inter-ideograph|inter-word|italic|justify|katakana-iroha|katakana|keep-all|left|lighter|line-edge|line-through|line|list-item|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|medium|middle|move|n-resize|ne-resize|newspaper|no-drop|no-repeat|nw-resize|none|normal|not-allowed|nowrap|oblique|outset|outside|overline|pointer|progress|relative|repeat-x|repeat-y|repeat|right|ridge|row-resize|rtl|s-resize|scroll|se-resize|separate|small-caps|solid|square|static|strict|super|sw-resize|table-footer-group|table-header-group|tb-rl|text-bottom|text-top|text|thick|thin|top|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|zero".split("|")),
                d = e.arrayToMap("aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow".split("|")),
                f = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))",
                h = [{
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "ruleset_comment"
                }, {
                    token: "string",
                    regex: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
                }, {
                    token: "string",
                    regex: "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
                }, {
                    token: "constant.numeric",
                    regex: f + g("em")
                }, {
                    token: "constant.numeric",
                    regex: f + g("ex")
                }, {
                    token: "constant.numeric",
                    regex: f + g("px")
                }, {
                    token: "constant.numeric",
                    regex: f + g("cm")
                }, {
                    token: "constant.numeric",
                    regex: f + g("mm")
                }, {
                    token: "constant.numeric",
                    regex: f + g("in")
                }, {
                    token: "constant.numeric",
                    regex: f + g("pt")
                }, {
                    token: "constant.numeric",
                    regex: f + g("pc")
                }, {
                    token: "constant.numeric",
                    regex: f + g("deg")
                }, {
                    token: "constant.numeric",
                    regex: f + g("rad")
                }, {
                    token: "constant.numeric",
                    regex: f + g("grad")
                }, {
                    token: "constant.numeric",
                    regex: f + g("ms")
                }, {
                    token: "constant.numeric",
                    regex: f + g("s")
                }, {
                    token: "constant.numeric",
                    regex: f + g("hz")
                }, {
                    token: "constant.numeric",
                    regex: f + g("khz")
                }, {
                    token: "constant.numeric",
                    regex: f + "%"
                }, {
                    token: "constant.numeric",
                    regex: f
                }, {
                    token: "constant.numeric",
                    regex: "#[a-fA-F0-9]{6}"
                }, {
                    token: "constant.numeric",
                    regex: "#[a-fA-F0-9]{3}"
                }, {
                    token: function(e) {
                        return a.hasOwnProperty(e.toLowerCase()) ? "support.type" : b.hasOwnProperty(e.toLowerCase()) ? "support.function" : c.hasOwnProperty(e.toLowerCase()) ? "support.constant" : d.hasOwnProperty(e.toLowerCase()) ? "support.constant.color" : "text"
                    },
                    regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
                }],
                i = e.copyArray(h);
            i.unshift({
                token: "paren.rparen",
                regex: "\\}",
                next: "start"
            });
            var j = e.copyArray(h);
            j.unshift({
                token: "paren.rparen",
                regex: "\\}",
                next: "media"
            });
            var k = [{
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }],
                l = e.copyArray(k);
            l.unshift({
                token: "comment",
                regex: ".*?\\*\\/",
                next: "start"
            });
            var m = e.copyArray(k);
            m.unshift({
                token: "comment",
                regex: ".*?\\*\\/",
                next: "media"
            });
            var n = e.copyArray(k);
            n.unshift({
                token: "comment",
                regex: ".*?\\*\\/",
                next: "ruleset"
            }), this.$rules = {
                start: [{
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "comment"
                }, {
                    token: "paren.lparen",
                    regex: "\\{",
                    next: "ruleset"
                }, {
                    token: "string",
                    regex: "@media.*?{",
                    next: "media"
                }, {
                    token: "keyword",
                    regex: "#[a-zA-Z0-9-_]+"
                }, {
                    token: "variable",
                    regex: "\\.[a-zA-Z0-9-_]+"
                }, {
                    token: "string",
                    regex: ":[a-zA-Z0-9-_]+"
                }, {
                    token: "constant",
                    regex: "[a-zA-Z0-9-_]+"
                }],
                media: [{
                    token: "comment",
                    merge: !0,
                    regex: "\\/\\*",
                    next: "media_comment"
                }, {
                    token: "paren.lparen",
                    regex: "\\{",
                    next: "media_ruleset"
                }, {
                    token: "string",
                    regex: "\\}",
                    next: "start"
                }, {
                    token: "keyword",
                    regex: "#[a-zA-Z0-9-_]+"
                }, {
                    token: "variable",
                    regex: "\\.[a-zA-Z0-9-_]+"
                }, {
                    token: "string",
                    regex: ":[a-zA-Z0-9-_]+"
                }, {
                    token: "constant",
                    regex: "[a-zA-Z0-9-_]+"
                }],
                comment: l,
                ruleset: i,
                ruleset_comment: n,
                media_ruleset: j,
                media_comment: m
            }
        };
    d.inherits(g, f), b.CssHighlightRules = g
}), define("ace/mode/html_highlight_rules", ["require", "exports", "module", "pilot/oop", "ace/mode/css_highlight_rules", "ace/mode/javascript_highlight_rules", "ace/mode/text_highlight_rules"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/css_highlight_rules").CssHighlightRules,
        f = a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,
        g = a("ace/mode/text_highlight_rules").TextHighlightRules,
        h = function() {
            function a(a) {
                return [{
                    token: "string",
                    regex: '".*?"'
                }, {
                    token: "string",
                    merge: !0,
                    regex: '["].*$',
                    next: a + "-qqstring"
                }, {
                    token: "string",
                    regex: "'.*?'"
                }, {
                    token: "string",
                    merge: !0,
                    regex: "['].*$",
                    next: a + "-qstring"
                }]
            }

            function b(a, b) {
                return [{
                    token: "string",
                    merge: !0,
                    regex: ".*" + a,
                    next: b
                }, {
                    token: "string",
                    merge: !0,
                    regex: ".+"
                }]
            }

            function c(c, d, e) {
                c[d] = [{
                    token: "text",
                    regex: "\\s+"
                }, {
                    token: "meta.tag",
                    regex: "[-_a-zA-Z0-9:]+",
                    next: d + "embed-attribute-list"
                }, {
                    token: "empty",
                    regex: "",
                    next: d + "embed-attribute-list"
                }], c[d + "-qstring"] = b("'", d), c[d + "-qqstring"] = b('"', d), c[d + "embed-attribute-list"] = [{
                    token: "text",
                    regex: ">",
                    next: e
                }, {
                    token: "entity.other.attribute-name",
                    regex: "[-_a-zA-Z0-9:]+"
                }, {
                    token: "constant.numeric",
                    regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
                }, {
                    token: "text",
                    regex: "\\s+"
                }].concat(a(d))
            }
            this.$rules = {
                start: [{
                    token: "text",
                    merge: !0,
                    regex: "<\\!\\[CDATA\\[",
                    next: "cdata"
                }, {
                    token: "xml_pe",
                    regex: "<\\?.*?\\?>"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: "<\\!--",
                    next: "comment"
                }, {
                    token: "text",
                    regex: "<(?=s*script)",
                    next: "script"
                }, {
                    token: "text",
                    regex: "<(?=s*style)",
                    next: "css"
                }, {
                    token: "text",
                    regex: "<\\/?",
                    next: "tag"
                }, {
                    token: "text",
                    regex: "\\s+"
                }, {
                    token: "text",
                    regex: "[^<]+"
                }],
                cdata: [{
                    token: "text",
                    regex: "\\]\\]>",
                    next: "start"
                }, {
                    token: "text",
                    merge: !0,
                    regex: "\\s+"
                }, {
                    token: "text",
                    merge: !0,
                    regex: ".+"
                }],
                comment: [{
                    token: "comment",
                    regex: ".*?-->",
                    next: "start"
                }, {
                    token: "comment",
                    merge: !0,
                    regex: ".+"
                }]
            }, c(this.$rules, "tag", "start"), c(this.$rules, "css", "css-start"), c(this.$rules, "script", "js-start"), this.embedRules(f, "js-", [{
                token: "comment",
                regex: "\\/\\/.*(?=<\\/script>)",
                next: "tag"
            }, {
                token: "text",
                regex: "<\\/(?=script)",
                next: "tag"
            }]), this.embedRules(e, "css-", [{
                token: "text",
                regex: "<\\/(?=style)",
                next: "tag"
            }])
        };
    d.inherits(h, g), b.HtmlHighlightRules = h
}), define("ace/mode/behaviour/xml", ["require", "exports", "module", "pilot/oop", "ace/mode/behaviour", "ace/mode/behaviour/cstyle"], function(a, b, c) {
    var d = a("pilot/oop"),
        e = a("ace/mode/behaviour").Behaviour,
        f = a("ace/mode/behaviour/cstyle").CstyleBehaviour,
        g = function() {
            this.inherit(f, ["string_dquotes"]), this.add("brackets", "insertion", function(a, b, c, d, e) {
                if (e == "<") {
                    var f = c.getSelectionRange(),
                        g = d.doc.getTextRange(f);
                    return g !== "" ? !1 : {
                        text: "<>",
                        selection: [1, 1]
                    }
                }
                if (e == ">") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        j = i.substring(h.column, h.column + 1);
                    if (j == ">") return {
                        text: "",
                        selection: [1, 1]
                    }
                } else if (e == "\n") {
                    var h = c.getCursorPosition(),
                        i = d.doc.getLine(h.row),
                        k = i.substring(h.column, h.column + 2);
                    if (k == "</") {
                        var l = this.$getIndent(d.doc.getLine(h.row)) + d.getTabString(),
                            m = this.$getIndent(d.doc.getLine(h.row));
                        return {
                            text: "\n" + l + "\n" + m,
                            selection: [1, l.length, 1, l.length]
                        }
                    }
                }
            })
        };
    d.inherits(g, e), b.XmlBehaviour = g
})