spectacular_rails 1.6.0.2 → 1.6.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/font/FontAwesome.otf +0 -0
  3. data/app/assets/font/fontawesome-webfont.eot +0 -0
  4. data/app/assets/font/fontawesome-webfont.svg +399 -0
  5. data/app/assets/font/fontawesome-webfont.ttf +0 -0
  6. data/app/assets/font/fontawesome-webfont.woff +0 -0
  7. data/app/assets/javascripts/jade.js +208 -0
  8. data/app/assets/javascripts/snap.js +11 -0
  9. data/app/assets/javascripts/source-map.js +1804 -0
  10. data/app/assets/javascripts/source-map.min.js +1 -0
  11. data/app/assets/javascripts/spectacular.js +5692 -0
  12. data/app/assets/javascripts/spectacular.min.js +5 -0
  13. data/app/assets/javascripts/templates.js +103 -0
  14. data/app/assets/javascripts/templates.min.js +1 -0
  15. data/app/assets/stylesheets/font-awesome/css/font-awesome-ie7.css +1203 -0
  16. data/app/assets/stylesheets/font-awesome/css/font-awesome-ie7.min.css +384 -0
  17. data/app/assets/stylesheets/font-awesome/css/font-awesome.css.erb +1479 -0
  18. data/app/assets/stylesheets/font-awesome/css/font-awesome.min.css +403 -0
  19. data/app/assets/stylesheets/font-awesome/less/bootstrap.less +84 -0
  20. data/app/assets/stylesheets/font-awesome/less/core.less +129 -0
  21. data/app/assets/stylesheets/font-awesome/less/extras.less +93 -0
  22. data/app/assets/stylesheets/font-awesome/less/font-awesome-ie7.less +1953 -0
  23. data/app/assets/stylesheets/font-awesome/less/font-awesome.less +33 -0
  24. data/app/assets/stylesheets/font-awesome/less/icons.less +381 -0
  25. data/app/assets/stylesheets/font-awesome/less/mixins.less +48 -0
  26. data/app/assets/stylesheets/font-awesome/less/path.less +14 -0
  27. data/app/assets/stylesheets/font-awesome/less/variables.less +735 -0
  28. data/app/assets/stylesheets/font-awesome/scss/_bootstrap.scss +84 -0
  29. data/app/assets/stylesheets/font-awesome/scss/_core.scss +129 -0
  30. data/app/assets/stylesheets/font-awesome/scss/_extras.scss +93 -0
  31. data/app/assets/stylesheets/font-awesome/scss/_icons.scss +381 -0
  32. data/app/assets/stylesheets/font-awesome/scss/_mixins.scss +48 -0
  33. data/app/assets/stylesheets/font-awesome/scss/_path.scss +14 -0
  34. data/app/assets/stylesheets/font-awesome/scss/_variables.scss +734 -0
  35. data/app/assets/stylesheets/font-awesome/scss/font-awesome-ie7.scss +1953 -0
  36. data/app/assets/stylesheets/font-awesome/scss/font-awesome.scss +33 -0
  37. data/app/assets/stylesheets/spectacular.css +950 -0
  38. data/lib/spectacular_rails/version.rb +1 -1
  39. data/lib/spectacular_rails.rb +0 -18
  40. metadata +37 -1
@@ -0,0 +1,1804 @@
1
+ /* -*- Mode: js; js-indent-level: 2; -*- */
2
+ /*
3
+ * Copyright 2011 Mozilla Foundation and contributors
4
+ * Licensed under the New BSD license. See LICENSE or:
5
+ * http://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+
8
+ /**
9
+ * Environment such PhantomJS 1.8.* does not provides the bind method on Function prototype.
10
+ * This shim will ensure that source-map will not break when running on PhantomJS.
11
+ */
12
+ if(!Function.prototype.bind) {
13
+ Function.prototype.bind = function(scope){
14
+ var self = this;
15
+ return function(){ return self.apply(scope, arguments); }
16
+ }
17
+ }
18
+
19
+ /**
20
+ * Define a module along with a payload.
21
+ * @param {string} moduleName Name for the payload
22
+ * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec
23
+ * @param {function} payload Function with (require, exports, module) params
24
+ */
25
+
26
+ function define(moduleName, deps, payload) {
27
+ if (typeof moduleName != "string") {
28
+ throw new TypeError('Expected string, got: ' + moduleName);
29
+ }
30
+
31
+ if (arguments.length == 2) {
32
+ payload = deps;
33
+ }
34
+
35
+ if (moduleName in define.modules) {
36
+ throw new Error("Module already defined: " + moduleName);
37
+ }
38
+ define.modules[moduleName] = payload;
39
+ };
40
+
41
+ /**
42
+ * The global store of un-instantiated modules
43
+ */
44
+ define.modules = {};
45
+
46
+
47
+ /**
48
+ * We invoke require() in the context of a Domain so we can have multiple
49
+ * sets of modules running separate from each other.
50
+ * This contrasts with JSMs which are singletons, Domains allows us to
51
+ * optionally load a CommonJS module twice with separate data each time.
52
+ * Perhaps you want 2 command lines with a different set of commands in each,
53
+ * for example.
54
+ */
55
+ function Domain() {
56
+ this.modules = {};
57
+ this._currentModule = null;
58
+ }
59
+
60
+ (function () {
61
+
62
+ /**
63
+ * Lookup module names and resolve them by calling the definition function if
64
+ * needed.
65
+ * There are 2 ways to call this, either with an array of dependencies and a
66
+ * callback to call when the dependencies are found (which can happen
67
+ * asynchronously in an in-page context) or with a single string an no callback
68
+ * where the dependency is resolved synchronously and returned.
69
+ * The API is designed to be compatible with the CommonJS AMD spec and
70
+ * RequireJS.
71
+ * @param {string[]|string} deps A name, or names for the payload
72
+ * @param {function|undefined} callback Function to call when the dependencies
73
+ * are resolved
74
+ * @return {undefined|object} The module required or undefined for
75
+ * array/callback method
76
+ */
77
+ Domain.prototype.require = function(deps, callback) {
78
+ if (Array.isArray(deps)) {
79
+ var params = deps.map(function(dep) {
80
+ return this.lookup(dep);
81
+ }, this);
82
+ if (callback) {
83
+ callback.apply(null, params);
84
+ }
85
+ return undefined;
86
+ }
87
+ else {
88
+ return this.lookup(deps);
89
+ }
90
+ };
91
+
92
+ function normalize(path) {
93
+ var bits = path.split('/');
94
+ var i = 1;
95
+ while (i < bits.length) {
96
+ if (bits[i] === '..') {
97
+ bits.splice(i-1, 1);
98
+ } else if (bits[i] === '.') {
99
+ bits.splice(i, 1);
100
+ } else {
101
+ i++;
102
+ }
103
+ }
104
+ return bits.join('/');
105
+ }
106
+
107
+ function join(a, b) {
108
+ a = a.trim();
109
+ b = b.trim();
110
+ if (/^\//.test(b)) {
111
+ return b;
112
+ } else {
113
+ return a.replace(/\/*$/, '/') + b;
114
+ }
115
+ }
116
+
117
+ function dirname(path) {
118
+ var bits = path.split('/');
119
+ bits.pop();
120
+ return bits.join('/');
121
+ }
122
+
123
+ /**
124
+ * Lookup module names and resolve them by calling the definition function if
125
+ * needed.
126
+ * @param {string} moduleName A name for the payload to lookup
127
+ * @return {object} The module specified by aModuleName or null if not found.
128
+ */
129
+ Domain.prototype.lookup = function(moduleName) {
130
+ if (/^\./.test(moduleName)) {
131
+ moduleName = normalize(join(dirname(this._currentModule), moduleName));
132
+ }
133
+
134
+ if (moduleName in this.modules) {
135
+ var module = this.modules[moduleName];
136
+ return module;
137
+ }
138
+
139
+ if (!(moduleName in define.modules)) {
140
+ throw new Error("Module not defined: " + moduleName);
141
+ }
142
+
143
+ var module = define.modules[moduleName];
144
+
145
+ if (typeof module == "function") {
146
+ var exports = {};
147
+ var previousModule = this._currentModule;
148
+ this._currentModule = moduleName;
149
+ module(this.require.bind(this), exports, { id: moduleName, uri: "" });
150
+ this._currentModule = previousModule;
151
+ module = exports;
152
+ }
153
+
154
+ // cache the resulting module object for next time
155
+ this.modules[moduleName] = module;
156
+
157
+ return module;
158
+ };
159
+
160
+ }());
161
+
162
+ define.Domain = Domain;
163
+ define.globalDomain = new Domain();
164
+
165
+ var require = define.globalDomain.require.bind(define.globalDomain);
166
+ /* -*- Mode: js; js-indent-level: 2; -*- */
167
+ /*
168
+ * Copyright 2011 Mozilla Foundation and contributors
169
+ * Licensed under the New BSD license. See LICENSE or:
170
+ * http://opensource.org/licenses/BSD-3-Clause
171
+ */
172
+ define('source-map/source-map-generator', ['require', 'exports', 'module' , 'source-map/base64-vlq', 'source-map/util', 'source-map/array-set'], function(require, exports, module) {
173
+
174
+ var base64VLQ = require('./base64-vlq');
175
+ var util = require('./util');
176
+ var ArraySet = require('./array-set').ArraySet;
177
+
178
+ /**
179
+ * An instance of the SourceMapGenerator represents a source map which is
180
+ * being built incrementally. To create a new one, you must pass an object
181
+ * with the following properties:
182
+ *
183
+ * - file: The filename of the generated source.
184
+ * - sourceRoot: An optional root for all URLs in this source map.
185
+ */
186
+ function SourceMapGenerator(aArgs) {
187
+ this._file = util.getArg(aArgs, 'file');
188
+ this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
189
+ this._sources = new ArraySet();
190
+ this._names = new ArraySet();
191
+ this._mappings = [];
192
+ this._sourcesContents = null;
193
+ }
194
+
195
+ SourceMapGenerator.prototype._version = 3;
196
+
197
+ /**
198
+ * Creates a new SourceMapGenerator based on a SourceMapConsumer
199
+ *
200
+ * @param aSourceMapConsumer The SourceMap.
201
+ */
202
+ SourceMapGenerator.fromSourceMap =
203
+ function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
204
+ var sourceRoot = aSourceMapConsumer.sourceRoot;
205
+ var generator = new SourceMapGenerator({
206
+ file: aSourceMapConsumer.file,
207
+ sourceRoot: sourceRoot
208
+ });
209
+ aSourceMapConsumer.eachMapping(function (mapping) {
210
+ var newMapping = {
211
+ generated: {
212
+ line: mapping.generatedLine,
213
+ column: mapping.generatedColumn
214
+ }
215
+ };
216
+
217
+ if (mapping.source) {
218
+ newMapping.source = mapping.source;
219
+ if (sourceRoot) {
220
+ newMapping.source = util.relative(sourceRoot, newMapping.source);
221
+ }
222
+
223
+ newMapping.original = {
224
+ line: mapping.originalLine,
225
+ column: mapping.originalColumn
226
+ };
227
+
228
+ if (mapping.name) {
229
+ newMapping.name = mapping.name;
230
+ }
231
+ }
232
+
233
+ generator.addMapping(newMapping);
234
+ });
235
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
236
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
237
+ if (content) {
238
+ generator.setSourceContent(sourceFile, content);
239
+ }
240
+ });
241
+ return generator;
242
+ };
243
+
244
+ /**
245
+ * Add a single mapping from original source line and column to the generated
246
+ * source's line and column for this source map being created. The mapping
247
+ * object should have the following properties:
248
+ *
249
+ * - generated: An object with the generated line and column positions.
250
+ * - original: An object with the original line and column positions.
251
+ * - source: The original source file (relative to the sourceRoot).
252
+ * - name: An optional original token name for this mapping.
253
+ */
254
+ SourceMapGenerator.prototype.addMapping =
255
+ function SourceMapGenerator_addMapping(aArgs) {
256
+ var generated = util.getArg(aArgs, 'generated');
257
+ var original = util.getArg(aArgs, 'original', null);
258
+ var source = util.getArg(aArgs, 'source', null);
259
+ var name = util.getArg(aArgs, 'name', null);
260
+
261
+ this._validateMapping(generated, original, source, name);
262
+
263
+ if (source && !this._sources.has(source)) {
264
+ this._sources.add(source);
265
+ }
266
+
267
+ if (name && !this._names.has(name)) {
268
+ this._names.add(name);
269
+ }
270
+
271
+ this._mappings.push({
272
+ generated: generated,
273
+ original: original,
274
+ source: source,
275
+ name: name
276
+ });
277
+ };
278
+
279
+ /**
280
+ * Set the source content for a source file.
281
+ */
282
+ SourceMapGenerator.prototype.setSourceContent =
283
+ function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
284
+ var source = aSourceFile;
285
+ if (this._sourceRoot) {
286
+ source = util.relative(this._sourceRoot, source);
287
+ }
288
+
289
+ if (aSourceContent !== null) {
290
+ // Add the source content to the _sourcesContents map.
291
+ // Create a new _sourcesContents map if the property is null.
292
+ if (!this._sourcesContents) {
293
+ this._sourcesContents = {};
294
+ }
295
+ this._sourcesContents[util.toSetString(source)] = aSourceContent;
296
+ } else {
297
+ // Remove the source file from the _sourcesContents map.
298
+ // If the _sourcesContents map is empty, set the property to null.
299
+ delete this._sourcesContents[util.toSetString(source)];
300
+ if (Object.keys(this._sourcesContents).length === 0) {
301
+ this._sourcesContents = null;
302
+ }
303
+ }
304
+ };
305
+
306
+ /**
307
+ * Applies the mappings of a sub-source-map for a specific source file to the
308
+ * source map being generated. Each mapping to the supplied source file is
309
+ * rewritten using the supplied source map. Note: The resolution for the
310
+ * resulting mappings is the minimium of this map and the supplied map.
311
+ *
312
+ * @param aSourceMapConsumer The source map to be applied.
313
+ * @param aSourceFile Optional. The filename of the source file.
314
+ * If omitted, SourceMapConsumer's file property will be used.
315
+ */
316
+ SourceMapGenerator.prototype.applySourceMap =
317
+ function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) {
318
+ // If aSourceFile is omitted, we will use the file property of the SourceMap
319
+ if (!aSourceFile) {
320
+ aSourceFile = aSourceMapConsumer.file;
321
+ }
322
+ var sourceRoot = this._sourceRoot;
323
+ // Make "aSourceFile" relative if an absolute Url is passed.
324
+ if (sourceRoot) {
325
+ aSourceFile = util.relative(sourceRoot, aSourceFile);
326
+ }
327
+ // Applying the SourceMap can add and remove items from the sources and
328
+ // the names array.
329
+ var newSources = new ArraySet();
330
+ var newNames = new ArraySet();
331
+
332
+ // Find mappings for the "aSourceFile"
333
+ this._mappings.forEach(function (mapping) {
334
+ if (mapping.source === aSourceFile && mapping.original) {
335
+ // Check if it can be mapped by the source map, then update the mapping.
336
+ var original = aSourceMapConsumer.originalPositionFor({
337
+ line: mapping.original.line,
338
+ column: mapping.original.column
339
+ });
340
+ if (original.source !== null) {
341
+ // Copy mapping
342
+ if (sourceRoot) {
343
+ mapping.source = util.relative(sourceRoot, original.source);
344
+ } else {
345
+ mapping.source = original.source;
346
+ }
347
+ mapping.original.line = original.line;
348
+ mapping.original.column = original.column;
349
+ if (original.name !== null && mapping.name !== null) {
350
+ // Only use the identifier name if it's an identifier
351
+ // in both SourceMaps
352
+ mapping.name = original.name;
353
+ }
354
+ }
355
+ }
356
+
357
+ var source = mapping.source;
358
+ if (source && !newSources.has(source)) {
359
+ newSources.add(source);
360
+ }
361
+
362
+ var name = mapping.name;
363
+ if (name && !newNames.has(name)) {
364
+ newNames.add(name);
365
+ }
366
+
367
+ }, this);
368
+ this._sources = newSources;
369
+ this._names = newNames;
370
+
371
+ // Copy sourcesContents of applied map.
372
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
373
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
374
+ if (content) {
375
+ if (sourceRoot) {
376
+ sourceFile = util.relative(sourceRoot, sourceFile);
377
+ }
378
+ this.setSourceContent(sourceFile, content);
379
+ }
380
+ }, this);
381
+ };
382
+
383
+ /**
384
+ * A mapping can have one of the three levels of data:
385
+ *
386
+ * 1. Just the generated position.
387
+ * 2. The Generated position, original position, and original source.
388
+ * 3. Generated and original position, original source, as well as a name
389
+ * token.
390
+ *
391
+ * To maintain consistency, we validate that any new mapping being added falls
392
+ * in to one of these categories.
393
+ */
394
+ SourceMapGenerator.prototype._validateMapping =
395
+ function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
396
+ aName) {
397
+ if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
398
+ && aGenerated.line > 0 && aGenerated.column >= 0
399
+ && !aOriginal && !aSource && !aName) {
400
+ // Case 1.
401
+ return;
402
+ }
403
+ else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
404
+ && aOriginal && 'line' in aOriginal && 'column' in aOriginal
405
+ && aGenerated.line > 0 && aGenerated.column >= 0
406
+ && aOriginal.line > 0 && aOriginal.column >= 0
407
+ && aSource) {
408
+ // Cases 2 and 3.
409
+ return;
410
+ }
411
+ else {
412
+ throw new Error('Invalid mapping.');
413
+ }
414
+ };
415
+
416
+ function cmpLocation(loc1, loc2) {
417
+ var cmp = (loc1 && loc1.line) - (loc2 && loc2.line);
418
+ return cmp ? cmp : (loc1 && loc1.column) - (loc2 && loc2.column);
419
+ }
420
+
421
+ function strcmp(str1, str2) {
422
+ str1 = str1 || '';
423
+ str2 = str2 || '';
424
+ return (str1 > str2) - (str1 < str2);
425
+ }
426
+
427
+ function cmpMapping(mappingA, mappingB) {
428
+ return cmpLocation(mappingA.generated, mappingB.generated) ||
429
+ cmpLocation(mappingA.original, mappingB.original) ||
430
+ strcmp(mappingA.source, mappingB.source) ||
431
+ strcmp(mappingA.name, mappingB.name);
432
+ }
433
+
434
+ /**
435
+ * Serialize the accumulated mappings in to the stream of base 64 VLQs
436
+ * specified by the source map format.
437
+ */
438
+ SourceMapGenerator.prototype._serializeMappings =
439
+ function SourceMapGenerator_serializeMappings() {
440
+ var previousGeneratedColumn = 0;
441
+ var previousGeneratedLine = 1;
442
+ var previousOriginalColumn = 0;
443
+ var previousOriginalLine = 0;
444
+ var previousName = 0;
445
+ var previousSource = 0;
446
+ var result = '';
447
+ var mapping;
448
+
449
+ // The mappings must be guaranteed to be in sorted order before we start
450
+ // serializing them or else the generated line numbers (which are defined
451
+ // via the ';' separators) will be all messed up. Note: it might be more
452
+ // performant to maintain the sorting as we insert them, rather than as we
453
+ // serialize them, but the big O is the same either way.
454
+ this._mappings.sort(cmpMapping);
455
+
456
+ for (var i = 0, len = this._mappings.length; i < len; i++) {
457
+ mapping = this._mappings[i];
458
+
459
+ if (mapping.generated.line !== previousGeneratedLine) {
460
+ previousGeneratedColumn = 0;
461
+ while (mapping.generated.line !== previousGeneratedLine) {
462
+ result += ';';
463
+ previousGeneratedLine++;
464
+ }
465
+ }
466
+ else {
467
+ if (i > 0) {
468
+ if (!cmpMapping(mapping, this._mappings[i - 1])) {
469
+ continue;
470
+ }
471
+ result += ',';
472
+ }
473
+ }
474
+
475
+ result += base64VLQ.encode(mapping.generated.column
476
+ - previousGeneratedColumn);
477
+ previousGeneratedColumn = mapping.generated.column;
478
+
479
+ if (mapping.source && mapping.original) {
480
+ result += base64VLQ.encode(this._sources.indexOf(mapping.source)
481
+ - previousSource);
482
+ previousSource = this._sources.indexOf(mapping.source);
483
+
484
+ // lines are stored 0-based in SourceMap spec version 3
485
+ result += base64VLQ.encode(mapping.original.line - 1
486
+ - previousOriginalLine);
487
+ previousOriginalLine = mapping.original.line - 1;
488
+
489
+ result += base64VLQ.encode(mapping.original.column
490
+ - previousOriginalColumn);
491
+ previousOriginalColumn = mapping.original.column;
492
+
493
+ if (mapping.name) {
494
+ result += base64VLQ.encode(this._names.indexOf(mapping.name)
495
+ - previousName);
496
+ previousName = this._names.indexOf(mapping.name);
497
+ }
498
+ }
499
+ }
500
+
501
+ return result;
502
+ };
503
+
504
+ /**
505
+ * Externalize the source map.
506
+ */
507
+ SourceMapGenerator.prototype.toJSON =
508
+ function SourceMapGenerator_toJSON() {
509
+ var map = {
510
+ version: this._version,
511
+ file: this._file,
512
+ sources: this._sources.toArray(),
513
+ names: this._names.toArray(),
514
+ mappings: this._serializeMappings()
515
+ };
516
+ if (this._sourceRoot) {
517
+ map.sourceRoot = this._sourceRoot;
518
+ }
519
+ if (this._sourcesContents) {
520
+ map.sourcesContent = map.sources.map(function (source) {
521
+ if (map.sourceRoot) {
522
+ source = util.relative(map.sourceRoot, source);
523
+ }
524
+ return Object.prototype.hasOwnProperty.call(
525
+ this._sourcesContents, util.toSetString(source))
526
+ ? this._sourcesContents[util.toSetString(source)]
527
+ : null;
528
+ }, this);
529
+ }
530
+ return map;
531
+ };
532
+
533
+ /**
534
+ * Render the source map being generated to a string.
535
+ */
536
+ SourceMapGenerator.prototype.toString =
537
+ function SourceMapGenerator_toString() {
538
+ return JSON.stringify(this);
539
+ };
540
+
541
+ exports.SourceMapGenerator = SourceMapGenerator;
542
+
543
+ });
544
+ /* -*- Mode: js; js-indent-level: 2; -*- */
545
+ /*
546
+ * Copyright 2011 Mozilla Foundation and contributors
547
+ * Licensed under the New BSD license. See LICENSE or:
548
+ * http://opensource.org/licenses/BSD-3-Clause
549
+ *
550
+ * Based on the Base 64 VLQ implementation in Closure Compiler:
551
+ * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
552
+ *
553
+ * Copyright 2011 The Closure Compiler Authors. All rights reserved.
554
+ * Redistribution and use in source and binary forms, with or without
555
+ * modification, are permitted provided that the following conditions are
556
+ * met:
557
+ *
558
+ * * Redistributions of source code must retain the above copyright
559
+ * notice, this list of conditions and the following disclaimer.
560
+ * * Redistributions in binary form must reproduce the above
561
+ * copyright notice, this list of conditions and the following
562
+ * disclaimer in the documentation and/or other materials provided
563
+ * with the distribution.
564
+ * * Neither the name of Google Inc. nor the names of its
565
+ * contributors may be used to endorse or promote products derived
566
+ * from this software without specific prior written permission.
567
+ *
568
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
569
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
570
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
571
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
572
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
573
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
574
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
575
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
576
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
577
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
578
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
579
+ */
580
+ define('source-map/base64-vlq', ['require', 'exports', 'module' , 'source-map/base64'], function(require, exports, module) {
581
+
582
+ var base64 = require('./base64');
583
+
584
+ // A single base 64 digit can contain 6 bits of data. For the base 64 variable
585
+ // length quantities we use in the source map spec, the first bit is the sign,
586
+ // the next four bits are the actual value, and the 6th bit is the
587
+ // continuation bit. The continuation bit tells us whether there are more
588
+ // digits in this value following this digit.
589
+ //
590
+ // Continuation
591
+ // | Sign
592
+ // | |
593
+ // V V
594
+ // 101011
595
+
596
+ var VLQ_BASE_SHIFT = 5;
597
+
598
+ // binary: 100000
599
+ var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
600
+
601
+ // binary: 011111
602
+ var VLQ_BASE_MASK = VLQ_BASE - 1;
603
+
604
+ // binary: 100000
605
+ var VLQ_CONTINUATION_BIT = VLQ_BASE;
606
+
607
+ /**
608
+ * Converts from a two-complement value to a value where the sign bit is
609
+ * is placed in the least significant bit. For example, as decimals:
610
+ * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
611
+ * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
612
+ */
613
+ function toVLQSigned(aValue) {
614
+ return aValue < 0
615
+ ? ((-aValue) << 1) + 1
616
+ : (aValue << 1) + 0;
617
+ }
618
+
619
+ /**
620
+ * Converts to a two-complement value from a value where the sign bit is
621
+ * is placed in the least significant bit. For example, as decimals:
622
+ * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
623
+ * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
624
+ */
625
+ function fromVLQSigned(aValue) {
626
+ var isNegative = (aValue & 1) === 1;
627
+ var shifted = aValue >> 1;
628
+ return isNegative
629
+ ? -shifted
630
+ : shifted;
631
+ }
632
+
633
+ /**
634
+ * Returns the base 64 VLQ encoded value.
635
+ */
636
+ exports.encode = function base64VLQ_encode(aValue) {
637
+ var encoded = "";
638
+ var digit;
639
+
640
+ var vlq = toVLQSigned(aValue);
641
+
642
+ do {
643
+ digit = vlq & VLQ_BASE_MASK;
644
+ vlq >>>= VLQ_BASE_SHIFT;
645
+ if (vlq > 0) {
646
+ // There are still more digits in this value, so we must make sure the
647
+ // continuation bit is marked.
648
+ digit |= VLQ_CONTINUATION_BIT;
649
+ }
650
+ encoded += base64.encode(digit);
651
+ } while (vlq > 0);
652
+
653
+ return encoded;
654
+ };
655
+
656
+ /**
657
+ * Decodes the next base 64 VLQ value from the given string and returns the
658
+ * value and the rest of the string.
659
+ */
660
+ exports.decode = function base64VLQ_decode(aStr) {
661
+ var i = 0;
662
+ var strLen = aStr.length;
663
+ var result = 0;
664
+ var shift = 0;
665
+ var continuation, digit;
666
+
667
+ do {
668
+ if (i >= strLen) {
669
+ throw new Error("Expected more digits in base 64 VLQ value.");
670
+ }
671
+ digit = base64.decode(aStr.charAt(i++));
672
+ continuation = !!(digit & VLQ_CONTINUATION_BIT);
673
+ digit &= VLQ_BASE_MASK;
674
+ result = result + (digit << shift);
675
+ shift += VLQ_BASE_SHIFT;
676
+ } while (continuation);
677
+
678
+ return {
679
+ value: fromVLQSigned(result),
680
+ rest: aStr.slice(i)
681
+ };
682
+ };
683
+
684
+ });
685
+ /* -*- Mode: js; js-indent-level: 2; -*- */
686
+ /*
687
+ * Copyright 2011 Mozilla Foundation and contributors
688
+ * Licensed under the New BSD license. See LICENSE or:
689
+ * http://opensource.org/licenses/BSD-3-Clause
690
+ */
691
+ define('source-map/base64', ['require', 'exports', 'module' , ], function(require, exports, module) {
692
+
693
+ var charToIntMap = {};
694
+ var intToCharMap = {};
695
+
696
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
697
+ .split('')
698
+ .forEach(function (ch, index) {
699
+ charToIntMap[ch] = index;
700
+ intToCharMap[index] = ch;
701
+ });
702
+
703
+ /**
704
+ * Encode an integer in the range of 0 to 63 to a single base 64 digit.
705
+ */
706
+ exports.encode = function base64_encode(aNumber) {
707
+ if (aNumber in intToCharMap) {
708
+ return intToCharMap[aNumber];
709
+ }
710
+ throw new TypeError("Must be between 0 and 63: " + aNumber);
711
+ };
712
+
713
+ /**
714
+ * Decode a single base 64 digit to an integer.
715
+ */
716
+ exports.decode = function base64_decode(aChar) {
717
+ if (aChar in charToIntMap) {
718
+ return charToIntMap[aChar];
719
+ }
720
+ throw new TypeError("Not a valid base 64 digit: " + aChar);
721
+ };
722
+
723
+ });
724
+ /* -*- Mode: js; js-indent-level: 2; -*- */
725
+ /*
726
+ * Copyright 2011 Mozilla Foundation and contributors
727
+ * Licensed under the New BSD license. See LICENSE or:
728
+ * http://opensource.org/licenses/BSD-3-Clause
729
+ */
730
+ define('source-map/util', ['require', 'exports', 'module' , ], function(require, exports, module) {
731
+
732
+ /**
733
+ * This is a helper function for getting values from parameter/options
734
+ * objects.
735
+ *
736
+ * @param args The object we are extracting values from
737
+ * @param name The name of the property we are getting.
738
+ * @param defaultValue An optional value to return if the property is missing
739
+ * from the object. If this is not specified and the property is missing, an
740
+ * error will be thrown.
741
+ */
742
+ function getArg(aArgs, aName, aDefaultValue) {
743
+ if (aName in aArgs) {
744
+ return aArgs[aName];
745
+ } else if (arguments.length === 3) {
746
+ return aDefaultValue;
747
+ } else {
748
+ throw new Error('"' + aName + '" is a required argument.');
749
+ }
750
+ }
751
+ exports.getArg = getArg;
752
+
753
+ var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/;
754
+
755
+ function urlParse(aUrl) {
756
+ var match = aUrl.match(urlRegexp);
757
+ if (!match) {
758
+ return null;
759
+ }
760
+ return {
761
+ scheme: match[1],
762
+ auth: match[3],
763
+ host: match[4],
764
+ port: match[6],
765
+ path: match[7]
766
+ };
767
+ }
768
+ exports.urlParse = urlParse;
769
+
770
+ function urlGenerate(aParsedUrl) {
771
+ var url = aParsedUrl.scheme + "://";
772
+ if (aParsedUrl.auth) {
773
+ url += aParsedUrl.auth + "@"
774
+ }
775
+ if (aParsedUrl.host) {
776
+ url += aParsedUrl.host;
777
+ }
778
+ if (aParsedUrl.port) {
779
+ url += ":" + aParsedUrl.port
780
+ }
781
+ if (aParsedUrl.path) {
782
+ url += aParsedUrl.path;
783
+ }
784
+ return url;
785
+ }
786
+ exports.urlGenerate = urlGenerate;
787
+
788
+ function join(aRoot, aPath) {
789
+ var url;
790
+
791
+ if (aPath.match(urlRegexp)) {
792
+ return aPath;
793
+ }
794
+
795
+ if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) {
796
+ url.path = aPath;
797
+ return urlGenerate(url);
798
+ }
799
+
800
+ return aRoot.replace(/\/$/, '') + '/' + aPath;
801
+ }
802
+ exports.join = join;
803
+
804
+ /**
805
+ * Because behavior goes wacky when you set `__proto__` on objects, we
806
+ * have to prefix all the strings in our set with an arbitrary character.
807
+ *
808
+ * See https://github.com/mozilla/source-map/pull/31 and
809
+ * https://github.com/mozilla/source-map/issues/30
810
+ *
811
+ * @param String aStr
812
+ */
813
+ function toSetString(aStr) {
814
+ return '$' + aStr;
815
+ }
816
+ exports.toSetString = toSetString;
817
+
818
+ function fromSetString(aStr) {
819
+ return aStr.substr(1);
820
+ }
821
+ exports.fromSetString = fromSetString;
822
+
823
+ function relative(aRoot, aPath) {
824
+ aRoot = aRoot.replace(/\/$/, '');
825
+
826
+ var url = urlParse(aRoot);
827
+ if (aPath.charAt(0) == "/" && url && url.path == "/") {
828
+ return aPath.slice(1);
829
+ }
830
+
831
+ return aPath.indexOf(aRoot + '/') === 0
832
+ ? aPath.substr(aRoot.length + 1)
833
+ : aPath;
834
+ }
835
+ exports.relative = relative;
836
+
837
+ });
838
+ /* -*- Mode: js; js-indent-level: 2; -*- */
839
+ /*
840
+ * Copyright 2011 Mozilla Foundation and contributors
841
+ * Licensed under the New BSD license. See LICENSE or:
842
+ * http://opensource.org/licenses/BSD-3-Clause
843
+ */
844
+ define('source-map/array-set', ['require', 'exports', 'module' , 'source-map/util'], function(require, exports, module) {
845
+
846
+ var util = require('./util');
847
+
848
+ /**
849
+ * A data structure which is a combination of an array and a set. Adding a new
850
+ * member is O(1), testing for membership is O(1), and finding the index of an
851
+ * element is O(1). Removing elements from the set is not supported. Only
852
+ * strings are supported for membership.
853
+ */
854
+ function ArraySet() {
855
+ this._array = [];
856
+ this._set = {};
857
+ }
858
+
859
+ /**
860
+ * Static method for creating ArraySet instances from an existing array.
861
+ */
862
+ ArraySet.fromArray = function ArraySet_fromArray(aArray) {
863
+ var set = new ArraySet();
864
+ for (var i = 0, len = aArray.length; i < len; i++) {
865
+ set.add(aArray[i]);
866
+ }
867
+ return set;
868
+ };
869
+
870
+ /**
871
+ * Add the given string to this set.
872
+ *
873
+ * @param String aStr
874
+ */
875
+ ArraySet.prototype.add = function ArraySet_add(aStr) {
876
+ if (this.has(aStr)) {
877
+ // Already a member; nothing to do.
878
+ return;
879
+ }
880
+ var idx = this._array.length;
881
+ this._array.push(aStr);
882
+ this._set[util.toSetString(aStr)] = idx;
883
+ };
884
+
885
+ /**
886
+ * Is the given string a member of this set?
887
+ *
888
+ * @param String aStr
889
+ */
890
+ ArraySet.prototype.has = function ArraySet_has(aStr) {
891
+ return Object.prototype.hasOwnProperty.call(this._set,
892
+ util.toSetString(aStr));
893
+ };
894
+
895
+ /**
896
+ * What is the index of the given string in the array?
897
+ *
898
+ * @param String aStr
899
+ */
900
+ ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
901
+ if (this.has(aStr)) {
902
+ return this._set[util.toSetString(aStr)];
903
+ }
904
+ throw new Error('"' + aStr + '" is not in the set.');
905
+ };
906
+
907
+ /**
908
+ * What is the element at the given index?
909
+ *
910
+ * @param Number aIdx
911
+ */
912
+ ArraySet.prototype.at = function ArraySet_at(aIdx) {
913
+ if (aIdx >= 0 && aIdx < this._array.length) {
914
+ return this._array[aIdx];
915
+ }
916
+ throw new Error('No element indexed by ' + aIdx);
917
+ };
918
+
919
+ /**
920
+ * Returns the array representation of this set (which has the proper indices
921
+ * indicated by indexOf). Note that this is a copy of the internal array used
922
+ * for storing the members so that no one can mess with internal state.
923
+ */
924
+ ArraySet.prototype.toArray = function ArraySet_toArray() {
925
+ return this._array.slice();
926
+ };
927
+
928
+ exports.ArraySet = ArraySet;
929
+
930
+ });
931
+ /* -*- Mode: js; js-indent-level: 2; -*- */
932
+ /*
933
+ * Copyright 2011 Mozilla Foundation and contributors
934
+ * Licensed under the New BSD license. See LICENSE or:
935
+ * http://opensource.org/licenses/BSD-3-Clause
936
+ */
937
+ define('source-map/source-map-consumer', ['require', 'exports', 'module' , 'source-map/util', 'source-map/binary-search', 'source-map/array-set', 'source-map/base64-vlq'], function(require, exports, module) {
938
+
939
+ var util = require('./util');
940
+ var binarySearch = require('./binary-search');
941
+ var ArraySet = require('./array-set').ArraySet;
942
+ var base64VLQ = require('./base64-vlq');
943
+
944
+ /**
945
+ * A SourceMapConsumer instance represents a parsed source map which we can
946
+ * query for information about the original file positions by giving it a file
947
+ * position in the generated source.
948
+ *
949
+ * The only parameter is the raw source map (either as a JSON string, or
950
+ * already parsed to an object). According to the spec, source maps have the
951
+ * following attributes:
952
+ *
953
+ * - version: Which version of the source map spec this map is following.
954
+ * - sources: An array of URLs to the original source files.
955
+ * - names: An array of identifiers which can be referrenced by individual mappings.
956
+ * - sourceRoot: Optional. The URL root from which all sources are relative.
957
+ * - sourcesContent: Optional. An array of contents of the original source files.
958
+ * - mappings: A string of base64 VLQs which contain the actual mappings.
959
+ * - file: The generated file this source map is associated with.
960
+ *
961
+ * Here is an example source map, taken from the source map spec[0]:
962
+ *
963
+ * {
964
+ * version : 3,
965
+ * file: "out.js",
966
+ * sourceRoot : "",
967
+ * sources: ["foo.js", "bar.js"],
968
+ * names: ["src", "maps", "are", "fun"],
969
+ * mappings: "AA,AB;;ABCDE;"
970
+ * }
971
+ *
972
+ * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1#
973
+ */
974
+ function SourceMapConsumer(aSourceMap) {
975
+ var sourceMap = aSourceMap;
976
+ if (typeof aSourceMap === 'string') {
977
+ sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, ''));
978
+ }
979
+
980
+ var version = util.getArg(sourceMap, 'version');
981
+ var sources = util.getArg(sourceMap, 'sources');
982
+ var names = util.getArg(sourceMap, 'names');
983
+ var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null);
984
+ var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null);
985
+ var mappings = util.getArg(sourceMap, 'mappings');
986
+ var file = util.getArg(sourceMap, 'file', null);
987
+
988
+ if (version !== this._version) {
989
+ throw new Error('Unsupported version: ' + version);
990
+ }
991
+
992
+ this._names = ArraySet.fromArray(names);
993
+ this._sources = ArraySet.fromArray(sources);
994
+ this.sourceRoot = sourceRoot;
995
+ this.sourcesContent = sourcesContent;
996
+ this.file = file;
997
+
998
+ // `this._generatedMappings` and `this._originalMappings` hold the parsed
999
+ // mapping coordinates from the source map's "mappings" attribute. Each
1000
+ // object in the array is of the form
1001
+ //
1002
+ // {
1003
+ // generatedLine: The line number in the generated code,
1004
+ // generatedColumn: The column number in the generated code,
1005
+ // source: The path to the original source file that generated this
1006
+ // chunk of code,
1007
+ // originalLine: The line number in the original source that
1008
+ // corresponds to this chunk of generated code,
1009
+ // originalColumn: The column number in the original source that
1010
+ // corresponds to this chunk of generated code,
1011
+ // name: The name of the original symbol which generated this chunk of
1012
+ // code.
1013
+ // }
1014
+ //
1015
+ // All properties except for `generatedLine` and `generatedColumn` can be
1016
+ // `null`.
1017
+ //
1018
+ // `this._generatedMappings` is ordered by the generated positions.
1019
+ //
1020
+ // `this._originalMappings` is ordered by the original positions.
1021
+ this._generatedMappings = [];
1022
+ this._originalMappings = [];
1023
+ this._parseMappings(mappings, sourceRoot);
1024
+ }
1025
+
1026
+ /**
1027
+ * The version of the source mapping spec that we are consuming.
1028
+ */
1029
+ SourceMapConsumer.prototype._version = 3;
1030
+
1031
+ /**
1032
+ * The list of original sources.
1033
+ */
1034
+ Object.defineProperty(SourceMapConsumer.prototype, 'sources', {
1035
+ get: function () {
1036
+ return this._sources.toArray().map(function (s) {
1037
+ return this.sourceRoot ? util.join(this.sourceRoot, s) : s;
1038
+ }, this);
1039
+ }
1040
+ });
1041
+
1042
+ /**
1043
+ * Parse the mappings in a string in to a data structure which we can easily
1044
+ * query (an ordered list in this._generatedMappings).
1045
+ */
1046
+ SourceMapConsumer.prototype._parseMappings =
1047
+ function SourceMapConsumer_parseMappings(aStr, aSourceRoot) {
1048
+ var generatedLine = 1;
1049
+ var previousGeneratedColumn = 0;
1050
+ var previousOriginalLine = 0;
1051
+ var previousOriginalColumn = 0;
1052
+ var previousSource = 0;
1053
+ var previousName = 0;
1054
+ var mappingSeparator = /^[,;]/;
1055
+ var str = aStr;
1056
+ var mapping;
1057
+ var temp;
1058
+
1059
+ while (str.length > 0) {
1060
+ if (str.charAt(0) === ';') {
1061
+ generatedLine++;
1062
+ str = str.slice(1);
1063
+ previousGeneratedColumn = 0;
1064
+ }
1065
+ else if (str.charAt(0) === ',') {
1066
+ str = str.slice(1);
1067
+ }
1068
+ else {
1069
+ mapping = {};
1070
+ mapping.generatedLine = generatedLine;
1071
+
1072
+ // Generated column.
1073
+ temp = base64VLQ.decode(str);
1074
+ mapping.generatedColumn = previousGeneratedColumn + temp.value;
1075
+ previousGeneratedColumn = mapping.generatedColumn;
1076
+ str = temp.rest;
1077
+
1078
+ if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
1079
+ // Original source.
1080
+ temp = base64VLQ.decode(str);
1081
+ mapping.source = this._sources.at(previousSource + temp.value);
1082
+ previousSource += temp.value;
1083
+ str = temp.rest;
1084
+ if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
1085
+ throw new Error('Found a source, but no line and column');
1086
+ }
1087
+
1088
+ // Original line.
1089
+ temp = base64VLQ.decode(str);
1090
+ mapping.originalLine = previousOriginalLine + temp.value;
1091
+ previousOriginalLine = mapping.originalLine;
1092
+ // Lines are stored 0-based
1093
+ mapping.originalLine += 1;
1094
+ str = temp.rest;
1095
+ if (str.length === 0 || mappingSeparator.test(str.charAt(0))) {
1096
+ throw new Error('Found a source and line, but no column');
1097
+ }
1098
+
1099
+ // Original column.
1100
+ temp = base64VLQ.decode(str);
1101
+ mapping.originalColumn = previousOriginalColumn + temp.value;
1102
+ previousOriginalColumn = mapping.originalColumn;
1103
+ str = temp.rest;
1104
+
1105
+ if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) {
1106
+ // Original name.
1107
+ temp = base64VLQ.decode(str);
1108
+ mapping.name = this._names.at(previousName + temp.value);
1109
+ previousName += temp.value;
1110
+ str = temp.rest;
1111
+ }
1112
+ }
1113
+
1114
+ this._generatedMappings.push(mapping);
1115
+ if (typeof mapping.originalLine === 'number') {
1116
+ this._originalMappings.push(mapping);
1117
+ }
1118
+ }
1119
+ }
1120
+
1121
+ this._originalMappings.sort(this._compareOriginalPositions);
1122
+ };
1123
+
1124
+ /**
1125
+ * Comparator between two mappings where the original positions are compared.
1126
+ */
1127
+ SourceMapConsumer.prototype._compareOriginalPositions =
1128
+ function SourceMapConsumer_compareOriginalPositions(mappingA, mappingB) {
1129
+ if (mappingA.source > mappingB.source) {
1130
+ return 1;
1131
+ }
1132
+ else if (mappingA.source < mappingB.source) {
1133
+ return -1;
1134
+ }
1135
+ else {
1136
+ var cmp = mappingA.originalLine - mappingB.originalLine;
1137
+ return cmp === 0
1138
+ ? mappingA.originalColumn - mappingB.originalColumn
1139
+ : cmp;
1140
+ }
1141
+ };
1142
+
1143
+ /**
1144
+ * Comparator between two mappings where the generated positions are compared.
1145
+ */
1146
+ SourceMapConsumer.prototype._compareGeneratedPositions =
1147
+ function SourceMapConsumer_compareGeneratedPositions(mappingA, mappingB) {
1148
+ var cmp = mappingA.generatedLine - mappingB.generatedLine;
1149
+ return cmp === 0
1150
+ ? mappingA.generatedColumn - mappingB.generatedColumn
1151
+ : cmp;
1152
+ };
1153
+
1154
+ /**
1155
+ * Find the mapping that best matches the hypothetical "needle" mapping that
1156
+ * we are searching for in the given "haystack" of mappings.
1157
+ */
1158
+ SourceMapConsumer.prototype._findMapping =
1159
+ function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName,
1160
+ aColumnName, aComparator) {
1161
+ // To return the position we are searching for, we must first find the
1162
+ // mapping for the given position and then return the opposite position it
1163
+ // points to. Because the mappings are sorted, we can use binary search to
1164
+ // find the best mapping.
1165
+
1166
+ if (aNeedle[aLineName] <= 0) {
1167
+ throw new TypeError('Line must be greater than or equal to 1, got '
1168
+ + aNeedle[aLineName]);
1169
+ }
1170
+ if (aNeedle[aColumnName] < 0) {
1171
+ throw new TypeError('Column must be greater than or equal to 0, got '
1172
+ + aNeedle[aColumnName]);
1173
+ }
1174
+
1175
+ return binarySearch.search(aNeedle, aMappings, aComparator);
1176
+ };
1177
+
1178
+ /**
1179
+ * Returns the original source, line, and column information for the generated
1180
+ * source's line and column positions provided. The only argument is an object
1181
+ * with the following properties:
1182
+ *
1183
+ * - line: The line number in the generated source.
1184
+ * - column: The column number in the generated source.
1185
+ *
1186
+ * and an object is returned with the following properties:
1187
+ *
1188
+ * - source: The original source file, or null.
1189
+ * - line: The line number in the original source, or null.
1190
+ * - column: The column number in the original source, or null.
1191
+ * - name: The original identifier, or null.
1192
+ */
1193
+ SourceMapConsumer.prototype.originalPositionFor =
1194
+ function SourceMapConsumer_originalPositionFor(aArgs) {
1195
+ var needle = {
1196
+ generatedLine: util.getArg(aArgs, 'line'),
1197
+ generatedColumn: util.getArg(aArgs, 'column')
1198
+ };
1199
+
1200
+ var mapping = this._findMapping(needle,
1201
+ this._generatedMappings,
1202
+ "generatedLine",
1203
+ "generatedColumn",
1204
+ this._compareGeneratedPositions);
1205
+
1206
+ if (mapping) {
1207
+ var source = util.getArg(mapping, 'source', null);
1208
+ if (source && this.sourceRoot) {
1209
+ source = util.join(this.sourceRoot, source);
1210
+ }
1211
+ return {
1212
+ source: source,
1213
+ line: util.getArg(mapping, 'originalLine', null),
1214
+ column: util.getArg(mapping, 'originalColumn', null),
1215
+ name: util.getArg(mapping, 'name', null)
1216
+ };
1217
+ }
1218
+
1219
+ return {
1220
+ source: null,
1221
+ line: null,
1222
+ column: null,
1223
+ name: null
1224
+ };
1225
+ };
1226
+
1227
+ /**
1228
+ * Returns the original source content. The only argument is the url of the
1229
+ * original source file. Returns null if no original source content is
1230
+ * availible.
1231
+ */
1232
+ SourceMapConsumer.prototype.sourceContentFor =
1233
+ function SourceMapConsumer_sourceContentFor(aSource) {
1234
+ if (!this.sourcesContent) {
1235
+ return null;
1236
+ }
1237
+
1238
+ if (this.sourceRoot) {
1239
+ aSource = util.relative(this.sourceRoot, aSource);
1240
+ }
1241
+
1242
+ if (this._sources.has(aSource)) {
1243
+ return this.sourcesContent[this._sources.indexOf(aSource)];
1244
+ }
1245
+
1246
+ var url;
1247
+ if (this.sourceRoot
1248
+ && (url = util.urlParse(this.sourceRoot))) {
1249
+ // XXX: file:// URIs and absolute paths lead to unexpected behavior for
1250
+ // many users. We can help them out when they expect file:// URIs to
1251
+ // behave like it would if they were running a local HTTP server. See
1252
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=885597.
1253
+ var fileUriAbsPath = aSource.replace(/^file:\/\//, "");
1254
+ if (url.scheme == "file"
1255
+ && this._sources.has(fileUriAbsPath)) {
1256
+ return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)]
1257
+ }
1258
+
1259
+ if ((!url.path || url.path == "/")
1260
+ && this._sources.has("/" + aSource)) {
1261
+ return this.sourcesContent[this._sources.indexOf("/" + aSource)];
1262
+ }
1263
+ }
1264
+
1265
+ throw new Error('"' + aSource + '" is not in the SourceMap.');
1266
+ };
1267
+
1268
+ /**
1269
+ * Returns the generated line and column information for the original source,
1270
+ * line, and column positions provided. The only argument is an object with
1271
+ * the following properties:
1272
+ *
1273
+ * - source: The filename of the original source.
1274
+ * - line: The line number in the original source.
1275
+ * - column: The column number in the original source.
1276
+ *
1277
+ * and an object is returned with the following properties:
1278
+ *
1279
+ * - line: The line number in the generated source, or null.
1280
+ * - column: The column number in the generated source, or null.
1281
+ */
1282
+ SourceMapConsumer.prototype.generatedPositionFor =
1283
+ function SourceMapConsumer_generatedPositionFor(aArgs) {
1284
+ var needle = {
1285
+ source: util.getArg(aArgs, 'source'),
1286
+ originalLine: util.getArg(aArgs, 'line'),
1287
+ originalColumn: util.getArg(aArgs, 'column')
1288
+ };
1289
+
1290
+ if (this.sourceRoot) {
1291
+ needle.source = util.relative(this.sourceRoot, needle.source);
1292
+ }
1293
+
1294
+ var mapping = this._findMapping(needle,
1295
+ this._originalMappings,
1296
+ "originalLine",
1297
+ "originalColumn",
1298
+ this._compareOriginalPositions);
1299
+
1300
+ if (mapping) {
1301
+ return {
1302
+ line: util.getArg(mapping, 'generatedLine', null),
1303
+ column: util.getArg(mapping, 'generatedColumn', null)
1304
+ };
1305
+ }
1306
+
1307
+ return {
1308
+ line: null,
1309
+ column: null
1310
+ };
1311
+ };
1312
+
1313
+ SourceMapConsumer.GENERATED_ORDER = 1;
1314
+ SourceMapConsumer.ORIGINAL_ORDER = 2;
1315
+
1316
+ /**
1317
+ * Iterate over each mapping between an original source/line/column and a
1318
+ * generated line/column in this source map.
1319
+ *
1320
+ * @param Function aCallback
1321
+ * The function that is called with each mapping.
1322
+ * @param Object aContext
1323
+ * Optional. If specified, this object will be the value of `this` every
1324
+ * time that `aCallback` is called.
1325
+ * @param aOrder
1326
+ * Either `SourceMapConsumer.GENERATED_ORDER` or
1327
+ * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to
1328
+ * iterate over the mappings sorted by the generated file's line/column
1329
+ * order or the original's source/line/column order, respectively. Defaults to
1330
+ * `SourceMapConsumer.GENERATED_ORDER`.
1331
+ */
1332
+ SourceMapConsumer.prototype.eachMapping =
1333
+ function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) {
1334
+ var context = aContext || null;
1335
+ var order = aOrder || SourceMapConsumer.GENERATED_ORDER;
1336
+
1337
+ var mappings;
1338
+ switch (order) {
1339
+ case SourceMapConsumer.GENERATED_ORDER:
1340
+ mappings = this._generatedMappings;
1341
+ break;
1342
+ case SourceMapConsumer.ORIGINAL_ORDER:
1343
+ mappings = this._originalMappings;
1344
+ break;
1345
+ default:
1346
+ throw new Error("Unknown order of iteration.");
1347
+ }
1348
+
1349
+ var sourceRoot = this.sourceRoot;
1350
+ mappings.map(function (mapping) {
1351
+ var source = mapping.source;
1352
+ if (source && sourceRoot) {
1353
+ source = util.join(sourceRoot, source);
1354
+ }
1355
+ return {
1356
+ source: source,
1357
+ generatedLine: mapping.generatedLine,
1358
+ generatedColumn: mapping.generatedColumn,
1359
+ originalLine: mapping.originalLine,
1360
+ originalColumn: mapping.originalColumn,
1361
+ name: mapping.name
1362
+ };
1363
+ }).forEach(aCallback, context);
1364
+ };
1365
+
1366
+ exports.SourceMapConsumer = SourceMapConsumer;
1367
+
1368
+ });
1369
+ /* -*- Mode: js; js-indent-level: 2; -*- */
1370
+ /*
1371
+ * Copyright 2011 Mozilla Foundation and contributors
1372
+ * Licensed under the New BSD license. See LICENSE or:
1373
+ * http://opensource.org/licenses/BSD-3-Clause
1374
+ */
1375
+ define('source-map/binary-search', ['require', 'exports', 'module' , ], function(require, exports, module) {
1376
+
1377
+ /**
1378
+ * Recursive implementation of binary search.
1379
+ *
1380
+ * @param aLow Indices here and lower do not contain the needle.
1381
+ * @param aHigh Indices here and higher do not contain the needle.
1382
+ * @param aNeedle The element being searched for.
1383
+ * @param aHaystack The non-empty array being searched.
1384
+ * @param aCompare Function which takes two elements and returns -1, 0, or 1.
1385
+ */
1386
+ function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) {
1387
+ // This function terminates when one of the following is true:
1388
+ //
1389
+ // 1. We find the exact element we are looking for.
1390
+ //
1391
+ // 2. We did not find the exact element, but we can return the next
1392
+ // closest element that is less than that element.
1393
+ //
1394
+ // 3. We did not find the exact element, and there is no next-closest
1395
+ // element which is less than the one we are searching for, so we
1396
+ // return null.
1397
+ var mid = Math.floor((aHigh - aLow) / 2) + aLow;
1398
+ var cmp = aCompare(aNeedle, aHaystack[mid]);
1399
+ if (cmp === 0) {
1400
+ // Found the element we are looking for.
1401
+ return aHaystack[mid];
1402
+ }
1403
+ else if (cmp > 0) {
1404
+ // aHaystack[mid] is greater than our needle.
1405
+ if (aHigh - mid > 1) {
1406
+ // The element is in the upper half.
1407
+ return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare);
1408
+ }
1409
+ // We did not find an exact match, return the next closest one
1410
+ // (termination case 2).
1411
+ return aHaystack[mid];
1412
+ }
1413
+ else {
1414
+ // aHaystack[mid] is less than our needle.
1415
+ if (mid - aLow > 1) {
1416
+ // The element is in the lower half.
1417
+ return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare);
1418
+ }
1419
+ // The exact needle element was not found in this haystack. Determine if
1420
+ // we are in termination case (2) or (3) and return the appropriate thing.
1421
+ return aLow < 0
1422
+ ? null
1423
+ : aHaystack[aLow];
1424
+ }
1425
+ }
1426
+
1427
+ /**
1428
+ * This is an implementation of binary search which will always try and return
1429
+ * the next lowest value checked if there is no exact hit. This is because
1430
+ * mappings between original and generated line/col pairs are single points,
1431
+ * and there is an implicit region between each of them, so a miss just means
1432
+ * that you aren't on the very start of a region.
1433
+ *
1434
+ * @param aNeedle The element you are looking for.
1435
+ * @param aHaystack The array that is being searched.
1436
+ * @param aCompare A function which takes the needle and an element in the
1437
+ * array and returns -1, 0, or 1 depending on whether the needle is less
1438
+ * than, equal to, or greater than the element, respectively.
1439
+ */
1440
+ exports.search = function search(aNeedle, aHaystack, aCompare) {
1441
+ return aHaystack.length > 0
1442
+ ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare)
1443
+ : null;
1444
+ };
1445
+
1446
+ });
1447
+ /* -*- Mode: js; js-indent-level: 2; -*- */
1448
+ /*
1449
+ * Copyright 2011 Mozilla Foundation and contributors
1450
+ * Licensed under the New BSD license. See LICENSE or:
1451
+ * http://opensource.org/licenses/BSD-3-Clause
1452
+ */
1453
+ define('source-map/source-node', ['require', 'exports', 'module' , 'source-map/source-map-generator', 'source-map/util'], function(require, exports, module) {
1454
+
1455
+ var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator;
1456
+ var util = require('./util');
1457
+
1458
+ /**
1459
+ * SourceNodes provide a way to abstract over interpolating/concatenating
1460
+ * snippets of generated JavaScript source code while maintaining the line and
1461
+ * column information associated with the original source code.
1462
+ *
1463
+ * @param aLine The original line number.
1464
+ * @param aColumn The original column number.
1465
+ * @param aSource The original source's filename.
1466
+ * @param aChunks Optional. An array of strings which are snippets of
1467
+ * generated JS, or other SourceNodes.
1468
+ * @param aName The original identifier.
1469
+ */
1470
+ function SourceNode(aLine, aColumn, aSource, aChunks, aName) {
1471
+ this.children = [];
1472
+ this.sourceContents = {};
1473
+ this.line = aLine === undefined ? null : aLine;
1474
+ this.column = aColumn === undefined ? null : aColumn;
1475
+ this.source = aSource === undefined ? null : aSource;
1476
+ this.name = aName === undefined ? null : aName;
1477
+ if (aChunks != null) this.add(aChunks);
1478
+ }
1479
+
1480
+ /**
1481
+ * Creates a SourceNode from generated code and a SourceMapConsumer.
1482
+ *
1483
+ * @param aGeneratedCode The generated code
1484
+ * @param aSourceMapConsumer The SourceMap for the generated code
1485
+ */
1486
+ SourceNode.fromStringWithSourceMap =
1487
+ function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) {
1488
+ // The SourceNode we want to fill with the generated code
1489
+ // and the SourceMap
1490
+ var node = new SourceNode();
1491
+
1492
+ // The generated code
1493
+ // Processed fragments are removed from this array.
1494
+ var remainingLines = aGeneratedCode.split('\n');
1495
+
1496
+ // We need to remember the position of "remainingLines"
1497
+ var lastGeneratedLine = 1, lastGeneratedColumn = 0;
1498
+
1499
+ // The generate SourceNodes we need a code range.
1500
+ // To extract it current and last mapping is used.
1501
+ // Here we store the last mapping.
1502
+ var lastMapping = null;
1503
+
1504
+ aSourceMapConsumer.eachMapping(function (mapping) {
1505
+ if (lastMapping === null) {
1506
+ // We add the generated code until the first mapping
1507
+ // to the SourceNode without any mapping.
1508
+ // Each line is added as separate string.
1509
+ while (lastGeneratedLine < mapping.generatedLine) {
1510
+ node.add(remainingLines.shift() + "\n");
1511
+ lastGeneratedLine++;
1512
+ }
1513
+ if (lastGeneratedColumn < mapping.generatedColumn) {
1514
+ var nextLine = remainingLines[0];
1515
+ node.add(nextLine.substr(0, mapping.generatedColumn));
1516
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn);
1517
+ lastGeneratedColumn = mapping.generatedColumn;
1518
+ }
1519
+ } else {
1520
+ // We add the code from "lastMapping" to "mapping":
1521
+ // First check if there is a new line in between.
1522
+ if (lastGeneratedLine < mapping.generatedLine) {
1523
+ var code = "";
1524
+ // Associate full lines with "lastMapping"
1525
+ do {
1526
+ code += remainingLines.shift() + "\n";
1527
+ lastGeneratedLine++;
1528
+ lastGeneratedColumn = 0;
1529
+ } while (lastGeneratedLine < mapping.generatedLine);
1530
+ // When we reached the correct line, we add code until we
1531
+ // reach the correct column too.
1532
+ if (lastGeneratedColumn < mapping.generatedColumn) {
1533
+ var nextLine = remainingLines[0];
1534
+ code += nextLine.substr(0, mapping.generatedColumn);
1535
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn);
1536
+ lastGeneratedColumn = mapping.generatedColumn;
1537
+ }
1538
+ // Create the SourceNode.
1539
+ addMappingWithCode(lastMapping, code);
1540
+ } else {
1541
+ // There is no new line in between.
1542
+ // Associate the code between "lastGeneratedColumn" and
1543
+ // "mapping.generatedColumn" with "lastMapping"
1544
+ var nextLine = remainingLines[0];
1545
+ var code = nextLine.substr(0, mapping.generatedColumn -
1546
+ lastGeneratedColumn);
1547
+ remainingLines[0] = nextLine.substr(mapping.generatedColumn -
1548
+ lastGeneratedColumn);
1549
+ lastGeneratedColumn = mapping.generatedColumn;
1550
+ addMappingWithCode(lastMapping, code);
1551
+ }
1552
+ }
1553
+ lastMapping = mapping;
1554
+ }, this);
1555
+ // We have processed all mappings.
1556
+ // Associate the remaining code in the current line with "lastMapping"
1557
+ // and add the remaining lines without any mapping
1558
+ addMappingWithCode(lastMapping, remainingLines.join("\n"));
1559
+
1560
+ // Copy sourcesContent into SourceNode
1561
+ aSourceMapConsumer.sources.forEach(function (sourceFile) {
1562
+ var content = aSourceMapConsumer.sourceContentFor(sourceFile);
1563
+ if (content) {
1564
+ node.setSourceContent(sourceFile, content);
1565
+ }
1566
+ });
1567
+
1568
+ return node;
1569
+
1570
+ function addMappingWithCode(mapping, code) {
1571
+ if (mapping === null || mapping.source === undefined) {
1572
+ node.add(code);
1573
+ } else {
1574
+ node.add(new SourceNode(mapping.originalLine,
1575
+ mapping.originalColumn,
1576
+ mapping.source,
1577
+ code,
1578
+ mapping.name));
1579
+ }
1580
+ }
1581
+ };
1582
+
1583
+ /**
1584
+ * Add a chunk of generated JS to this source node.
1585
+ *
1586
+ * @param aChunk A string snippet of generated JS code, another instance of
1587
+ * SourceNode, or an array where each member is one of those things.
1588
+ */
1589
+ SourceNode.prototype.add = function SourceNode_add(aChunk) {
1590
+ if (Array.isArray(aChunk)) {
1591
+ aChunk.forEach(function (chunk) {
1592
+ this.add(chunk);
1593
+ }, this);
1594
+ }
1595
+ else if (aChunk instanceof SourceNode || typeof aChunk === "string") {
1596
+ if (aChunk) {
1597
+ this.children.push(aChunk);
1598
+ }
1599
+ }
1600
+ else {
1601
+ throw new TypeError(
1602
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
1603
+ );
1604
+ }
1605
+ return this;
1606
+ };
1607
+
1608
+ /**
1609
+ * Add a chunk of generated JS to the beginning of this source node.
1610
+ *
1611
+ * @param aChunk A string snippet of generated JS code, another instance of
1612
+ * SourceNode, or an array where each member is one of those things.
1613
+ */
1614
+ SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) {
1615
+ if (Array.isArray(aChunk)) {
1616
+ for (var i = aChunk.length-1; i >= 0; i--) {
1617
+ this.prepend(aChunk[i]);
1618
+ }
1619
+ }
1620
+ else if (aChunk instanceof SourceNode || typeof aChunk === "string") {
1621
+ this.children.unshift(aChunk);
1622
+ }
1623
+ else {
1624
+ throw new TypeError(
1625
+ "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk
1626
+ );
1627
+ }
1628
+ return this;
1629
+ };
1630
+
1631
+ /**
1632
+ * Walk over the tree of JS snippets in this node and its children. The
1633
+ * walking function is called once for each snippet of JS and is passed that
1634
+ * snippet and the its original associated source's line/column location.
1635
+ *
1636
+ * @param aFn The traversal function.
1637
+ */
1638
+ SourceNode.prototype.walk = function SourceNode_walk(aFn) {
1639
+ this.children.forEach(function (chunk) {
1640
+ if (chunk instanceof SourceNode) {
1641
+ chunk.walk(aFn);
1642
+ }
1643
+ else {
1644
+ if (chunk !== '') {
1645
+ aFn(chunk, { source: this.source,
1646
+ line: this.line,
1647
+ column: this.column,
1648
+ name: this.name });
1649
+ }
1650
+ }
1651
+ }, this);
1652
+ };
1653
+
1654
+ /**
1655
+ * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between
1656
+ * each of `this.children`.
1657
+ *
1658
+ * @param aSep The separator.
1659
+ */
1660
+ SourceNode.prototype.join = function SourceNode_join(aSep) {
1661
+ var newChildren;
1662
+ var i;
1663
+ var len = this.children.length;
1664
+ if (len > 0) {
1665
+ newChildren = [];
1666
+ for (i = 0; i < len-1; i++) {
1667
+ newChildren.push(this.children[i]);
1668
+ newChildren.push(aSep);
1669
+ }
1670
+ newChildren.push(this.children[i]);
1671
+ this.children = newChildren;
1672
+ }
1673
+ return this;
1674
+ };
1675
+
1676
+ /**
1677
+ * Call String.prototype.replace on the very right-most source snippet. Useful
1678
+ * for trimming whitespace from the end of a source node, etc.
1679
+ *
1680
+ * @param aPattern The pattern to replace.
1681
+ * @param aReplacement The thing to replace the pattern with.
1682
+ */
1683
+ SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) {
1684
+ var lastChild = this.children[this.children.length - 1];
1685
+ if (lastChild instanceof SourceNode) {
1686
+ lastChild.replaceRight(aPattern, aReplacement);
1687
+ }
1688
+ else if (typeof lastChild === 'string') {
1689
+ this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement);
1690
+ }
1691
+ else {
1692
+ this.children.push(''.replace(aPattern, aReplacement));
1693
+ }
1694
+ return this;
1695
+ };
1696
+
1697
+ /**
1698
+ * Set the source content for a source file. This will be added to the SourceMapGenerator
1699
+ * in the sourcesContent field.
1700
+ *
1701
+ * @param aSourceFile The filename of the source file
1702
+ * @param aSourceContent The content of the source file
1703
+ */
1704
+ SourceNode.prototype.setSourceContent =
1705
+ function SourceNode_setSourceContent(aSourceFile, aSourceContent) {
1706
+ this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent;
1707
+ };
1708
+
1709
+ /**
1710
+ * Walk over the tree of SourceNodes. The walking function is called for each
1711
+ * source file content and is passed the filename and source content.
1712
+ *
1713
+ * @param aFn The traversal function.
1714
+ */
1715
+ SourceNode.prototype.walkSourceContents =
1716
+ function SourceNode_walkSourceContents(aFn) {
1717
+ this.children.forEach(function (chunk) {
1718
+ if (chunk instanceof SourceNode) {
1719
+ chunk.walkSourceContents(aFn);
1720
+ }
1721
+ }, this);
1722
+ Object.keys(this.sourceContents).forEach(function (sourceFileKey) {
1723
+ aFn(util.fromSetString(sourceFileKey), this.sourceContents[sourceFileKey]);
1724
+ }, this);
1725
+ };
1726
+
1727
+ /**
1728
+ * Return the string representation of this source node. Walks over the tree
1729
+ * and concatenates all the various snippets together to one string.
1730
+ */
1731
+ SourceNode.prototype.toString = function SourceNode_toString() {
1732
+ var str = "";
1733
+ this.walk(function (chunk) {
1734
+ str += chunk;
1735
+ });
1736
+ return str;
1737
+ };
1738
+
1739
+ /**
1740
+ * Returns the string representation of this source node along with a source
1741
+ * map.
1742
+ */
1743
+ SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) {
1744
+ var generated = {
1745
+ code: "",
1746
+ line: 1,
1747
+ column: 0
1748
+ };
1749
+ var map = new SourceMapGenerator(aArgs);
1750
+ var sourceMappingActive = false;
1751
+ this.walk(function (chunk, original) {
1752
+ generated.code += chunk;
1753
+ if (original.source !== null
1754
+ && original.line !== null
1755
+ && original.column !== null) {
1756
+ map.addMapping({
1757
+ source: original.source,
1758
+ original: {
1759
+ line: original.line,
1760
+ column: original.column
1761
+ },
1762
+ generated: {
1763
+ line: generated.line,
1764
+ column: generated.column
1765
+ },
1766
+ name: original.name
1767
+ });
1768
+ sourceMappingActive = true;
1769
+ } else if (sourceMappingActive) {
1770
+ map.addMapping({
1771
+ generated: {
1772
+ line: generated.line,
1773
+ column: generated.column
1774
+ }
1775
+ });
1776
+ sourceMappingActive = false;
1777
+ }
1778
+ chunk.split('').forEach(function (ch) {
1779
+ if (ch === '\n') {
1780
+ generated.line++;
1781
+ generated.column = 0;
1782
+ } else {
1783
+ generated.column++;
1784
+ }
1785
+ });
1786
+ });
1787
+ this.walkSourceContents(function (sourceFile, sourceContent) {
1788
+ map.setSourceContent(sourceFile, sourceContent);
1789
+ });
1790
+
1791
+ return { code: generated.code, map: map };
1792
+ };
1793
+
1794
+ exports.SourceNode = SourceNode;
1795
+
1796
+ });
1797
+ /* -*- Mode: js; js-indent-level: 2; -*- */
1798
+ ///////////////////////////////////////////////////////////////////////////////
1799
+
1800
+ window.sourceMap = {
1801
+ SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer,
1802
+ SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator,
1803
+ SourceNode: require('source-map/source-node').SourceNode
1804
+ };