OLD | NEW |
1 var core; | 1 var core; |
2 (function(exports) { | 2 (function(exports) { |
3 'use strict'; | 3 'use strict'; |
4 class Object { | 4 class Object { |
5 Object() { | 5 constructor() { |
6 var name = this.constructor.name; | 6 var name = this.constructor.name; |
7 var init = this[name]; | 7 var init = this[name]; |
8 var result = void 0; | 8 var result = void 0; |
9 if (init) | 9 if (init) |
10 result = init.apply(this, arguments); | 10 result = init.apply(this, arguments); |
11 return result === void 0 ? this : result; | 11 return result === void 0 ? this : result; |
12 } | 12 } |
13 ['=='](other) { | 13 ['=='](other) { |
14 return identical(this, other); | 14 return identical(this, other); |
15 } | 15 } |
(...skipping 24 matching lines...) Expand all Loading... |
40 } | 40 } |
41 let deprecated = new Deprecated("next release"); | 41 let deprecated = new Deprecated("next release"); |
42 let override = new _Override(); | 42 let override = new _Override(); |
43 class _Proxy extends Object { | 43 class _Proxy extends Object { |
44 _Proxy() { | 44 _Proxy() { |
45 } | 45 } |
46 } | 46 } |
47 let proxy = new _Proxy(); | 47 let proxy = new _Proxy(); |
48 class bool extends Object { | 48 class bool extends Object { |
49 bool$fromEnvironment(name, opt$) { | 49 bool$fromEnvironment(name, opt$) { |
50 let defaultValue = opt$.defaultValue === void 0 ? false : opt$.defaultValu
e; | 50 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : fa
lse; |
51 throw new UnsupportedError('bool.fromEnvironment can only be used as a con
st constructor'); | 51 throw new UnsupportedError('bool.fromEnvironment can only be used as a con
st constructor'); |
52 } | 52 } |
53 toString() { | 53 toString() { |
54 return this ? "true" : "false"; | 54 return this ? "true" : "false"; |
55 } | 55 } |
56 } | 56 } |
57 dart.defineNamedConstructor(bool, 'fromEnvironment'); | 57 dart.defineNamedConstructor(bool, 'fromEnvironment'); |
58 let Comparable$ = dart.generic(function(T) { | 58 let Comparable$ = dart.generic(function(T) { |
59 class Comparable extends Object { | 59 class Comparable extends Object { |
60 static compare(a, b) { | 60 static compare(a, b) { |
61 return a.compareTo(b); | 61 return a.compareTo(b); |
62 } | 62 } |
63 } | 63 } |
64 return Comparable; | 64 return Comparable; |
65 }); | 65 }); |
66 let Comparable = Comparable$(dart.dynamic); | 66 let Comparable = Comparable$(dart.dynamic); |
67 let _fourDigits = Symbol('_fourDigits'); | 67 let _fourDigits = dart.JsSymbol('_fourDigits'); |
68 let _sixDigits = Symbol('_sixDigits'); | 68 let _sixDigits = dart.JsSymbol('_sixDigits'); |
69 let _threeDigits = Symbol('_threeDigits'); | 69 let _threeDigits = dart.JsSymbol('_threeDigits'); |
70 let _twoDigits = Symbol('_twoDigits'); | 70 let _twoDigits = dart.JsSymbol('_twoDigits'); |
71 let _brokenDownDateToMillisecondsSinceEpoch = Symbol('_brokenDownDateToMillise
condsSinceEpoch'); | 71 let _brokenDownDateToMillisecondsSinceEpoch = dart.JsSymbol('_brokenDownDateTo
MillisecondsSinceEpoch'); |
72 class DateTime extends Object { | 72 class DateTime extends Object { |
73 DateTime(year, month, day, hour, minute, second, millisecond) { | 73 DateTime(year, month, day, hour, minute, second, millisecond) { |
74 if (month === void 0) | 74 if (month === void 0) |
75 month = 1; | 75 month = 1; |
76 if (day === void 0) | 76 if (day === void 0) |
77 day = 1; | 77 day = 1; |
78 if (hour === void 0) | 78 if (hour === void 0) |
79 hour = 0; | 79 hour = 0; |
80 if (minute === void 0) | 80 if (minute === void 0) |
81 minute = 0; | 81 minute = 0; |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 throw new FormatException("Time out of range", formattedString); | 147 throw new FormatException("Time out of range", formattedString); |
148 } | 148 } |
149 if (addOneMillisecond) | 149 if (addOneMillisecond) |
150 millisecondsSinceEpoch = dart.notNull(millisecondsSinceEpoch) + 1; | 150 millisecondsSinceEpoch = dart.notNull(millisecondsSinceEpoch) + 1; |
151 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, {
isUtc: isUtc}); | 151 return new DateTime.fromMillisecondsSinceEpoch(millisecondsSinceEpoch, {
isUtc: isUtc}); |
152 } else { | 152 } else { |
153 throw new FormatException("Invalid date format", formattedString); | 153 throw new FormatException("Invalid date format", formattedString); |
154 } | 154 } |
155 } | 155 } |
156 DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opt$) { | 156 DateTime$fromMillisecondsSinceEpoch(millisecondsSinceEpoch, opt$) { |
157 let isUtc = opt$.isUtc === void 0 ? false : opt$.isUtc; | 157 let isUtc = opt$ && 'isUtc' in opt$ ? opt$.isUtc : false; |
158 this.millisecondsSinceEpoch = millisecondsSinceEpoch; | 158 this.millisecondsSinceEpoch = millisecondsSinceEpoch; |
159 this.isUtc = isUtc; | 159 this.isUtc = isUtc; |
160 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MA
X_MILLISECONDS_SINCE_EPOCH)) { | 160 if (dart.notNull(millisecondsSinceEpoch.abs()) > dart.notNull(DateTime._MA
X_MILLISECONDS_SINCE_EPOCH)) { |
161 throw new ArgumentError(millisecondsSinceEpoch); | 161 throw new ArgumentError(millisecondsSinceEpoch); |
162 } | 162 } |
163 if (isUtc === null) | 163 if (isUtc === null) |
164 throw new ArgumentError(isUtc); | 164 throw new ArgumentError(isUtc); |
165 } | 165 } |
166 ['=='](other) { | 166 ['=='](other) { |
167 if (!dart.notNull(dart.is(other, DateTime))) | 167 if (!dart.notNull(dart.is(other, DateTime))) |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 DateTime.MAY = 5; | 332 DateTime.MAY = 5; |
333 DateTime.JUNE = 6; | 333 DateTime.JUNE = 6; |
334 DateTime.JULY = 7; | 334 DateTime.JULY = 7; |
335 DateTime.AUGUST = 8; | 335 DateTime.AUGUST = 8; |
336 DateTime.SEPTEMBER = 9; | 336 DateTime.SEPTEMBER = 9; |
337 DateTime.OCTOBER = 10; | 337 DateTime.OCTOBER = 10; |
338 DateTime.NOVEMBER = 11; | 338 DateTime.NOVEMBER = 11; |
339 DateTime.DECEMBER = 12; | 339 DateTime.DECEMBER = 12; |
340 DateTime.MONTHS_PER_YEAR = 12; | 340 DateTime.MONTHS_PER_YEAR = 12; |
341 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; | 341 DateTime._MAX_MILLISECONDS_SINCE_EPOCH = 8640000000000000; |
342 let _onParseErrorInt = Symbol('_onParseErrorInt'); | 342 let _onParseErrorInt = dart.JsSymbol('_onParseErrorInt'); |
343 let _onParseErrorDouble = Symbol('_onParseErrorDouble'); | 343 let _onParseErrorDouble = dart.JsSymbol('_onParseErrorDouble'); |
344 class num extends Object { | 344 class num extends Object { |
345 static parse(input, onError) { | 345 static parse(input, onError) { |
346 if (onError === void 0) | 346 if (onError === void 0) |
347 onError = null; | 347 onError = null; |
348 let source = input.trim(); | 348 let source = input.trim(); |
349 _parseError = false; | 349 _parseError = false; |
350 let result = int.parse(source, {onError: _onParseErrorInt}); | 350 let result = int.parse(source, {onError: _onParseErrorInt}); |
351 if (!dart.notNull(_parseError)) | 351 if (!dart.notNull(_parseError)) |
352 return result; | 352 return result; |
353 _parseError = false; | 353 _parseError = false; |
(...skipping 19 matching lines...) Expand all Loading... |
373 if (onError === void 0) | 373 if (onError === void 0) |
374 onError = null; | 374 onError = null; |
375 return _js_helper.Primitives.parseDouble(source, onError); | 375 return _js_helper.Primitives.parseDouble(source, onError); |
376 } | 376 } |
377 } | 377 } |
378 double.NAN = 0.0 / 0.0; | 378 double.NAN = 0.0 / 0.0; |
379 double.INFINITY = 1.0 / 0.0; | 379 double.INFINITY = 1.0 / 0.0; |
380 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY); | 380 double.NEGATIVE_INFINITY = -dart.notNull(double.INFINITY); |
381 double.MIN_POSITIVE = 5e-324; | 381 double.MIN_POSITIVE = 5e-324; |
382 double.MAX_FINITE = 1.7976931348623157e+308; | 382 double.MAX_FINITE = 1.7976931348623157e+308; |
383 let _duration = Symbol('_duration'); | 383 let _duration = dart.JsSymbol('_duration'); |
384 class Duration extends Object { | 384 class Duration extends Object { |
385 Duration(opt$) { | 385 Duration(opt$) { |
386 let days = opt$.days === void 0 ? 0 : opt$.days; | 386 let days = opt$ && 'days' in opt$ ? opt$.days : 0; |
387 let hours = opt$.hours === void 0 ? 0 : opt$.hours; | 387 let hours = opt$ && 'hours' in opt$ ? opt$.hours : 0; |
388 let minutes = opt$.minutes === void 0 ? 0 : opt$.minutes; | 388 let minutes = opt$ && 'minutes' in opt$ ? opt$.minutes : 0; |
389 let seconds = opt$.seconds === void 0 ? 0 : opt$.seconds; | 389 let seconds = opt$ && 'seconds' in opt$ ? opt$.seconds : 0; |
390 let milliseconds = opt$.milliseconds === void 0 ? 0 : opt$.milliseconds; | 390 let milliseconds = opt$ && 'milliseconds' in opt$ ? opt$.milliseconds : 0; |
391 let microseconds = opt$.microseconds === void 0 ? 0 : opt$.microseconds; | 391 let microseconds = opt$ && 'microseconds' in opt$ ? opt$.microseconds : 0; |
392 this.Duration$_microseconds(dart.notNull(days) * dart.notNull(Duration.MIC
ROSECONDS_PER_DAY) + dart.notNull(hours) * dart.notNull(Duration.MICROSECONDS_PE
R_HOUR) + dart.notNull(minutes) * dart.notNull(Duration.MICROSECONDS_PER_MINUTE)
+ dart.notNull(seconds) * dart.notNull(Duration.MICROSECONDS_PER_SECOND) + dart
.notNull(milliseconds) * dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND) + d
art.notNull(microseconds)); | 392 this.Duration$_microseconds(dart.notNull(days) * dart.notNull(Duration.MIC
ROSECONDS_PER_DAY) + dart.notNull(hours) * dart.notNull(Duration.MICROSECONDS_PE
R_HOUR) + dart.notNull(minutes) * dart.notNull(Duration.MICROSECONDS_PER_MINUTE)
+ dart.notNull(seconds) * dart.notNull(Duration.MICROSECONDS_PER_SECOND) + dart
.notNull(milliseconds) * dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND) + d
art.notNull(microseconds)); |
393 } | 393 } |
394 Duration$_microseconds($_duration) { | 394 Duration$_microseconds($_duration) { |
395 this[_duration] = $_duration; | 395 this[_duration] = $_duration; |
396 } | 396 } |
397 ['+'](other) { | 397 ['+'](other) { |
398 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not
Null(other[_duration])); | 398 return new Duration._microseconds(dart.notNull(this[_duration]) + dart.not
Null(other[_duration])); |
399 } | 399 } |
400 ['-'](other) { | 400 ['-'](other) { |
401 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not
Null(other[_duration])); | 401 return new Duration._microseconds(dart.notNull(this[_duration]) - dart.not
Null(other[_duration])); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO
ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); | 498 Duration.MICROSECONDS_PER_MINUTE = dart.notNull(Duration.MICROSECONDS_PER_SECO
ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); |
499 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE
) * dart.notNull(Duration.MINUTES_PER_HOUR); | 499 Duration.MICROSECONDS_PER_HOUR = dart.notNull(Duration.MICROSECONDS_PER_MINUTE
) * dart.notNull(Duration.MINUTES_PER_HOUR); |
500 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) *
dart.notNull(Duration.HOURS_PER_DAY); | 500 Duration.MICROSECONDS_PER_DAY = dart.notNull(Duration.MICROSECONDS_PER_HOUR) *
dart.notNull(Duration.HOURS_PER_DAY); |
501 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO
ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); | 501 Duration.MILLISECONDS_PER_MINUTE = dart.notNull(Duration.MILLISECONDS_PER_SECO
ND) * dart.notNull(Duration.SECONDS_PER_MINUTE); |
502 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE
) * dart.notNull(Duration.MINUTES_PER_HOUR); | 502 Duration.MILLISECONDS_PER_HOUR = dart.notNull(Duration.MILLISECONDS_PER_MINUTE
) * dart.notNull(Duration.MINUTES_PER_HOUR); |
503 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) *
dart.notNull(Duration.HOURS_PER_DAY); | 503 Duration.MILLISECONDS_PER_DAY = dart.notNull(Duration.MILLISECONDS_PER_HOUR) *
dart.notNull(Duration.HOURS_PER_DAY); |
504 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n
otNull(Duration.MINUTES_PER_HOUR); | 504 Duration.SECONDS_PER_HOUR = dart.notNull(Duration.SECONDS_PER_MINUTE) * dart.n
otNull(Duration.MINUTES_PER_HOUR); |
505 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); | 505 Duration.SECONDS_PER_DAY = dart.notNull(Duration.SECONDS_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); |
506 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); | 506 Duration.MINUTES_PER_DAY = dart.notNull(Duration.MINUTES_PER_HOUR) * dart.notN
ull(Duration.HOURS_PER_DAY); |
507 Duration.ZERO = new Duration({seconds: 0}); | 507 Duration.ZERO = new Duration({seconds: 0}); |
508 let _stringToSafeString = Symbol('_stringToSafeString'); | 508 let _stringToSafeString = dart.JsSymbol('_stringToSafeString'); |
509 let _objectToString = Symbol('_objectToString'); | 509 let _objectToString = dart.JsSymbol('_objectToString'); |
510 class Error extends Object { | 510 class Error extends Object { |
511 Error() { | 511 Error() { |
512 } | 512 } |
513 static safeToString(object) { | 513 static safeToString(object) { |
514 if (dart.notNull(dart.is(object, num)) || dart.notNull(typeof object == bo
olean) || dart.notNull(null === object)) { | 514 if (dart.notNull(dart.is(object, num)) || dart.notNull(typeof object == bo
olean) || dart.notNull(null === object)) { |
515 return object.toString(); | 515 return object.toString(); |
516 } | 516 } |
517 if (typeof object == string) { | 517 if (typeof object == string) { |
518 return _stringToSafeString(object); | 518 return _stringToSafeString(object); |
519 } | 519 } |
(...skipping 13 matching lines...) Expand all Loading... |
533 } | 533 } |
534 class TypeError extends AssertionError { | 534 class TypeError extends AssertionError { |
535 } | 535 } |
536 class CastError extends Error { | 536 class CastError extends Error { |
537 } | 537 } |
538 class NullThrownError extends Error { | 538 class NullThrownError extends Error { |
539 toString() { | 539 toString() { |
540 return "Throw of null."; | 540 return "Throw of null."; |
541 } | 541 } |
542 } | 542 } |
543 let _hasValue = Symbol('_hasValue'); | 543 let _hasValue = dart.JsSymbol('_hasValue'); |
544 class ArgumentError extends Error { | 544 class ArgumentError extends Error { |
545 ArgumentError(message) { | 545 ArgumentError(message) { |
546 if (message === void 0) | 546 if (message === void 0) |
547 message = null; | 547 message = null; |
548 this.message = message; | 548 this.message = message; |
549 this.invalidValue = null; | 549 this.invalidValue = null; |
550 this[_hasValue] = false; | 550 this[_hasValue] = false; |
551 this.name = null; | 551 this.name = null; |
552 super.Error(); | 552 super.Error(); |
553 } | 553 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 explanation = "index must not be negative"; | 711 explanation = "index must not be negative"; |
712 } | 712 } |
713 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e
xplanation}`; | 713 return `RangeError: ${this.message} (${target}[${this.invalidValue}]): ${e
xplanation}`; |
714 } | 714 } |
715 } | 715 } |
716 class FallThroughError extends Error { | 716 class FallThroughError extends Error { |
717 FallThroughError() { | 717 FallThroughError() { |
718 super.Error(); | 718 super.Error(); |
719 } | 719 } |
720 } | 720 } |
721 let _className = Symbol('_className'); | 721 let _className = dart.JsSymbol('_className'); |
722 class AbstractClassInstantiationError extends Error { | 722 class AbstractClassInstantiationError extends Error { |
723 AbstractClassInstantiationError($_className) { | 723 AbstractClassInstantiationError($_className) { |
724 this[_className] = $_className; | 724 this[_className] = $_className; |
725 super.Error(); | 725 super.Error(); |
726 } | 726 } |
727 toString() { | 727 toString() { |
728 return `Cannot instantiate abstract class: '${this[_className]}'`; | 728 return `Cannot instantiate abstract class: '${this[_className]}'`; |
729 } | 729 } |
730 } | 730 } |
731 let _receiver = Symbol('_receiver'); | 731 let _receiver = dart.JsSymbol('_receiver'); |
732 let _memberName = Symbol('_memberName'); | 732 let _memberName = dart.JsSymbol('_memberName'); |
733 let _arguments = Symbol('_arguments'); | 733 let _arguments = dart.JsSymbol('_arguments'); |
734 let _namedArguments = Symbol('_namedArguments'); | 734 let _namedArguments = dart.JsSymbol('_namedArguments'); |
735 let _existingArgumentNames = Symbol('_existingArgumentNames'); | 735 let _existingArgumentNames = dart.JsSymbol('_existingArgumentNames'); |
736 class NoSuchMethodError extends Error { | 736 class NoSuchMethodError extends Error { |
737 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments,
existingArgumentNames) { | 737 NoSuchMethodError(receiver, memberName, positionalArguments, namedArguments,
existingArgumentNames) { |
738 if (existingArgumentNames === void 0) | 738 if (existingArgumentNames === void 0) |
739 existingArgumentNames = null; | 739 existingArgumentNames = null; |
740 this[_receiver] = receiver; | 740 this[_receiver] = receiver; |
741 this[_memberName] = memberName; | 741 this[_memberName] = memberName; |
742 this[_arguments] = positionalArguments; | 742 this[_arguments] = positionalArguments; |
743 this[_namedArguments] = namedArguments; | 743 this[_namedArguments] = namedArguments; |
744 this[_existingArgumentNames] = existingArgumentNames; | 744 this[_existingArgumentNames] = existingArgumentNames; |
745 super.Error(); | 745 super.Error(); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 return `${report}${prefix}${slice}${postfix}\n${String['*'](" ", markOffse
t)}^\n`; | 963 return `${report}${prefix}${slice}${postfix}\n${String['*'](" ", markOffse
t)}^\n`; |
964 } | 964 } |
965 } | 965 } |
966 class IntegerDivisionByZeroException extends Object { | 966 class IntegerDivisionByZeroException extends Object { |
967 IntegerDivisionByZeroException() { | 967 IntegerDivisionByZeroException() { |
968 } | 968 } |
969 toString() { | 969 toString() { |
970 return "IntegerDivisionByZeroException"; | 970 return "IntegerDivisionByZeroException"; |
971 } | 971 } |
972 } | 972 } |
973 let _getKey = Symbol('_getKey'); | 973 let _getKey = dart.JsSymbol('_getKey'); |
974 let Expando$ = dart.generic(function(T) { | 974 let Expando$ = dart.generic(function(T) { |
975 class Expando extends Object { | 975 class Expando extends Object { |
976 Expando(name) { | 976 Expando(name) { |
977 if (name === void 0) | 977 if (name === void 0) |
978 name = null; | 978 name = null; |
979 this.name = name; | 979 this.name = name; |
980 } | 980 } |
981 toString() { | 981 toString() { |
982 return `Expando:${this.name}`; | 982 return `Expando:${this.name}`; |
983 } | 983 } |
(...skipping 17 matching lines...) Expand all Loading... |
1001 } | 1001 } |
1002 return key; | 1002 return key; |
1003 } | 1003 } |
1004 } | 1004 } |
1005 Expando._KEY_PROPERTY_NAME = 'expando$key'; | 1005 Expando._KEY_PROPERTY_NAME = 'expando$key'; |
1006 Expando._EXPANDO_PROPERTY_NAME = 'expando$values'; | 1006 Expando._EXPANDO_PROPERTY_NAME = 'expando$values'; |
1007 Expando._keyCount = 0; | 1007 Expando._keyCount = 0; |
1008 return Expando; | 1008 return Expando; |
1009 }); | 1009 }); |
1010 let Expando = Expando$(dart.dynamic); | 1010 let Expando = Expando$(dart.dynamic); |
1011 let _toMangledNames = Symbol('_toMangledNames'); | 1011 let _toMangledNames = dart.JsSymbol('_toMangledNames'); |
1012 class Function extends Object { | 1012 class Function extends Object { |
1013 static apply(function, positionalArguments, namedArguments) { | 1013 static apply(f, positionalArguments, namedArguments) { |
1014 if (namedArguments === void 0) | 1014 if (namedArguments === void 0) |
1015 namedArguments = null; | 1015 namedArguments = null; |
1016 return _js_helper.Primitives.applyFunction(function, positionalArguments,
namedArguments === null ? null : _toMangledNames(namedArguments)); | 1016 return _js_helper.Primitives.applyFunction(f, positionalArguments, namedAr
guments === null ? null : _toMangledNames(namedArguments)); |
1017 } | 1017 } |
1018 static [_toMangledNames](namedArguments) { | 1018 static [_toMangledNames](namedArguments) { |
1019 let result = dart.as(dart.map(), Map$(String, dynamic)); | 1019 let result = dart.as(dart.map(), Map$(String, dynamic)); |
1020 namedArguments.forEach(dart.closureWrap((symbol, value) => { | 1020 namedArguments.forEach(dart.closureWrap((symbol, value) => { |
1021 result.set(_symbolToString(dart.as(symbol, Symbol)), value); | 1021 result.set(_symbolToString(dart.as(symbol, Symbol)), value); |
1022 }, "(Symbol, dynamic) → void")); | 1022 }, "(Symbol, dynamic) → void")); |
1023 return result; | 1023 return result; |
1024 } | 1024 } |
1025 } | 1025 } |
1026 // Function identical: (Object, Object) → bool | 1026 // Function identical: (Object, Object) → bool |
1027 function identical(a, b) { | 1027 function identical(a, b) { |
1028 return _js_helper.Primitives.identicalImplementation(a, b); | 1028 return _js_helper.Primitives.identicalImplementation(a, b); |
1029 } | 1029 } |
1030 // Function identityHashCode: (Object) → int | 1030 // Function identityHashCode: (Object) → int |
1031 function identityHashCode(object) { | 1031 function identityHashCode(object) { |
1032 return _js_helper.objectHashCode(object); | 1032 return _js_helper.objectHashCode(object); |
1033 } | 1033 } |
1034 class int extends num { | 1034 class int extends num { |
1035 int$fromEnvironment(name, opt$) { | 1035 int$fromEnvironment(name, opt$) { |
1036 let defaultValue = opt$.defaultValue === void 0 ? null : opt$.defaultValue
; | 1036 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : nu
ll; |
1037 throw new UnsupportedError('int.fromEnvironment can only be used as a cons
t constructor'); | 1037 throw new UnsupportedError('int.fromEnvironment can only be used as a cons
t constructor'); |
1038 } | 1038 } |
1039 static parse(source, opt$) { | 1039 static parse(source, opt$) { |
1040 let radix = opt$.radix === void 0 ? null : opt$.radix; | 1040 let radix = opt$ && 'radix' in opt$ ? opt$.radix : null; |
1041 let onError = opt$.onError === void 0 ? null : opt$.onError; | 1041 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; |
1042 return _js_helper.Primitives.parseInt(source, radix, onError); | 1042 return Number(source); |
1043 } | 1043 } |
1044 } | 1044 } |
1045 dart.defineNamedConstructor(int, 'fromEnvironment'); | 1045 dart.defineNamedConstructor(int, 'fromEnvironment'); |
1046 class Invocation extends Object { | 1046 class Invocation extends Object { |
1047 get isAccessor() { | 1047 get isAccessor() { |
1048 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter); | 1048 return dart.notNull(this.isGetter) || dart.notNull(this.isSetter); |
1049 } | 1049 } |
1050 } | 1050 } |
1051 let Iterable$ = dart.generic(function(E) { | 1051 let Iterable$ = dart.generic(function(E) { |
1052 class Iterable extends Object { | 1052 class Iterable extends Object { |
1053 Iterable() { | 1053 Iterable() { |
1054 } | 1054 } |
1055 Iterable$generate(count, generator) { | 1055 Iterable$generate(count, generator) { |
1056 if (generator === void 0) | 1056 if (generator === void 0) |
1057 generator = null; | 1057 generator = null; |
1058 if (dart.notNull(count) <= 0) | 1058 if (dart.notNull(count) <= 0) |
1059 return new _internal.EmptyIterable(); | 1059 return new _internal.EmptyIterable(); |
1060 return new _GeneratorIterable(count, generator); | 1060 return new _GeneratorIterable(count, generator); |
1061 } | 1061 } |
1062 join(separator) { | 1062 join(separator) { |
1063 if (separator === void 0) | 1063 if (separator === void 0) |
1064 separator = ""; | 1064 separator = ""; |
1065 let buffer = new StringBuffer(); | 1065 let buffer = new StringBuffer(); |
1066 buffer.writeAll(this, separator); | 1066 buffer.writeAll(this, separator); |
1067 return buffer.toString(); | 1067 return buffer.toString(); |
1068 } | 1068 } |
1069 [Symbol.iterator]() { | 1069 [dart.JsSymbol.iterator]() { |
1070 var iterator = this.iterator; | 1070 var iterator = this.iterator; |
1071 return { | 1071 return { |
1072 next() { | 1072 next() { |
1073 var done = iterator.moveNext(); | 1073 var done = iterator.moveNext(); |
1074 return {done: done, current: done ? void 0 : iterator.current}; | 1074 return {done: done, current: done ? void 0 : iterator.current}; |
1075 } | 1075 } |
1076 }; | 1076 }; |
1077 } | 1077 } |
1078 } | 1078 } |
1079 dart.defineNamedConstructor(Iterable, 'generate'); | 1079 dart.defineNamedConstructor(Iterable, 'generate'); |
1080 return Iterable; | 1080 return Iterable; |
1081 }); | 1081 }); |
1082 let Iterable = Iterable$(dart.dynamic); | 1082 let Iterable = Iterable$(dart.dynamic); |
1083 let _end = Symbol('_end'); | 1083 let _end = dart.JsSymbol('_end'); |
1084 let _start = Symbol('_start'); | 1084 let _start = dart.JsSymbol('_start'); |
1085 let _generator = Symbol('_generator'); | 1085 let _generator = dart.JsSymbol('_generator'); |
1086 let _id = Symbol('_id'); | 1086 let _id = dart.JsSymbol('_id'); |
1087 let _GeneratorIterable$ = dart.generic(function(E) { | 1087 let _GeneratorIterable$ = dart.generic(function(E) { |
1088 class _GeneratorIterable extends collection.IterableBase$(E) { | 1088 class _GeneratorIterable extends collection.IterableBase$(E) { |
1089 _GeneratorIterable($_end, generator) { | 1089 _GeneratorIterable($_end, generator) { |
1090 this[_end] = $_end; | 1090 this[_end] = $_end; |
1091 this[_start] = 0; | 1091 this[_start] = 0; |
1092 this[_generator] = dart.as(generator !== null ? generator : _id, _Genera
tor); | 1092 this[_generator] = dart.as(generator !== null ? generator : _id, _Genera
tor); |
1093 super.IterableBase(); | 1093 super.IterableBase(); |
1094 } | 1094 } |
1095 _GeneratorIterable$slice($_start, $_end, $_generator) { | 1095 _GeneratorIterable$slice($_start, $_end, $_generator) { |
1096 this[_start] = $_start; | 1096 this[_start] = $_start; |
(...skipping 26 matching lines...) Expand all Loading... |
1123 return new _GeneratorIterable.slice(this[_start], newEnd, this[_generato
r]); | 1123 return new _GeneratorIterable.slice(this[_start], newEnd, this[_generato
r]); |
1124 } | 1124 } |
1125 static [_id](n) { | 1125 static [_id](n) { |
1126 return n; | 1126 return n; |
1127 } | 1127 } |
1128 } | 1128 } |
1129 dart.defineNamedConstructor(_GeneratorIterable, 'slice'); | 1129 dart.defineNamedConstructor(_GeneratorIterable, 'slice'); |
1130 return _GeneratorIterable; | 1130 return _GeneratorIterable; |
1131 }); | 1131 }); |
1132 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte
rable$}); | 1132 dart.defineLazyClassGeneric(exports, '_GeneratorIterable', {get: _GeneratorIte
rable$}); |
1133 let _index = Symbol('_index'); | 1133 let _index = dart.JsSymbol('_index'); |
1134 let _current = Symbol('_current'); | 1134 let _current = dart.JsSymbol('_current'); |
1135 let _GeneratorIterator$ = dart.generic(function(E) { | 1135 let _GeneratorIterator$ = dart.generic(function(E) { |
1136 class _GeneratorIterator extends Object { | 1136 class _GeneratorIterator extends Object { |
1137 _GeneratorIterator($_index, $_end, $_generator) { | 1137 _GeneratorIterator($_index, $_end, $_generator) { |
1138 this[_index] = $_index; | 1138 this[_index] = $_index; |
1139 this[_end] = $_end; | 1139 this[_end] = $_end; |
1140 this[_generator] = $_generator; | 1140 this[_generator] = $_generator; |
1141 this[_current] = null; | 1141 this[_current] = null; |
1142 } | 1142 } |
1143 moveNext() { | 1143 moveNext() { |
1144 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) { | 1144 if (dart.notNull(this[_index]) < dart.notNull(this[_end])) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1182 List$filled(length, fill) { | 1182 List$filled(length, fill) { |
1183 let result = new _interceptors.JSArray.fixed(length); | 1183 let result = new _interceptors.JSArray.fixed(length); |
1184 if (length !== 0 && dart.notNull(fill !== null)) { | 1184 if (length !== 0 && dart.notNull(fill !== null)) { |
1185 for (let i = 0; dart.notNull(i) < dart.notNull(result.length); i = dar
t.notNull(i) + 1) { | 1185 for (let i = 0; dart.notNull(i) < dart.notNull(result.length); i = dar
t.notNull(i) + 1) { |
1186 result.set(i, fill); | 1186 result.set(i, fill); |
1187 } | 1187 } |
1188 } | 1188 } |
1189 return dart.as(result, List$(E)); | 1189 return dart.as(result, List$(E)); |
1190 } | 1190 } |
1191 List$from(elements, opt$) { | 1191 List$from(elements, opt$) { |
1192 let growable = opt$.growable === void 0 ? true : opt$.growable; | 1192 let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; |
1193 let list = new List(); | 1193 return null; |
1194 for (let e of elements) { | |
1195 list.add(e); | |
1196 } | |
1197 if (growable) | |
1198 return list; | |
1199 return dart.as(_internal.makeListFixedLength(list), List$(E)); | |
1200 } | 1194 } |
1201 List$generate(length, generator, opt$) { | 1195 List$generate(length, generator, opt$) { |
1202 let growable = opt$.growable === void 0 ? true : opt$.growable; | 1196 let growable = opt$ && 'growable' in opt$ ? opt$.growable : true; |
1203 let result = null; | 1197 let result = null; |
1204 if (growable) { | 1198 if (growable) { |
1205 result = ((_) => { | 1199 result = ((_) => { |
1206 _.length = length; | 1200 _.length = length; |
1207 return _; | 1201 return _; |
1208 }).bind(this)(new List.from([])); | 1202 }).bind(this)(new List.from([])); |
1209 } else { | 1203 } else { |
1210 result = new List(length); | 1204 result = new List(length); |
1211 } | 1205 } |
1212 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { | 1206 for (let i = 0; dart.notNull(i) < dart.notNull(length); i = dart.notNull
(i) + 1) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1263 if (_internal.printToZone === null) { | 1257 if (_internal.printToZone === null) { |
1264 _internal.printToConsole(line); | 1258 _internal.printToConsole(line); |
1265 } else { | 1259 } else { |
1266 dart.dinvokef(_internal.printToZone, line); | 1260 dart.dinvokef(_internal.printToZone, line); |
1267 } | 1261 } |
1268 } | 1262 } |
1269 class Match extends Object { | 1263 class Match extends Object { |
1270 } | 1264 } |
1271 class RegExp extends Object { | 1265 class RegExp extends Object { |
1272 RegExp(source, opt$) { | 1266 RegExp(source, opt$) { |
1273 let multiLine = opt$.multiLine === void 0 ? false : opt$.multiLine; | 1267 let multiLine = opt$ && 'multiLine' in opt$ ? opt$.multiLine : false; |
1274 let caseSensitive = opt$.caseSensitive === void 0 ? true : opt$.caseSensit
ive; | 1268 let caseSensitive = opt$ && 'caseSensitive' in opt$ ? opt$.caseSensitive :
true; |
1275 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe
nsitive: caseSensitive}); | 1269 return new _js_helper.JSSyntaxRegExp(source, {multiLine: multiLine, caseSe
nsitive: caseSensitive}); |
1276 } | 1270 } |
1277 } | 1271 } |
1278 let Set$ = dart.generic(function(E) { | 1272 let Set$ = dart.generic(function(E) { |
1279 class Set extends collection.IterableBase$(E) { | 1273 class Set extends collection.IterableBase$(E) { |
1280 Set() { | 1274 Set() { |
1281 return new collection.LinkedHashSet(); | 1275 return new collection.LinkedHashSet(); |
1282 } | 1276 } |
1283 Set$identity() { | 1277 Set$identity() { |
1284 return new collection.LinkedHashSet.identity(); | 1278 return new collection.LinkedHashSet.identity(); |
1285 } | 1279 } |
1286 Set$from(elements) { | 1280 Set$from(elements) { |
1287 return new collection.LinkedHashSet.from(elements); | 1281 return new collection.LinkedHashSet.from(elements); |
1288 } | 1282 } |
1289 } | 1283 } |
1290 dart.defineNamedConstructor(Set, 'identity'); | 1284 dart.defineNamedConstructor(Set, 'identity'); |
1291 dart.defineNamedConstructor(Set, 'from'); | 1285 dart.defineNamedConstructor(Set, 'from'); |
1292 return Set; | 1286 return Set; |
1293 }); | 1287 }); |
1294 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$}); | 1288 dart.defineLazyClassGeneric(exports, 'Set', {get: Set$}); |
1295 let Sink$ = dart.generic(function(T) { | 1289 let Sink$ = dart.generic(function(T) { |
1296 class Sink extends Object { | 1290 class Sink extends Object { |
1297 } | 1291 } |
1298 return Sink; | 1292 return Sink; |
1299 }); | 1293 }); |
1300 let Sink = Sink$(dart.dynamic); | 1294 let Sink = Sink$(dart.dynamic); |
1301 class StackTrace extends Object { | 1295 class StackTrace extends Object { |
1302 } | 1296 } |
1303 let _stop = Symbol('_stop'); | 1297 let _stop = dart.JsSymbol('_stop'); |
1304 let _initTicker = Symbol('_initTicker'); | 1298 let _initTicker = dart.JsSymbol('_initTicker'); |
1305 let _now = Symbol('_now'); | 1299 let _now = dart.JsSymbol('_now'); |
1306 class Stopwatch extends Object { | 1300 class Stopwatch extends Object { |
1307 get frequency() { | 1301 get frequency() { |
1308 return _frequency; | 1302 return _frequency; |
1309 } | 1303 } |
1310 Stopwatch() { | 1304 Stopwatch() { |
1311 this[_start] = null; | 1305 this[_start] = null; |
1312 this[_stop] = null; | 1306 this[_stop] = null; |
1313 _initTicker(); | 1307 _initTicker(); |
1314 } | 1308 } |
1315 start() { | 1309 start() { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1355 } | 1349 } |
1356 static [_initTicker]() { | 1350 static [_initTicker]() { |
1357 _js_helper.Primitives.initTicker(); | 1351 _js_helper.Primitives.initTicker(); |
1358 _frequency = _js_helper.Primitives.timerFrequency; | 1352 _frequency = _js_helper.Primitives.timerFrequency; |
1359 } | 1353 } |
1360 static [_now]() { | 1354 static [_now]() { |
1361 return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int); | 1355 return dart.as(dart.dinvoke(_js_helper.Primitives, 'timerTicks'), int); |
1362 } | 1356 } |
1363 } | 1357 } |
1364 Stopwatch._frequency = null; | 1358 Stopwatch._frequency = null; |
1365 let _stringFromIterable = Symbol('_stringFromIterable'); | 1359 let _stringFromIterable = dart.JsSymbol('_stringFromIterable'); |
1366 class String extends Object { | 1360 class String extends Object { |
1367 String$fromCharCodes(charCodes, start, end) { | 1361 String$fromCharCodes(charCodes, start, end) { |
1368 if (start === void 0) | 1362 if (start === void 0) |
1369 start = 0; | 1363 start = 0; |
1370 if (end === void 0) | 1364 if (end === void 0) |
1371 end = null; | 1365 end = null; |
1372 if (!dart.is(charCodes, _interceptors.JSArray)) { | 1366 if (!dart.is(charCodes, _interceptors.JSArray)) { |
1373 return _stringFromIterable(charCodes, start, end); | 1367 return _stringFromIterable(charCodes, start, end); |
1374 } | 1368 } |
1375 let list = dart.as(charCodes, List); | 1369 let list = dart.as(charCodes, List); |
1376 let len = list.length; | 1370 let len = list.length; |
1377 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) { | 1371 if (dart.notNull(start) < 0 || dart.notNull(start) > dart.notNull(len)) { |
1378 throw new RangeError.range(start, 0, len); | 1372 throw new RangeError.range(start, 0, len); |
1379 } | 1373 } |
1380 if (end === null) { | 1374 if (end === null) { |
1381 end = len; | 1375 end = len; |
1382 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) >
dart.notNull(len)) { | 1376 } else if (dart.notNull(end) < dart.notNull(start) || dart.notNull(end) >
dart.notNull(len)) { |
1383 throw new RangeError.range(end, start, len); | 1377 throw new RangeError.range(end, start, len); |
1384 } | 1378 } |
1385 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) { | 1379 if (dart.notNull(start) > 0 || dart.notNull(end) < dart.notNull(len)) { |
1386 list = list.sublist(start, end); | 1380 list = list.sublist(start, end); |
1387 } | 1381 } |
1388 return _js_helper.Primitives.stringFromCharCodes(list); | 1382 return _js_helper.Primitives.stringFromCharCodes(list); |
1389 } | 1383 } |
1390 String$fromCharCode(charCode) { | 1384 String$fromCharCode(charCode) { |
1391 return _js_helper.Primitives.stringFromCharCode(charCode); | 1385 return _js_helper.Primitives.stringFromCharCode(charCode); |
1392 } | 1386 } |
1393 String$fromEnvironment(name, opt$) { | 1387 String$fromEnvironment(name, opt$) { |
1394 let defaultValue = opt$.defaultValue === void 0 ? null : opt$.defaultValue
; | 1388 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.defaultValue : nu
ll; |
1395 throw new UnsupportedError('String.fromEnvironment can only be used as a c
onst constructor'); | 1389 throw new UnsupportedError('String.fromEnvironment can only be used as a c
onst constructor'); |
1396 } | 1390 } |
1397 static [_stringFromIterable](charCodes, start, end) { | 1391 static [_stringFromIterable](charCodes, start, end) { |
1398 if (dart.notNull(start) < 0) | 1392 if (dart.notNull(start) < 0) |
1399 throw new RangeError.range(start, 0, charCodes.length); | 1393 throw new RangeError.range(start, 0, charCodes.length); |
1400 if (end !== null && dart.notNull(end) < dart.notNull(start)) { | 1394 if (end !== null && dart.notNull(end) < dart.notNull(start)) { |
1401 throw new RangeError.range(end, start, charCodes.length); | 1395 throw new RangeError.range(end, start, charCodes.length); |
1402 } | 1396 } |
1403 let it = charCodes.iterator; | 1397 let it = charCodes.iterator; |
1404 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i)
+ 1) { | 1398 for (let i = 0; dart.notNull(i) < dart.notNull(start); i = dart.notNull(i)
+ 1) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1457 return (dart.notNull(code) & 64512) === 55296; | 1451 return (dart.notNull(code) & 64512) === 55296; |
1458 } | 1452 } |
1459 // Function _isTrailSurrogate: (int) → bool | 1453 // Function _isTrailSurrogate: (int) → bool |
1460 function _isTrailSurrogate(code) { | 1454 function _isTrailSurrogate(code) { |
1461 return (dart.notNull(code) & 64512) === 56320; | 1455 return (dart.notNull(code) & 64512) === 56320; |
1462 } | 1456 } |
1463 // Function _combineSurrogatePair: (int, int) → int | 1457 // Function _combineSurrogatePair: (int, int) → int |
1464 function _combineSurrogatePair(start, end) { | 1458 function _combineSurrogatePair(start, end) { |
1465 return 65536 + ((dart.notNull(start) & 1023) << 10) + (dart.notNull(end) & 1
023); | 1459 return 65536 + ((dart.notNull(start) & 1023) << 10) + (dart.notNull(end) & 1
023); |
1466 } | 1460 } |
1467 let _position = Symbol('_position'); | 1461 let _position = dart.JsSymbol('_position'); |
1468 let _nextPosition = Symbol('_nextPosition'); | 1462 let _nextPosition = dart.JsSymbol('_nextPosition'); |
1469 let _currentCodePoint = Symbol('_currentCodePoint'); | 1463 let _currentCodePoint = dart.JsSymbol('_currentCodePoint'); |
1470 let _checkSplitSurrogate = Symbol('_checkSplitSurrogate'); | 1464 let _checkSplitSurrogate = dart.JsSymbol('_checkSplitSurrogate'); |
1471 class RuneIterator extends Object { | 1465 class RuneIterator extends Object { |
1472 RuneIterator(string) { | 1466 RuneIterator(string) { |
1473 this.string = string; | 1467 this.string = string; |
1474 this[_position] = 0; | 1468 this[_position] = 0; |
1475 this[_nextPosition] = 0; | 1469 this[_nextPosition] = 0; |
1476 this[_currentCodePoint] = null; | 1470 this[_currentCodePoint] = null; |
1477 } | 1471 } |
1478 RuneIterator$at(string, index) { | 1472 RuneIterator$at(string, index) { |
1479 this.string = string; | 1473 this.string = string; |
1480 this[_position] = index; | 1474 this[_position] = index; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 this[_currentCodePoint] = _combineSurrogatePair(prevCodeUnit, codeUnit
); | 1546 this[_currentCodePoint] = _combineSurrogatePair(prevCodeUnit, codeUnit
); |
1553 return true; | 1547 return true; |
1554 } | 1548 } |
1555 } | 1549 } |
1556 this[_position] = position; | 1550 this[_position] = position; |
1557 this[_currentCodePoint] = codeUnit; | 1551 this[_currentCodePoint] = codeUnit; |
1558 return true; | 1552 return true; |
1559 } | 1553 } |
1560 } | 1554 } |
1561 dart.defineNamedConstructor(RuneIterator, 'at'); | 1555 dart.defineNamedConstructor(RuneIterator, 'at'); |
1562 let _contents = Symbol('_contents'); | 1556 let _contents = dart.JsSymbol('_contents'); |
1563 let _writeString = Symbol('_writeString'); | 1557 let _writeString = dart.JsSymbol('_writeString'); |
1564 class StringBuffer extends Object { | 1558 class StringBuffer extends Object { |
1565 StringBuffer(content) { | 1559 StringBuffer(content) { |
1566 if (content === void 0) | 1560 if (content === void 0) |
1567 content = ""; | 1561 content = ""; |
1568 this[_contents] = `${content}`; | 1562 this[_contents] = `${content}`; |
1569 } | 1563 } |
1570 get length() { | 1564 get length() { |
1571 return this[_contents].length; | 1565 return this[_contents].length; |
1572 } | 1566 } |
1573 get isEmpty() { | 1567 get isEmpty() { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 } | 1612 } |
1619 class StringSink extends Object { | 1613 class StringSink extends Object { |
1620 } | 1614 } |
1621 class Symbol extends Object { | 1615 class Symbol extends Object { |
1622 Symbol(name) { | 1616 Symbol(name) { |
1623 return new _internal.Symbol(name); | 1617 return new _internal.Symbol(name); |
1624 } | 1618 } |
1625 } | 1619 } |
1626 class Type extends Object { | 1620 class Type extends Object { |
1627 } | 1621 } |
1628 let _writeAuthority = Symbol('_writeAuthority'); | 1622 let _writeAuthority = dart.JsSymbol('_writeAuthority'); |
1629 let _userInfo = Symbol('_userInfo'); | 1623 let _userInfo = dart.JsSymbol('_userInfo'); |
1630 let _host = Symbol('_host'); | 1624 let _host = dart.JsSymbol('_host'); |
1631 let _port = Symbol('_port'); | 1625 let _port = dart.JsSymbol('_port'); |
1632 let _defaultPort = Symbol('_defaultPort'); | 1626 let _defaultPort = dart.JsSymbol('_defaultPort'); |
1633 let _path = Symbol('_path'); | 1627 let _path = dart.JsSymbol('_path'); |
1634 let _query = Symbol('_query'); | 1628 let _query = dart.JsSymbol('_query'); |
1635 let _fragment = Symbol('_fragment'); | 1629 let _fragment = dart.JsSymbol('_fragment'); |
1636 let _fail = Symbol('_fail'); | 1630 let _fail = dart.JsSymbol('_fail'); |
1637 let _pathSegments = Symbol('_pathSegments'); | 1631 let _pathSegments = dart.JsSymbol('_pathSegments'); |
1638 let _queryParameters = Symbol('_queryParameters'); | 1632 let _queryParameters = dart.JsSymbol('_queryParameters'); |
1639 let _makeHttpUri = Symbol('_makeHttpUri'); | 1633 let _makeHttpUri = dart.JsSymbol('_makeHttpUri'); |
1640 let _isWindows = Symbol('_isWindows'); | 1634 let _isWindows = dart.JsSymbol('_isWindows'); |
1641 let _checkNonWindowsPathReservedCharacters = Symbol('_checkNonWindowsPathReser
vedCharacters'); | 1635 let _checkNonWindowsPathReservedCharacters = dart.JsSymbol('_checkNonWindowsPa
thReservedCharacters'); |
1642 let _checkWindowsPathReservedCharacters = Symbol('_checkWindowsPathReservedCha
racters'); | 1636 let _checkWindowsPathReservedCharacters = dart.JsSymbol('_checkWindowsPathRese
rvedCharacters'); |
1643 let _checkWindowsDriveLetter = Symbol('_checkWindowsDriveLetter'); | 1637 let _checkWindowsDriveLetter = dart.JsSymbol('_checkWindowsDriveLetter'); |
1644 let _makeFileUri = Symbol('_makeFileUri'); | 1638 let _makeFileUri = dart.JsSymbol('_makeFileUri'); |
1645 let _makeWindowsFileUrl = Symbol('_makeWindowsFileUrl'); | 1639 let _makeWindowsFileUrl = dart.JsSymbol('_makeWindowsFileUrl'); |
1646 let _makePort = Symbol('_makePort'); | 1640 let _makePort = dart.JsSymbol('_makePort'); |
1647 let _makeHost = Symbol('_makeHost'); | 1641 let _makeHost = dart.JsSymbol('_makeHost'); |
1648 let _isRegNameChar = Symbol('_isRegNameChar'); | 1642 let _isRegNameChar = dart.JsSymbol('_isRegNameChar'); |
1649 let _normalizeRegName = Symbol('_normalizeRegName'); | 1643 let _normalizeRegName = dart.JsSymbol('_normalizeRegName'); |
1650 let _makeScheme = Symbol('_makeScheme'); | 1644 let _makeScheme = dart.JsSymbol('_makeScheme'); |
1651 let _makeUserInfo = Symbol('_makeUserInfo'); | 1645 let _makeUserInfo = dart.JsSymbol('_makeUserInfo'); |
1652 let _makePath = Symbol('_makePath'); | 1646 let _makePath = dart.JsSymbol('_makePath'); |
1653 let _makeQuery = Symbol('_makeQuery'); | 1647 let _makeQuery = dart.JsSymbol('_makeQuery'); |
1654 let _makeFragment = Symbol('_makeFragment'); | 1648 let _makeFragment = dart.JsSymbol('_makeFragment'); |
1655 let _stringOrNullLength = Symbol('_stringOrNullLength'); | 1649 let _stringOrNullLength = dart.JsSymbol('_stringOrNullLength'); |
1656 let _isHexDigit = Symbol('_isHexDigit'); | 1650 let _isHexDigit = dart.JsSymbol('_isHexDigit'); |
1657 let _hexValue = Symbol('_hexValue'); | 1651 let _hexValue = dart.JsSymbol('_hexValue'); |
1658 let _normalizeEscape = Symbol('_normalizeEscape'); | 1652 let _normalizeEscape = dart.JsSymbol('_normalizeEscape'); |
1659 let _isUnreservedChar = Symbol('_isUnreservedChar'); | 1653 let _isUnreservedChar = dart.JsSymbol('_isUnreservedChar'); |
1660 let _escapeChar = Symbol('_escapeChar'); | 1654 let _escapeChar = dart.JsSymbol('_escapeChar'); |
1661 let _normalize = Symbol('_normalize'); | 1655 let _normalize = dart.JsSymbol('_normalize'); |
1662 let _isSchemeCharacter = Symbol('_isSchemeCharacter'); | 1656 let _isSchemeCharacter = dart.JsSymbol('_isSchemeCharacter'); |
1663 let _isGeneralDelimiter = Symbol('_isGeneralDelimiter'); | 1657 let _isGeneralDelimiter = dart.JsSymbol('_isGeneralDelimiter'); |
1664 let _merge = Symbol('_merge'); | 1658 let _merge = dart.JsSymbol('_merge'); |
1665 let _hasDotSegments = Symbol('_hasDotSegments'); | 1659 let _hasDotSegments = dart.JsSymbol('_hasDotSegments'); |
1666 let _removeDotSegments = Symbol('_removeDotSegments'); | 1660 let _removeDotSegments = dart.JsSymbol('_removeDotSegments'); |
1667 let _toWindowsFilePath = Symbol('_toWindowsFilePath'); | 1661 let _toWindowsFilePath = dart.JsSymbol('_toWindowsFilePath'); |
1668 let _toFilePath = Symbol('_toFilePath'); | 1662 let _toFilePath = dart.JsSymbol('_toFilePath'); |
1669 let _isPathAbsolute = Symbol('_isPathAbsolute'); | 1663 let _isPathAbsolute = dart.JsSymbol('_isPathAbsolute'); |
1670 let _addIfNonEmpty = Symbol('_addIfNonEmpty'); | 1664 let _addIfNonEmpty = dart.JsSymbol('_addIfNonEmpty'); |
1671 let _uriEncode = Symbol('_uriEncode'); | 1665 let _uriEncode = dart.JsSymbol('_uriEncode'); |
1672 let _hexCharPairToByte = Symbol('_hexCharPairToByte'); | 1666 let _hexCharPairToByte = dart.JsSymbol('_hexCharPairToByte'); |
1673 let _uriDecode = Symbol('_uriDecode'); | 1667 let _uriDecode = dart.JsSymbol('_uriDecode'); |
1674 let _isAlphabeticCharacter = Symbol('_isAlphabeticCharacter'); | 1668 let _isAlphabeticCharacter = dart.JsSymbol('_isAlphabeticCharacter'); |
1675 class Uri extends Object { | 1669 class Uri extends Object { |
1676 get authority() { | 1670 get authority() { |
1677 if (!dart.notNull(this.hasAuthority)) | 1671 if (!dart.notNull(this.hasAuthority)) |
1678 return ""; | 1672 return ""; |
1679 let sb = new StringBuffer(); | 1673 let sb = new StringBuffer(); |
1680 this[_writeAuthority](sb); | 1674 this[_writeAuthority](sb); |
1681 return sb.toString(); | 1675 return sb.toString(); |
1682 } | 1676 } |
1683 get userInfo() { | 1677 get userInfo() { |
1684 return this[_userInfo]; | 1678 return this[_userInfo]; |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1884 this[_userInfo] = $_userInfo; | 1878 this[_userInfo] = $_userInfo; |
1885 this[_host] = $_host; | 1879 this[_host] = $_host; |
1886 this[_port] = $_port; | 1880 this[_port] = $_port; |
1887 this[_path] = $_path; | 1881 this[_path] = $_path; |
1888 this[_query] = $_query; | 1882 this[_query] = $_query; |
1889 this[_fragment] = $_fragment; | 1883 this[_fragment] = $_fragment; |
1890 this[_pathSegments] = null; | 1884 this[_pathSegments] = null; |
1891 this[_queryParameters] = null; | 1885 this[_queryParameters] = null; |
1892 } | 1886 } |
1893 Uri(opt$) { | 1887 Uri(opt$) { |
1894 let scheme = opt$.scheme === void 0 ? "" : opt$.scheme; | 1888 let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : ""; |
1895 let userInfo = opt$.userInfo === void 0 ? "" : opt$.userInfo; | 1889 let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : ""; |
1896 let host = opt$.host === void 0 ? null : opt$.host; | 1890 let host = opt$ && 'host' in opt$ ? opt$.host : null; |
1897 let port = opt$.port === void 0 ? null : opt$.port; | 1891 let port = opt$ && 'port' in opt$ ? opt$.port : null; |
1898 let path = opt$.path === void 0 ? null : opt$.path; | 1892 let path = opt$ && 'path' in opt$ ? opt$.path : null; |
1899 let pathSegments = opt$.pathSegments === void 0 ? null : opt$.pathSegments
; | 1893 let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : nu
ll; |
1900 let query = opt$.query === void 0 ? null : opt$.query; | 1894 let query = opt$ && 'query' in opt$ ? opt$.query : null; |
1901 let queryParameters = opt$.queryParameters === void 0 ? null : opt$.queryP
arameters; | 1895 let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParame
ters : null; |
1902 let fragment = opt$.fragment === void 0 ? null : opt$.fragment; | 1896 let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; |
1903 scheme = _makeScheme(scheme, _stringOrNullLength(scheme)); | 1897 scheme = _makeScheme(scheme, _stringOrNullLength(scheme)); |
1904 userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo)); | 1898 userInfo = _makeUserInfo(userInfo, 0, _stringOrNullLength(userInfo)); |
1905 host = _makeHost(host, 0, _stringOrNullLength(host), false); | 1899 host = _makeHost(host, 0, _stringOrNullLength(host), false); |
1906 if (dart.equals(query, "")) | 1900 if (dart.equals(query, "")) |
1907 query = null; | 1901 query = null; |
1908 query = _makeQuery(query, 0, _stringOrNullLength(query), queryParameters); | 1902 query = _makeQuery(query, 0, _stringOrNullLength(query), queryParameters); |
1909 fragment = _makeFragment(fragment, 0, _stringOrNullLength(fragment)); | 1903 fragment = _makeFragment(fragment, 0, _stringOrNullLength(fragment)); |
1910 port = _makePort(port, scheme); | 1904 port = _makePort(port, scheme); |
1911 let isFile = dart.equals(scheme, "file"); | 1905 let isFile = dart.equals(scheme, "file"); |
1912 if (dart.notNull(host === null) && (dart.notNull(userInfo.isNotEmpty) || p
ort !== null || dart.notNull(isFile))) { | 1906 if (dart.notNull(host === null) && (dart.notNull(userInfo.isNotEmpty) || p
ort !== null || dart.notNull(isFile))) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1963 if (portString.isNotEmpty) | 1957 if (portString.isNotEmpty) |
1964 port = int.parse(portString); | 1958 port = int.parse(portString); |
1965 break; | 1959 break; |
1966 } | 1960 } |
1967 } | 1961 } |
1968 host = authority.substring(hostStart, hostEnd); | 1962 host = authority.substring(hostStart, hostEnd); |
1969 } | 1963 } |
1970 return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, St
ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa
rameters: queryParameters}); | 1964 return new Uri({scheme: scheme, userInfo: userInfo, host: dart.as(host, St
ring), port: dart.as(port, int), pathSegments: unencodedPath.split("/"), queryPa
rameters: queryParameters}); |
1971 } | 1965 } |
1972 Uri$file(path, opt$) { | 1966 Uri$file(path, opt$) { |
1973 let windows = opt$.windows === void 0 ? null : opt$.windows; | 1967 let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; |
1974 windows = windows === null ? Uri[_isWindows] : windows; | 1968 windows = windows === null ? Uri[_isWindows] : windows; |
1975 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U
ri); | 1969 return dart.as(windows ? _makeWindowsFileUrl(path) : _makeFileUri(path), U
ri); |
1976 } | 1970 } |
1977 static get base() { | 1971 static get base() { |
1978 let uri = _js_helper.Primitives.currentUri(); | 1972 let uri = _js_helper.Primitives.currentUri(); |
1979 if (uri !== null) | 1973 if (uri !== null) |
1980 return Uri.parse(uri); | 1974 return Uri.parse(uri); |
1981 throw new UnsupportedError("'Uri.base' is not supported"); | 1975 throw new UnsupportedError("'Uri.base' is not supported"); |
1982 } | 1976 } |
1983 static get [_isWindows]() { | 1977 static get [_isWindows]() { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2061 _checkWindowsPathReservedCharacters(pathSegments, true); | 2055 _checkWindowsPathReservedCharacters(pathSegments, true); |
2062 return new Uri({scheme: "file", pathSegments: pathSegments}); | 2056 return new Uri({scheme: "file", pathSegments: pathSegments}); |
2063 } | 2057 } |
2064 } else { | 2058 } else { |
2065 let pathSegments = path.split(sep); | 2059 let pathSegments = path.split(sep); |
2066 _checkWindowsPathReservedCharacters(pathSegments, true); | 2060 _checkWindowsPathReservedCharacters(pathSegments, true); |
2067 return new Uri({pathSegments: pathSegments}); | 2061 return new Uri({pathSegments: pathSegments}); |
2068 } | 2062 } |
2069 } | 2063 } |
2070 replace(opt$) { | 2064 replace(opt$) { |
2071 let scheme = opt$.scheme === void 0 ? null : opt$.scheme; | 2065 let scheme = opt$ && 'scheme' in opt$ ? opt$.scheme : null; |
2072 let userInfo = opt$.userInfo === void 0 ? null : opt$.userInfo; | 2066 let userInfo = opt$ && 'userInfo' in opt$ ? opt$.userInfo : null; |
2073 let host = opt$.host === void 0 ? null : opt$.host; | 2067 let host = opt$ && 'host' in opt$ ? opt$.host : null; |
2074 let port = opt$.port === void 0 ? null : opt$.port; | 2068 let port = opt$ && 'port' in opt$ ? opt$.port : null; |
2075 let path = opt$.path === void 0 ? null : opt$.path; | 2069 let path = opt$ && 'path' in opt$ ? opt$.path : null; |
2076 let pathSegments = opt$.pathSegments === void 0 ? null : opt$.pathSegments
; | 2070 let pathSegments = opt$ && 'pathSegments' in opt$ ? opt$.pathSegments : nu
ll; |
2077 let query = opt$.query === void 0 ? null : opt$.query; | 2071 let query = opt$ && 'query' in opt$ ? opt$.query : null; |
2078 let queryParameters = opt$.queryParameters === void 0 ? null : opt$.queryP
arameters; | 2072 let queryParameters = opt$ && 'queryParameters' in opt$ ? opt$.queryParame
ters : null; |
2079 let fragment = opt$.fragment === void 0 ? null : opt$.fragment; | 2073 let fragment = opt$ && 'fragment' in opt$ ? opt$.fragment : null; |
2080 let schemeChanged = false; | 2074 let schemeChanged = false; |
2081 if (scheme !== null) { | 2075 if (scheme !== null) { |
2082 scheme = _makeScheme(scheme, scheme.length); | 2076 scheme = _makeScheme(scheme, scheme.length); |
2083 schemeChanged = true; | 2077 schemeChanged = true; |
2084 } else { | 2078 } else { |
2085 scheme = this.scheme; | 2079 scheme = this.scheme; |
2086 } | 2080 } |
2087 let isFile = dart.equals(scheme, "file"); | 2081 let isFile = dart.equals(scheme, "file"); |
2088 if (userInfo !== null) { | 2082 if (userInfo !== null) { |
2089 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); | 2083 userInfo = _makeUserInfo(userInfo, 0, userInfo.length); |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2577 throw new StateError(`Cannot use origin without a scheme: ${this}`); | 2571 throw new StateError(`Cannot use origin without a scheme: ${this}`); |
2578 } | 2572 } |
2579 if (dart.notNull(!dart.equals(this.scheme, "http")) && dart.notNull(!dart.
equals(this.scheme, "https"))) { | 2573 if (dart.notNull(!dart.equals(this.scheme, "http")) && dart.notNull(!dart.
equals(this.scheme, "https"))) { |
2580 throw new StateError(`Origin is only applicable schemes http and https:
${this}`); | 2574 throw new StateError(`Origin is only applicable schemes http and https:
${this}`); |
2581 } | 2575 } |
2582 if (this[_port] === null) | 2576 if (this[_port] === null) |
2583 return `${this.scheme}://${this[_host]}`; | 2577 return `${this.scheme}://${this[_host]}`; |
2584 return `${this.scheme}://${this[_host]}:${this[_port]}`; | 2578 return `${this.scheme}://${this[_host]}:${this[_port]}`; |
2585 } | 2579 } |
2586 toFilePath(opt$) { | 2580 toFilePath(opt$) { |
2587 let windows = opt$.windows === void 0 ? null : opt$.windows; | 2581 let windows = opt$ && 'windows' in opt$ ? opt$.windows : null; |
2588 if (dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(!dart.equa
ls(this.scheme, "file"))) { | 2582 if (dart.notNull(!dart.equals(this.scheme, "")) && dart.notNull(!dart.equa
ls(this.scheme, "file"))) { |
2589 throw new UnsupportedError(`Cannot extract a file path from a ${this.sch
eme} URI`); | 2583 throw new UnsupportedError(`Cannot extract a file path from a ${this.sch
eme} URI`); |
2590 } | 2584 } |
2591 if (!dart.equals(this.query, "")) { | 2585 if (!dart.equals(this.query, "")) { |
2592 throw new UnsupportedError("Cannot extract a file path from a URI with a
query component"); | 2586 throw new UnsupportedError("Cannot extract a file path from a URI with a
query component"); |
2593 } | 2587 } |
2594 if (!dart.equals(this.fragment, "")) { | 2588 if (!dart.equals(this.fragment, "")) { |
2595 throw new UnsupportedError("Cannot extract a file path from a URI with a
fragment component"); | 2589 throw new UnsupportedError("Cannot extract a file path from a URI with a
fragment component"); |
2596 } | 2590 } |
2597 if (windows === null) | 2591 if (windows === null) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2683 static [_addIfNonEmpty](sb, test, first, second) { | 2677 static [_addIfNonEmpty](sb, test, first, second) { |
2684 if (!dart.equals("", test)) { | 2678 if (!dart.equals("", test)) { |
2685 sb.write(first); | 2679 sb.write(first); |
2686 sb.write(second); | 2680 sb.write(second); |
2687 } | 2681 } |
2688 } | 2682 } |
2689 static encodeComponent(component) { | 2683 static encodeComponent(component) { |
2690 return _uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), component
); | 2684 return _uriEncode(dart.as(Uri._unreserved2396Table, List$(int)), component
); |
2691 } | 2685 } |
2692 static encodeQueryComponent(component, opt$) { | 2686 static encodeQueryComponent(component, opt$) { |
2693 let encoding = opt$.encoding === void 0 ? convert.UTF8 : opt$.encoding; | 2687 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; |
2694 return _uriEncode(dart.as(Uri._unreservedTable, List$(int)), component, {e
ncoding: encoding, spaceToPlus: true}); | 2688 return _uriEncode(dart.as(Uri._unreservedTable, List$(int)), component, {e
ncoding: encoding, spaceToPlus: true}); |
2695 } | 2689 } |
2696 static decodeComponent(encodedComponent) { | 2690 static decodeComponent(encodedComponent) { |
2697 return _uriDecode(encodedComponent); | 2691 return _uriDecode(encodedComponent); |
2698 } | 2692 } |
2699 static decodeQueryComponent(encodedComponent, opt$) { | 2693 static decodeQueryComponent(encodedComponent, opt$) { |
2700 let encoding = opt$.encoding === void 0 ? convert.UTF8 : opt$.encoding; | 2694 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; |
2701 return _uriDecode(encodedComponent, {plusToSpace: true, encoding: encoding
}); | 2695 return _uriDecode(encodedComponent, {plusToSpace: true, encoding: encoding
}); |
2702 } | 2696 } |
2703 static encodeFull(uri) { | 2697 static encodeFull(uri) { |
2704 return _uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri); | 2698 return _uriEncode(dart.as(Uri._encodeFullTable, List$(int)), uri); |
2705 } | 2699 } |
2706 static decodeFull(uri) { | 2700 static decodeFull(uri) { |
2707 return _uriDecode(uri); | 2701 return _uriDecode(uri); |
2708 } | 2702 } |
2709 static splitQueryString(query, opt$) { | 2703 static splitQueryString(query, opt$) { |
2710 let encoding = opt$.encoding === void 0 ? convert.UTF8 : opt$.encoding; | 2704 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; |
2711 return dart.as(query.split("&").fold(dart.map(), dart.closureWrap((map, el
ement) => { | 2705 return dart.as(query.split("&").fold(dart.map(), dart.closureWrap((map, el
ement) => { |
2712 let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int); | 2706 let index = dart.as(dart.dinvoke(element, 'indexOf', "="), int); |
2713 if (index === -1) { | 2707 if (index === -1) { |
2714 if (!dart.equals(element, "")) { | 2708 if (!dart.equals(element, "")) { |
2715 dart.dsetindex(map, decodeQueryComponent(dart.as(element, String), {
encoding: encoding}), ""); | 2709 dart.dsetindex(map, decodeQueryComponent(dart.as(element, String), {
encoding: encoding}), ""); |
2716 } | 2710 } |
2717 } else if (index !== 0) { | 2711 } else if (index !== 0) { |
2718 let key = dart.dinvoke(element, 'substring', 0, index); | 2712 let key = dart.dinvoke(element, 'substring', 0, index); |
2719 let value = dart.dinvoke(element, 'substring', dart.notNull(index) + 1
); | 2713 let value = dart.dinvoke(element, 'substring', dart.notNull(index) + 1
); |
2720 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en
coding: encoding}), decodeQueryComponent(dart.as(value, String), {encoding: enco
ding})); | 2714 dart.dsetindex(map, Uri.decodeQueryComponent(dart.as(key, String), {en
coding: encoding}), decodeQueryComponent(dart.as(value, String), {encoding: enco
ding})); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2830 } | 2824 } |
2831 } else { | 2825 } else { |
2832 bytes.set(index, dart.notNull(value) >> 8); | 2826 bytes.set(index, dart.notNull(value) >> 8); |
2833 bytes.set(dart.notNull(index) + 1, dart.notNull(value) & 255); | 2827 bytes.set(dart.notNull(index) + 1, dart.notNull(value) & 255); |
2834 index = 2; | 2828 index = 2; |
2835 } | 2829 } |
2836 } | 2830 } |
2837 return dart.as(bytes, List$(int)); | 2831 return dart.as(bytes, List$(int)); |
2838 } | 2832 } |
2839 static [_uriEncode](canonicalTable, text, opt$) { | 2833 static [_uriEncode](canonicalTable, text, opt$) { |
2840 let encoding = opt$.encoding === void 0 ? convert.UTF8 : opt$.encoding; | 2834 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; |
2841 let spaceToPlus = opt$.spaceToPlus === void 0 ? false : opt$.spaceToPlus; | 2835 let spaceToPlus = opt$ && 'spaceToPlus' in opt$ ? opt$.spaceToPlus : false
; |
2842 // Function byteToHex: (dynamic, dynamic) → dynamic | 2836 // Function byteToHex: (dynamic, dynamic) → dynamic |
2843 function byteToHex(byte, buffer) { | 2837 function byteToHex(byte, buffer) { |
2844 let hex = '0123456789ABCDEF'; | 2838 let hex = '0123456789ABCDEF'; |
2845 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar
y(byte, '>>', 4), int))); | 2839 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar
y(byte, '>>', 4), int))); |
2846 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar
y(byte, '&', 15), int))); | 2840 dart.dinvoke(buffer, 'writeCharCode', hex.codeUnitAt(dart.as(dart.dbinar
y(byte, '&', 15), int))); |
2847 } | 2841 } |
2848 let result = new StringBuffer(); | 2842 let result = new StringBuffer(); |
2849 let bytes = encoding.encode(text); | 2843 let bytes = encoding.encode(text); |
2850 for (let i = 0; dart.notNull(i) < dart.notNull(bytes.length); i = dart.not
Null(i) + 1) { | 2844 for (let i = 0; dart.notNull(i) < dart.notNull(bytes.length); i = dart.not
Null(i) + 1) { |
2851 let byte = bytes.get(i); | 2845 let byte = bytes.get(i); |
(...skipping 19 matching lines...) Expand all Loading... |
2871 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { | 2865 if (97 <= dart.notNull(charCode) && dart.notNull(charCode) <= 102) { |
2872 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87; | 2866 byte = dart.notNull(byte) * 16 + dart.notNull(charCode) - 87; |
2873 } else { | 2867 } else { |
2874 throw new ArgumentError("Invalid URL encoding"); | 2868 throw new ArgumentError("Invalid URL encoding"); |
2875 } | 2869 } |
2876 } | 2870 } |
2877 } | 2871 } |
2878 return byte; | 2872 return byte; |
2879 } | 2873 } |
2880 static [_uriDecode](text, opt$) { | 2874 static [_uriDecode](text, opt$) { |
2881 let plusToSpace = opt$.plusToSpace === void 0 ? false : opt$.plusToSpace; | 2875 let plusToSpace = opt$ && 'plusToSpace' in opt$ ? opt$.plusToSpace : false
; |
2882 let encoding = opt$.encoding === void 0 ? convert.UTF8 : opt$.encoding; | 2876 let encoding = opt$ && 'encoding' in opt$ ? opt$.encoding : convert.UTF8; |
2883 let simple = true; | 2877 let simple = true; |
2884 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul
l(simple); i = dart.notNull(i) + 1) { | 2878 for (let i = 0; dart.notNull(i) < dart.notNull(text.length) && dart.notNul
l(simple); i = dart.notNull(i) + 1) { |
2885 let codeUnit = text.codeUnitAt(i); | 2879 let codeUnit = text.codeUnitAt(i); |
2886 simple = codeUnit !== Uri._PERCENT && codeUnit !== Uri._PLUS; | 2880 simple = codeUnit !== Uri._PERCENT && codeUnit !== Uri._PLUS; |
2887 } | 2881 } |
2888 let bytes = null; | 2882 let bytes = null; |
2889 if (simple) { | 2883 if (simple) { |
2890 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da
rt.equals(encoding, convert.LATIN1))) { | 2884 if (dart.notNull(dart.equals(encoding, convert.UTF8)) || dart.notNull(da
rt.equals(encoding, convert.LATIN1))) { |
2891 return text; | 2885 return text; |
2892 } else { | 2886 } else { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2966 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic | 2960 // Function _symbolMapToStringMap: (Map<Symbol, dynamic>) → dynamic |
2967 function _symbolMapToStringMap(map) { | 2961 function _symbolMapToStringMap(map) { |
2968 if (map === null) | 2962 if (map === null) |
2969 return null; | 2963 return null; |
2970 let result = new Map(); | 2964 let result = new Map(); |
2971 map.forEach((key, value) => { | 2965 map.forEach((key, value) => { |
2972 result.set(_symbolToString(key), value); | 2966 result.set(_symbolToString(key), value); |
2973 }); | 2967 }); |
2974 return result; | 2968 return result; |
2975 } | 2969 } |
2976 dart.defineLazyClass(exports, { | 2970 class _ListConstructorSentinel extends Object { |
2977 get _ListConstructorSentinel() { | 2971 _ListConstructorSentinel() { |
2978 class _ListConstructorSentinel extends _interceptors.JSInt { | |
2979 _ListConstructorSentinel() { | |
2980 super.JSInt(); | |
2981 } | |
2982 } | |
2983 return _ListConstructorSentinel; | |
2984 } | 2972 } |
2985 }); | 2973 } |
2986 // Exports: | 2974 // Exports: |
2987 exports.Deprecated = Deprecated; | 2975 exports.Deprecated = Deprecated; |
2988 exports.Object = Object; | 2976 exports.Object = Object; |
2989 exports.deprecated = deprecated; | 2977 exports.deprecated = deprecated; |
2990 exports.override = override; | 2978 exports.override = override; |
2991 exports.proxy = proxy; | 2979 exports.proxy = proxy; |
2992 exports.bool = bool; | 2980 exports.bool = bool; |
2993 exports.Comparable = Comparable; | 2981 exports.Comparable = Comparable; |
2994 exports.Comparable$ = Comparable$; | 2982 exports.Comparable$ = Comparable$; |
2995 exports.DateTime = DateTime; | 2983 exports.DateTime = DateTime; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3032 exports.Iterator$ = Iterator$; | 3020 exports.Iterator$ = Iterator$; |
3033 exports.List = List; | 3021 exports.List = List; |
3034 exports.List$ = List$; | 3022 exports.List$ = List$; |
3035 exports.Map = Map; | 3023 exports.Map = Map; |
3036 exports.Map$ = Map$; | 3024 exports.Map$ = Map$; |
3037 exports.Null = Null; | 3025 exports.Null = Null; |
3038 exports.Pattern = Pattern; | 3026 exports.Pattern = Pattern; |
3039 exports.print = print; | 3027 exports.print = print; |
3040 exports.Match = Match; | 3028 exports.Match = Match; |
3041 exports.RegExp = RegExp; | 3029 exports.RegExp = RegExp; |
3042 exports.Set = Set; | |
3043 exports.Set$ = Set$; | |
3044 exports.Sink = Sink; | 3030 exports.Sink = Sink; |
3045 exports.Sink$ = Sink$; | 3031 exports.Sink$ = Sink$; |
3046 exports.StackTrace = StackTrace; | 3032 exports.StackTrace = StackTrace; |
3047 exports.Stopwatch = Stopwatch; | 3033 exports.Stopwatch = Stopwatch; |
3048 exports.String = String; | 3034 exports.String = String; |
3049 exports.Runes = Runes; | |
3050 exports.RuneIterator = RuneIterator; | 3035 exports.RuneIterator = RuneIterator; |
3051 exports.StringBuffer = StringBuffer; | 3036 exports.StringBuffer = StringBuffer; |
3052 exports.StringSink = StringSink; | 3037 exports.StringSink = StringSink; |
3053 exports.Symbol = Symbol; | 3038 exports.Symbol = Symbol; |
3054 exports.Type = Type; | 3039 exports.Type = Type; |
3055 exports.Uri = Uri; | 3040 exports.Uri = Uri; |
3056 })(core || (core = {})); | 3041 })(core || (core = {})); |
OLD | NEW |