yves 1.0.85 → 1.0.86

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/lib/yves.js CHANGED
@@ -2,233 +2,227 @@
2
2
  // Yves - a customizable value inspector for Node.js
3
3
  //
4
4
  // usage:
5
- //
6
- // var inspect = require('yves').inspector({styles: {all: 'magenta'}});
5
+ // const yves = import from 'yves';
6
+ // const inspect = yves.inspector({styles: {all: 'magenta'}});
7
7
  // inspect(something); // inspect with the settings passed to `inspector`
8
8
  //
9
9
  // or
10
10
  //
11
- // var yves = require('yves');
11
+ // const yves = import from 'yves';
12
12
  // yves.inspect(something); // inspect with the default settings
13
13
  //
14
- function isItA(obj,A) {
14
+ function isItA( obj, A ) {
15
15
  try {
16
- return obj instanceof A;
17
- } catch (e) {
18
- return false; //
16
+ return obj instanceof A
17
+ } catch ( e ) {
18
+ return false //
19
19
  }
20
20
  }
21
21
 
22
- var sortobject = require('deep-sort-object');
23
- var supportsColor = require('supports-color')
24
- var debug = require('debug');
25
- var jsonc = require('jsonc');
26
- var stack = [];
27
-
28
- var verbose = false;
29
-
30
- // function isCyclic (obj) {
31
- // var seenObjects = [];
32
- // var mark = String(Math.random());
33
-
34
- // function detect (obj) {
35
- // if (typeOf(obj) === 'object') {
36
- // if (mark in obj) {
37
- // return false;
38
- // }
39
- // obj[mark] = true;
40
- // seenObjects.push(obj);
41
- // for (var key in obj) {
42
- // if (obj.hasOwnProperty && obj.hasOwnProperty(key) && !detect(obj[key])) {
43
- // return false;
44
- // }
45
- // }
46
- // }
47
- // return true;
48
- // }
49
-
50
- // var result = detect(obj);
51
-
52
- // for (var i = 0; i < seenObjects.length; ++i) {
53
- // delete seenObjects[i][mark];
54
- // }
55
-
56
- // return result;
57
- // }
58
-
59
- var yves = function() {
60
- var args=arguments;
61
- var rslt=[];
62
- if (args) for (var a in args) {
63
- rslt.push(yves.inspector({stream:null})(args[a]))
64
- }
65
- var log = (yves._console && yves._console.log)?yves._console.log:console.log
66
- log(rslt.join(' '))
67
- }
22
+ import sortobject from 'deep-sort-object'
23
+ import supportsColor from 'supports-color'
24
+ import debug from 'debug'
25
+ import jsonc from 'jsonc'
26
+ let stack = []
68
27
 
28
+ const verbose = false
29
+
30
+ const yves = function () {
31
+ const args = arguments
32
+ const rslt = []
33
+ if ( args )
34
+ for ( let a in args ) {
35
+ rslt.push( yves.inspector( { stream: null } )( args[a] ) )
36
+ }
37
+ const log =
38
+ yves._console && yves._console.log ? yves._console.log : console.log
39
+ log( rslt.join( ' ' ) )
40
+ }
69
41
 
70
- yves.supportsColors = function() {
71
- if ('YVES_COLORS' in process.env) {
72
- return true;
42
+ yves.supportsColors = function () {
43
+ if ( 'YVES_COLORS' in process.env ) {
44
+ return true
73
45
  }
74
46
 
75
- if (process.stdout && !process.stdout.isTTY) {
76
- return false;
47
+ if ( process.stdout && !process.stdout.isTTY ) {
48
+ return false
77
49
  }
78
50
 
79
- if (process.platform === 'win32') {
80
- return true;
51
+ if ( process.platform === 'win32' ) {
52
+ return true
81
53
  }
82
54
 
83
- if (process.env.TERM === 'dumb') {
84
- return false;
55
+ if ( process.env.TERM === 'dumb' ) {
56
+ return false
85
57
  }
86
58
 
87
- if (/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(process.env.TERM)) {
88
- return true;
59
+ if ( /^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test( process.env.TERM ) ) {
60
+ return true
89
61
  }
90
62
 
91
- return false;
63
+ return false
92
64
  }
93
65
 
94
-
95
-
96
66
  yves.defaults = {
97
- styles: { // Styles applied to stdout
98
- all: 'cyan', // Overall style applied to everything
99
- label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`
100
- other: 'inverted', // Objects which don't have a literal representation, such as functions
101
- key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`
102
- special: 'grey', // null, undefined...
103
- string: 'green',
104
- number: 'magenta',
105
- bool: 'blue', // true false
106
- regexp: 'green', // /\d+/
107
- },
108
- pretty: true, // Indent object literals
109
- indent: 4,
110
- hideFunctions: false,
111
- showHidden: false,
112
- sortKeys: false,
113
- stream: process && process.stdout,
114
- maxLength: -1,//2048, // Truncate output if longer
115
- colors: yves.supportsColors(),
116
- html: false,
117
- json: false,
118
- escape: true,
119
- functions: false,
120
- singleLineMax: 2,
121
- sorted: false,
122
- includes: null,
123
- excludes: null,
124
- obfuscate: null,
125
- decycle: true,
126
- trailingComma: true,
127
- templateStrings: true,
128
- };
129
-
130
- yves.options = function(opts) {
131
- yves.defaults = Object.assign({},yves.defaults,opts);// { ...yves.defaults, ...opts}
67
+ styles: {
68
+ // Styles applied to stdout
69
+ all: 'cyan', // Overall style applied to everything
70
+ label: 'underline', // Inspection labels, like 'array' in `array: [1, 2, 3]`
71
+ other: 'inverted', // Objects which don't have a literal representation, such as functions
72
+ key: 'bold', // The keys in object literals, like 'a' in `{a: 1}`
73
+ special: 'grey', // null, undefined...
74
+ string: 'green',
75
+ number: 'magenta',
76
+ bool: 'blue', // true false
77
+ regexp: 'green', // /\d+/
78
+ },
79
+ pretty: true, // Indent object literals
80
+ indent: 4,
81
+ hideFunctions: false,
82
+ showHidden: false,
83
+ sortKeys: false,
84
+ stream: process && process.stdout,
85
+ maxLength: -1, //2048, // Truncate output if longer
86
+ colors: yves.supportsColors(),
87
+ html: false,
88
+ json: false,
89
+ escape: true,
90
+ functions: false,
91
+ singleLineMax: 2,
92
+ sorted: false,
93
+ includes: null,
94
+ excludes: null,
95
+ obfuscate: null,
96
+ decycle: true,
97
+ trailingComma: true,
98
+ templateStrings: true,
99
+ }
100
+
101
+ yves.options = function ( opts ) {
102
+ yves.defaults = Object.assign( {}, yves.defaults, opts ) // { ...yves.defaults, ...opts}
132
103
  }
133
104
 
134
105
  function getCircularReplacer() {
135
- var seen = new WeakSet();
136
- return function(key, value) {
137
- if (typeof value === "object" && value !== null) {
138
- if (seen.has(value)) {
106
+ const seen = new WeakSet()
107
+ return function ( key, value ) {
108
+ if ( typeof value === 'object' && value !== null ) {
109
+ if ( seen.has( value ) ) {
139
110
  return
140
111
  }
141
- seen.add(value)
112
+ seen.add( value )
142
113
  }
143
- if (typeof value === "bigint" && value !== null) {
114
+ if ( typeof value === 'bigint' && value !== null ) {
144
115
  return value.toString()
145
116
  }
146
117
  return value
147
118
  }
148
119
  }
149
120
 
150
-
151
121
  // Return a curried inspect() function, with the `options` argument filled in.
152
- yves.inspector = function (options) {
153
- var that = this;
154
- return function (obj, label, opts) {
155
- var lmyopts = merge(yves.defaults || {},options || {}, opts || {});
156
- if (lmyopts.sorted && typeOf(obj) == 'object') {
157
- obj=sortobject(obj)
158
- }
159
- if (lmyopts.decycle) {
122
+ yves.inspector = function ( options ) {
123
+ const that = this
124
+ return function ( obj, label, opts ) {
125
+ const lmyopts = merge( yves.defaults || {}, options || {}, opts || {} )
126
+ if ( lmyopts.sorted && typeOf( obj ) == 'object' ) {
127
+ obj = sortobject( obj )
128
+ }
129
+ if ( lmyopts.decycle ) {
130
+ try {
131
+ JSON.stringify( obj, ( key, value ) =>
132
+ typeof value === 'bigint' ? value.toString() : value
133
+ )
134
+ } catch ( e ) {
135
+ if ( e.message === 'Converting circular structure to JSON' ) {
160
136
  try {
161
- JSON.stringify(obj,(key, value) => typeof value === 'bigint' ? value.toString() : value )
162
- } catch(e) {
163
- if (e.message === 'Converting circular structure to JSON') {
164
- try {
165
- obj = JSON.parse(JSON.stringify(obj, getCircularReplacer()))
166
- } catch(e) {
167
- return 'Error: ' + e.message
168
- }
169
- } else {
170
- return 'Error: ' + e.message
171
- }
137
+ obj = JSON.parse( JSON.stringify( obj, getCircularReplacer() ) )
138
+ } catch ( e ) {
139
+ return 'Error: ' + e.message
172
140
  }
173
- }
174
- var myopts=merge(options || {}, opts || {});
175
- var result=that.inspect.call(that, obj, label, myopts);
176
- if (myopts.html && !myopts.stream) {
177
- return '<pre class="yves" style="padding:8px;background-color: black;color: white;overflow: auto;border-radius: 6px;'+((myopts && myopts.styles && myopts.styles.all)?('color:'+myopts.styles.all+';'):'')+'">'+result+'</pre>';
178
141
  } else {
179
- return result;
142
+ return 'Error: ' + e.message
180
143
  }
181
- };
182
- };
183
-
184
- yves.debugger = function(namespace, options) {
185
- if (!namespace && !options) {
186
- return debug;
187
- } else if (!options) {
188
- var deb = debug(namespace);
189
- deb.log = (yves._console && yves._console.log)?yves._console.log.bind(console):console.log.bind(console);
190
- if (typeof window != 'undefined' && window.document) {
191
- if (!window.debug) window.debug = deb;
192
- } else {
193
- if (typeof process != 'undefined') {
194
- if (!global.debug) global.debug = deb;
195
144
  }
196
145
  }
197
- return deb;
198
- } else {
199
- debug.formatters[namespace] = function(y) {
200
- return yves.inspector()(y, null, Object.assign(options,{ stream: null }))
146
+ const myopts = merge( options || {}, opts || {} )
147
+ const result = that.inspect.call( that, obj, label, myopts )
148
+ if ( myopts.html && !myopts.stream ) {
149
+ return (
150
+ '<pre class="yves" style="padding:8px;background-color: black;color: white;overflow: auto;border-radius: 6px;' +
151
+ ( myopts && myopts.styles && myopts.styles.all
152
+ ? 'color:' + myopts.styles.all + ';'
153
+ : '' ) +
154
+ '">' +
155
+ result +
156
+ '</pre>'
157
+ )
158
+ } else {
159
+ return result
201
160
  }
202
161
  }
203
162
  }
204
163
 
205
- if (!debug.formatters.y) debug.formatters.y = function(y) {
206
- return yves.inspector()(y, null, { stream: null })
164
+ yves.debugger = function ( namespace, options ) {
165
+ if ( !namespace && !options ) {
166
+ return debug
167
+ } else if ( !options ) {
168
+ const deb = debug( namespace )
169
+ deb.log =
170
+ yves._console && yves._console.log
171
+ ? yves._console.log.bind( console )
172
+ : console.log.bind( console )
173
+ if ( typeof window != 'undefined' && window.document ) { // eslint-disable-line no-undef
174
+ if ( !window.debug ) window.debug = deb // eslint-disable-line no-undef
175
+ } else {
176
+ if ( typeof process != 'undefined' ) {
177
+ if ( !global.debug ) global.debug = deb
178
+ }
179
+ }
180
+ return deb
181
+ } else {
182
+ debug.formatters[namespace] = function ( y ) {
183
+ return yves.inspector()(
184
+ y,
185
+ null,
186
+ Object.assign( options, { stream: null } )
187
+ )
188
+ }
189
+ }
207
190
  }
208
191
 
209
- yves.debugger('y',{ stream: null });
210
- yves.debugger('Y',{stream: null, sortKeys: true, hideFunctions: true, singleLineMax: 0 });
192
+ if ( !debug.formatters.y )
193
+ debug.formatters.y = function ( y ) {
194
+ return yves.inspector()( y, null, { stream: null } )
195
+ }
211
196
 
212
- yves._console = null;
213
- yves._console_namespace = '';
214
- yves.console = function(namespace) {
215
- if (!namespace) namespace='';
216
- if (namespace.length && namespace[namespace.length-1]!=':') namespace+=':'
197
+ yves.debugger( 'y', { stream: null } )
198
+ yves.debugger( 'Y', {
199
+ stream: null,
200
+ sortKeys: true,
201
+ hideFunctions: true,
202
+ singleLineMax: 0,
203
+ } )
204
+
205
+ yves._console = null
206
+ yves._console_namespace = ''
207
+ yves.console = function ( namespace ) {
208
+ if ( !namespace ) namespace = ''
209
+ if ( namespace.length && namespace[namespace.length - 1] != ':' )
210
+ namespace += ':'
217
211
  yves._console_namespace = namespace
218
212
 
219
- yves.debugLog = yves.debugger(yves._console_namespace+'console:log')
220
- yves.debugInfo = yves.debugger(yves._console_namespace+'console:info')
221
- yves.debugWarn = yves.debugger(yves._console_namespace+'console:warn')
222
- yves.debugError = yves.debugger(yves._console_namespace+'console:error')
223
- yves.debugDir = yves.debugger(yves._console_namespace+'console:dir')
213
+ yves.debugLog = yves.debugger( yves._console_namespace + 'console:log' )
214
+ yves.debugInfo = yves.debugger( yves._console_namespace + 'console:info' )
215
+ yves.debugWarn = yves.debugger( yves._console_namespace + 'console:warn' )
216
+ yves.debugError = yves.debugger( yves._console_namespace + 'console:error' )
217
+ yves.debugDir = yves.debugger( yves._console_namespace + 'console:dir' )
224
218
 
225
- yves.console_setup();
219
+ yves.console_setup()
226
220
  yves.console_set()
227
221
  }
228
222
 
229
- yves.console_setup = function() {
230
- if (!yves._console) {
231
- yves._console={
223
+ yves.console_setup = function () {
224
+ if ( !yves._console ) {
225
+ yves._console = {
232
226
  log: console.log,
233
227
  info: console.info,
234
228
  warn: console.warn,
@@ -240,39 +234,78 @@ yves.console_setup = function() {
240
234
 
241
235
  yves.debugLog = null
242
236
  yves.logLevel = 0
243
- yves.log = function() {
244
- var result
245
- result=Function.prototype.apply.call(yves.debugLog?yves.debugLog:(yves._console.log?yves._console.log:console.log),yves,arguments);
237
+ yves.log = function () {
238
+ const result = Function.prototype.apply.call(
239
+ yves.debugLog
240
+ ? yves.debugLog
241
+ : yves._console.log
242
+ ? yves._console.log
243
+ : console.log,
244
+ yves,
245
+ arguments
246
+ )
246
247
  return result
247
248
  }
248
249
 
249
250
  yves.debugInfo = null
250
- yves.info = function() {
251
- var result=Function.prototype.apply.call(yves.debugInfo?yves.debugInfo:(yves._console.info?yves._console.info:console.info),yves,arguments);
251
+ yves.info = function () {
252
+ const result = Function.prototype.apply.call(
253
+ yves.debugInfo
254
+ ? yves.debugInfo
255
+ : yves._console.info
256
+ ? yves._console.info
257
+ : console.info,
258
+ yves,
259
+ arguments
260
+ )
252
261
  return result
253
262
  }
254
263
 
255
264
  yves.debugWarn = null
256
- yves.warn = function() {
257
- var result=Function.prototype.apply.call(yves.debugWarn?yves.debugWarn:(yves._console.warn?yves._console.warn:console.warn),yves,arguments);
265
+ yves.warn = function () {
266
+ const result = Function.prototype.apply.call(
267
+ yves.debugWarn
268
+ ? yves.debugWarn
269
+ : yves._console.warn
270
+ ? yves._console.warn
271
+ : console.warn,
272
+ yves,
273
+ arguments
274
+ )
258
275
  return result
259
276
  }
260
277
 
261
278
  yves.debugError = null
262
- yves.error = function() {
263
- var result=Function.prototype.apply.call(yves.debugError?yves.debugError:(yves._console.error?yves._console.error:console.error),yves,arguments);
279
+ yves.error = function () {
280
+ const result = Function.prototype.apply.call(
281
+ yves.debugError
282
+ ? yves.debugError
283
+ : yves._console.error
284
+ ? yves._console.error
285
+ : console.error,
286
+ yves,
287
+ arguments
288
+ )
264
289
  return result
265
290
  }
266
291
 
267
292
  yves.debugDir = null
268
- yves.dir = function() {
269
- var args=['%y']
270
- for (var a in arguments) args.push(arguments[a])
271
- var result=Function.prototype.apply.call(yves.debugDir?yves.debugDir:(yves._console.dir?yves._console.dir:console.dir),yves,args);
293
+ yves.dir = function () {
294
+ const args = [ '%y' ]
295
+ for ( let a in arguments ) args.push( arguments[a] )
296
+ const result = Function.prototype.apply.call(
297
+ yves.debugDir
298
+ ? yves.debugDir
299
+ : yves._console.dir
300
+ ? yves._console.dir
301
+ : console.dir,
302
+ yves,
303
+ args
304
+ )
272
305
  return result
273
306
  }
274
307
 
275
- yves.console_set = function() {
308
+ yves.console_set = function () {
276
309
  console.log = yves.log
277
310
  console.info = yves.info
278
311
  console.warn = yves.warn
@@ -280,29 +313,29 @@ yves.console_set = function() {
280
313
  console.dir = yves.dir
281
314
  }
282
315
 
283
- yves.console_unset = function() {
284
- if (yves._console) {
285
- if (yves._console.log) console.log = yves._console.log
286
- if (yves._console.info) console.info = yves._console.info
287
- if (yves._console.warn) console.warn = yves._console.warn
288
- if (yves._console.error) console.error = yves._console.error
289
- if (yves._console.dir) console.dir = yves._console.dir
316
+ yves.console_unset = function () {
317
+ if ( yves._console ) {
318
+ if ( yves._console.log ) console.log = yves._console.log
319
+ if ( yves._console.info ) console.info = yves._console.info
320
+ if ( yves._console.warn ) console.warn = yves._console.warn
321
+ if ( yves._console.error ) console.error = yves._console.error
322
+ if ( yves._console.dir ) console.dir = yves._console.dir
290
323
  }
291
324
  }
292
325
 
293
- seenObjects = []
326
+ let seenObjects = []
294
327
  // If we have a `stream` defined, use it to print a styled string,
295
328
  // if not, we just return the stringified object.
296
- yves.inspect = function (obj, label, options) {
297
- const str = jsonc.stringify(obj)
298
- if (str) {
299
- obj = jsonc.parse(str)
300
- }
301
- options = merge(this.defaults, options || {});
302
- stack = [];
303
- seenObjects = []
304
- return this.print(stringify(obj, options), label, options);
305
- };
329
+ yves.inspect = function ( obj, label, options ) {
330
+ const str = jsonc.stringify( obj )
331
+ if ( str ) {
332
+ obj = jsonc.parse( str )
333
+ }
334
+ options = merge( this.defaults, options || {} )
335
+ stack = []
336
+ seenObjects = []
337
+ return this.print( stringify( obj, options ), label, options )
338
+ }
306
339
 
307
340
  // Output using the 'stream', and an optional label
308
341
  // Loop through `str`, and truncate it after `options.maxLength` has been reached.
@@ -311,340 +344,517 @@ yves.inspect = function (obj, label, options) {
311
344
  // in a useful way, without separating what is an escape sequence,
312
345
  // versus a printable character (`c`). So we resort to counting the
313
346
  // length manually.
314
- yves.print = function (str, label, options) {
315
- if (options && !options.html) {
316
- if (str) for (var c = 0, i = 0; i < str.length; i++) {
317
- if (str.charAt(i) === '\x1b') { i += 4 } // `4` because '\x1b[25m'.length + 1 == 5
318
- else if (c === options.maxLength) {
319
- str = str.slice(0, i - 1) + '…';
320
- break;
321
- } else { c++ }
347
+ yves.print = function ( str, label, options ) {
348
+ if ( options && !options.html ) {
349
+ if ( str )
350
+ for ( let c = 0, i = 0; i < str.length; i++ ) {
351
+ if ( str.charAt( i ) === '\x1b' ) {
352
+ i += 4
353
+ } // `4` because '\x1b[25m'.length + 1 == 5
354
+ else if ( c === options.maxLength ) {
355
+ str = str.slice( 0, i - 1 ) + '…'
356
+ break
357
+ } else {
358
+ c++
322
359
  }
323
- }
324
- if (options && options.stream) {
325
- return options.stream.write.call(options.stream, (label ?
326
- this.stylize(label, options && options.styles && options.styles.label, options) + ': ' : '') +
327
- this.stylize(str, options && options.styles && options.styles.all, options) + (options.html?'':(options.colors?'\x1b[0m':'')) + "\n");
328
- } else {
329
- return (label ?
330
- this.stylize(label, options && options.styles && options.styles.label, options) + ': ' : '') +
331
- this.stylize(str, options && options.styles && options.styles.all, options) + (options && options.html?'':(options && options.colors?'\x1b[0m':'')) ;
332
- }
333
- };
360
+ }
361
+ }
362
+ if ( options && options.stream ) {
363
+ return options.stream.write.call(
364
+ options.stream,
365
+ ( label
366
+ ? this.stylize(
367
+ label,
368
+ options && options.styles && options.styles.label,
369
+ options
370
+ ) + ': '
371
+ : '' ) +
372
+ this.stylize(
373
+ str,
374
+ options && options.styles && options.styles.all,
375
+ options
376
+ ) +
377
+ ( options.html ? '' : options.colors ? '\x1b[0m' : '' ) +
378
+ '\n'
379
+ )
380
+ } else {
381
+ return (
382
+ ( label
383
+ ? this.stylize(
384
+ label,
385
+ options && options.styles && options.styles.label,
386
+ options
387
+ ) + ': '
388
+ : '' ) +
389
+ this.stylize(
390
+ str,
391
+ options && options.styles && options.styles.all,
392
+ options
393
+ ) +
394
+ ( options && options.html
395
+ ? ''
396
+ : options && options.colors
397
+ ? '\x1b[0m'
398
+ : '' )
399
+ )
400
+ }
401
+ }
334
402
 
335
403
  // Apply a style to a string, eventually,
336
404
  // I'd like this to support passing multiple
337
405
  // styles.
338
- yves.stylize = function (str, style, options) {
339
- if (options && options.colors) {
340
- if (options.html) {
341
- var codes = {
342
- 'bold' : 'font-weight:bold',
343
- 'underline' : 'text-decoration: underline',
344
- };
345
- if (style) {
346
- if (codes[style]) {
347
- return '<span style="'+style+'">'+str+'</span>';
348
- } else {
349
- return '<span style="color:'+style+'">'+str+'</span>';
350
- }
351
- } else {
352
- return str;
353
- }
406
+ yves.stylize = function ( str, style, options ) {
407
+ if ( options && options.colors ) {
408
+ if ( options.html ) {
409
+ let codes = {
410
+ bold: 'font-weight:bold',
411
+ underline: 'text-decoration: underline',
412
+ }
413
+ if ( style ) {
414
+ if ( codes[style] ) {
415
+ return '<span style="' + style + '">' + str + '</span>'
354
416
  } else {
355
- var codes = {
356
- 'bold' : [1, 22],
357
- 'underline' : [4, 24],
358
- 'inverse' : [7, 27],
359
- 'cyan' : [36, 39],
360
- 'magenta' : [35, 39],
361
- 'blue' : [34, 39],
362
- 'yellow' : [33, 39],
363
- 'green' : [32, 39],
364
- 'red' : [31, 39],
365
- 'grey' : [90, 39]
366
- }, endCode;
367
-
368
- if (style && codes[style]) {
369
- endCode = (codes[style][1] === 39 && options && options.styles && options.styles.all) ? codes[options.styles.all][0]
370
- : codes[style][1];
371
- return '\x1b[' + codes[style][0] + 'm' + str +
372
- '\x1b[' + endCode + 'm';
373
- } else { return str }
417
+ return '<span style="color:' + style + '">' + str + '</span>'
374
418
  }
419
+ } else {
420
+ return str
421
+ }
375
422
  } else {
376
- return str;
423
+ let codes = {
424
+ bold: [ 1, 22 ],
425
+ underline: [ 4, 24 ],
426
+ inverse: [ 7, 27 ],
427
+ cyan: [ 36, 39 ],
428
+ magenta: [ 35, 39 ],
429
+ blue: [ 34, 39 ],
430
+ yellow: [ 33, 39 ],
431
+ green: [ 32, 39 ],
432
+ red: [ 31, 39 ],
433
+ grey: [ 90, 39 ],
434
+ },
435
+ endCode
436
+
437
+ if ( style && codes[style] ) {
438
+ endCode =
439
+ codes[style][1] === 39 &&
440
+ options &&
441
+ options.styles &&
442
+ options.styles.all
443
+ ? codes[options.styles.all][0]
444
+ : codes[style][1]
445
+ return '\x1b[' + codes[style][0] + 'm' + str + '\x1b[' + endCode + 'm'
446
+ } else {
447
+ return str
448
+ }
377
449
  }
378
- };
450
+ } else {
451
+ return str
452
+ }
453
+ }
379
454
 
380
455
  // Convert any object to a string, ready for output.
381
456
  // When an 'array' or an 'object' are encountered, they are
382
457
  // passed to specialized functions, which can then recursively call
383
458
  // stringify().
384
- function stringify(obj, options) {
385
- var that = this;
386
- var stylize = function (str, style) {
387
- return yves.stylize(str, options && options.styles && options.styles[style], options)
388
- }
389
- var index
390
- var result;
459
+ function stringify( obj, options ) {
460
+ const that = this
461
+ const stylize = function ( str, style ) {
462
+ return yves.stylize(
463
+ str,
464
+ options && options.styles && options.styles[style],
465
+ options
466
+ )
467
+ }
468
+ let index
469
+ let result
391
470
 
392
- if ((index = stack.indexOf(obj)) !== -1) {
393
- return stylize(new(Array)(stack.length - index + 1).join('.'), 'special');
471
+ if ( ( index = stack.indexOf( obj ) ) !== -1 ) {
472
+ return stylize( new Array( stack.length - index + 1 ).join( '.' ), 'special' )
473
+ }
474
+ stack.push( obj )
475
+
476
+ result = ( function ( obj ) {
477
+ switch ( typeOf( obj ) ) {
478
+ case 'string': {
479
+ if (
480
+ options &&
481
+ options.templateStrings &&
482
+ !options.json &&
483
+ obj.match( /[\r\n\t\u0001-\u001F]/ ) // eslint-disable-line no-control-regex
484
+ ) {
485
+ obj = '`' + obj.replace( /`/g, '\\`' ) + '`'
486
+ } else {
487
+ obj = stringifyString(
488
+ obj.indexOf( '\'' ) === -1 && !( options && options.json )
489
+ ? '\'' + obj.replace( /'/g, '\\\'' ) + '\''
490
+ : '"' + obj.replace( /"/g, '\\"' ) + '"',
491
+ options
492
+ )
493
+ }
494
+ return stylize( obj, 'string' )
394
495
  }
395
- stack.push(obj);
396
-
397
-
398
- result = (function (obj) {
399
- switch (typeOf(obj)) {
400
- case "string" : {
401
- if (options && options.templateStrings && !options.json && obj.match(/[\r\n\t\u0001-\u001F]/)) {
402
- obj = ("`" + obj.replace(/`/g,"\\`") + "`");
403
- } else {
404
- obj = stringifyString((obj.indexOf("'") === -1 && !(options && options.json))? ("'" + obj.replace(/'/g,"\\'") + "'") : ('"' + obj.replace(/"/g,'\\"') + '"'),options);
405
- }
406
- return stylize(obj, 'string');
407
- }
408
- case "buffer" : return stringifyBuffer(obj, options, stack.length);
409
- case "regexp" : return stylize(obj.toString(), 'regexp');
410
- case "number" : return stylize(obj + '', 'number');
411
- case "bigint" : return stylize(obj + 'n', 'number');
412
- case "function" : return options && options.stream ? stylize(options.functions?obj.toString():"Function", 'other') : '[Function]';
413
- case "null" : return stylize("null", 'special');
414
- case "undefined": return stylize("undefined", 'special');
415
- case "boolean" : return stylize(obj + '', 'bool');
416
- case "date" : return stylize('new Date("'+obj.toISOString()+'")','date');
417
- case "array" : return stringifyArray(obj, options, stack.length);
418
- case "object" : return stringifyObject(obj, options, stack.length);
419
- }
420
- })(obj);
496
+ case 'buffer':
497
+ return stringifyBuffer( obj, options, stack.length )
498
+ case 'regexp':
499
+ return stylize( obj.toString(), 'regexp' )
500
+ case 'number':
501
+ return stylize( obj + '', 'number' )
502
+ case 'bigint':
503
+ return stylize( obj + 'n', 'number' )
504
+ case 'function':
505
+ return options && options.stream
506
+ ? stylize( options.functions ? obj.toString() : 'Function', 'other' )
507
+ : '[Function]'
508
+ case 'null':
509
+ return stylize( 'null', 'special' )
510
+ case 'undefined':
511
+ return stylize( 'undefined', 'special' )
512
+ case 'boolean':
513
+ return stylize( obj + '', 'bool' )
514
+ case 'date':
515
+ return stylize( 'new Date("' + obj.toISOString() + '")', 'date' )
516
+ case 'array':
517
+ return stringifyArray( obj, options, stack.length )
518
+ case 'object':
519
+ return stringifyObject( obj, options, stack.length )
520
+ }
521
+ } )( obj )
421
522
 
422
- stack.pop();
523
+ stack.pop()
423
524
 
424
- return result;
425
- };
525
+ return result
526
+ }
426
527
 
427
- function stringifyBuffer(obj, options, length) {
428
- if (seenObjects.indexOf(obj) !== -1) {
429
- return stringify(`[Circular]`)
528
+ function stringifyBuffer( obj, options, length ) {
529
+ if ( seenObjects.indexOf( obj ) !== -1 ) {
530
+ return stringify( '[Circular]' )
430
531
  }
431
- seenObjects.push(obj);
532
+ seenObjects.push( obj )
432
533
  return obj.inspect()
433
534
  }
434
535
 
435
- function htmlspecialchars (string, quote_style, charset, double_encode) {
436
- var optTemp = 0,
437
- i = 0,
438
- noquotes = false;
439
- if (typeof quote_style === 'undefined' || quote_style === null) {
440
- quote_style = 2;
441
- }
442
- string = string.toString();
443
- if (double_encode !== false) {
444
- string = string.replace(/&/g, '&amp;');
445
- }
446
- string = string.replace(/</g, '&lt;').replace(/>/g, '&gt;');
447
- var OPTS = {
448
- 'ENT_NOQUOTES': 0,
449
- 'ENT_HTML_QUOTE_SINGLE': 1,
450
- 'ENT_HTML_QUOTE_DOUBLE': 2,
451
- 'ENT_COMPAT': 2,
452
- 'ENT_QUOTES': 3,
453
- 'ENT_IGNORE': 4
454
- };
455
- if (quote_style === 0) {
456
- noquotes = true;
457
- }
458
- if (typeof quote_style !== 'number') {
459
- quote_style = [].concat(quote_style);
460
- for (var i = 0; i < quote_style.length; i++) {
461
- if (OPTS[quote_style[i]] === 0) {
462
- noquotes = true;
463
- }
464
- else if (OPTS[quote_style[i]]) {
465
- optTemp = optTemp | OPTS[quote_style[i]];
466
- }
467
- }
468
- quote_style = optTemp;
469
- }
470
- if (quote_style & OPTS.ENT_HTML_QUOTE_SINGLE) {
471
- string = string.replace(/'/g, '&#039;');
472
- }
473
- if (!noquotes) {
474
- string = string.replace(/"/g, '&quot;');
536
+ function htmlspecialchars( string, quote_style, charset, double_encode ) {
537
+ let optTemp = 0,
538
+ i = 0,
539
+ noquotes = false
540
+ if ( typeof quote_style === 'undefined' || quote_style === null ) {
541
+ quote_style = 2
542
+ }
543
+ string = string.toString()
544
+ if ( double_encode !== false ) {
545
+ string = string.replace( /&/g, '&amp;' )
546
+ }
547
+ string = string.replace( /</g, '&lt;' ).replace( />/g, '&gt;' )
548
+ const OPTS = {
549
+ ENT_NOQUOTES: 0,
550
+ ENT_HTML_QUOTE_SINGLE: 1,
551
+ ENT_HTML_QUOTE_DOUBLE: 2,
552
+ ENT_COMPAT: 2,
553
+ ENT_QUOTES: 3,
554
+ ENT_IGNORE: 4,
555
+ }
556
+ if ( quote_style === 0 ) {
557
+ noquotes = true
558
+ }
559
+ if ( typeof quote_style !== 'number' ) {
560
+ quote_style = [].concat( quote_style )
561
+ for ( let i = 0; i < quote_style.length; i++ ) {
562
+ if ( OPTS[quote_style[i]] === 0 ) {
563
+ noquotes = true
564
+ } else if ( OPTS[quote_style[i]] ) {
565
+ optTemp = optTemp | OPTS[quote_style[i]]
566
+ }
475
567
  }
476
- return string;
568
+ quote_style = optTemp
569
+ }
570
+ if ( quote_style & OPTS.ENT_HTML_QUOTE_SINGLE ) {
571
+ string = string.replace( /'/g, '&#039;' )
572
+ }
573
+ if ( !noquotes ) {
574
+ string = string.replace( /"/g, '&quot;' )
575
+ }
576
+ return string
477
577
  }
478
578
 
479
579
  // Escape invisible characters in a string
480
- function stringifyString (str, options) {
481
- var result;
482
- if (options && options.escape) {
483
- result=str.replace(/\r/g, '\\r').replace(/\n/g, '\\n').replace(/\t/g, '\\t').replace(/[\u0001-\u001F]/g, function (match) {
484
- return '\\x' + match[0].charCodeAt(0).toString(16);
485
- });
486
- if (options && options.html) {
487
- result=htmlspecialchars(result);
488
- }
489
- } else {
490
- result=str;
491
- }
492
-
493
- // Truncate the string if a maximum length is configured
494
- var truncate = options && options.hasOwnProperty('maxStringLength') && options.maxStringLength >= 0;
495
- if(truncate && options && result.length > options.maxStringLength) {
496
- var length = Math.min(result.length, options.maxStringLength - 3);
497
- result = result.substr(0, length) + "...";
580
+ function stringifyString( str, options ) {
581
+ let result
582
+ if ( options && options.escape ) {
583
+ result = str
584
+ .replace( /\r/g, '\\r' )
585
+ .replace( /\n/g, '\\n' )
586
+ .replace( /\t/g, '\\t' )
587
+ .replace( /[\u0001-\u001F]/g, function ( match ) { // eslint-disable-line no-control-regex
588
+ return '\\x' + match[0].charCodeAt( 0 ).toString( 16 )
589
+ } )
590
+ if ( options && options.html ) {
591
+ result = htmlspecialchars( result )
498
592
  }
593
+ } else {
594
+ result = str
595
+ }
596
+
597
+ // Truncate the string if a maximum length is configured
598
+
599
+ const truncate =
600
+ options &&
601
+ Object.prototype.hasOwnProperty.call( options, 'maxStringLength' ) &&
602
+ options.maxStringLength >= 0
603
+ if ( truncate && options && result.length > options.maxStringLength ) {
604
+ const length = Math.min( result.length, options.maxStringLength - 3 )
605
+ result = result.substr( 0, length ) + '...'
606
+ }
499
607
 
500
- return result;
608
+ return result
501
609
  }
502
610
 
503
611
  // Convert an array to a string, such as [1, 2, 3].
504
612
  // This function calls stringify() for each of the elements
505
613
  // in the array.
506
- function stringifyArray(ary, options, level) {
507
- if (seenObjects.indexOf(ary) !== -1) {
508
- return stringify(`[Circular]`)
614
+ function stringifyArray( ary, options, level ) {
615
+ if ( seenObjects.indexOf( ary ) !== -1 ) {
616
+ return stringify( '[Circular]' )
617
+ }
618
+ seenObjects.push( ary )
619
+
620
+ const out = []
621
+ const pretty =
622
+ options &&
623
+ options.pretty &&
624
+ ( ary.length > 4 ||
625
+ ary.some( function ( o ) {
626
+ return (
627
+ ( o !== null && typeof o === 'object' && Object.keys( o ).length > 0 ) ||
628
+ ( Array.isArray( o ) && o.length > 0 )
629
+ )
630
+ } ) )
631
+ const ws = pretty
632
+ ? '\n' + new Array( level * options.indent + 1 ).join( ' ' )
633
+ : ' '
634
+
635
+ const truncate =
636
+ options &&
637
+ Object.prototype.hasOwnProperty.call( options, 'maxArrayLength' ) &&
638
+ options.maxArrayLength >= 0
639
+
640
+ const length = truncate
641
+ ? Math.min( ary.length, options && options.maxArrayLength )
642
+ : ary.length
643
+ for ( let i = 0; i < length; i++ ) {
644
+ out.push( stringify( ary[i], options ) )
509
645
  }
510
- seenObjects.push(ary);
511
-
512
- var out = [];
513
- var pretty = options && options.pretty && (ary.length > 4 || ary.some(function (o) {
514
- return (o !== null && typeof(o) === 'object' && Object.keys(o).length > 0) ||
515
- (Array.isArray(o) && o.length > 0);
516
- }));
517
- var ws = pretty ? '\n' + new(Array)(level * options.indent + 1).join(' ') : ' ';
518
-
519
- var truncate = options && options.hasOwnProperty('maxArrayLength') && options.maxArrayLength >= 0;
520
-
521
- var length = truncate ? Math.min(ary.length, options && options.maxArrayLength) : ary.length;
522
- for (var i = 0; i < length; i++) {
523
- out.push(stringify(ary[i], options));
524
- }
525
646
 
526
- // Add a special String if the array was truncated
527
- if(length < ary.length) {
528
- out.push('<<truncated>>');
529
- }
647
+ // Add a special String if the array was truncated
648
+ if ( length < ary.length ) {
649
+ out.push( '<<truncated>>' )
650
+ }
530
651
 
531
- if (out.length === 0) {
532
- return '[]';
533
- } else {
534
- return '[' + ws
535
- + out.join(',' + (pretty ? ws : ' '))+ (((options && (options.json || !options.trailingComma)) || !pretty)?'':',')
536
- + (pretty ? ws.slice(0, -1*options.indent) : ws) +
537
- ']';
538
- }
539
- };
652
+ if ( out.length === 0 ) {
653
+ return '[]'
654
+ } else {
655
+ return (
656
+ '[' +
657
+ ws +
658
+ out.join( ',' + ( pretty ? ws : ' ' ) ) +
659
+ ( ( options && ( options.json || !options.trailingComma ) ) || !pretty
660
+ ? ''
661
+ : ',' ) +
662
+ ( pretty ? ws.slice( 0, -1 * options.indent ) : ws ) +
663
+ ']'
664
+ )
665
+ }
666
+ }
540
667
 
541
- var quote_reserved_words = function(word) {
542
- var reserved_words=['abstract', 'else', 'instanceof', 'switch', 'boolean', 'enum', 'int', 'synchronized', 'break', 'export', 'interface', 'this', 'byte', 'extends', 'long', 'throw', 'case', 'false', 'native', 'throws', 'catch', 'final', 'new', 'transient', 'char', 'finally', 'null', 'true', 'class', 'float', 'package', 'try', 'const', 'for', 'private', 'typeof', 'continue', 'function', 'protected', 'var', 'debugger', 'goto', 'public', 'void', 'default', 'if', 'return', 'volatile', 'delete', 'implements', 'short', 'while', 'do', 'import', 'static', 'with', 'double', 'in', 'super'];
668
+ const quote_reserved_words = ( function ( word ) {
669
+ const reserved_words = [
670
+ 'abstract',
671
+ 'else',
672
+ 'instanceof',
673
+ 'switch',
674
+ 'boolean',
675
+ 'enum',
676
+ 'int',
677
+ 'synchronized',
678
+ 'break',
679
+ 'export',
680
+ 'interface',
681
+ 'this',
682
+ 'byte',
683
+ 'extends',
684
+ 'long',
685
+ 'throw',
686
+ 'case',
687
+ 'false',
688
+ 'native',
689
+ 'throws',
690
+ 'catch',
691
+ 'final',
692
+ 'new',
693
+ 'transient',
694
+ 'char',
695
+ 'finally',
696
+ 'null',
697
+ 'true',
698
+ 'class',
699
+ 'float',
700
+ 'package',
701
+ 'try',
702
+ 'const',
703
+ 'for',
704
+ 'private',
705
+ 'typeof',
706
+ 'continue',
707
+ 'function',
708
+ 'protected',
709
+ 'var',
710
+ 'debugger',
711
+ 'goto',
712
+ 'public',
713
+ 'void',
714
+ 'default',
715
+ 'if',
716
+ 'return',
717
+ 'volatile',
718
+ 'delete',
719
+ 'implements',
720
+ 'short',
721
+ 'while',
722
+ 'do',
723
+ 'import',
724
+ 'static',
725
+ 'with',
726
+ 'double',
727
+ 'in',
728
+ 'super',
729
+ ]
543
730
 
544
731
  // According to ES6 + Unicode 7.0.0
545
- var regexIdentifierNameES6 = /^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])*$/
732
+ const regexIdentifierNameES6 =
733
+ /^(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D])(?:[$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF])*$/ // eslint-disable-line no-misleading-character-class
546
734
  // According to ES5 + Unicode 7.0.0
547
- var regexIdentifierNameES5 = /^(?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])(?:[\$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])*$/
548
- var regexES3ReservedWord = /^(?:do|if|in|for|int|new|try|var|byte|case|char|else|enum|goto|long|null|this|true|void|with|break|catch|class|const|false|final|float|short|super|throw|while|delete|double|export|import|native|public|return|static|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/
735
+ const regexIdentifierNameES5 =
736
+ /^(?:[$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])(?:[$0-9A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC])*$/ // eslint-disable-line no-misleading-character-class
737
+ const regexES3ReservedWord =
738
+ /^(?:do|if|in|for|int|new|try|var|byte|case|char|else|enum|goto|long|null|this|true|void|with|break|catch|class|const|false|final|float|short|super|throw|while|delete|double|export|import|native|public|return|static|switch|throws|typeof|boolean|default|extends|finally|package|private|abstract|continue|debugger|function|volatile|interface|protected|transient|implements|instanceof|synchronized)$/
549
739
  // Zero-width characters that are allowed in IdentifierPart as per ES5, but not in ES3
550
- var regexZeroWidth = /\u200c|\u200d/
551
- var regexNumber = /^(?![+-])([0-9a-fA-FxX\+\-\.]+)$/
552
- var regexSpecialCharacters = /['\\]/g
553
- var regexOctalLiteral = /^0[0-7]+$/
740
+ const regexZeroWidth = /\u200c|\u200d/
741
+ const regexNumber = /^(?![+-])([0-9a-fA-FxX+-.]+)$/
742
+ const regexSpecialCharacters = /['\\]/g
743
+ const regexOctalLiteral = /^0[0-7]+$/
554
744
  // https://mathiasbynens.be/notes/javascript-escapes#unicode
555
- var regexUnicodeEscape = /\\u([a-fA-F0-9]{4})/g
745
+ const regexUnicodeEscape = /\\u([a-fA-F0-9]{4})/g
556
746
  // https://mathiasbynens.be/notes/localstorage-pattern
557
747
 
558
- function isNumericLiteral(string, number) {
559
- // Consider: empty string, `2e2`, `010`, ` 010` (leading space), `1.23`, `.23`, `+1`, `-0`, etc.
560
- return regexNumber.test(string) && !isNaN(number);
561
- }
562
-
563
- return function(word) {
564
- var value = word;
565
-
566
- var valueAsNumber = Number(value); // Number('010') returns 10, not 8 :'(
567
- // Both Unicode escapes and Unicode code point escapes are allowed.
568
- // Note: the replacement must happen in a single `replace` call.
569
- var valueAsUnescapedString = value.replace(/\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]{1,})\}/g, function($0, $1, $2) {
570
- var codePoint = parseInt($2 || $1, 16);
571
- // If it’s a surrogate…
572
- if (codePoint >= 0xD800 && codePoint <= 0xDFFF) {
573
- // Return a character that is never valid in an identifier.
574
- // This prevents the surrogate from pairing with another.
575
- return '\0';
576
- }
577
- return String.fromCodePoint(codePoint);
578
- });
579
- var es5Warning = !regexIdentifierNameES5.test(
580
- // Only Unicode escapes are allowed in ES5 identifiers.
581
- value.replace(/\\u([a-fA-F0-9]{4})/g, function($0, $1) {
582
- return String.fromCodePoint(parseInt($1, 16));
583
- })
584
- );
585
- var isIdentifierNameES6 = regexIdentifierNameES6.test(valueAsUnescapedString);
586
- var needsQuotes = true;
587
- var needsBrackets = true;
588
- var es3Warning = false;
589
- var quotedValue;
590
- if (isIdentifierNameES6) {
591
- es3Warning = needsQuotes = es5Warning || regexES3ReservedWord.test(valueAsUnescapedString) || regexZeroWidth.test(valueAsUnescapedString);
592
- needsQuotes && (quotedValue = '\'' + value + '\'');
593
- needsBrackets = false;
594
- } else if (isNumericLiteral(value, valueAsNumber)) {
595
- if (regexOctalLiteral.test(value)) {
596
- // parse octal literals, e.g. `010`
597
- valueAsNumber = parseInt(value, 8);
598
- }
599
- needsQuotes = false;
600
- quotedValue = '\'' + valueAsNumber + '\'';
601
- } else {
602
- quotedValue = '\'' + value.replace(regexSpecialCharacters, '\\$&') + '\'';
603
- }
604
-
605
- if (needsQuotes) {
606
- return quotedValue;
748
+ function isNumericLiteral( string, number ) {
749
+ // Consider: empty string, `2e2`, `010`, ` 010` (leading space), `1.23`, `.23`, `+1`, `-0`, etc.
750
+ return regexNumber.test( string ) && !isNaN( number )
751
+ }
752
+
753
+ return function ( word ) {
754
+ const value = word
755
+
756
+ let valueAsNumber = Number( value ) // Number('010') returns 10, not 8 :'(
757
+ // Both Unicode escapes and Unicode code point escapes are allowed.
758
+ // Note: the replacement must happen in a single `replace` call.
759
+ const valueAsUnescapedString = value.replace(
760
+ /\\u([a-fA-F0-9]{4})|\\u\{([0-9a-fA-F]{1,})\}/g,
761
+ function ( $0, $1, $2 ) {
762
+ const codePoint = parseInt( $2 || $1, 16 )
763
+ // If it’s a surrogate…
764
+ if ( codePoint >= 0xd800 && codePoint <= 0xdfff ) {
765
+ // Return a character that is never valid in an identifier.
766
+ // This prevents the surrogate from pairing with another.
767
+ return '\0'
768
+ }
769
+ return String.fromCodePoint( codePoint )
770
+ }
771
+ )
772
+ const es5Warning = !regexIdentifierNameES5.test(
773
+ // Only Unicode escapes are allowed in ES5 identifiers.
774
+ value.replace( /\\u([a-fA-F0-9]{4})/g, function ( $0, $1 ) {
775
+ return String.fromCodePoint( parseInt( $1, 16 ) )
776
+ } )
777
+ )
778
+ const isIdentifierNameES6 = regexIdentifierNameES6.test(
779
+ valueAsUnescapedString
780
+ )
781
+ let needsQuotes = true
782
+ let needsBrackets = true
783
+ let es3Warning = false
784
+ let quotedValue
785
+ if ( isIdentifierNameES6 ) {
786
+ es3Warning = needsQuotes =
787
+ es5Warning ||
788
+ regexES3ReservedWord.test( valueAsUnescapedString ) ||
789
+ regexZeroWidth.test( valueAsUnescapedString )
790
+ needsQuotes && ( quotedValue = '\'' + value + '\'' )
791
+ needsBrackets = false
792
+ } else if ( isNumericLiteral( value, valueAsNumber ) ) {
793
+ if ( regexOctalLiteral.test( value ) ) {
794
+ // parse octal literals, e.g. `010`
795
+ valueAsNumber = parseInt( value, 8 )
796
+ }
797
+ needsQuotes = false
798
+ quotedValue = '\'' + valueAsNumber + '\''
799
+ } else {
800
+ quotedValue = '\'' + value.replace( regexSpecialCharacters, '\\$&' ) + '\''
607
801
  }
608
802
 
803
+ if ( needsQuotes ) {
804
+ return quotedValue
805
+ }
609
806
 
610
- for (var i in reserved_words) {
611
- if (word === reserved_words[i]) {
612
- return "'" + word + "'";
613
- }
614
- }
615
- return word;
616
- }
617
- }();
618
-
619
- function yvesInclude(key,includes)
620
- {
621
- if (includes && includes.length) {
622
- for (var i in includes) {
623
- if (typeof includes[i] == 'string' && key === includes[i]) return true;
624
- if (typeof includes[i] == 'object' && isItA(includes[i],RegExp) && includes[i].test(key)) return true;
807
+ for ( let i in reserved_words ) {
808
+ if ( word === reserved_words[i] ) {
809
+ return '\'' + word + '\''
810
+ }
811
+ }
812
+ return word
813
+ }
814
+ } )()
815
+
816
+ function yvesInclude( key, includes ) {
817
+ if ( includes && includes.length ) {
818
+ for ( let i in includes ) {
819
+ if ( typeof includes[i] == 'string' && key === includes[i] ) return true
820
+ if (
821
+ typeof includes[i] == 'object' &&
822
+ isItA( includes[i], RegExp ) &&
823
+ includes[i].test( key )
824
+ )
825
+ return true
625
826
  }
626
827
  return false
627
828
  }
628
829
  return true
629
830
  }
630
831
 
631
- function yvesExclude(key,excludes)
632
- {
633
- if (excludes && excludes.length) {
634
- for (var i in excludes) {
635
- if (typeof excludes[i] == 'string' && key === excludes[i]) return true;
636
- if (typeof excludes[i] == 'object' && isItA(excludes[i],RegExp) && excludes[i].test(key)) return true;
832
+ function yvesExclude( key, excludes ) {
833
+ if ( excludes && excludes.length ) {
834
+ for ( let i in excludes ) {
835
+ if ( typeof excludes[i] == 'string' && key === excludes[i] ) return true
836
+ if (
837
+ typeof excludes[i] == 'object' &&
838
+ isItA( excludes[i], RegExp ) &&
839
+ excludes[i].test( key )
840
+ )
841
+ return true
637
842
  }
638
843
  }
639
844
  return false
640
845
  }
641
846
 
642
- function yvesObfuscate(key,obfuscates)
643
- {
644
- if (obfuscates && obfuscates.length) {
645
- for (var i in obfuscates) {
646
- if (typeof obfuscates[i] == 'string' && key === obfuscates[i]) return true;
647
- if (typeof obfuscates[i] == 'object' && isItA(obfuscates[i],RegExp) && obfuscates[i].test(key)) return true;
847
+ function yvesObfuscate( key, obfuscates ) {
848
+ if ( obfuscates && obfuscates.length ) {
849
+ for ( let i in obfuscates ) {
850
+ if ( typeof obfuscates[i] == 'string' && key === obfuscates[i] )
851
+ return true
852
+ if (
853
+ typeof obfuscates[i] == 'object' &&
854
+ isItA( obfuscates[i], RegExp ) &&
855
+ obfuscates[i].test( key )
856
+ )
857
+ return true
648
858
  }
649
859
  }
650
860
  return false
@@ -653,102 +863,168 @@ function yvesObfuscate(key,obfuscates)
653
863
  // Convert an object to a string, such as {a: 1}.
654
864
  // This function calls stringify() for each of its values,
655
865
  // and does not output functions or prototype values.
656
- function stringifyObject(obj, options, level) {
657
- if (seenObjects.indexOf(obj) !== -1) {
658
- return stringify(`[Circular]`)
659
- }
660
- seenObjects.push(obj);
661
-
662
- var clas = Object.prototype.toString.call(obj).slice(8, -1);
663
- var out = [];
664
- var pretty = options && options.pretty && (Object.keys(obj).length > options.singleLineMax ||
665
- Object.keys(obj).some(function (k) { return typeof(obj[k]) === 'object' }));
666
- var ws = pretty ? '\n' + new(Array)(level * options.indent + 1).join(' ') : ' ';
667
-
668
- var keys = options && options.showHidden ? Object.keys(obj) : Object.getOwnPropertyNames(obj);
669
- if (options && options.sortKeys) keys.sort();
670
-
671
- var truncate = options && options.hasOwnProperty('maxObjectKeys') && options.maxObjectKeys >= 0;
672
-
673
- // Slice the keys to the maximum length if they exceed the maxObjectKeys option
674
- var includeKeys = (truncate) ? keys.slice(0, options && options.maxObjectKeys) : keys;
675
- if (includeKeys) for (var ki in includeKeys) {
676
- var k = includeKeys[ki]
677
- // includeKeys.forEach(function (k) {
678
- if (!(level== 1 && options && options.exclude && ~options.exclude.indexOf(k))) {
679
- if (Object.prototype.hasOwnProperty.call(obj, k)
680
- && (!yvesExclude(k, options && options.excludes))
681
- && (yvesInclude(k, options && options.includes))
866
+ function stringifyObject( obj, options, level ) {
867
+ if ( seenObjects.indexOf( obj ) !== -1 ) {
868
+ return stringify( '[Circular]' )
869
+ }
870
+ seenObjects.push( obj )
871
+
872
+ const clas = Object.prototype.toString.call( obj ).slice( 8, -1 )
873
+ const out = []
874
+ const pretty =
875
+ options &&
876
+ options.pretty &&
877
+ ( Object.keys( obj ).length > options.singleLineMax ||
878
+ Object.keys( obj ).some( function ( k ) {
879
+ return typeof obj[k] === 'object'
880
+ } ) )
881
+ const ws = pretty
882
+ ? '\n' + new Array( level * options.indent + 1 ).join( ' ' )
883
+ : ' '
884
+
885
+ const keys =
886
+ options && options.showHidden
887
+ ? Object.keys( obj )
888
+ : Object.getOwnPropertyNames( obj )
889
+ if ( options && options.sortKeys ) keys.sort()
890
+
891
+ const truncate =
892
+ options &&
893
+ Object.prototype.hasOwnProperty.call( options, 'maxObjectKeys' ) &&
894
+ options.maxObjectKeys >= 0
895
+
896
+ // Slice the keys to the maximum length if they exceed the maxObjectKeys option
897
+ const includeKeys = truncate
898
+ ? keys.slice( 0, options && options.maxObjectKeys )
899
+ : keys
900
+ if ( includeKeys )
901
+ for ( let ki in includeKeys ) {
902
+ const k = includeKeys[ki]
903
+ // includeKeys.forEach(function (k) {
904
+ if (
905
+ !(
906
+ level == 1 &&
907
+ options &&
908
+ options.exclude &&
909
+ ~options.exclude.indexOf( k )
910
+ )
911
+ ) {
912
+ if (
913
+ Object.prototype.hasOwnProperty.call( obj, k ) &&
914
+ !yvesExclude( k, options && options.excludes ) &&
915
+ yvesInclude( k, options && options.includes ) &&
682
916
  // && (!options.obfuscate || !options.obfuscate.length || )
683
- && !(isItA(obj[k],Function) && options && options.hideFunctions)) {
684
- out.push((options && options.json?'"':'')+yves.stylize(options && options.json?k:quote_reserved_words(k), options && options.styles && options.styles.key, options) + (options && options.json?'"':'') + ': ' +
685
- stringify((yvesObfuscate(k,options && options.obfuscates)) ? '<<obfuscated>>' : obj[k], options));
686
- }
687
- }
917
+ !( isItA( obj[k], Function ) && options && options.hideFunctions )
918
+ ) {
919
+ out.push(
920
+ ( options && options.json ? '"' : '' ) +
921
+ yves.stylize(
922
+ options && options.json ? k : quote_reserved_words( k ),
923
+ options && options.styles && options.styles.key,
924
+ options
925
+ ) +
926
+ ( options && options.json ? '"' : '' ) +
927
+ ': ' +
928
+ stringify(
929
+ yvesObfuscate( k, options && options.obfuscates )
930
+ ? '<<obfuscated>>'
931
+ : obj[k],
932
+ options
933
+ )
934
+ )
935
+ }
936
+ }
688
937
  }
689
938
 
690
- // Append a special String if the Object was truncated
691
- if (includeKeys.length < keys.length) {
692
- out.push(yves.stylize('<<truncated>>', options && options.styles && options.styles.key, options && options.styles));
693
- }
939
+ // Append a special String if the Object was truncated
940
+ if ( includeKeys.length < keys.length ) {
941
+ out.push(
942
+ yves.stylize(
943
+ '<<truncated>>',
944
+ options && options.styles && options.styles.key,
945
+ options && options.styles
946
+ )
947
+ )
948
+ }
694
949
 
695
- if (out.length === 0) {
696
- return '{}';
697
- } else {
698
- return "{" + ws
699
- + out.join(',' + (pretty ? ws : ' ')) + ((options && (options.json || !options.trailingComma) || !pretty)?'':',')
700
- + (pretty ? ws.slice(0, -1*options.indent) : ws) +
701
- "}";
702
- }
703
- };
950
+ if ( out.length === 0 ) {
951
+ return '{}'
952
+ } else {
953
+ return (
954
+ '{' +
955
+ ws +
956
+ out.join( ',' + ( pretty ? ws : ' ' ) ) +
957
+ ( ( options && ( options.json || !options.trailingComma ) ) || !pretty
958
+ ? ''
959
+ : ',' ) +
960
+ ( pretty ? ws.slice( 0, -1 * options.indent ) : ws ) +
961
+ '}'
962
+ )
963
+ }
964
+ }
704
965
 
705
966
  // A better `typeof`
706
- function typeOf(value) {
707
- function isObject(x) {
708
- return x != null && (typeof x == "object" || typeof x == "function");
709
- }
710
- var s = typeof (value)
711
- var types = [Object, Array, String, RegExp, Number, Function, Boolean, Date, Buffer];
712
- if (s === 'object' || s === 'function') {
713
- if (value) {
714
- if (types) for (var ti in types) {
715
- var t = types[ti]
716
- if (value && isItA(value, t)) {
717
- s = t.name.toLowerCase()
967
+ function typeOf( value ) {
968
+ function isObject( x ) {
969
+ return x != null && ( typeof x == 'object' || typeof x == 'function' )
970
+ }
971
+ let s = typeof value
972
+ const types = [
973
+ Object,
974
+ Array,
975
+ String,
976
+ RegExp,
977
+ Number,
978
+ Function,
979
+ Boolean,
980
+ Date,
981
+ Buffer,
982
+ ]
983
+ if ( s === 'object' || s === 'function' ) {
984
+ if ( value ) {
985
+ if ( types )
986
+ for ( let ti in types ) {
987
+ const t = types[ti]
988
+ if ( value && isItA( value, t ) ) {
989
+ s = t.name.toLowerCase()
990
+ }
718
991
  }
719
- }
720
- } else { s = 'null' }
992
+ } else {
993
+ s = 'null'
994
+ }
721
995
  }
722
- return s;
996
+ return s
723
997
  }
724
998
 
725
- function merge(/* variable args */) {
726
- var objs = Array.prototype.slice.call(arguments);
727
- var target = {};
728
-
729
- if (objs) for (var oi in objs) {
730
- var o = objs[oi]
731
- var oks = Object.keys(o)
732
- if (oks) for (var oki in oks) {
733
- var k = oks[oki]
734
- if (typeof k === 'string') {
735
- if (k === 'styles') {
736
- if (!o.styles) {
737
- target.styles = false;
738
- } else {
739
- target.styles = {}
740
- for (var s in o.styles) {
741
- target.styles[s] = o.styles[s];
999
+ function merge( /* variable args */ ) {
1000
+ const objs = Array.prototype.slice.call( arguments )
1001
+ const target = {}
1002
+
1003
+ if ( objs )
1004
+ for ( let oi in objs ) {
1005
+ const o = objs[oi]
1006
+ const oks = Object.keys( o )
1007
+ if ( oks )
1008
+ for ( let oki in oks ) {
1009
+ const k = oks[oki]
1010
+ if ( typeof k === 'string' ) {
1011
+ if ( k === 'styles' ) {
1012
+ if ( !o.styles ) {
1013
+ target.styles = false
1014
+ } else {
1015
+ target.styles = {}
1016
+ for ( let s in o.styles ) {
1017
+ target.styles[s] = o.styles[s]
1018
+ }
1019
+ }
1020
+ } else {
1021
+ target[k] = o[k]
742
1022
  }
743
1023
  }
744
- } else {
745
- target[k] = o[k];
746
1024
  }
747
- }
748
1025
  }
749
- }
750
- return target;
1026
+ return target
751
1027
  }
752
1028
 
753
1029
  yves.typeOf = typeOf
754
- module.exports = yves;
1030
+ export default yves