define(['dart_sdk', 'packages/typed_data/src/typed_buffer.dart'], (function load__packages__flutter__src__foundation__serialization_dart(dart_sdk, packages__typed_data__src__typed_buffer$46dart) { 'use strict'; const core = dart_sdk.core; const _native_typed_data = dart_sdk._native_typed_data; const _internal = dart_sdk._internal; const typed_data = dart_sdk.typed_data; const dart = dart_sdk.dart; const dartx = dart_sdk.dartx; const typed_buffer = packages__typed_data__src__typed_buffer$46dart.src__typed_buffer; var serialization = Object.create(dart.library); var $buffer = dartx.buffer; var $asUint8List = dartx.asUint8List; var $setUint16 = dartx.setUint16; var $setUint32 = dartx.setUint32; var $setInt32 = dartx.setInt32; var $setInt64 = dartx.setInt64; var $setFloat64 = dartx.setFloat64; var $offsetInBytes = dartx.offsetInBytes; var $length = dartx.length; var $modulo = dartx['%']; var $asByteData = dartx.asByteData; var $lengthInBytes = dartx.lengthInBytes; var $getUint8 = dartx.getUint8; var $getUint16 = dartx.getUint16; var $getUint32 = dartx.getUint32; var $getInt32 = dartx.getInt32; var $getInt64 = dartx.getInt64; var $getFloat64 = dartx.getFloat64; var $asInt32List = dartx.asInt32List; var $asInt64List = dartx.asInt64List; var $asFloat64List = dartx.asFloat64List; dart._checkModuleNullSafetyMode(false); var T = { _: () => T }; var T$Eval = Object.assign({ _: () => T$Eval }, T); var S = { _: () => S }; var S$Eval = Object.assign({ _: () => S$Eval }, S); const CT = Object.create({ _: () => (C, CT) }); var C = []; var I = [ "file:///D:/flutter/packages/flutter/lib/src/foundation/serialization.dart", "package:flutter/src/foundation/serialization.dart" ]; var __WriteBuffer__eightBytesAsList = dart.privateName(serialization, "_#WriteBuffer#_eightBytesAsList"); var __WriteBuffer__eightBytesAsList_isSet = dart.privateName(serialization, "_#WriteBuffer#_eightBytesAsList#isSet"); var _buffer = dart.privateName(serialization, "_buffer"); var _eightBytes = dart.privateName(serialization, "_eightBytes"); var _eightBytesAsList = dart.privateName(serialization, "_eightBytesAsList"); var _alignTo = dart.privateName(serialization, "_alignTo"); serialization.WriteBuffer = class WriteBuffer extends core.Object { get [_eightBytesAsList]() { let t0; return dart.test(this[__WriteBuffer__eightBytesAsList_isSet]) ? (t0 = this[__WriteBuffer__eightBytesAsList], t0) : dart.throw(new _internal.LateError.fieldNI("_eightBytesAsList")); } set [_eightBytesAsList](t0) { if (t0 == null) dart.nullFailed(I[0], 25, 18, "null"); this[__WriteBuffer__eightBytesAsList_isSet] = true; this[__WriteBuffer__eightBytesAsList] = t0; } putUint8(byte) { if (byte == null) dart.nullFailed(I[0], 28, 21, "byte"); dart.nullCheck(this[_buffer]).add(byte); } putUint16(value, opts) { let t1; if (value == null) dart.nullFailed(I[0], 33, 22, "value"); let endian = opts && 'endian' in opts ? opts.endian : null; this[_eightBytes][$setUint16](0, value, (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); dart.nullCheck(this[_buffer]).addAll(this[_eightBytesAsList], 0, 2); } putUint32(value, opts) { let t1; if (value == null) dart.nullFailed(I[0], 39, 22, "value"); let endian = opts && 'endian' in opts ? opts.endian : null; this[_eightBytes][$setUint32](0, value, (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); dart.nullCheck(this[_buffer]).addAll(this[_eightBytesAsList], 0, 4); } putInt32(value, opts) { let t1; if (value == null) dart.nullFailed(I[0], 45, 21, "value"); let endian = opts && 'endian' in opts ? opts.endian : null; this[_eightBytes][$setInt32](0, value, (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); dart.nullCheck(this[_buffer]).addAll(this[_eightBytesAsList], 0, 4); } putInt64(value, opts) { let t1; if (value == null) dart.nullFailed(I[0], 51, 21, "value"); let endian = opts && 'endian' in opts ? opts.endian : null; this[_eightBytes][$setInt64](0, value, (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); dart.nullCheck(this[_buffer]).addAll(this[_eightBytesAsList], 0, 8); } putFloat64(value, opts) { let t1; if (value == null) dart.nullFailed(I[0], 57, 26, "value"); let endian = opts && 'endian' in opts ? opts.endian : null; this[_alignTo](8); this[_eightBytes][$setFloat64](0, value, (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); dart.nullCheck(this[_buffer]).addAll(this[_eightBytesAsList]); } putUint8List(list) { if (list == null) dart.nullFailed(I[0], 64, 31, "list"); dart.nullCheck(this[_buffer]).addAll(list); } putInt32List(list) { if (list == null) dart.nullFailed(I[0], 69, 31, "list"); this[_alignTo](4); dart.nullCheck(this[_buffer]).addAll(list[$buffer][$asUint8List](list[$offsetInBytes], 4 * dart.notNull(list[$length]))); } putInt64List(list) { if (list == null) dart.nullFailed(I[0], 75, 31, "list"); this[_alignTo](8); dart.nullCheck(this[_buffer]).addAll(list[$buffer][$asUint8List](list[$offsetInBytes], 8 * dart.notNull(list[$length]))); } putFloat64List(list) { if (list == null) dart.nullFailed(I[0], 81, 35, "list"); this[_alignTo](8); dart.nullCheck(this[_buffer]).addAll(list[$buffer][$asUint8List](list[$offsetInBytes], 8 * dart.notNull(list[$length]))); } [_alignTo](alignment) { if (alignment == null) dart.nullFailed(I[0], 86, 21, "alignment"); let mod = dart.nullCheck(this[_buffer]).length[$modulo](alignment); if (mod !== 0) { for (let i = 0; i < dart.notNull(alignment) - mod; i = i + 1) dart.nullCheck(this[_buffer]).add(0); } } done() { let result = dart.nullCheck(this[_buffer]).buffer[$asByteData](0, dart.nullCheck(this[_buffer]).lengthInBytes); this[_buffer] = null; return result; } }; (serialization.WriteBuffer.new = function() { this[__WriteBuffer__eightBytesAsList] = null; this[__WriteBuffer__eightBytesAsList_isSet] = false; this[_buffer] = new typed_buffer.Uint8Buffer.new(); this[_eightBytes] = _native_typed_data.NativeByteData.new(8); this[_eightBytesAsList] = this[_eightBytes][$buffer][$asUint8List](); }).prototype = serialization.WriteBuffer.prototype; dart.addTypeTests(serialization.WriteBuffer); dart.addTypeCaches(serialization.WriteBuffer); dart.setMethodSignature(serialization.WriteBuffer, () => ({ __proto__: dart.getMethods(serialization.WriteBuffer.__proto__), putUint8: dart.fnType(dart.void, [core.int]), putUint16: dart.fnType(dart.void, [core.int], {endian: dart.nullable(typed_data.Endian)}, {}), putUint32: dart.fnType(dart.void, [core.int], {endian: dart.nullable(typed_data.Endian)}, {}), putInt32: dart.fnType(dart.void, [core.int], {endian: dart.nullable(typed_data.Endian)}, {}), putInt64: dart.fnType(dart.void, [core.int], {endian: dart.nullable(typed_data.Endian)}, {}), putFloat64: dart.fnType(dart.void, [core.double], {endian: dart.nullable(typed_data.Endian)}, {}), putUint8List: dart.fnType(dart.void, [typed_data.Uint8List]), putInt32List: dart.fnType(dart.void, [typed_data.Int32List]), putInt64List: dart.fnType(dart.void, [typed_data.Int64List]), putFloat64List: dart.fnType(dart.void, [typed_data.Float64List]), [_alignTo]: dart.fnType(dart.void, [core.int]), done: dart.fnType(typed_data.ByteData, []) })); dart.setGetterSignature(serialization.WriteBuffer, () => ({ __proto__: dart.getGetters(serialization.WriteBuffer.__proto__), [_eightBytesAsList]: typed_data.Uint8List })); dart.setSetterSignature(serialization.WriteBuffer, () => ({ __proto__: dart.getSetters(serialization.WriteBuffer.__proto__), [_eightBytesAsList]: typed_data.Uint8List })); dart.setLibraryUri(serialization.WriteBuffer, I[1]); dart.setFieldSignature(serialization.WriteBuffer, () => ({ __proto__: dart.getFields(serialization.WriteBuffer.__proto__), [_buffer]: dart.fieldType(dart.nullable(typed_buffer.Uint8Buffer)), [_eightBytes]: dart.finalFieldType(typed_data.ByteData), [__WriteBuffer__eightBytesAsList]: dart.fieldType(dart.nullable(typed_data.Uint8List)), [__WriteBuffer__eightBytesAsList_isSet]: dart.fieldType(core.bool) })); var data$ = dart.privateName(serialization, "ReadBuffer.data"); var _position = dart.privateName(serialization, "_position"); serialization.ReadBuffer = class ReadBuffer extends core.Object { get data() { return this[data$]; } set data(value) { super.data = value; } get hasRemaining() { return dart.notNull(this[_position]) < dart.notNull(this.data[$lengthInBytes]); } getUint8() { let t1; return this.data[$getUint8]((t1 = this[_position], this[_position] = dart.notNull(t1) + 1, t1)); } getUint16(opts) { let t1; let endian = opts && 'endian' in opts ? opts.endian : null; let value = this.data[$getUint16](this[_position], (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); this[_position] = dart.notNull(this[_position]) + 2; return value; } getUint32(opts) { let t1; let endian = opts && 'endian' in opts ? opts.endian : null; let value = this.data[$getUint32](this[_position], (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); this[_position] = dart.notNull(this[_position]) + 4; return value; } getInt32(opts) { let t1; let endian = opts && 'endian' in opts ? opts.endian : null; let value = this.data[$getInt32](this[_position], (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); this[_position] = dart.notNull(this[_position]) + 4; return value; } getInt64(opts) { let t1; let endian = opts && 'endian' in opts ? opts.endian : null; let value = this.data[$getInt64](this[_position], (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); this[_position] = dart.notNull(this[_position]) + 8; return value; } getFloat64(opts) { let t1; let endian = opts && 'endian' in opts ? opts.endian : null; this[_alignTo](8); let value = this.data[$getFloat64](this[_position], (t1 = endian, t1 == null ? typed_data.Endian.host : t1)); this[_position] = dart.notNull(this[_position]) + 8; return value; } getUint8List(length) { if (length == null) dart.nullFailed(I[0], 161, 30, "length"); let list = this.data[$buffer][$asUint8List](dart.notNull(this.data[$offsetInBytes]) + dart.notNull(this[_position]), length); this[_position] = dart.notNull(this[_position]) + dart.notNull(length); return list; } getInt32List(length) { if (length == null) dart.nullFailed(I[0], 168, 30, "length"); this[_alignTo](4); let list = this.data[$buffer][$asInt32List](dart.notNull(this.data[$offsetInBytes]) + dart.notNull(this[_position]), length); this[_position] = dart.notNull(this[_position]) + 4 * dart.notNull(length); return list; } getInt64List(length) { if (length == null) dart.nullFailed(I[0], 176, 30, "length"); this[_alignTo](8); let list = this.data[$buffer][$asInt64List](dart.notNull(this.data[$offsetInBytes]) + dart.notNull(this[_position]), length); this[_position] = dart.notNull(this[_position]) + 8 * dart.notNull(length); return list; } getFloat64List(length) { if (length == null) dart.nullFailed(I[0], 184, 34, "length"); this[_alignTo](8); let list = this.data[$buffer][$asFloat64List](dart.notNull(this.data[$offsetInBytes]) + dart.notNull(this[_position]), length); this[_position] = dart.notNull(this[_position]) + 8 * dart.notNull(length); return list; } [_alignTo](alignment) { if (alignment == null) dart.nullFailed(I[0], 191, 21, "alignment"); let mod = this[_position][$modulo](alignment); if (mod !== 0) this[_position] = dart.notNull(this[_position]) + (dart.notNull(alignment) - mod); } }; (serialization.ReadBuffer.new = function(data) { if (data == null) dart.nullFailed(I[0], 107, 19, "data"); this[_position] = 0; this[data$] = data; if (!(data != null)) dart.assertFailed(null, I[0], 108, 14, "data != null"); ; }).prototype = serialization.ReadBuffer.prototype; dart.addTypeTests(serialization.ReadBuffer); dart.addTypeCaches(serialization.ReadBuffer); dart.setMethodSignature(serialization.ReadBuffer, () => ({ __proto__: dart.getMethods(serialization.ReadBuffer.__proto__), getUint8: dart.fnType(core.int, []), getUint16: dart.fnType(core.int, [], {endian: dart.nullable(typed_data.Endian)}, {}), getUint32: dart.fnType(core.int, [], {endian: dart.nullable(typed_data.Endian)}, {}), getInt32: dart.fnType(core.int, [], {endian: dart.nullable(typed_data.Endian)}, {}), getInt64: dart.fnType(core.int, [], {endian: dart.nullable(typed_data.Endian)}, {}), getFloat64: dart.fnType(core.double, [], {endian: dart.nullable(typed_data.Endian)}, {}), getUint8List: dart.fnType(typed_data.Uint8List, [core.int]), getInt32List: dart.fnType(typed_data.Int32List, [core.int]), getInt64List: dart.fnType(typed_data.Int64List, [core.int]), getFloat64List: dart.fnType(typed_data.Float64List, [core.int]), [_alignTo]: dart.fnType(dart.void, [core.int]) })); dart.setGetterSignature(serialization.ReadBuffer, () => ({ __proto__: dart.getGetters(serialization.ReadBuffer.__proto__), hasRemaining: core.bool })); dart.setLibraryUri(serialization.ReadBuffer, I[1]); dart.setFieldSignature(serialization.ReadBuffer, () => ({ __proto__: dart.getFields(serialization.ReadBuffer.__proto__), data: dart.finalFieldType(typed_data.ByteData), [_position]: dart.fieldType(core.int) })); dart.trackLibraries("packages/flutter/src/foundation/serialization.dart", { "package:flutter/src/foundation/ser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;AACI,kBAAQ,AAAK,uBAAW,kBAAkB,KAAP,MAAM,EAAN,aAAiB;AACnD,MAAd,kBAAU,aAAV,mBAAa;AACb,YAAO,MAAK;IACd;;UAG2B;AACT,iBAAO,AAAK,AAAO,iCAA+B,aAAnB,AAAK,0CAAgB,kBAAW,MAAM;AAClE,MAAnB,kBAAU,aAAV,gCAAa,MAAM;AACnB,YAAO,KAAI;IACb;;UAG2B;AACd,MAAX,eAAS;AACO,iBAAO,AAAK,AAAO,iCAA+B,aAAnB,AAAK,0CAAgB,kBAAW,MAAM;AAC9D,MAAvB,kBAAU,aAAV,mBAAa,AAAE,iBAAE,MAAM;AACvB,YAAO,KAAI;IACb;;UAG2B;AACd,MAAX,eAAS;AACO,iBAAO,AAAK,AAAO,iCAA+B,aAAnB,AAAK,0CAAgB,kBAAW,MAAM;AAC9D,MAAvB,kBAAU,aAAV,mBAAa,AAAE,iBAAE,MAAM;AACvB,YAAO,KAAI;IACb;;UAG+B;AAClB,MAAX,eAAS;AACS,iBAAO,AAAK,AAAO,mCAAiC,aAAnB,AAAK,0CAAgB,kBAAW,MAAM;AAClE,MAAvB,kBAAU,aAAV,mBAAa,AAAE,iBAAE,MAAM;AACvB,YAAO,KAAI;IACb;;UAEkB;AACN,gBAAM,AAAU,yBAAE,SAAS;AACrC,UAAI,AAAI,GAAD,KAAI,GACT,AAA4B,kBAAlB,aAAV,oBAAuB,aAAV,SAAS,IAAG,GAAG;IAChC;;;QAxFgB;IAOZ,kBAAY;IAPA;UACL,AAAK,IAAD;;EAAS","file":"../../../../../../packages/flutter/src/foundation/serialization.dart.lib.js"}'); // Exports: return { src__foundation__serialization: serialization }; })); //# sourceMappingURL=serialization.dart.lib.js.map