react 0.11.0-rc1 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/JSXTransformer.js +714 -711
- package/dist/react-with-addons.js +12 -3
- package/dist/react-with-addons.min.js +5 -5
- package/dist/react.js +12 -3
- package/dist/react.min.js +3 -3
- package/lib/React.js +2 -1
- package/lib/ReactDescriptor.js +9 -1
- package/package.json +1 -1
package/dist/JSXTransformer.js
CHANGED
|
@@ -1,585 +1,282 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* JSXTransformer v0.11.0
|
|
2
|
+
* JSXTransformer v0.11.0
|
|
3
3
|
*/
|
|
4
4
|
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
/*!
|
|
6
|
+
* The buffer module from node.js, for the browser.
|
|
7
|
+
*
|
|
8
|
+
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
9
|
+
* @license MIT
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
var base64 = _dereq_('base64-js')
|
|
13
|
+
var ieee754 = _dereq_('ieee754')
|
|
14
|
+
|
|
15
|
+
exports.Buffer = Buffer
|
|
16
|
+
exports.SlowBuffer = Buffer
|
|
17
|
+
exports.INSPECT_MAX_BYTES = 50
|
|
18
|
+
Buffer.poolSize = 8192
|
|
15
19
|
|
|
16
20
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @param {Function} [requireFn]. Node's require function for the current module.
|
|
21
|
-
* It only needs to be passed in Node versions before 0.5, when module.require
|
|
22
|
-
* did not exist.
|
|
23
|
-
* @returns {Function} a define function that is usable for the current node
|
|
24
|
-
* module.
|
|
21
|
+
* If `Buffer._useTypedArrays`:
|
|
22
|
+
* === true Use Uint8Array implementation (fastest)
|
|
23
|
+
* === false Use Object implementation (compatible down to IE6)
|
|
25
24
|
*/
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
Buffer._useTypedArrays = (function () {
|
|
26
|
+
// Detect if browser supports Typed Arrays. Supported browsers are IE 10+, Firefox 4+,
|
|
27
|
+
// Chrome 7+, Safari 5.1+, Opera 11.6+, iOS 4.2+. If the browser does not support adding
|
|
28
|
+
// properties to `Uint8Array` instances, then that's the same as no `Uint8Array` support
|
|
29
|
+
// because we need to be able to add all the node Buffer API methods. This is an issue
|
|
30
|
+
// in Firefox 4-29. Now fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=695438
|
|
31
|
+
try {
|
|
32
|
+
var buf = new ArrayBuffer(0)
|
|
33
|
+
var arr = new Uint8Array(buf)
|
|
34
|
+
arr.foo = function () { return 42 }
|
|
35
|
+
return 42 === arr.foo() &&
|
|
36
|
+
typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray`
|
|
37
|
+
} catch (e) {
|
|
38
|
+
return false
|
|
39
|
+
}
|
|
40
|
+
})()
|
|
33
41
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
i -= 1;
|
|
50
|
-
} else if (part === '..') {
|
|
51
|
-
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
|
|
52
|
-
//End of the line. Keep at least one non-dot
|
|
53
|
-
//path segment at the front so it can be mapped
|
|
54
|
-
//correctly to disk. Otherwise, there is likely
|
|
55
|
-
//no path mapping for a path starting with '..'.
|
|
56
|
-
//This can still fail, but catches the most reasonable
|
|
57
|
-
//uses of ..
|
|
58
|
-
break;
|
|
59
|
-
} else if (i > 0) {
|
|
60
|
-
ary.splice(i - 1, 2);
|
|
61
|
-
i -= 2;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
42
|
+
/**
|
|
43
|
+
* Class: Buffer
|
|
44
|
+
* =============
|
|
45
|
+
*
|
|
46
|
+
* The Buffer constructor returns instances of `Uint8Array` that are augmented
|
|
47
|
+
* with function properties for all the node `Buffer` API functions. We use
|
|
48
|
+
* `Uint8Array` so that square bracket notation works as expected -- it returns
|
|
49
|
+
* a single octet.
|
|
50
|
+
*
|
|
51
|
+
* By augmenting the instances, we can avoid modifying the `Uint8Array`
|
|
52
|
+
* prototype.
|
|
53
|
+
*/
|
|
54
|
+
function Buffer (subject, encoding, noZero) {
|
|
55
|
+
if (!(this instanceof Buffer))
|
|
56
|
+
return new Buffer(subject, encoding, noZero)
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
var baseParts;
|
|
58
|
+
var type = typeof subject
|
|
69
59
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
60
|
+
// Find the length
|
|
61
|
+
var length
|
|
62
|
+
if (type === 'number')
|
|
63
|
+
length = subject > 0 ? subject >>> 0 : 0
|
|
64
|
+
else if (type === 'string') {
|
|
65
|
+
if (encoding === 'base64')
|
|
66
|
+
subject = base64clean(subject)
|
|
67
|
+
length = Buffer.byteLength(subject, encoding)
|
|
68
|
+
} else if (type === 'object' && subject !== null) { // assume object is array-like
|
|
69
|
+
if (subject.type === 'Buffer' && Array.isArray(subject.data))
|
|
70
|
+
subject = subject.data
|
|
71
|
+
length = +subject.length > 0 ? Math.floor(+subject.length) : 0
|
|
72
|
+
} else
|
|
73
|
+
throw new Error('First argument needs to be a number, array or string.')
|
|
83
74
|
|
|
84
|
-
|
|
85
|
-
|
|
75
|
+
var buf
|
|
76
|
+
if (Buffer._useTypedArrays) {
|
|
77
|
+
// Preferred: Return an augmented `Uint8Array` instance for best performance
|
|
78
|
+
buf = Buffer._augment(new Uint8Array(length))
|
|
79
|
+
} else {
|
|
80
|
+
// Fallback: Return THIS instance of Buffer (created by `new`)
|
|
81
|
+
buf = this
|
|
82
|
+
buf.length = length
|
|
83
|
+
buf._isBuffer = true
|
|
84
|
+
}
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
var i
|
|
87
|
+
if (Buffer._useTypedArrays && typeof subject.byteLength === 'number') {
|
|
88
|
+
// Speed optimization -- use set if we're copying from a typed array
|
|
89
|
+
buf._set(subject)
|
|
90
|
+
} else if (isArrayish(subject)) {
|
|
91
|
+
// Treat array-ish objects as a byte array
|
|
92
|
+
if (Buffer.isBuffer(subject)) {
|
|
93
|
+
for (i = 0; i < length; i++)
|
|
94
|
+
buf[i] = subject.readUInt8(i)
|
|
95
|
+
} else {
|
|
96
|
+
for (i = 0; i < length; i++)
|
|
97
|
+
buf[i] = ((subject[i] % 256) + 256) % 256
|
|
95
98
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
load.fromText = function (id, text) {
|
|
103
|
-
//This one is difficult because the text can/probably uses
|
|
104
|
-
//define, and any relative paths and requires should be relative
|
|
105
|
-
//to that id was it would be found on disk. But this would require
|
|
106
|
-
//bootstrapping a module/require fairly deeply from node core.
|
|
107
|
-
//Not sure how best to go about that yet.
|
|
108
|
-
throw new Error('amdefine does not implement load.fromText');
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
return load;
|
|
99
|
+
} else if (type === 'string') {
|
|
100
|
+
buf.write(subject, 0, encoding)
|
|
101
|
+
} else if (type === 'number' && !Buffer._useTypedArrays && !noZero) {
|
|
102
|
+
for (i = 0; i < length; i++) {
|
|
103
|
+
buf[i] = 0
|
|
112
104
|
}
|
|
105
|
+
}
|
|
113
106
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (typeof deps === 'string') {
|
|
117
|
-
//Synchronous, single module require('')
|
|
118
|
-
return stringRequire(systemRequire, exports, module, deps, relId);
|
|
119
|
-
} else {
|
|
120
|
-
//Array of dependencies with a callback.
|
|
107
|
+
return buf
|
|
108
|
+
}
|
|
121
109
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
return stringRequire(systemRequire, exports, module, depName, relId);
|
|
125
|
-
});
|
|
110
|
+
// STATIC METHODS
|
|
111
|
+
// ==============
|
|
126
112
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
113
|
+
Buffer.isEncoding = function (encoding) {
|
|
114
|
+
switch (String(encoding).toLowerCase()) {
|
|
115
|
+
case 'hex':
|
|
116
|
+
case 'utf8':
|
|
117
|
+
case 'utf-8':
|
|
118
|
+
case 'ascii':
|
|
119
|
+
case 'binary':
|
|
120
|
+
case 'base64':
|
|
121
|
+
case 'raw':
|
|
122
|
+
case 'ucs2':
|
|
123
|
+
case 'ucs-2':
|
|
124
|
+
case 'utf16le':
|
|
125
|
+
case 'utf-16le':
|
|
126
|
+
return true
|
|
127
|
+
default:
|
|
128
|
+
return false
|
|
129
|
+
}
|
|
130
|
+
}
|
|
133
131
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
} else {
|
|
138
|
-
return filePath;
|
|
139
|
-
}
|
|
140
|
-
};
|
|
132
|
+
Buffer.isBuffer = function (b) {
|
|
133
|
+
return !!(b != null && b._isBuffer)
|
|
134
|
+
}
|
|
141
135
|
|
|
142
|
-
|
|
143
|
-
|
|
136
|
+
Buffer.byteLength = function (str, encoding) {
|
|
137
|
+
var ret
|
|
138
|
+
str = str.toString()
|
|
139
|
+
switch (encoding || 'utf8') {
|
|
140
|
+
case 'hex':
|
|
141
|
+
ret = str.length / 2
|
|
142
|
+
break
|
|
143
|
+
case 'utf8':
|
|
144
|
+
case 'utf-8':
|
|
145
|
+
ret = utf8ToBytes(str).length
|
|
146
|
+
break
|
|
147
|
+
case 'ascii':
|
|
148
|
+
case 'binary':
|
|
149
|
+
case 'raw':
|
|
150
|
+
ret = str.length
|
|
151
|
+
break
|
|
152
|
+
case 'base64':
|
|
153
|
+
ret = base64ToBytes(str).length
|
|
154
|
+
break
|
|
155
|
+
case 'ucs2':
|
|
156
|
+
case 'ucs-2':
|
|
157
|
+
case 'utf16le':
|
|
158
|
+
case 'utf-16le':
|
|
159
|
+
ret = str.length * 2
|
|
160
|
+
break
|
|
161
|
+
default:
|
|
162
|
+
throw new Error('Unknown encoding')
|
|
163
|
+
}
|
|
164
|
+
return ret
|
|
165
|
+
}
|
|
144
166
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return module.require.apply(module, arguments);
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
function runFactory(id, deps, factory) {
|
|
151
|
-
var r, e, m, result;
|
|
152
|
-
|
|
153
|
-
if (id) {
|
|
154
|
-
e = loaderCache[id] = {};
|
|
155
|
-
m = {
|
|
156
|
-
id: id,
|
|
157
|
-
uri: __filename,
|
|
158
|
-
exports: e
|
|
159
|
-
};
|
|
160
|
-
r = makeRequire(requireFn, e, m, id);
|
|
161
|
-
} else {
|
|
162
|
-
//Only support one define call per file
|
|
163
|
-
if (alreadyCalled) {
|
|
164
|
-
throw new Error('amdefine with no module ID cannot be called more than once per file.');
|
|
165
|
-
}
|
|
166
|
-
alreadyCalled = true;
|
|
167
|
-
|
|
168
|
-
//Use the real variables from node
|
|
169
|
-
//Use module.exports for exports, since
|
|
170
|
-
//the exports in here is amdefine exports.
|
|
171
|
-
e = module.exports;
|
|
172
|
-
m = module;
|
|
173
|
-
r = makeRequire(requireFn, e, m, module.id);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
//If there are dependencies, they are strings, so need
|
|
177
|
-
//to convert them to dependency values.
|
|
178
|
-
if (deps) {
|
|
179
|
-
deps = deps.map(function (depName) {
|
|
180
|
-
return r(depName);
|
|
181
|
-
});
|
|
182
|
-
}
|
|
167
|
+
Buffer.concat = function (list, totalLength) {
|
|
168
|
+
assert(isArray(list), 'Usage: Buffer.concat(list[, length])')
|
|
183
169
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
170
|
+
if (list.length === 0) {
|
|
171
|
+
return new Buffer(0)
|
|
172
|
+
} else if (list.length === 1) {
|
|
173
|
+
return list[0]
|
|
174
|
+
}
|
|
190
175
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
176
|
+
var i
|
|
177
|
+
if (totalLength === undefined) {
|
|
178
|
+
totalLength = 0
|
|
179
|
+
for (i = 0; i < list.length; i++) {
|
|
180
|
+
totalLength += list[i].length
|
|
197
181
|
}
|
|
182
|
+
}
|
|
198
183
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
//Straight module lookup. If it is one of the special dependencies,
|
|
209
|
-
//deal with it, otherwise, delegate to node.
|
|
210
|
-
if (id === 'require') {
|
|
211
|
-
return makeRequire(systemRequire, exports, module, relId);
|
|
212
|
-
} else if (id === 'exports') {
|
|
213
|
-
return exports;
|
|
214
|
-
} else if (id === 'module') {
|
|
215
|
-
return module;
|
|
216
|
-
} else if (loaderCache.hasOwnProperty(id)) {
|
|
217
|
-
return loaderCache[id];
|
|
218
|
-
} else if (defineCache[id]) {
|
|
219
|
-
runFactory.apply(null, defineCache[id]);
|
|
220
|
-
return loaderCache[id];
|
|
221
|
-
} else {
|
|
222
|
-
if(systemRequire) {
|
|
223
|
-
return systemRequire(originalId);
|
|
224
|
-
} else {
|
|
225
|
-
throw new Error('No module with ID: ' + id);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
} else {
|
|
229
|
-
//There is a plugin in play.
|
|
230
|
-
prefix = id.substring(0, index);
|
|
231
|
-
id = id.substring(index + 1, id.length);
|
|
232
|
-
|
|
233
|
-
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
|
|
234
|
-
|
|
235
|
-
if (plugin.normalize) {
|
|
236
|
-
id = plugin.normalize(id, makeNormalize(relId));
|
|
237
|
-
} else {
|
|
238
|
-
//Normalize the ID normally.
|
|
239
|
-
id = normalize(id, relId);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
if (loaderCache[id]) {
|
|
243
|
-
return loaderCache[id];
|
|
244
|
-
} else {
|
|
245
|
-
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
|
|
246
|
-
|
|
247
|
-
return loaderCache[id];
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
|
|
252
|
-
//Create a define function specific to the module asking for amdefine.
|
|
253
|
-
function define(id, deps, factory) {
|
|
254
|
-
if (Array.isArray(id)) {
|
|
255
|
-
factory = deps;
|
|
256
|
-
deps = id;
|
|
257
|
-
id = undefined;
|
|
258
|
-
} else if (typeof id !== 'string') {
|
|
259
|
-
factory = id;
|
|
260
|
-
id = deps = undefined;
|
|
261
|
-
}
|
|
184
|
+
var buf = new Buffer(totalLength)
|
|
185
|
+
var pos = 0
|
|
186
|
+
for (i = 0; i < list.length; i++) {
|
|
187
|
+
var item = list[i]
|
|
188
|
+
item.copy(buf, pos)
|
|
189
|
+
pos += item.length
|
|
190
|
+
}
|
|
191
|
+
return buf
|
|
192
|
+
}
|
|
262
193
|
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
194
|
+
Buffer.compare = function (a, b) {
|
|
195
|
+
assert(Buffer.isBuffer(a) && Buffer.isBuffer(b), 'Arguments must be Buffers')
|
|
196
|
+
var x = a.length
|
|
197
|
+
var y = b.length
|
|
198
|
+
for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
|
|
199
|
+
if (i !== len) {
|
|
200
|
+
x = a[i]
|
|
201
|
+
y = b[i]
|
|
202
|
+
}
|
|
203
|
+
if (x < y) {
|
|
204
|
+
return -1
|
|
205
|
+
}
|
|
206
|
+
if (y < x) {
|
|
207
|
+
return 1
|
|
208
|
+
}
|
|
209
|
+
return 0
|
|
210
|
+
}
|
|
267
211
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
}
|
|
212
|
+
// BUFFER INSTANCE METHODS
|
|
213
|
+
// =======================
|
|
271
214
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}
|
|
215
|
+
function hexWrite (buf, string, offset, length) {
|
|
216
|
+
offset = Number(offset) || 0
|
|
217
|
+
var remaining = buf.length - offset
|
|
218
|
+
if (!length) {
|
|
219
|
+
length = remaining
|
|
220
|
+
} else {
|
|
221
|
+
length = Number(length)
|
|
222
|
+
if (length > remaining) {
|
|
223
|
+
length = remaining
|
|
282
224
|
}
|
|
225
|
+
}
|
|
283
226
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
//IDs.
|
|
288
|
-
define.require = function (id) {
|
|
289
|
-
if (loaderCache[id]) {
|
|
290
|
-
return loaderCache[id];
|
|
291
|
-
}
|
|
227
|
+
// must be an even number of digits
|
|
228
|
+
var strLen = string.length
|
|
229
|
+
assert(strLen % 2 === 0, 'Invalid hex string')
|
|
292
230
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
231
|
+
if (length > strLen / 2) {
|
|
232
|
+
length = strLen / 2
|
|
233
|
+
}
|
|
234
|
+
for (var i = 0; i < length; i++) {
|
|
235
|
+
var byte = parseInt(string.substr(i * 2, 2), 16)
|
|
236
|
+
assert(!isNaN(byte), 'Invalid hex string')
|
|
237
|
+
buf[offset + i] = byte
|
|
238
|
+
}
|
|
239
|
+
return i
|
|
240
|
+
}
|
|
298
241
|
|
|
299
|
-
|
|
242
|
+
function utf8Write (buf, string, offset, length) {
|
|
243
|
+
var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length)
|
|
244
|
+
return charsWritten
|
|
245
|
+
}
|
|
300
246
|
|
|
301
|
-
|
|
247
|
+
function asciiWrite (buf, string, offset, length) {
|
|
248
|
+
var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
|
|
249
|
+
return charsWritten
|
|
302
250
|
}
|
|
303
251
|
|
|
304
|
-
|
|
252
|
+
function binaryWrite (buf, string, offset, length) {
|
|
253
|
+
return asciiWrite(buf, string, offset, length)
|
|
254
|
+
}
|
|
305
255
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
*
|
|
311
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
312
|
-
* @license MIT
|
|
313
|
-
*/
|
|
256
|
+
function base64Write (buf, string, offset, length) {
|
|
257
|
+
var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
|
|
258
|
+
return charsWritten
|
|
259
|
+
}
|
|
314
260
|
|
|
315
|
-
|
|
316
|
-
var
|
|
261
|
+
function utf16leWrite (buf, string, offset, length) {
|
|
262
|
+
var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length)
|
|
263
|
+
return charsWritten
|
|
264
|
+
}
|
|
317
265
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
// because we need to be able to add all the node Buffer API methods. This is an issue
|
|
333
|
-
// in Firefox 4-29. Now fixed: https://bugzilla.mozilla.org/show_bug.cgi?id=695438
|
|
334
|
-
try {
|
|
335
|
-
var buf = new ArrayBuffer(0)
|
|
336
|
-
var arr = new Uint8Array(buf)
|
|
337
|
-
arr.foo = function () { return 42 }
|
|
338
|
-
return 42 === arr.foo() &&
|
|
339
|
-
typeof arr.subarray === 'function' // Chrome 9-10 lack `subarray`
|
|
340
|
-
} catch (e) {
|
|
341
|
-
return false
|
|
342
|
-
}
|
|
343
|
-
})()
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Class: Buffer
|
|
347
|
-
* =============
|
|
348
|
-
*
|
|
349
|
-
* The Buffer constructor returns instances of `Uint8Array` that are augmented
|
|
350
|
-
* with function properties for all the node `Buffer` API functions. We use
|
|
351
|
-
* `Uint8Array` so that square bracket notation works as expected -- it returns
|
|
352
|
-
* a single octet.
|
|
353
|
-
*
|
|
354
|
-
* By augmenting the instances, we can avoid modifying the `Uint8Array`
|
|
355
|
-
* prototype.
|
|
356
|
-
*/
|
|
357
|
-
function Buffer (subject, encoding, noZero) {
|
|
358
|
-
if (!(this instanceof Buffer))
|
|
359
|
-
return new Buffer(subject, encoding, noZero)
|
|
360
|
-
|
|
361
|
-
var type = typeof subject
|
|
362
|
-
|
|
363
|
-
if (encoding === 'base64' && type === 'string') {
|
|
364
|
-
subject = base64clean(subject)
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
// Find the length
|
|
368
|
-
var length
|
|
369
|
-
if (type === 'number')
|
|
370
|
-
length = coerce(subject)
|
|
371
|
-
else if (type === 'string')
|
|
372
|
-
length = Buffer.byteLength(subject, encoding)
|
|
373
|
-
else if (type === 'object')
|
|
374
|
-
length = coerce(subject.length) // assume that object is array-like
|
|
375
|
-
else
|
|
376
|
-
throw new Error('First argument needs to be a number, array or string.')
|
|
377
|
-
|
|
378
|
-
var buf
|
|
379
|
-
if (Buffer._useTypedArrays) {
|
|
380
|
-
// Preferred: Return an augmented `Uint8Array` instance for best performance
|
|
381
|
-
buf = Buffer._augment(new Uint8Array(length))
|
|
382
|
-
} else {
|
|
383
|
-
// Fallback: Return THIS instance of Buffer (created by `new`)
|
|
384
|
-
buf = this
|
|
385
|
-
buf.length = length
|
|
386
|
-
buf._isBuffer = true
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
var i
|
|
390
|
-
if (Buffer._useTypedArrays && typeof subject.byteLength === 'number') {
|
|
391
|
-
// Speed optimization -- use set if we're copying from a typed array
|
|
392
|
-
buf._set(subject)
|
|
393
|
-
} else if (isArrayish(subject)) {
|
|
394
|
-
// Treat array-ish objects as a byte array
|
|
395
|
-
if (Buffer.isBuffer(subject)) {
|
|
396
|
-
for (i = 0; i < length; i++)
|
|
397
|
-
buf[i] = subject.readUInt8(i)
|
|
398
|
-
} else {
|
|
399
|
-
for (i = 0; i < length; i++)
|
|
400
|
-
buf[i] = ((subject[i] % 256) + 256) % 256
|
|
401
|
-
}
|
|
402
|
-
} else if (type === 'string') {
|
|
403
|
-
buf.write(subject, 0, encoding)
|
|
404
|
-
} else if (type === 'number' && !Buffer._useTypedArrays && !noZero) {
|
|
405
|
-
for (i = 0; i < length; i++) {
|
|
406
|
-
buf[i] = 0
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
return buf
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
// STATIC METHODS
|
|
414
|
-
// ==============
|
|
415
|
-
|
|
416
|
-
Buffer.isEncoding = function (encoding) {
|
|
417
|
-
switch (String(encoding).toLowerCase()) {
|
|
418
|
-
case 'hex':
|
|
419
|
-
case 'utf8':
|
|
420
|
-
case 'utf-8':
|
|
421
|
-
case 'ascii':
|
|
422
|
-
case 'binary':
|
|
423
|
-
case 'base64':
|
|
424
|
-
case 'raw':
|
|
425
|
-
case 'ucs2':
|
|
426
|
-
case 'ucs-2':
|
|
427
|
-
case 'utf16le':
|
|
428
|
-
case 'utf-16le':
|
|
429
|
-
return true
|
|
430
|
-
default:
|
|
431
|
-
return false
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
Buffer.isBuffer = function (b) {
|
|
436
|
-
return !!(b !== null && b !== undefined && b._isBuffer)
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
Buffer.byteLength = function (str, encoding) {
|
|
440
|
-
var ret
|
|
441
|
-
str = str.toString()
|
|
442
|
-
switch (encoding || 'utf8') {
|
|
443
|
-
case 'hex':
|
|
444
|
-
ret = str.length / 2
|
|
445
|
-
break
|
|
446
|
-
case 'utf8':
|
|
447
|
-
case 'utf-8':
|
|
448
|
-
ret = utf8ToBytes(str).length
|
|
449
|
-
break
|
|
450
|
-
case 'ascii':
|
|
451
|
-
case 'binary':
|
|
452
|
-
case 'raw':
|
|
453
|
-
ret = str.length
|
|
454
|
-
break
|
|
455
|
-
case 'base64':
|
|
456
|
-
ret = base64ToBytes(str).length
|
|
457
|
-
break
|
|
458
|
-
case 'ucs2':
|
|
459
|
-
case 'ucs-2':
|
|
460
|
-
case 'utf16le':
|
|
461
|
-
case 'utf-16le':
|
|
462
|
-
ret = str.length * 2
|
|
463
|
-
break
|
|
464
|
-
default:
|
|
465
|
-
throw new Error('Unknown encoding')
|
|
466
|
-
}
|
|
467
|
-
return ret
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
Buffer.concat = function (list, totalLength) {
|
|
471
|
-
assert(isArray(list), 'Usage: Buffer.concat(list[, length])')
|
|
472
|
-
|
|
473
|
-
if (list.length === 0) {
|
|
474
|
-
return new Buffer(0)
|
|
475
|
-
} else if (list.length === 1) {
|
|
476
|
-
return list[0]
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
var i
|
|
480
|
-
if (totalLength === undefined) {
|
|
481
|
-
totalLength = 0
|
|
482
|
-
for (i = 0; i < list.length; i++) {
|
|
483
|
-
totalLength += list[i].length
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
var buf = new Buffer(totalLength)
|
|
488
|
-
var pos = 0
|
|
489
|
-
for (i = 0; i < list.length; i++) {
|
|
490
|
-
var item = list[i]
|
|
491
|
-
item.copy(buf, pos)
|
|
492
|
-
pos += item.length
|
|
493
|
-
}
|
|
494
|
-
return buf
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
Buffer.compare = function (a, b) {
|
|
498
|
-
assert(Buffer.isBuffer(a) && Buffer.isBuffer(b), 'Arguments must be Buffers')
|
|
499
|
-
var x = a.length
|
|
500
|
-
var y = b.length
|
|
501
|
-
for (var i = 0, len = Math.min(x, y); i < len && a[i] === b[i]; i++) {}
|
|
502
|
-
if (i !== len) {
|
|
503
|
-
x = a[i]
|
|
504
|
-
y = b[i]
|
|
505
|
-
}
|
|
506
|
-
if (x < y) {
|
|
507
|
-
return -1
|
|
508
|
-
}
|
|
509
|
-
if (y < x) {
|
|
510
|
-
return 1
|
|
511
|
-
}
|
|
512
|
-
return 0
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
// BUFFER INSTANCE METHODS
|
|
516
|
-
// =======================
|
|
517
|
-
|
|
518
|
-
function hexWrite (buf, string, offset, length) {
|
|
519
|
-
offset = Number(offset) || 0
|
|
520
|
-
var remaining = buf.length - offset
|
|
521
|
-
if (!length) {
|
|
522
|
-
length = remaining
|
|
523
|
-
} else {
|
|
524
|
-
length = Number(length)
|
|
525
|
-
if (length > remaining) {
|
|
526
|
-
length = remaining
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
|
|
530
|
-
// must be an even number of digits
|
|
531
|
-
var strLen = string.length
|
|
532
|
-
assert(strLen % 2 === 0, 'Invalid hex string')
|
|
533
|
-
|
|
534
|
-
if (length > strLen / 2) {
|
|
535
|
-
length = strLen / 2
|
|
536
|
-
}
|
|
537
|
-
for (var i = 0; i < length; i++) {
|
|
538
|
-
var byte = parseInt(string.substr(i * 2, 2), 16)
|
|
539
|
-
assert(!isNaN(byte), 'Invalid hex string')
|
|
540
|
-
buf[offset + i] = byte
|
|
541
|
-
}
|
|
542
|
-
return i
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function utf8Write (buf, string, offset, length) {
|
|
546
|
-
var charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length)
|
|
547
|
-
return charsWritten
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
function asciiWrite (buf, string, offset, length) {
|
|
551
|
-
var charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length)
|
|
552
|
-
return charsWritten
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
function binaryWrite (buf, string, offset, length) {
|
|
556
|
-
return asciiWrite(buf, string, offset, length)
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
function base64Write (buf, string, offset, length) {
|
|
560
|
-
var charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length)
|
|
561
|
-
return charsWritten
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
function utf16leWrite (buf, string, offset, length) {
|
|
565
|
-
var charsWritten = blitBuffer(utf16leToBytes(string), buf, offset, length)
|
|
566
|
-
return charsWritten
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
Buffer.prototype.write = function (string, offset, length, encoding) {
|
|
570
|
-
// Support both (string, offset, length, encoding)
|
|
571
|
-
// and the legacy (string, encoding, offset, length)
|
|
572
|
-
if (isFinite(offset)) {
|
|
573
|
-
if (!isFinite(length)) {
|
|
574
|
-
encoding = length
|
|
575
|
-
length = undefined
|
|
576
|
-
}
|
|
577
|
-
} else { // legacy
|
|
578
|
-
var swap = encoding
|
|
579
|
-
encoding = offset
|
|
580
|
-
offset = length
|
|
581
|
-
length = swap
|
|
582
|
-
}
|
|
266
|
+
Buffer.prototype.write = function (string, offset, length, encoding) {
|
|
267
|
+
// Support both (string, offset, length, encoding)
|
|
268
|
+
// and the legacy (string, encoding, offset, length)
|
|
269
|
+
if (isFinite(offset)) {
|
|
270
|
+
if (!isFinite(length)) {
|
|
271
|
+
encoding = length
|
|
272
|
+
length = undefined
|
|
273
|
+
}
|
|
274
|
+
} else { // legacy
|
|
275
|
+
var swap = encoding
|
|
276
|
+
encoding = offset
|
|
277
|
+
offset = length
|
|
278
|
+
length = swap
|
|
279
|
+
}
|
|
583
280
|
|
|
584
281
|
offset = Number(offset) || 0
|
|
585
282
|
var remaining = this.length - offset
|
|
@@ -780,13 +477,32 @@ function utf16leSlice (buf, start, end) {
|
|
|
780
477
|
|
|
781
478
|
Buffer.prototype.slice = function (start, end) {
|
|
782
479
|
var len = this.length
|
|
783
|
-
start =
|
|
784
|
-
end =
|
|
480
|
+
start = ~~start
|
|
481
|
+
end = end === undefined ? len : ~~end
|
|
785
482
|
|
|
786
|
-
if (
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
483
|
+
if (start < 0) {
|
|
484
|
+
start += len;
|
|
485
|
+
if (start < 0)
|
|
486
|
+
start = 0
|
|
487
|
+
} else if (start > len) {
|
|
488
|
+
start = len
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
if (end < 0) {
|
|
492
|
+
end += len
|
|
493
|
+
if (end < 0)
|
|
494
|
+
end = 0
|
|
495
|
+
} else if (end > len) {
|
|
496
|
+
end = len
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
if (end < start)
|
|
500
|
+
end = start
|
|
501
|
+
|
|
502
|
+
if (Buffer._useTypedArrays) {
|
|
503
|
+
return Buffer._augment(this.subarray(start, end))
|
|
504
|
+
} else {
|
|
505
|
+
var sliceLen = end - start
|
|
790
506
|
var newBuf = new Buffer(sliceLen, undefined, true)
|
|
791
507
|
for (var i = 0; i < sliceLen; i++) {
|
|
792
508
|
newBuf[i] = this[i + start]
|
|
@@ -1335,25 +1051,6 @@ function stringtrim (str) {
|
|
|
1335
1051
|
return str.replace(/^\s+|\s+$/g, '')
|
|
1336
1052
|
}
|
|
1337
1053
|
|
|
1338
|
-
// slice(start, end)
|
|
1339
|
-
function clamp (index, len, defaultValue) {
|
|
1340
|
-
if (typeof index !== 'number') return defaultValue
|
|
1341
|
-
index = ~~index; // Coerce to integer.
|
|
1342
|
-
if (index >= len) return len
|
|
1343
|
-
if (index >= 0) return index
|
|
1344
|
-
index += len
|
|
1345
|
-
if (index >= 0) return index
|
|
1346
|
-
return 0
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function coerce (length) {
|
|
1350
|
-
// Coerce length to a number (possibly NaN), round up
|
|
1351
|
-
// in case it's fractional (e.g. 123.456) then do a
|
|
1352
|
-
// double negate to coerce a NaN to 0. Easy, right?
|
|
1353
|
-
length = ~~Math.ceil(+length)
|
|
1354
|
-
return length < 0 ? 0 : length
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
1054
|
function isArray (subject) {
|
|
1358
1055
|
return (Array.isArray || function (subject) {
|
|
1359
1056
|
return Object.prototype.toString.call(subject) === '[object Array]'
|
|
@@ -1462,7 +1159,7 @@ function assert (test, message) {
|
|
|
1462
1159
|
if (!test) throw new Error(message || 'Failed assertion')
|
|
1463
1160
|
}
|
|
1464
1161
|
|
|
1465
|
-
},{"base64-js":
|
|
1162
|
+
},{"base64-js":2,"ieee754":3}],2:[function(_dereq_,module,exports){
|
|
1466
1163
|
var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
1467
1164
|
|
|
1468
1165
|
;(function (exports) {
|
|
@@ -1584,7 +1281,7 @@ var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
|
|
1584
1281
|
exports.fromByteArray = uint8ToBase64
|
|
1585
1282
|
}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))
|
|
1586
1283
|
|
|
1587
|
-
},{}],
|
|
1284
|
+
},{}],3:[function(_dereq_,module,exports){
|
|
1588
1285
|
exports.read = function(buffer, offset, isLE, mLen, nBytes) {
|
|
1589
1286
|
var e, m,
|
|
1590
1287
|
eLen = nBytes * 8 - mLen - 1,
|
|
@@ -1670,7 +1367,7 @@ exports.write = function(buffer, value, offset, isLE, mLen, nBytes) {
|
|
|
1670
1367
|
buffer[offset + i - d] |= s * 128;
|
|
1671
1368
|
};
|
|
1672
1369
|
|
|
1673
|
-
},{}],
|
|
1370
|
+
},{}],4:[function(_dereq_,module,exports){
|
|
1674
1371
|
(function (process){
|
|
1675
1372
|
// Copyright Joyent, Inc. and other Node contributors.
|
|
1676
1373
|
//
|
|
@@ -1898,7 +1595,7 @@ var substr = 'ab'.substr(-1) === 'b'
|
|
|
1898
1595
|
;
|
|
1899
1596
|
|
|
1900
1597
|
}).call(this,_dereq_("FWaASH"))
|
|
1901
|
-
},{"FWaASH":
|
|
1598
|
+
},{"FWaASH":5}],5:[function(_dereq_,module,exports){
|
|
1902
1599
|
// shim for using process in browser
|
|
1903
1600
|
|
|
1904
1601
|
var process = module.exports = {};
|
|
@@ -1963,7 +1660,7 @@ process.chdir = function (dir) {
|
|
|
1963
1660
|
throw new Error('process.chdir is not supported');
|
|
1964
1661
|
};
|
|
1965
1662
|
|
|
1966
|
-
},{}],
|
|
1663
|
+
},{}],6:[function(_dereq_,module,exports){
|
|
1967
1664
|
/*
|
|
1968
1665
|
Copyright (C) 2013 Ariya Hidayat <ariya.hidayat@gmail.com>
|
|
1969
1666
|
Copyright (C) 2013 Thaddee Tyl <thaddee.tyl@gmail.com>
|
|
@@ -8271,7 +7968,7 @@ parseYieldExpression: true
|
|
|
8271
7968
|
}));
|
|
8272
7969
|
/* vim: set sw=4 ts=4 et tw=80 : */
|
|
8273
7970
|
|
|
8274
|
-
},{}],
|
|
7971
|
+
},{}],7:[function(_dereq_,module,exports){
|
|
8275
7972
|
var Base62 = (function (my) {
|
|
8276
7973
|
my.chars = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]
|
|
8277
7974
|
|
|
@@ -8299,7 +7996,7 @@ var Base62 = (function (my) {
|
|
|
8299
7996
|
}({}));
|
|
8300
7997
|
|
|
8301
7998
|
module.exports = Base62
|
|
8302
|
-
},{}],
|
|
7999
|
+
},{}],8:[function(_dereq_,module,exports){
|
|
8303
8000
|
/*
|
|
8304
8001
|
* Copyright 2009-2011 Mozilla Foundation and contributors
|
|
8305
8002
|
* Licensed under the New BSD license. See LICENSE.txt or:
|
|
@@ -8309,7 +8006,7 @@ exports.SourceMapGenerator = _dereq_('./source-map/source-map-generator').Source
|
|
|
8309
8006
|
exports.SourceMapConsumer = _dereq_('./source-map/source-map-consumer').SourceMapConsumer;
|
|
8310
8007
|
exports.SourceNode = _dereq_('./source-map/source-node').SourceNode;
|
|
8311
8008
|
|
|
8312
|
-
},{"./source-map/source-map-consumer":
|
|
8009
|
+
},{"./source-map/source-map-consumer":13,"./source-map/source-map-generator":14,"./source-map/source-node":15}],9:[function(_dereq_,module,exports){
|
|
8313
8010
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
8314
8011
|
/*
|
|
8315
8012
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -8408,7 +8105,7 @@ define(function (_dereq_, exports, module) {
|
|
|
8408
8105
|
|
|
8409
8106
|
});
|
|
8410
8107
|
|
|
8411
|
-
},{"./util":
|
|
8108
|
+
},{"./util":16,"amdefine":17}],10:[function(_dereq_,module,exports){
|
|
8412
8109
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
8413
8110
|
/*
|
|
8414
8111
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -8554,7 +8251,7 @@ define(function (_dereq_, exports, module) {
|
|
|
8554
8251
|
|
|
8555
8252
|
});
|
|
8556
8253
|
|
|
8557
|
-
},{"./base64":
|
|
8254
|
+
},{"./base64":11,"amdefine":17}],11:[function(_dereq_,module,exports){
|
|
8558
8255
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
8559
8256
|
/*
|
|
8560
8257
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -8598,7 +8295,7 @@ define(function (_dereq_, exports, module) {
|
|
|
8598
8295
|
|
|
8599
8296
|
});
|
|
8600
8297
|
|
|
8601
|
-
},{"amdefine":
|
|
8298
|
+
},{"amdefine":17}],12:[function(_dereq_,module,exports){
|
|
8602
8299
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
8603
8300
|
/*
|
|
8604
8301
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -8681,7 +8378,7 @@ define(function (_dereq_, exports, module) {
|
|
|
8681
8378
|
|
|
8682
8379
|
});
|
|
8683
8380
|
|
|
8684
|
-
},{"amdefine":
|
|
8381
|
+
},{"amdefine":17}],13:[function(_dereq_,module,exports){
|
|
8685
8382
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
8686
8383
|
/*
|
|
8687
8384
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -9160,7 +8857,7 @@ define(function (_dereq_, exports, module) {
|
|
|
9160
8857
|
|
|
9161
8858
|
});
|
|
9162
8859
|
|
|
9163
|
-
},{"./array-set":
|
|
8860
|
+
},{"./array-set":9,"./base64-vlq":10,"./binary-search":12,"./util":16,"amdefine":17}],14:[function(_dereq_,module,exports){
|
|
9164
8861
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
9165
8862
|
/*
|
|
9166
8863
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -9542,7 +9239,7 @@ define(function (_dereq_, exports, module) {
|
|
|
9542
9239
|
|
|
9543
9240
|
});
|
|
9544
9241
|
|
|
9545
|
-
},{"./array-set":
|
|
9242
|
+
},{"./array-set":9,"./base64-vlq":10,"./util":16,"amdefine":17}],15:[function(_dereq_,module,exports){
|
|
9546
9243
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
9547
9244
|
/*
|
|
9548
9245
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -9915,7 +9612,7 @@ define(function (_dereq_, exports, module) {
|
|
|
9915
9612
|
|
|
9916
9613
|
});
|
|
9917
9614
|
|
|
9918
|
-
},{"./source-map-generator":
|
|
9615
|
+
},{"./source-map-generator":14,"./util":16,"amdefine":17}],16:[function(_dereq_,module,exports){
|
|
9919
9616
|
/* -*- Mode: js; js-indent-level: 2; -*- */
|
|
9920
9617
|
/*
|
|
9921
9618
|
* Copyright 2011 Mozilla Foundation and contributors
|
|
@@ -9984,145 +9681,448 @@ define(function (_dereq_, exports, module) {
|
|
|
9984
9681
|
}
|
|
9985
9682
|
exports.urlGenerate = urlGenerate;
|
|
9986
9683
|
|
|
9987
|
-
function join(aRoot, aPath) {
|
|
9988
|
-
var url;
|
|
9684
|
+
function join(aRoot, aPath) {
|
|
9685
|
+
var url;
|
|
9686
|
+
|
|
9687
|
+
if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) {
|
|
9688
|
+
return aPath;
|
|
9689
|
+
}
|
|
9690
|
+
|
|
9691
|
+
if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) {
|
|
9692
|
+
url.path = aPath;
|
|
9693
|
+
return urlGenerate(url);
|
|
9694
|
+
}
|
|
9695
|
+
|
|
9696
|
+
return aRoot.replace(/\/$/, '') + '/' + aPath;
|
|
9697
|
+
}
|
|
9698
|
+
exports.join = join;
|
|
9699
|
+
|
|
9700
|
+
/**
|
|
9701
|
+
* Because behavior goes wacky when you set `__proto__` on objects, we
|
|
9702
|
+
* have to prefix all the strings in our set with an arbitrary character.
|
|
9703
|
+
*
|
|
9704
|
+
* See https://github.com/mozilla/source-map/pull/31 and
|
|
9705
|
+
* https://github.com/mozilla/source-map/issues/30
|
|
9706
|
+
*
|
|
9707
|
+
* @param String aStr
|
|
9708
|
+
*/
|
|
9709
|
+
function toSetString(aStr) {
|
|
9710
|
+
return '$' + aStr;
|
|
9711
|
+
}
|
|
9712
|
+
exports.toSetString = toSetString;
|
|
9713
|
+
|
|
9714
|
+
function fromSetString(aStr) {
|
|
9715
|
+
return aStr.substr(1);
|
|
9716
|
+
}
|
|
9717
|
+
exports.fromSetString = fromSetString;
|
|
9718
|
+
|
|
9719
|
+
function relative(aRoot, aPath) {
|
|
9720
|
+
aRoot = aRoot.replace(/\/$/, '');
|
|
9721
|
+
|
|
9722
|
+
var url = urlParse(aRoot);
|
|
9723
|
+
if (aPath.charAt(0) == "/" && url && url.path == "/") {
|
|
9724
|
+
return aPath.slice(1);
|
|
9725
|
+
}
|
|
9726
|
+
|
|
9727
|
+
return aPath.indexOf(aRoot + '/') === 0
|
|
9728
|
+
? aPath.substr(aRoot.length + 1)
|
|
9729
|
+
: aPath;
|
|
9730
|
+
}
|
|
9731
|
+
exports.relative = relative;
|
|
9732
|
+
|
|
9733
|
+
function strcmp(aStr1, aStr2) {
|
|
9734
|
+
var s1 = aStr1 || "";
|
|
9735
|
+
var s2 = aStr2 || "";
|
|
9736
|
+
return (s1 > s2) - (s1 < s2);
|
|
9737
|
+
}
|
|
9738
|
+
|
|
9739
|
+
/**
|
|
9740
|
+
* Comparator between two mappings where the original positions are compared.
|
|
9741
|
+
*
|
|
9742
|
+
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
|
9743
|
+
* mappings with the same original source/line/column, but different generated
|
|
9744
|
+
* line and column the same. Useful when searching for a mapping with a
|
|
9745
|
+
* stubbed out mapping.
|
|
9746
|
+
*/
|
|
9747
|
+
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
9748
|
+
var cmp;
|
|
9749
|
+
|
|
9750
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
9751
|
+
if (cmp) {
|
|
9752
|
+
return cmp;
|
|
9753
|
+
}
|
|
9754
|
+
|
|
9755
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
9756
|
+
if (cmp) {
|
|
9757
|
+
return cmp;
|
|
9758
|
+
}
|
|
9759
|
+
|
|
9760
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
9761
|
+
if (cmp || onlyCompareOriginal) {
|
|
9762
|
+
return cmp;
|
|
9763
|
+
}
|
|
9764
|
+
|
|
9765
|
+
cmp = strcmp(mappingA.name, mappingB.name);
|
|
9766
|
+
if (cmp) {
|
|
9767
|
+
return cmp;
|
|
9768
|
+
}
|
|
9769
|
+
|
|
9770
|
+
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
9771
|
+
if (cmp) {
|
|
9772
|
+
return cmp;
|
|
9773
|
+
}
|
|
9774
|
+
|
|
9775
|
+
return mappingA.generatedColumn - mappingB.generatedColumn;
|
|
9776
|
+
};
|
|
9777
|
+
exports.compareByOriginalPositions = compareByOriginalPositions;
|
|
9778
|
+
|
|
9779
|
+
/**
|
|
9780
|
+
* Comparator between two mappings where the generated positions are
|
|
9781
|
+
* compared.
|
|
9782
|
+
*
|
|
9783
|
+
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
|
9784
|
+
* mappings with the same generated line and column, but different
|
|
9785
|
+
* source/name/original line and column the same. Useful when searching for a
|
|
9786
|
+
* mapping with a stubbed out mapping.
|
|
9787
|
+
*/
|
|
9788
|
+
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
|
|
9789
|
+
var cmp;
|
|
9790
|
+
|
|
9791
|
+
cmp = mappingA.generatedLine - mappingB.generatedLine;
|
|
9792
|
+
if (cmp) {
|
|
9793
|
+
return cmp;
|
|
9794
|
+
}
|
|
9795
|
+
|
|
9796
|
+
cmp = mappingA.generatedColumn - mappingB.generatedColumn;
|
|
9797
|
+
if (cmp || onlyCompareGenerated) {
|
|
9798
|
+
return cmp;
|
|
9799
|
+
}
|
|
9800
|
+
|
|
9801
|
+
cmp = strcmp(mappingA.source, mappingB.source);
|
|
9802
|
+
if (cmp) {
|
|
9803
|
+
return cmp;
|
|
9804
|
+
}
|
|
9805
|
+
|
|
9806
|
+
cmp = mappingA.originalLine - mappingB.originalLine;
|
|
9807
|
+
if (cmp) {
|
|
9808
|
+
return cmp;
|
|
9809
|
+
}
|
|
9810
|
+
|
|
9811
|
+
cmp = mappingA.originalColumn - mappingB.originalColumn;
|
|
9812
|
+
if (cmp) {
|
|
9813
|
+
return cmp;
|
|
9814
|
+
}
|
|
9815
|
+
|
|
9816
|
+
return strcmp(mappingA.name, mappingB.name);
|
|
9817
|
+
};
|
|
9818
|
+
exports.compareByGeneratedPositions = compareByGeneratedPositions;
|
|
9819
|
+
|
|
9820
|
+
});
|
|
9821
|
+
|
|
9822
|
+
},{"amdefine":17}],17:[function(_dereq_,module,exports){
|
|
9823
|
+
(function (process,__filename){
|
|
9824
|
+
/** vim: et:ts=4:sw=4:sts=4
|
|
9825
|
+
* @license amdefine 0.1.0 Copyright (c) 2011, The Dojo Foundation All Rights Reserved.
|
|
9826
|
+
* Available via the MIT or new BSD license.
|
|
9827
|
+
* see: http://github.com/jrburke/amdefine for details
|
|
9828
|
+
*/
|
|
9829
|
+
|
|
9830
|
+
/*jslint node: true */
|
|
9831
|
+
/*global module, process */
|
|
9832
|
+
'use strict';
|
|
9833
|
+
|
|
9834
|
+
/**
|
|
9835
|
+
* Creates a define for node.
|
|
9836
|
+
* @param {Object} module the "module" object that is defined by Node for the
|
|
9837
|
+
* current module.
|
|
9838
|
+
* @param {Function} [requireFn]. Node's require function for the current module.
|
|
9839
|
+
* It only needs to be passed in Node versions before 0.5, when module.require
|
|
9840
|
+
* did not exist.
|
|
9841
|
+
* @returns {Function} a define function that is usable for the current node
|
|
9842
|
+
* module.
|
|
9843
|
+
*/
|
|
9844
|
+
function amdefine(module, requireFn) {
|
|
9845
|
+
'use strict';
|
|
9846
|
+
var defineCache = {},
|
|
9847
|
+
loaderCache = {},
|
|
9848
|
+
alreadyCalled = false,
|
|
9849
|
+
path = _dereq_('path'),
|
|
9850
|
+
makeRequire, stringRequire;
|
|
9851
|
+
|
|
9852
|
+
/**
|
|
9853
|
+
* Trims the . and .. from an array of path segments.
|
|
9854
|
+
* It will keep a leading path segment if a .. will become
|
|
9855
|
+
* the first path segment, to help with module name lookups,
|
|
9856
|
+
* which act like paths, but can be remapped. But the end result,
|
|
9857
|
+
* all paths that use this function should look normalized.
|
|
9858
|
+
* NOTE: this method MODIFIES the input array.
|
|
9859
|
+
* @param {Array} ary the array of path segments.
|
|
9860
|
+
*/
|
|
9861
|
+
function trimDots(ary) {
|
|
9862
|
+
var i, part;
|
|
9863
|
+
for (i = 0; ary[i]; i+= 1) {
|
|
9864
|
+
part = ary[i];
|
|
9865
|
+
if (part === '.') {
|
|
9866
|
+
ary.splice(i, 1);
|
|
9867
|
+
i -= 1;
|
|
9868
|
+
} else if (part === '..') {
|
|
9869
|
+
if (i === 1 && (ary[2] === '..' || ary[0] === '..')) {
|
|
9870
|
+
//End of the line. Keep at least one non-dot
|
|
9871
|
+
//path segment at the front so it can be mapped
|
|
9872
|
+
//correctly to disk. Otherwise, there is likely
|
|
9873
|
+
//no path mapping for a path starting with '..'.
|
|
9874
|
+
//This can still fail, but catches the most reasonable
|
|
9875
|
+
//uses of ..
|
|
9876
|
+
break;
|
|
9877
|
+
} else if (i > 0) {
|
|
9878
|
+
ary.splice(i - 1, 2);
|
|
9879
|
+
i -= 2;
|
|
9880
|
+
}
|
|
9881
|
+
}
|
|
9882
|
+
}
|
|
9883
|
+
}
|
|
9884
|
+
|
|
9885
|
+
function normalize(name, baseName) {
|
|
9886
|
+
var baseParts;
|
|
9887
|
+
|
|
9888
|
+
//Adjust any relative paths.
|
|
9889
|
+
if (name && name.charAt(0) === '.') {
|
|
9890
|
+
//If have a base name, try to normalize against it,
|
|
9891
|
+
//otherwise, assume it is a top-level require that will
|
|
9892
|
+
//be relative to baseUrl in the end.
|
|
9893
|
+
if (baseName) {
|
|
9894
|
+
baseParts = baseName.split('/');
|
|
9895
|
+
baseParts = baseParts.slice(0, baseParts.length - 1);
|
|
9896
|
+
baseParts = baseParts.concat(name.split('/'));
|
|
9897
|
+
trimDots(baseParts);
|
|
9898
|
+
name = baseParts.join('/');
|
|
9899
|
+
}
|
|
9900
|
+
}
|
|
9901
|
+
|
|
9902
|
+
return name;
|
|
9903
|
+
}
|
|
9904
|
+
|
|
9905
|
+
/**
|
|
9906
|
+
* Create the normalize() function passed to a loader plugin's
|
|
9907
|
+
* normalize method.
|
|
9908
|
+
*/
|
|
9909
|
+
function makeNormalize(relName) {
|
|
9910
|
+
return function (name) {
|
|
9911
|
+
return normalize(name, relName);
|
|
9912
|
+
};
|
|
9913
|
+
}
|
|
9914
|
+
|
|
9915
|
+
function makeLoad(id) {
|
|
9916
|
+
function load(value) {
|
|
9917
|
+
loaderCache[id] = value;
|
|
9918
|
+
}
|
|
9919
|
+
|
|
9920
|
+
load.fromText = function (id, text) {
|
|
9921
|
+
//This one is difficult because the text can/probably uses
|
|
9922
|
+
//define, and any relative paths and requires should be relative
|
|
9923
|
+
//to that id was it would be found on disk. But this would require
|
|
9924
|
+
//bootstrapping a module/require fairly deeply from node core.
|
|
9925
|
+
//Not sure how best to go about that yet.
|
|
9926
|
+
throw new Error('amdefine does not implement load.fromText');
|
|
9927
|
+
};
|
|
9928
|
+
|
|
9929
|
+
return load;
|
|
9930
|
+
}
|
|
9931
|
+
|
|
9932
|
+
makeRequire = function (systemRequire, exports, module, relId) {
|
|
9933
|
+
function amdRequire(deps, callback) {
|
|
9934
|
+
if (typeof deps === 'string') {
|
|
9935
|
+
//Synchronous, single module require('')
|
|
9936
|
+
return stringRequire(systemRequire, exports, module, deps, relId);
|
|
9937
|
+
} else {
|
|
9938
|
+
//Array of dependencies with a callback.
|
|
9939
|
+
|
|
9940
|
+
//Convert the dependencies to modules.
|
|
9941
|
+
deps = deps.map(function (depName) {
|
|
9942
|
+
return stringRequire(systemRequire, exports, module, depName, relId);
|
|
9943
|
+
});
|
|
9944
|
+
|
|
9945
|
+
//Wait for next tick to call back the require call.
|
|
9946
|
+
process.nextTick(function () {
|
|
9947
|
+
callback.apply(null, deps);
|
|
9948
|
+
});
|
|
9949
|
+
}
|
|
9950
|
+
}
|
|
9951
|
+
|
|
9952
|
+
amdRequire.toUrl = function (filePath) {
|
|
9953
|
+
if (filePath.indexOf('.') === 0) {
|
|
9954
|
+
return normalize(filePath, path.dirname(module.filename));
|
|
9955
|
+
} else {
|
|
9956
|
+
return filePath;
|
|
9957
|
+
}
|
|
9958
|
+
};
|
|
9959
|
+
|
|
9960
|
+
return amdRequire;
|
|
9961
|
+
};
|
|
9989
9962
|
|
|
9990
|
-
if
|
|
9991
|
-
|
|
9992
|
-
|
|
9963
|
+
//Favor explicit value, passed in if the module wants to support Node 0.4.
|
|
9964
|
+
requireFn = requireFn || function req() {
|
|
9965
|
+
return module.require.apply(module, arguments);
|
|
9966
|
+
};
|
|
9993
9967
|
|
|
9994
|
-
|
|
9995
|
-
|
|
9996
|
-
return urlGenerate(url);
|
|
9997
|
-
}
|
|
9968
|
+
function runFactory(id, deps, factory) {
|
|
9969
|
+
var r, e, m, result;
|
|
9998
9970
|
|
|
9999
|
-
|
|
10000
|
-
|
|
10001
|
-
|
|
9971
|
+
if (id) {
|
|
9972
|
+
e = loaderCache[id] = {};
|
|
9973
|
+
m = {
|
|
9974
|
+
id: id,
|
|
9975
|
+
uri: __filename,
|
|
9976
|
+
exports: e
|
|
9977
|
+
};
|
|
9978
|
+
r = makeRequire(requireFn, e, m, id);
|
|
9979
|
+
} else {
|
|
9980
|
+
//Only support one define call per file
|
|
9981
|
+
if (alreadyCalled) {
|
|
9982
|
+
throw new Error('amdefine with no module ID cannot be called more than once per file.');
|
|
9983
|
+
}
|
|
9984
|
+
alreadyCalled = true;
|
|
10002
9985
|
|
|
10003
|
-
|
|
10004
|
-
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
|
|
10008
|
-
|
|
10009
|
-
|
|
10010
|
-
* @param String aStr
|
|
10011
|
-
*/
|
|
10012
|
-
function toSetString(aStr) {
|
|
10013
|
-
return '$' + aStr;
|
|
10014
|
-
}
|
|
10015
|
-
exports.toSetString = toSetString;
|
|
9986
|
+
//Use the real variables from node
|
|
9987
|
+
//Use module.exports for exports, since
|
|
9988
|
+
//the exports in here is amdefine exports.
|
|
9989
|
+
e = module.exports;
|
|
9990
|
+
m = module;
|
|
9991
|
+
r = makeRequire(requireFn, e, m, module.id);
|
|
9992
|
+
}
|
|
10016
9993
|
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
|
|
10020
|
-
|
|
9994
|
+
//If there are dependencies, they are strings, so need
|
|
9995
|
+
//to convert them to dependency values.
|
|
9996
|
+
if (deps) {
|
|
9997
|
+
deps = deps.map(function (depName) {
|
|
9998
|
+
return r(depName);
|
|
9999
|
+
});
|
|
10000
|
+
}
|
|
10021
10001
|
|
|
10022
|
-
|
|
10023
|
-
|
|
10002
|
+
//Call the factory with the right dependencies.
|
|
10003
|
+
if (typeof factory === 'function') {
|
|
10004
|
+
result = factory.apply(m.exports, deps);
|
|
10005
|
+
} else {
|
|
10006
|
+
result = factory;
|
|
10007
|
+
}
|
|
10024
10008
|
|
|
10025
|
-
|
|
10026
|
-
|
|
10027
|
-
|
|
10009
|
+
if (result !== undefined) {
|
|
10010
|
+
m.exports = result;
|
|
10011
|
+
if (id) {
|
|
10012
|
+
loaderCache[id] = m.exports;
|
|
10013
|
+
}
|
|
10014
|
+
}
|
|
10028
10015
|
}
|
|
10029
10016
|
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
10035
|
-
|
|
10036
|
-
function strcmp(aStr1, aStr2) {
|
|
10037
|
-
var s1 = aStr1 || "";
|
|
10038
|
-
var s2 = aStr2 || "";
|
|
10039
|
-
return (s1 > s2) - (s1 < s2);
|
|
10040
|
-
}
|
|
10017
|
+
stringRequire = function (systemRequire, exports, module, id, relId) {
|
|
10018
|
+
//Split the ID by a ! so that
|
|
10019
|
+
var index = id.indexOf('!'),
|
|
10020
|
+
originalId = id,
|
|
10021
|
+
prefix, plugin;
|
|
10041
10022
|
|
|
10042
|
-
|
|
10043
|
-
|
|
10044
|
-
*
|
|
10045
|
-
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
|
10046
|
-
* mappings with the same original source/line/column, but different generated
|
|
10047
|
-
* line and column the same. Useful when searching for a mapping with a
|
|
10048
|
-
* stubbed out mapping.
|
|
10049
|
-
*/
|
|
10050
|
-
function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
|
|
10051
|
-
var cmp;
|
|
10023
|
+
if (index === -1) {
|
|
10024
|
+
id = normalize(id, relId);
|
|
10052
10025
|
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10056
|
-
|
|
10026
|
+
//Straight module lookup. If it is one of the special dependencies,
|
|
10027
|
+
//deal with it, otherwise, delegate to node.
|
|
10028
|
+
if (id === 'require') {
|
|
10029
|
+
return makeRequire(systemRequire, exports, module, relId);
|
|
10030
|
+
} else if (id === 'exports') {
|
|
10031
|
+
return exports;
|
|
10032
|
+
} else if (id === 'module') {
|
|
10033
|
+
return module;
|
|
10034
|
+
} else if (loaderCache.hasOwnProperty(id)) {
|
|
10035
|
+
return loaderCache[id];
|
|
10036
|
+
} else if (defineCache[id]) {
|
|
10037
|
+
runFactory.apply(null, defineCache[id]);
|
|
10038
|
+
return loaderCache[id];
|
|
10039
|
+
} else {
|
|
10040
|
+
if(systemRequire) {
|
|
10041
|
+
return systemRequire(originalId);
|
|
10042
|
+
} else {
|
|
10043
|
+
throw new Error('No module with ID: ' + id);
|
|
10044
|
+
}
|
|
10045
|
+
}
|
|
10046
|
+
} else {
|
|
10047
|
+
//There is a plugin in play.
|
|
10048
|
+
prefix = id.substring(0, index);
|
|
10049
|
+
id = id.substring(index + 1, id.length);
|
|
10057
10050
|
|
|
10058
|
-
|
|
10059
|
-
if (cmp) {
|
|
10060
|
-
return cmp;
|
|
10061
|
-
}
|
|
10051
|
+
plugin = stringRequire(systemRequire, exports, module, prefix, relId);
|
|
10062
10052
|
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10053
|
+
if (plugin.normalize) {
|
|
10054
|
+
id = plugin.normalize(id, makeNormalize(relId));
|
|
10055
|
+
} else {
|
|
10056
|
+
//Normalize the ID normally.
|
|
10057
|
+
id = normalize(id, relId);
|
|
10058
|
+
}
|
|
10067
10059
|
|
|
10068
|
-
|
|
10069
|
-
|
|
10070
|
-
|
|
10071
|
-
|
|
10060
|
+
if (loaderCache[id]) {
|
|
10061
|
+
return loaderCache[id];
|
|
10062
|
+
} else {
|
|
10063
|
+
plugin.load(id, makeRequire(systemRequire, exports, module, relId), makeLoad(id), {});
|
|
10072
10064
|
|
|
10073
|
-
|
|
10074
|
-
|
|
10075
|
-
|
|
10076
|
-
}
|
|
10065
|
+
return loaderCache[id];
|
|
10066
|
+
}
|
|
10067
|
+
}
|
|
10068
|
+
};
|
|
10077
10069
|
|
|
10078
|
-
|
|
10079
|
-
|
|
10080
|
-
|
|
10070
|
+
//Create a define function specific to the module asking for amdefine.
|
|
10071
|
+
function define(id, deps, factory) {
|
|
10072
|
+
if (Array.isArray(id)) {
|
|
10073
|
+
factory = deps;
|
|
10074
|
+
deps = id;
|
|
10075
|
+
id = undefined;
|
|
10076
|
+
} else if (typeof id !== 'string') {
|
|
10077
|
+
factory = id;
|
|
10078
|
+
id = deps = undefined;
|
|
10079
|
+
}
|
|
10081
10080
|
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
* Optionally pass in `true` as `onlyCompareGenerated` to consider two
|
|
10087
|
-
* mappings with the same generated line and column, but different
|
|
10088
|
-
* source/name/original line and column the same. Useful when searching for a
|
|
10089
|
-
* mapping with a stubbed out mapping.
|
|
10090
|
-
*/
|
|
10091
|
-
function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) {
|
|
10092
|
-
var cmp;
|
|
10081
|
+
if (deps && !Array.isArray(deps)) {
|
|
10082
|
+
factory = deps;
|
|
10083
|
+
deps = undefined;
|
|
10084
|
+
}
|
|
10093
10085
|
|
|
10094
|
-
|
|
10095
|
-
|
|
10096
|
-
|
|
10097
|
-
}
|
|
10086
|
+
if (!deps) {
|
|
10087
|
+
deps = ['require', 'exports', 'module'];
|
|
10088
|
+
}
|
|
10098
10089
|
|
|
10099
|
-
|
|
10100
|
-
|
|
10101
|
-
|
|
10090
|
+
//Set up properties for this module. If an ID, then use
|
|
10091
|
+
//internal cache. If no ID, then use the external variables
|
|
10092
|
+
//for this node module.
|
|
10093
|
+
if (id) {
|
|
10094
|
+
//Put the module in deep freeze until there is a
|
|
10095
|
+
//require call for it.
|
|
10096
|
+
defineCache[id] = [id, deps, factory];
|
|
10097
|
+
} else {
|
|
10098
|
+
runFactory(id, deps, factory);
|
|
10099
|
+
}
|
|
10102
10100
|
}
|
|
10103
10101
|
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10102
|
+
//define.require, which has access to all the values in the
|
|
10103
|
+
//cache. Useful for AMD modules that all have IDs in the file,
|
|
10104
|
+
//but need to finally export a value to node based on one of those
|
|
10105
|
+
//IDs.
|
|
10106
|
+
define.require = function (id) {
|
|
10107
|
+
if (loaderCache[id]) {
|
|
10108
|
+
return loaderCache[id];
|
|
10109
|
+
}
|
|
10108
10110
|
|
|
10109
|
-
|
|
10110
|
-
|
|
10111
|
-
|
|
10112
|
-
|
|
10111
|
+
if (defineCache[id]) {
|
|
10112
|
+
runFactory.apply(null, defineCache[id]);
|
|
10113
|
+
return loaderCache[id];
|
|
10114
|
+
}
|
|
10115
|
+
};
|
|
10113
10116
|
|
|
10114
|
-
|
|
10115
|
-
if (cmp) {
|
|
10116
|
-
return cmp;
|
|
10117
|
-
}
|
|
10117
|
+
define.amd = {};
|
|
10118
10118
|
|
|
10119
|
-
return
|
|
10120
|
-
|
|
10121
|
-
exports.compareByGeneratedPositions = compareByGeneratedPositions;
|
|
10119
|
+
return define;
|
|
10120
|
+
}
|
|
10122
10121
|
|
|
10123
|
-
|
|
10122
|
+
module.exports = amdefine;
|
|
10124
10123
|
|
|
10125
|
-
},
|
|
10124
|
+
}).call(this,_dereq_("FWaASH"),"/../node_modules/jstransform/node_modules/source-map/node_modules/amdefine/amdefine.js")
|
|
10125
|
+
},{"FWaASH":5,"path":4}],18:[function(_dereq_,module,exports){
|
|
10126
10126
|
/**
|
|
10127
10127
|
* Copyright 2013 Facebook, Inc.
|
|
10128
10128
|
*
|
|
@@ -10465,7 +10465,7 @@ function transform(visitors, source, options) {
|
|
|
10465
10465
|
|
|
10466
10466
|
exports.transform = transform;
|
|
10467
10467
|
|
|
10468
|
-
},{"./utils":20,"esprima-fb":
|
|
10468
|
+
},{"./utils":20,"esprima-fb":6,"source-map":8}],20:[function(_dereq_,module,exports){
|
|
10469
10469
|
/**
|
|
10470
10470
|
* Copyright 2013 Facebook, Inc.
|
|
10471
10471
|
*
|
|
@@ -11072,7 +11072,7 @@ exports.analyzeAndTraverse = analyzeAndTraverse;
|
|
|
11072
11072
|
exports.getOrderedChildren = getOrderedChildren;
|
|
11073
11073
|
exports.getNodeSourceText = getNodeSourceText;
|
|
11074
11074
|
|
|
11075
|
-
},{"./docblock":18,"esprima-fb":
|
|
11075
|
+
},{"./docblock":18,"esprima-fb":6}],21:[function(_dereq_,module,exports){
|
|
11076
11076
|
/**
|
|
11077
11077
|
* Copyright 2013 Facebook, Inc.
|
|
11078
11078
|
*
|
|
@@ -11225,7 +11225,7 @@ exports.visitorList = [
|
|
|
11225
11225
|
];
|
|
11226
11226
|
|
|
11227
11227
|
|
|
11228
|
-
},{"../src/utils":20,"./es6-destructuring-visitors":23,"./es6-rest-param-visitors":26,"esprima-fb":
|
|
11228
|
+
},{"../src/utils":20,"./es6-destructuring-visitors":23,"./es6-rest-param-visitors":26,"esprima-fb":6}],22:[function(_dereq_,module,exports){
|
|
11229
11229
|
/**
|
|
11230
11230
|
* Copyright 2013 Facebook, Inc.
|
|
11231
11231
|
*
|
|
@@ -11767,7 +11767,7 @@ exports.visitorList = [
|
|
|
11767
11767
|
visitSuperMemberExpression
|
|
11768
11768
|
];
|
|
11769
11769
|
|
|
11770
|
-
},{"../src/utils":20,"base62":
|
|
11770
|
+
},{"../src/utils":20,"base62":7,"esprima-fb":6}],23:[function(_dereq_,module,exports){
|
|
11771
11771
|
/**
|
|
11772
11772
|
* Copyright 2014 Facebook, Inc.
|
|
11773
11773
|
*
|
|
@@ -12035,7 +12035,7 @@ exports.visitorList = [
|
|
|
12035
12035
|
exports.renderDestructuredComponents = renderDestructuredComponents;
|
|
12036
12036
|
|
|
12037
12037
|
|
|
12038
|
-
},{"../src/utils":20,"./es6-rest-param-visitors":26,"esprima-fb":
|
|
12038
|
+
},{"../src/utils":20,"./es6-rest-param-visitors":26,"esprima-fb":6}],24:[function(_dereq_,module,exports){
|
|
12039
12039
|
/**
|
|
12040
12040
|
* Copyright 2013 Facebook, Inc.
|
|
12041
12041
|
*
|
|
@@ -12089,7 +12089,7 @@ exports.visitorList = [
|
|
|
12089
12089
|
visitObjectConciseMethod
|
|
12090
12090
|
];
|
|
12091
12091
|
|
|
12092
|
-
},{"../src/utils":20,"esprima-fb":
|
|
12092
|
+
},{"../src/utils":20,"esprima-fb":6}],25:[function(_dereq_,module,exports){
|
|
12093
12093
|
/**
|
|
12094
12094
|
* Copyright 2013 Facebook, Inc.
|
|
12095
12095
|
*
|
|
@@ -12144,7 +12144,7 @@ exports.visitorList = [
|
|
|
12144
12144
|
];
|
|
12145
12145
|
|
|
12146
12146
|
|
|
12147
|
-
},{"../src/utils":20,"esprima-fb":
|
|
12147
|
+
},{"../src/utils":20,"esprima-fb":6}],26:[function(_dereq_,module,exports){
|
|
12148
12148
|
/**
|
|
12149
12149
|
* Copyright 2013 Facebook, Inc.
|
|
12150
12150
|
*
|
|
@@ -12243,7 +12243,7 @@ exports.visitorList = [
|
|
|
12243
12243
|
visitFunctionBodyWithRestParam
|
|
12244
12244
|
];
|
|
12245
12245
|
|
|
12246
|
-
},{"../src/utils":20,"esprima-fb":
|
|
12246
|
+
},{"../src/utils":20,"esprima-fb":6}],27:[function(_dereq_,module,exports){
|
|
12247
12247
|
/**
|
|
12248
12248
|
* Copyright 2013 Facebook, Inc.
|
|
12249
12249
|
*
|
|
@@ -12401,7 +12401,7 @@ exports.visitorList = [
|
|
|
12401
12401
|
visitTaggedTemplateExpression
|
|
12402
12402
|
];
|
|
12403
12403
|
|
|
12404
|
-
},{"../src/utils":20,"esprima-fb":
|
|
12404
|
+
},{"../src/utils":20,"esprima-fb":6}],28:[function(_dereq_,module,exports){
|
|
12405
12405
|
/**
|
|
12406
12406
|
* Copyright 2013-2014 Facebook, Inc.
|
|
12407
12407
|
*
|
|
@@ -12729,7 +12729,7 @@ module.exports = {
|
|
|
12729
12729
|
exec: exec
|
|
12730
12730
|
};
|
|
12731
12731
|
|
|
12732
|
-
},{"./fbtransform/visitors":32,"buffer":
|
|
12732
|
+
},{"./fbtransform/visitors":32,"buffer":1,"jstransform":19,"jstransform/src/docblock":18}],29:[function(_dereq_,module,exports){
|
|
12733
12733
|
/**
|
|
12734
12734
|
* Copyright 2013-2014 Facebook, Inc.
|
|
12735
12735
|
*
|
|
@@ -13019,7 +13019,7 @@ exports.visitorList = [
|
|
|
13019
13019
|
visitReactTag
|
|
13020
13020
|
];
|
|
13021
13021
|
|
|
13022
|
-
},{"./xjs":31,"esprima-fb":
|
|
13022
|
+
},{"./xjs":31,"esprima-fb":6,"jstransform/src/utils":20}],30:[function(_dereq_,module,exports){
|
|
13023
13023
|
/**
|
|
13024
13024
|
* Copyright 2013-2014 Facebook, Inc.
|
|
13025
13025
|
*
|
|
@@ -13128,7 +13128,7 @@ exports.visitorList = [
|
|
|
13128
13128
|
visitReactDisplayName
|
|
13129
13129
|
];
|
|
13130
13130
|
|
|
13131
|
-
},{"esprima-fb":
|
|
13131
|
+
},{"esprima-fb":6,"jstransform/src/utils":20}],31:[function(_dereq_,module,exports){
|
|
13132
13132
|
/**
|
|
13133
13133
|
* Copyright 2013-2014 Facebook, Inc.
|
|
13134
13134
|
*
|
|
@@ -13383,10 +13383,11 @@ exports.renderXJSLiteral = renderXJSLiteral;
|
|
|
13383
13383
|
exports.quoteAttrName = quoteAttrName;
|
|
13384
13384
|
exports.trimLeft = trimLeft;
|
|
13385
13385
|
|
|
13386
|
-
},{"esprima-fb":
|
|
13386
|
+
},{"esprima-fb":6,"jstransform/src/utils":20}],32:[function(_dereq_,module,exports){
|
|
13387
13387
|
/*global exports:true*/
|
|
13388
13388
|
var es6ArrowFunctions = _dereq_('jstransform/visitors/es6-arrow-function-visitors');
|
|
13389
13389
|
var es6Classes = _dereq_('jstransform/visitors/es6-class-visitors');
|
|
13390
|
+
var es6Destructuring = _dereq_('jstransform/visitors/es6-destructuring-visitors');
|
|
13390
13391
|
var es6ObjectConciseMethod = _dereq_('jstransform/visitors/es6-object-concise-method-visitors');
|
|
13391
13392
|
var es6ObjectShortNotation = _dereq_('jstransform/visitors/es6-object-short-notation-visitors');
|
|
13392
13393
|
var es6RestParameters = _dereq_('jstransform/visitors/es6-rest-param-visitors');
|
|
@@ -13400,6 +13401,7 @@ var reactDisplayName = _dereq_('./transforms/reactDisplayName');
|
|
|
13400
13401
|
var transformVisitors = {
|
|
13401
13402
|
'es6-arrow-functions': es6ArrowFunctions.visitorList,
|
|
13402
13403
|
'es6-classes': es6Classes.visitorList,
|
|
13404
|
+
'es6-destructuring': es6Destructuring.visitorList,
|
|
13403
13405
|
'es6-object-concise-method': es6ObjectConciseMethod.visitorList,
|
|
13404
13406
|
'es6-object-short-notation': es6ObjectShortNotation.visitorList,
|
|
13405
13407
|
'es6-rest-params': es6RestParameters.visitorList,
|
|
@@ -13417,6 +13419,7 @@ var transformRunOrder = [
|
|
|
13417
13419
|
'es6-classes',
|
|
13418
13420
|
'es6-rest-params',
|
|
13419
13421
|
'es6-templates',
|
|
13422
|
+
'es6-destructuring',
|
|
13420
13423
|
'react'
|
|
13421
13424
|
];
|
|
13422
13425
|
|
|
@@ -13440,6 +13443,6 @@ function getAllVisitors(excludes) {
|
|
|
13440
13443
|
exports.getAllVisitors = getAllVisitors;
|
|
13441
13444
|
exports.transformVisitors = transformVisitors;
|
|
13442
13445
|
|
|
13443
|
-
},{"./transforms/react":29,"./transforms/reactDisplayName":30,"jstransform/visitors/es6-arrow-function-visitors":21,"jstransform/visitors/es6-class-visitors":22,"jstransform/visitors/es6-object-concise-method-visitors":24,"jstransform/visitors/es6-object-short-notation-visitors":25,"jstransform/visitors/es6-rest-param-visitors":26,"jstransform/visitors/es6-template-visitors":27}]},{},[28])
|
|
13446
|
+
},{"./transforms/react":29,"./transforms/reactDisplayName":30,"jstransform/visitors/es6-arrow-function-visitors":21,"jstransform/visitors/es6-class-visitors":22,"jstransform/visitors/es6-destructuring-visitors":23,"jstransform/visitors/es6-object-concise-method-visitors":24,"jstransform/visitors/es6-object-short-notation-visitors":25,"jstransform/visitors/es6-rest-param-visitors":26,"jstransform/visitors/es6-template-visitors":27}]},{},[28])
|
|
13444
13447
|
(28)
|
|
13445
13448
|
});
|