@deck.gl/carto 8.7.0-beta.3 → 8.7.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.dev.js CHANGED
@@ -27662,6 +27662,101 @@ var forEach = function () {
27662
27662
  };
27663
27663
  }();
27664
27664
 
27665
+ /***/ }),
27666
+
27667
+ /***/ "../../node_modules/ieee754/index.js":
27668
+ /*!****************************************************************!*\
27669
+ !*** /Users/alasarr/dev/deck.gl/node_modules/ieee754/index.js ***!
27670
+ \****************************************************************/
27671
+ /*! no static exports found */
27672
+ /***/ (function(module, exports) {
27673
+
27674
+ exports.read = function (buffer, offset, isLE, mLen, nBytes) {
27675
+ var e, m
27676
+ var eLen = (nBytes * 8) - mLen - 1
27677
+ var eMax = (1 << eLen) - 1
27678
+ var eBias = eMax >> 1
27679
+ var nBits = -7
27680
+ var i = isLE ? (nBytes - 1) : 0
27681
+ var d = isLE ? -1 : 1
27682
+ var s = buffer[offset + i]
27683
+
27684
+ i += d
27685
+
27686
+ e = s & ((1 << (-nBits)) - 1)
27687
+ s >>= (-nBits)
27688
+ nBits += eLen
27689
+ for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
27690
+
27691
+ m = e & ((1 << (-nBits)) - 1)
27692
+ e >>= (-nBits)
27693
+ nBits += mLen
27694
+ for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
27695
+
27696
+ if (e === 0) {
27697
+ e = 1 - eBias
27698
+ } else if (e === eMax) {
27699
+ return m ? NaN : ((s ? -1 : 1) * Infinity)
27700
+ } else {
27701
+ m = m + Math.pow(2, mLen)
27702
+ e = e - eBias
27703
+ }
27704
+ return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
27705
+ }
27706
+
27707
+ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
27708
+ var e, m, c
27709
+ var eLen = (nBytes * 8) - mLen - 1
27710
+ var eMax = (1 << eLen) - 1
27711
+ var eBias = eMax >> 1
27712
+ var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
27713
+ var i = isLE ? 0 : (nBytes - 1)
27714
+ var d = isLE ? 1 : -1
27715
+ var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
27716
+
27717
+ value = Math.abs(value)
27718
+
27719
+ if (isNaN(value) || value === Infinity) {
27720
+ m = isNaN(value) ? 1 : 0
27721
+ e = eMax
27722
+ } else {
27723
+ e = Math.floor(Math.log(value) / Math.LN2)
27724
+ if (value * (c = Math.pow(2, -e)) < 1) {
27725
+ e--
27726
+ c *= 2
27727
+ }
27728
+ if (e + eBias >= 1) {
27729
+ value += rt / c
27730
+ } else {
27731
+ value += rt * Math.pow(2, 1 - eBias)
27732
+ }
27733
+ if (value * c >= 2) {
27734
+ e++
27735
+ c /= 2
27736
+ }
27737
+
27738
+ if (e + eBias >= eMax) {
27739
+ m = 0
27740
+ e = eMax
27741
+ } else if (e + eBias >= 1) {
27742
+ m = ((value * c) - 1) * Math.pow(2, mLen)
27743
+ e = e + eBias
27744
+ } else {
27745
+ m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
27746
+ e = 0
27747
+ }
27748
+ }
27749
+
27750
+ for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
27751
+
27752
+ e = (e << mLen) | m
27753
+ eLen += mLen
27754
+ for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
27755
+
27756
+ buffer[offset + i - d] |= s * 128
27757
+ }
27758
+
27759
+
27665
27760
  /***/ }),
27666
27761
 
27667
27762
  /***/ "../../node_modules/internmap/src/index.js":
@@ -50078,6 +50173,660 @@ webpackContext.id = "../../node_modules/moment/locale sync recursive ^\\.\\/.*$"
50078
50173
 
50079
50174
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "../../node_modules/webpack/buildin/module.js")(module)))
50080
50175
 
50176
+ /***/ }),
50177
+
50178
+ /***/ "../../node_modules/pbf/index.js":
50179
+ /*!************************************************************!*\
50180
+ !*** /Users/alasarr/dev/deck.gl/node_modules/pbf/index.js ***!
50181
+ \************************************************************/
50182
+ /*! no static exports found */
50183
+ /***/ (function(module, exports, __webpack_require__) {
50184
+
50185
+ "use strict";
50186
+
50187
+
50188
+ module.exports = Pbf;
50189
+
50190
+ var ieee754 = __webpack_require__(/*! ieee754 */ "../../node_modules/ieee754/index.js");
50191
+
50192
+ function Pbf(buf) {
50193
+ this.buf = ArrayBuffer.isView && ArrayBuffer.isView(buf) ? buf : new Uint8Array(buf || 0);
50194
+ this.pos = 0;
50195
+ this.type = 0;
50196
+ this.length = this.buf.length;
50197
+ }
50198
+
50199
+ Pbf.Varint = 0; // varint: int32, int64, uint32, uint64, sint32, sint64, bool, enum
50200
+ Pbf.Fixed64 = 1; // 64-bit: double, fixed64, sfixed64
50201
+ Pbf.Bytes = 2; // length-delimited: string, bytes, embedded messages, packed repeated fields
50202
+ Pbf.Fixed32 = 5; // 32-bit: float, fixed32, sfixed32
50203
+
50204
+ var SHIFT_LEFT_32 = (1 << 16) * (1 << 16),
50205
+ SHIFT_RIGHT_32 = 1 / SHIFT_LEFT_32;
50206
+
50207
+ // Threshold chosen based on both benchmarking and knowledge about browser string
50208
+ // data structures (which currently switch structure types at 12 bytes or more)
50209
+ var TEXT_DECODER_MIN_LENGTH = 12;
50210
+ var utf8TextDecoder = typeof TextDecoder === 'undefined' ? null : new TextDecoder('utf8');
50211
+
50212
+ Pbf.prototype = {
50213
+
50214
+ destroy: function() {
50215
+ this.buf = null;
50216
+ },
50217
+
50218
+ // === READING =================================================================
50219
+
50220
+ readFields: function(readField, result, end) {
50221
+ end = end || this.length;
50222
+
50223
+ while (this.pos < end) {
50224
+ var val = this.readVarint(),
50225
+ tag = val >> 3,
50226
+ startPos = this.pos;
50227
+
50228
+ this.type = val & 0x7;
50229
+ readField(tag, result, this);
50230
+
50231
+ if (this.pos === startPos) this.skip(val);
50232
+ }
50233
+ return result;
50234
+ },
50235
+
50236
+ readMessage: function(readField, result) {
50237
+ return this.readFields(readField, result, this.readVarint() + this.pos);
50238
+ },
50239
+
50240
+ readFixed32: function() {
50241
+ var val = readUInt32(this.buf, this.pos);
50242
+ this.pos += 4;
50243
+ return val;
50244
+ },
50245
+
50246
+ readSFixed32: function() {
50247
+ var val = readInt32(this.buf, this.pos);
50248
+ this.pos += 4;
50249
+ return val;
50250
+ },
50251
+
50252
+ // 64-bit int handling is based on github.com/dpw/node-buffer-more-ints (MIT-licensed)
50253
+
50254
+ readFixed64: function() {
50255
+ var val = readUInt32(this.buf, this.pos) + readUInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
50256
+ this.pos += 8;
50257
+ return val;
50258
+ },
50259
+
50260
+ readSFixed64: function() {
50261
+ var val = readUInt32(this.buf, this.pos) + readInt32(this.buf, this.pos + 4) * SHIFT_LEFT_32;
50262
+ this.pos += 8;
50263
+ return val;
50264
+ },
50265
+
50266
+ readFloat: function() {
50267
+ var val = ieee754.read(this.buf, this.pos, true, 23, 4);
50268
+ this.pos += 4;
50269
+ return val;
50270
+ },
50271
+
50272
+ readDouble: function() {
50273
+ var val = ieee754.read(this.buf, this.pos, true, 52, 8);
50274
+ this.pos += 8;
50275
+ return val;
50276
+ },
50277
+
50278
+ readVarint: function(isSigned) {
50279
+ var buf = this.buf,
50280
+ val, b;
50281
+
50282
+ b = buf[this.pos++]; val = b & 0x7f; if (b < 0x80) return val;
50283
+ b = buf[this.pos++]; val |= (b & 0x7f) << 7; if (b < 0x80) return val;
50284
+ b = buf[this.pos++]; val |= (b & 0x7f) << 14; if (b < 0x80) return val;
50285
+ b = buf[this.pos++]; val |= (b & 0x7f) << 21; if (b < 0x80) return val;
50286
+ b = buf[this.pos]; val |= (b & 0x0f) << 28;
50287
+
50288
+ return readVarintRemainder(val, isSigned, this);
50289
+ },
50290
+
50291
+ readVarint64: function() { // for compatibility with v2.0.1
50292
+ return this.readVarint(true);
50293
+ },
50294
+
50295
+ readSVarint: function() {
50296
+ var num = this.readVarint();
50297
+ return num % 2 === 1 ? (num + 1) / -2 : num / 2; // zigzag encoding
50298
+ },
50299
+
50300
+ readBoolean: function() {
50301
+ return Boolean(this.readVarint());
50302
+ },
50303
+
50304
+ readString: function() {
50305
+ var end = this.readVarint() + this.pos;
50306
+ var pos = this.pos;
50307
+ this.pos = end;
50308
+
50309
+ if (end - pos >= TEXT_DECODER_MIN_LENGTH && utf8TextDecoder) {
50310
+ // longer strings are fast with the built-in browser TextDecoder API
50311
+ return readUtf8TextDecoder(this.buf, pos, end);
50312
+ }
50313
+ // short strings are fast with our custom implementation
50314
+ return readUtf8(this.buf, pos, end);
50315
+ },
50316
+
50317
+ readBytes: function() {
50318
+ var end = this.readVarint() + this.pos,
50319
+ buffer = this.buf.subarray(this.pos, end);
50320
+ this.pos = end;
50321
+ return buffer;
50322
+ },
50323
+
50324
+ // verbose for performance reasons; doesn't affect gzipped size
50325
+
50326
+ readPackedVarint: function(arr, isSigned) {
50327
+ if (this.type !== Pbf.Bytes) return arr.push(this.readVarint(isSigned));
50328
+ var end = readPackedEnd(this);
50329
+ arr = arr || [];
50330
+ while (this.pos < end) arr.push(this.readVarint(isSigned));
50331
+ return arr;
50332
+ },
50333
+ readPackedSVarint: function(arr) {
50334
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSVarint());
50335
+ var end = readPackedEnd(this);
50336
+ arr = arr || [];
50337
+ while (this.pos < end) arr.push(this.readSVarint());
50338
+ return arr;
50339
+ },
50340
+ readPackedBoolean: function(arr) {
50341
+ if (this.type !== Pbf.Bytes) return arr.push(this.readBoolean());
50342
+ var end = readPackedEnd(this);
50343
+ arr = arr || [];
50344
+ while (this.pos < end) arr.push(this.readBoolean());
50345
+ return arr;
50346
+ },
50347
+ readPackedFloat: function(arr) {
50348
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFloat());
50349
+ var end = readPackedEnd(this);
50350
+ arr = arr || [];
50351
+ while (this.pos < end) arr.push(this.readFloat());
50352
+ return arr;
50353
+ },
50354
+ readPackedDouble: function(arr) {
50355
+ if (this.type !== Pbf.Bytes) return arr.push(this.readDouble());
50356
+ var end = readPackedEnd(this);
50357
+ arr = arr || [];
50358
+ while (this.pos < end) arr.push(this.readDouble());
50359
+ return arr;
50360
+ },
50361
+ readPackedFixed32: function(arr) {
50362
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFixed32());
50363
+ var end = readPackedEnd(this);
50364
+ arr = arr || [];
50365
+ while (this.pos < end) arr.push(this.readFixed32());
50366
+ return arr;
50367
+ },
50368
+ readPackedSFixed32: function(arr) {
50369
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed32());
50370
+ var end = readPackedEnd(this);
50371
+ arr = arr || [];
50372
+ while (this.pos < end) arr.push(this.readSFixed32());
50373
+ return arr;
50374
+ },
50375
+ readPackedFixed64: function(arr) {
50376
+ if (this.type !== Pbf.Bytes) return arr.push(this.readFixed64());
50377
+ var end = readPackedEnd(this);
50378
+ arr = arr || [];
50379
+ while (this.pos < end) arr.push(this.readFixed64());
50380
+ return arr;
50381
+ },
50382
+ readPackedSFixed64: function(arr) {
50383
+ if (this.type !== Pbf.Bytes) return arr.push(this.readSFixed64());
50384
+ var end = readPackedEnd(this);
50385
+ arr = arr || [];
50386
+ while (this.pos < end) arr.push(this.readSFixed64());
50387
+ return arr;
50388
+ },
50389
+
50390
+ skip: function(val) {
50391
+ var type = val & 0x7;
50392
+ if (type === Pbf.Varint) while (this.buf[this.pos++] > 0x7f) {}
50393
+ else if (type === Pbf.Bytes) this.pos = this.readVarint() + this.pos;
50394
+ else if (type === Pbf.Fixed32) this.pos += 4;
50395
+ else if (type === Pbf.Fixed64) this.pos += 8;
50396
+ else throw new Error('Unimplemented type: ' + type);
50397
+ },
50398
+
50399
+ // === WRITING =================================================================
50400
+
50401
+ writeTag: function(tag, type) {
50402
+ this.writeVarint((tag << 3) | type);
50403
+ },
50404
+
50405
+ realloc: function(min) {
50406
+ var length = this.length || 16;
50407
+
50408
+ while (length < this.pos + min) length *= 2;
50409
+
50410
+ if (length !== this.length) {
50411
+ var buf = new Uint8Array(length);
50412
+ buf.set(this.buf);
50413
+ this.buf = buf;
50414
+ this.length = length;
50415
+ }
50416
+ },
50417
+
50418
+ finish: function() {
50419
+ this.length = this.pos;
50420
+ this.pos = 0;
50421
+ return this.buf.subarray(0, this.length);
50422
+ },
50423
+
50424
+ writeFixed32: function(val) {
50425
+ this.realloc(4);
50426
+ writeInt32(this.buf, val, this.pos);
50427
+ this.pos += 4;
50428
+ },
50429
+
50430
+ writeSFixed32: function(val) {
50431
+ this.realloc(4);
50432
+ writeInt32(this.buf, val, this.pos);
50433
+ this.pos += 4;
50434
+ },
50435
+
50436
+ writeFixed64: function(val) {
50437
+ this.realloc(8);
50438
+ writeInt32(this.buf, val & -1, this.pos);
50439
+ writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
50440
+ this.pos += 8;
50441
+ },
50442
+
50443
+ writeSFixed64: function(val) {
50444
+ this.realloc(8);
50445
+ writeInt32(this.buf, val & -1, this.pos);
50446
+ writeInt32(this.buf, Math.floor(val * SHIFT_RIGHT_32), this.pos + 4);
50447
+ this.pos += 8;
50448
+ },
50449
+
50450
+ writeVarint: function(val) {
50451
+ val = +val || 0;
50452
+
50453
+ if (val > 0xfffffff || val < 0) {
50454
+ writeBigVarint(val, this);
50455
+ return;
50456
+ }
50457
+
50458
+ this.realloc(4);
50459
+
50460
+ this.buf[this.pos++] = val & 0x7f | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
50461
+ this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
50462
+ this.buf[this.pos++] = ((val >>>= 7) & 0x7f) | (val > 0x7f ? 0x80 : 0); if (val <= 0x7f) return;
50463
+ this.buf[this.pos++] = (val >>> 7) & 0x7f;
50464
+ },
50465
+
50466
+ writeSVarint: function(val) {
50467
+ this.writeVarint(val < 0 ? -val * 2 - 1 : val * 2);
50468
+ },
50469
+
50470
+ writeBoolean: function(val) {
50471
+ this.writeVarint(Boolean(val));
50472
+ },
50473
+
50474
+ writeString: function(str) {
50475
+ str = String(str);
50476
+ this.realloc(str.length * 4);
50477
+
50478
+ this.pos++; // reserve 1 byte for short string length
50479
+
50480
+ var startPos = this.pos;
50481
+ // write the string directly to the buffer and see how much was written
50482
+ this.pos = writeUtf8(this.buf, str, this.pos);
50483
+ var len = this.pos - startPos;
50484
+
50485
+ if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
50486
+
50487
+ // finally, write the message length in the reserved place and restore the position
50488
+ this.pos = startPos - 1;
50489
+ this.writeVarint(len);
50490
+ this.pos += len;
50491
+ },
50492
+
50493
+ writeFloat: function(val) {
50494
+ this.realloc(4);
50495
+ ieee754.write(this.buf, val, this.pos, true, 23, 4);
50496
+ this.pos += 4;
50497
+ },
50498
+
50499
+ writeDouble: function(val) {
50500
+ this.realloc(8);
50501
+ ieee754.write(this.buf, val, this.pos, true, 52, 8);
50502
+ this.pos += 8;
50503
+ },
50504
+
50505
+ writeBytes: function(buffer) {
50506
+ var len = buffer.length;
50507
+ this.writeVarint(len);
50508
+ this.realloc(len);
50509
+ for (var i = 0; i < len; i++) this.buf[this.pos++] = buffer[i];
50510
+ },
50511
+
50512
+ writeRawMessage: function(fn, obj) {
50513
+ this.pos++; // reserve 1 byte for short message length
50514
+
50515
+ // write the message directly to the buffer and see how much was written
50516
+ var startPos = this.pos;
50517
+ fn(obj, this);
50518
+ var len = this.pos - startPos;
50519
+
50520
+ if (len >= 0x80) makeRoomForExtraLength(startPos, len, this);
50521
+
50522
+ // finally, write the message length in the reserved place and restore the position
50523
+ this.pos = startPos - 1;
50524
+ this.writeVarint(len);
50525
+ this.pos += len;
50526
+ },
50527
+
50528
+ writeMessage: function(tag, fn, obj) {
50529
+ this.writeTag(tag, Pbf.Bytes);
50530
+ this.writeRawMessage(fn, obj);
50531
+ },
50532
+
50533
+ writePackedVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedVarint, arr); },
50534
+ writePackedSVarint: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSVarint, arr); },
50535
+ writePackedBoolean: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedBoolean, arr); },
50536
+ writePackedFloat: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFloat, arr); },
50537
+ writePackedDouble: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedDouble, arr); },
50538
+ writePackedFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed32, arr); },
50539
+ writePackedSFixed32: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed32, arr); },
50540
+ writePackedFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedFixed64, arr); },
50541
+ writePackedSFixed64: function(tag, arr) { if (arr.length) this.writeMessage(tag, writePackedSFixed64, arr); },
50542
+
50543
+ writeBytesField: function(tag, buffer) {
50544
+ this.writeTag(tag, Pbf.Bytes);
50545
+ this.writeBytes(buffer);
50546
+ },
50547
+ writeFixed32Field: function(tag, val) {
50548
+ this.writeTag(tag, Pbf.Fixed32);
50549
+ this.writeFixed32(val);
50550
+ },
50551
+ writeSFixed32Field: function(tag, val) {
50552
+ this.writeTag(tag, Pbf.Fixed32);
50553
+ this.writeSFixed32(val);
50554
+ },
50555
+ writeFixed64Field: function(tag, val) {
50556
+ this.writeTag(tag, Pbf.Fixed64);
50557
+ this.writeFixed64(val);
50558
+ },
50559
+ writeSFixed64Field: function(tag, val) {
50560
+ this.writeTag(tag, Pbf.Fixed64);
50561
+ this.writeSFixed64(val);
50562
+ },
50563
+ writeVarintField: function(tag, val) {
50564
+ this.writeTag(tag, Pbf.Varint);
50565
+ this.writeVarint(val);
50566
+ },
50567
+ writeSVarintField: function(tag, val) {
50568
+ this.writeTag(tag, Pbf.Varint);
50569
+ this.writeSVarint(val);
50570
+ },
50571
+ writeStringField: function(tag, str) {
50572
+ this.writeTag(tag, Pbf.Bytes);
50573
+ this.writeString(str);
50574
+ },
50575
+ writeFloatField: function(tag, val) {
50576
+ this.writeTag(tag, Pbf.Fixed32);
50577
+ this.writeFloat(val);
50578
+ },
50579
+ writeDoubleField: function(tag, val) {
50580
+ this.writeTag(tag, Pbf.Fixed64);
50581
+ this.writeDouble(val);
50582
+ },
50583
+ writeBooleanField: function(tag, val) {
50584
+ this.writeVarintField(tag, Boolean(val));
50585
+ }
50586
+ };
50587
+
50588
+ function readVarintRemainder(l, s, p) {
50589
+ var buf = p.buf,
50590
+ h, b;
50591
+
50592
+ b = buf[p.pos++]; h = (b & 0x70) >> 4; if (b < 0x80) return toNum(l, h, s);
50593
+ b = buf[p.pos++]; h |= (b & 0x7f) << 3; if (b < 0x80) return toNum(l, h, s);
50594
+ b = buf[p.pos++]; h |= (b & 0x7f) << 10; if (b < 0x80) return toNum(l, h, s);
50595
+ b = buf[p.pos++]; h |= (b & 0x7f) << 17; if (b < 0x80) return toNum(l, h, s);
50596
+ b = buf[p.pos++]; h |= (b & 0x7f) << 24; if (b < 0x80) return toNum(l, h, s);
50597
+ b = buf[p.pos++]; h |= (b & 0x01) << 31; if (b < 0x80) return toNum(l, h, s);
50598
+
50599
+ throw new Error('Expected varint not more than 10 bytes');
50600
+ }
50601
+
50602
+ function readPackedEnd(pbf) {
50603
+ return pbf.type === Pbf.Bytes ?
50604
+ pbf.readVarint() + pbf.pos : pbf.pos + 1;
50605
+ }
50606
+
50607
+ function toNum(low, high, isSigned) {
50608
+ if (isSigned) {
50609
+ return high * 0x100000000 + (low >>> 0);
50610
+ }
50611
+
50612
+ return ((high >>> 0) * 0x100000000) + (low >>> 0);
50613
+ }
50614
+
50615
+ function writeBigVarint(val, pbf) {
50616
+ var low, high;
50617
+
50618
+ if (val >= 0) {
50619
+ low = (val % 0x100000000) | 0;
50620
+ high = (val / 0x100000000) | 0;
50621
+ } else {
50622
+ low = ~(-val % 0x100000000);
50623
+ high = ~(-val / 0x100000000);
50624
+
50625
+ if (low ^ 0xffffffff) {
50626
+ low = (low + 1) | 0;
50627
+ } else {
50628
+ low = 0;
50629
+ high = (high + 1) | 0;
50630
+ }
50631
+ }
50632
+
50633
+ if (val >= 0x10000000000000000 || val < -0x10000000000000000) {
50634
+ throw new Error('Given varint doesn\'t fit into 10 bytes');
50635
+ }
50636
+
50637
+ pbf.realloc(10);
50638
+
50639
+ writeBigVarintLow(low, high, pbf);
50640
+ writeBigVarintHigh(high, pbf);
50641
+ }
50642
+
50643
+ function writeBigVarintLow(low, high, pbf) {
50644
+ pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
50645
+ pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
50646
+ pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
50647
+ pbf.buf[pbf.pos++] = low & 0x7f | 0x80; low >>>= 7;
50648
+ pbf.buf[pbf.pos] = low & 0x7f;
50649
+ }
50650
+
50651
+ function writeBigVarintHigh(high, pbf) {
50652
+ var lsb = (high & 0x07) << 4;
50653
+
50654
+ pbf.buf[pbf.pos++] |= lsb | ((high >>>= 3) ? 0x80 : 0); if (!high) return;
50655
+ pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
50656
+ pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
50657
+ pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
50658
+ pbf.buf[pbf.pos++] = high & 0x7f | ((high >>>= 7) ? 0x80 : 0); if (!high) return;
50659
+ pbf.buf[pbf.pos++] = high & 0x7f;
50660
+ }
50661
+
50662
+ function makeRoomForExtraLength(startPos, len, pbf) {
50663
+ var extraLen =
50664
+ len <= 0x3fff ? 1 :
50665
+ len <= 0x1fffff ? 2 :
50666
+ len <= 0xfffffff ? 3 : Math.floor(Math.log(len) / (Math.LN2 * 7));
50667
+
50668
+ // if 1 byte isn't enough for encoding message length, shift the data to the right
50669
+ pbf.realloc(extraLen);
50670
+ for (var i = pbf.pos - 1; i >= startPos; i--) pbf.buf[i + extraLen] = pbf.buf[i];
50671
+ }
50672
+
50673
+ function writePackedVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeVarint(arr[i]); }
50674
+ function writePackedSVarint(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSVarint(arr[i]); }
50675
+ function writePackedFloat(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFloat(arr[i]); }
50676
+ function writePackedDouble(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeDouble(arr[i]); }
50677
+ function writePackedBoolean(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeBoolean(arr[i]); }
50678
+ function writePackedFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed32(arr[i]); }
50679
+ function writePackedSFixed32(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed32(arr[i]); }
50680
+ function writePackedFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeFixed64(arr[i]); }
50681
+ function writePackedSFixed64(arr, pbf) { for (var i = 0; i < arr.length; i++) pbf.writeSFixed64(arr[i]); }
50682
+
50683
+ // Buffer code below from https://github.com/feross/buffer, MIT-licensed
50684
+
50685
+ function readUInt32(buf, pos) {
50686
+ return ((buf[pos]) |
50687
+ (buf[pos + 1] << 8) |
50688
+ (buf[pos + 2] << 16)) +
50689
+ (buf[pos + 3] * 0x1000000);
50690
+ }
50691
+
50692
+ function writeInt32(buf, val, pos) {
50693
+ buf[pos] = val;
50694
+ buf[pos + 1] = (val >>> 8);
50695
+ buf[pos + 2] = (val >>> 16);
50696
+ buf[pos + 3] = (val >>> 24);
50697
+ }
50698
+
50699
+ function readInt32(buf, pos) {
50700
+ return ((buf[pos]) |
50701
+ (buf[pos + 1] << 8) |
50702
+ (buf[pos + 2] << 16)) +
50703
+ (buf[pos + 3] << 24);
50704
+ }
50705
+
50706
+ function readUtf8(buf, pos, end) {
50707
+ var str = '';
50708
+ var i = pos;
50709
+
50710
+ while (i < end) {
50711
+ var b0 = buf[i];
50712
+ var c = null; // codepoint
50713
+ var bytesPerSequence =
50714
+ b0 > 0xEF ? 4 :
50715
+ b0 > 0xDF ? 3 :
50716
+ b0 > 0xBF ? 2 : 1;
50717
+
50718
+ if (i + bytesPerSequence > end) break;
50719
+
50720
+ var b1, b2, b3;
50721
+
50722
+ if (bytesPerSequence === 1) {
50723
+ if (b0 < 0x80) {
50724
+ c = b0;
50725
+ }
50726
+ } else if (bytesPerSequence === 2) {
50727
+ b1 = buf[i + 1];
50728
+ if ((b1 & 0xC0) === 0x80) {
50729
+ c = (b0 & 0x1F) << 0x6 | (b1 & 0x3F);
50730
+ if (c <= 0x7F) {
50731
+ c = null;
50732
+ }
50733
+ }
50734
+ } else if (bytesPerSequence === 3) {
50735
+ b1 = buf[i + 1];
50736
+ b2 = buf[i + 2];
50737
+ if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80) {
50738
+ c = (b0 & 0xF) << 0xC | (b1 & 0x3F) << 0x6 | (b2 & 0x3F);
50739
+ if (c <= 0x7FF || (c >= 0xD800 && c <= 0xDFFF)) {
50740
+ c = null;
50741
+ }
50742
+ }
50743
+ } else if (bytesPerSequence === 4) {
50744
+ b1 = buf[i + 1];
50745
+ b2 = buf[i + 2];
50746
+ b3 = buf[i + 3];
50747
+ if ((b1 & 0xC0) === 0x80 && (b2 & 0xC0) === 0x80 && (b3 & 0xC0) === 0x80) {
50748
+ c = (b0 & 0xF) << 0x12 | (b1 & 0x3F) << 0xC | (b2 & 0x3F) << 0x6 | (b3 & 0x3F);
50749
+ if (c <= 0xFFFF || c >= 0x110000) {
50750
+ c = null;
50751
+ }
50752
+ }
50753
+ }
50754
+
50755
+ if (c === null) {
50756
+ c = 0xFFFD;
50757
+ bytesPerSequence = 1;
50758
+
50759
+ } else if (c > 0xFFFF) {
50760
+ c -= 0x10000;
50761
+ str += String.fromCharCode(c >>> 10 & 0x3FF | 0xD800);
50762
+ c = 0xDC00 | c & 0x3FF;
50763
+ }
50764
+
50765
+ str += String.fromCharCode(c);
50766
+ i += bytesPerSequence;
50767
+ }
50768
+
50769
+ return str;
50770
+ }
50771
+
50772
+ function readUtf8TextDecoder(buf, pos, end) {
50773
+ return utf8TextDecoder.decode(buf.subarray(pos, end));
50774
+ }
50775
+
50776
+ function writeUtf8(buf, str, pos) {
50777
+ for (var i = 0, c, lead; i < str.length; i++) {
50778
+ c = str.charCodeAt(i); // code point
50779
+
50780
+ if (c > 0xD7FF && c < 0xE000) {
50781
+ if (lead) {
50782
+ if (c < 0xDC00) {
50783
+ buf[pos++] = 0xEF;
50784
+ buf[pos++] = 0xBF;
50785
+ buf[pos++] = 0xBD;
50786
+ lead = c;
50787
+ continue;
50788
+ } else {
50789
+ c = lead - 0xD800 << 10 | c - 0xDC00 | 0x10000;
50790
+ lead = null;
50791
+ }
50792
+ } else {
50793
+ if (c > 0xDBFF || (i + 1 === str.length)) {
50794
+ buf[pos++] = 0xEF;
50795
+ buf[pos++] = 0xBF;
50796
+ buf[pos++] = 0xBD;
50797
+ } else {
50798
+ lead = c;
50799
+ }
50800
+ continue;
50801
+ }
50802
+ } else if (lead) {
50803
+ buf[pos++] = 0xEF;
50804
+ buf[pos++] = 0xBF;
50805
+ buf[pos++] = 0xBD;
50806
+ lead = null;
50807
+ }
50808
+
50809
+ if (c < 0x80) {
50810
+ buf[pos++] = c;
50811
+ } else {
50812
+ if (c < 0x800) {
50813
+ buf[pos++] = c >> 0x6 | 0xC0;
50814
+ } else {
50815
+ if (c < 0x10000) {
50816
+ buf[pos++] = c >> 0xC | 0xE0;
50817
+ } else {
50818
+ buf[pos++] = c >> 0x12 | 0xF0;
50819
+ buf[pos++] = c >> 0xC & 0x3F | 0x80;
50820
+ }
50821
+ buf[pos++] = c >> 0x6 & 0x3F | 0x80;
50822
+ }
50823
+ buf[pos++] = c & 0x3F | 0x80;
50824
+ }
50825
+ }
50826
+ return pos;
50827
+ }
50828
+
50829
+
50081
50830
  /***/ }),
50082
50831
 
50083
50832
  /***/ "../../node_modules/webpack/buildin/module.js":
@@ -52139,7 +52888,7 @@ module.exports = Object.assign(deck, {
52139
52888
  /*!**************************!*\
52140
52889
  !*** ./src/api/index.js ***!
52141
52890
  \**************************/
52142
- /*! exports provided: FORMATS, MAP_TYPES, API_VERSIONS, getDataV2, CONNECTIONS, fetchLayerData, fetchMap, getData, mapInstantiation */
52891
+ /*! exports provided: FORMATS, TILE_FORMATS, MAP_TYPES, API_VERSIONS, getDataV2, CONNECTIONS, fetchLayerData, fetchMap, getData, mapInstantiation */
52143
52892
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
52144
52893
 
52145
52894
  "use strict";
@@ -52147,6 +52896,8 @@ __webpack_require__.r(__webpack_exports__);
52147
52896
  /* harmony import */ var _maps_api_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./maps-api-common */ "./src/api/maps-api-common.js");
52148
52897
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FORMATS", function() { return _maps_api_common__WEBPACK_IMPORTED_MODULE_0__["FORMATS"]; });
52149
52898
 
52899
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TILE_FORMATS", function() { return _maps_api_common__WEBPACK_IMPORTED_MODULE_0__["TILE_FORMATS"]; });
52900
+
52150
52901
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAP_TYPES", function() { return _maps_api_common__WEBPACK_IMPORTED_MODULE_0__["MAP_TYPES"]; });
52151
52902
 
52152
52903
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_VERSIONS", function() { return _maps_api_common__WEBPACK_IMPORTED_MODULE_0__["API_VERSIONS"]; });
@@ -52472,7 +53223,8 @@ const FORMATS = {
52472
53223
  NDJSON: 'ndjson',
52473
53224
  TILEJSON: 'tilejson',
52474
53225
  JSON: 'json'
52475
- };
53226
+ }; // AVAILABLE FORMATS FOR TILES
53227
+
52476
53228
  const TILE_FORMATS = {
52477
53229
  MVT: 'mvt',
52478
53230
  GEOJSON: 'geojson',
@@ -53453,7 +54205,7 @@ function buildMapsUrlFromBase(apiBaseUrl) {
53453
54205
  /*!**********************!*\
53454
54206
  !*** ./src/index.js ***!
53455
54207
  \**********************/
53456
- /*! exports provided: getDefaultCredentials, setDefaultCredentials, CartoLayer, _CartoDynamicTileLayer, BASEMAP, colorBins, colorCategories, colorContinuous, FORMATS, MAP_TYPES, API_VERSIONS, fetchLayerData, fetchMap, _getDataV2, getData, _mapInstantiation */
54208
+ /*! exports provided: getDefaultCredentials, setDefaultCredentials, CartoLayer, _CartoDynamicTileLayer, BASEMAP, colorBins, colorCategories, colorContinuous, FORMATS, TILE_FORMATS, MAP_TYPES, API_VERSIONS, fetchLayerData, fetchMap, _getDataV2, getData, _mapInstantiation */
53457
54209
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
53458
54210
 
53459
54211
  "use strict";
@@ -53484,6 +54236,8 @@ __webpack_require__.r(__webpack_exports__);
53484
54236
  /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./api */ "./src/api/index.js");
53485
54237
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "FORMATS", function() { return _api__WEBPACK_IMPORTED_MODULE_7__["FORMATS"]; });
53486
54238
 
54239
+ /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TILE_FORMATS", function() { return _api__WEBPACK_IMPORTED_MODULE_7__["TILE_FORMATS"]; });
54240
+
53487
54241
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MAP_TYPES", function() { return _api__WEBPACK_IMPORTED_MODULE_7__["MAP_TYPES"]; });
53488
54242
 
53489
54243
  /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "API_VERSIONS", function() { return _api__WEBPACK_IMPORTED_MODULE_7__["API_VERSIONS"]; });
@@ -53519,11 +54273,14 @@ __webpack_require__.r(__webpack_exports__);
53519
54273
  "use strict";
53520
54274
  __webpack_require__.r(__webpack_exports__);
53521
54275
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CartoDynamicTileLayer; });
53522
- /* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
53523
- /* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__);
53524
- /* harmony import */ var _deck_gl_extensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @deck.gl/extensions */ "../extensions/src/index.ts");
53525
- /* harmony import */ var _loaders_gl_gis__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @loaders.gl/gis */ "../../node_modules/@loaders.gl/gis/dist/esm/index.js");
53526
- /* harmony import */ var _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../api/maps-api-common */ "./src/api/maps-api-common.js");
54276
+ /* harmony import */ var pbf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! pbf */ "../../node_modules/pbf/index.js");
54277
+ /* harmony import */ var pbf__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(pbf__WEBPACK_IMPORTED_MODULE_0__);
54278
+ /* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @deck.gl/core */ "@deck.gl/core");
54279
+ /* harmony import */ var _deck_gl_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_deck_gl_core__WEBPACK_IMPORTED_MODULE_1__);
54280
+ /* harmony import */ var _deck_gl_extensions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @deck.gl/extensions */ "../extensions/src/index.ts");
54281
+ /* harmony import */ var _loaders_gl_gis__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @loaders.gl/gis */ "../../node_modules/@loaders.gl/gis/dist/esm/index.js");
54282
+ /* harmony import */ var _schema_carto_dynamic_tile__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./schema/carto-dynamic-tile */ "./src/layers/schema/carto-dynamic-tile.js");
54283
+ /* harmony import */ var _api_maps_api_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../api/maps-api-common */ "./src/api/maps-api-common.js");
53527
54284
  /* global TextDecoder */
53528
54285
 
53529
54286
 
@@ -53532,15 +54289,57 @@ __webpack_require__.r(__webpack_exports__);
53532
54289
 
53533
54290
 
53534
54291
 
54292
+
54293
+
53535
54294
  function parseJSON(arrayBuffer) {
53536
54295
  return JSON.parse(new TextDecoder().decode(arrayBuffer));
53537
54296
  }
53538
54297
 
54298
+ function parsePbf(buffer) {
54299
+ const pbf = new pbf__WEBPACK_IMPORTED_MODULE_0___default.a(buffer);
54300
+ const tile = _schema_carto_dynamic_tile__WEBPACK_IMPORTED_MODULE_4__["Tile"].read(pbf);
54301
+ return tile;
54302
+ }
54303
+
54304
+ function unpackProperties(properties) {
54305
+ if (!properties || !properties.length) {
54306
+ return [];
54307
+ }
54308
+
54309
+ return properties.map(item => {
54310
+ const currentRecord = {};
54311
+ item.data.forEach(({
54312
+ key,
54313
+ value
54314
+ }) => {
54315
+ currentRecord[key] = value;
54316
+ });
54317
+ return currentRecord;
54318
+ });
54319
+ }
54320
+
53539
54321
  function parseCartoDynamicTile(arrayBuffer, options) {
53540
54322
  if (!arrayBuffer) return null;
53541
54323
  const formatTiles = options && options.cartoDynamicTile && options.cartoDynamicTile.formatTiles;
53542
- if (formatTiles === 'geojson') return Object(_loaders_gl_gis__WEBPACK_IMPORTED_MODULE_2__["geojsonToBinary"])(parseJSON(arrayBuffer).features);
53543
- return null;
54324
+ if (formatTiles === _api_maps_api_common__WEBPACK_IMPORTED_MODULE_5__["TILE_FORMATS"].GEOJSON) return Object(_loaders_gl_gis__WEBPACK_IMPORTED_MODULE_3__["geojsonToBinary"])(parseJSON(arrayBuffer).features);
54325
+ const tile = parsePbf(arrayBuffer);
54326
+ const {
54327
+ points,
54328
+ lines,
54329
+ polygons
54330
+ } = tile;
54331
+ const data = {
54332
+ points: { ...points,
54333
+ properties: unpackProperties(points.properties)
54334
+ },
54335
+ lines: { ...lines,
54336
+ properties: unpackProperties(lines.properties)
54337
+ },
54338
+ polygons: { ...polygons,
54339
+ properties: unpackProperties(polygons.properties)
54340
+ }
54341
+ };
54342
+ return data;
53544
54343
  }
53545
54344
 
53546
54345
  const CartoDynamicTileLoader = {
@@ -53555,13 +54354,13 @@ const CartoDynamicTileLoader = {
53555
54354
  parseSync: parseCartoDynamicTile,
53556
54355
  options: {
53557
54356
  cartoDynamicTile: {
53558
- formatTiles: 'geojson'
54357
+ formatTiles: _api_maps_api_common__WEBPACK_IMPORTED_MODULE_5__["TILE_FORMATS"].BINARY
53559
54358
  }
53560
54359
  }
53561
54360
  };
53562
- class CartoDynamicTileLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["MVTLayer"] {
54361
+ class CartoDynamicTileLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__["MVTLayer"] {
53563
54362
  getTileData(tile) {
53564
- let url = Object(_deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["_getURLFromTemplate"])(this.state.data, tile);
54363
+ let url = Object(_deck_gl_core__WEBPACK_IMPORTED_MODULE_1__["_getURLFromTemplate"])(this.state.data, tile);
53565
54364
 
53566
54365
  if (!url) {
53567
54366
  return Promise.reject('Invalid URL');
@@ -53580,9 +54379,9 @@ class CartoDynamicTileLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["
53580
54379
  };
53581
54380
 
53582
54381
  if (formatTiles) {
53583
- _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["log"].assert(['geojson'].includes(formatTiles), `Invalid value for formatTiles: ${formatTiles}`);
53584
- url += `&${Object(_api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["encodeParameter"])('formatTiles', formatTiles)}`;
53585
- loadOptions.cartoBinaryTile = {
54382
+ _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__["log"].assert(Object.values(_api_maps_api_common__WEBPACK_IMPORTED_MODULE_5__["TILE_FORMATS"]).includes(formatTiles), `Invalid value for formatTiles: ${formatTiles}. Use value from TILE_FORMATS`);
54383
+ url += `&${Object(_api_maps_api_common__WEBPACK_IMPORTED_MODULE_5__["encodeParameter"])('formatTiles', formatTiles)}`;
54384
+ loadOptions.cartoDynamicTile = {
53586
54385
  formatTiles
53587
54386
  };
53588
54387
  }
@@ -53609,16 +54408,16 @@ class CartoDynamicTileLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["
53609
54408
  north
53610
54409
  }
53611
54410
  } = props.tile;
53612
- props.extensions = [new _deck_gl_extensions__WEBPACK_IMPORTED_MODULE_1__["ClipExtension"]()];
54411
+ props.extensions = [new _deck_gl_extensions__WEBPACK_IMPORTED_MODULE_2__["ClipExtension"](), ...props.extensions];
53613
54412
  props.clipBounds = [west, south, east, north];
53614
- const subLayer = new _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["GeoJsonLayer"]({ ...props
54413
+ const subLayer = new _deck_gl_core__WEBPACK_IMPORTED_MODULE_1__["GeoJsonLayer"]({ ...props
53615
54414
  });
53616
54415
  return subLayer;
53617
54416
  }
53618
54417
 
53619
54418
  }
53620
54419
  CartoDynamicTileLayer.layerName = 'CartoDynamicTileLayer';
53621
- CartoDynamicTileLayer.defaultProps = { ..._deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["MVTLayer"].defaultProps,
54420
+ CartoDynamicTileLayer.defaultProps = { ..._deck_gl_core__WEBPACK_IMPORTED_MODULE_1__["MVTLayer"].defaultProps,
53622
54421
  loaders: [CartoDynamicTileLoader]
53623
54422
  };
53624
54423
 
@@ -53676,6 +54475,9 @@ const defaultProps = {
53676
54475
  connection: null,
53677
54476
  // (String, optional): format of data
53678
54477
  format: null,
54478
+ // (String, optional): format of data
54479
+ formatTiles: _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["TILE_FORMATS"].GEOJSON,
54480
+ // TODO: for 8.7 release switch to BINARY
53679
54481
  // (String, optional): clientId identifier used for internal tracing, place here a string to identify the client who is doing the request.
53680
54482
  clientId: null,
53681
54483
  // (String, optional): name of the `geo_column` in the CARTO platform. Use this override the default column ('geom'), from which the geometry information should be fetched.
@@ -53809,14 +54611,17 @@ class CartoLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["CompositeLa
53809
54611
  } = this.state;
53810
54612
  if (!data) return null;
53811
54613
  const {
54614
+ type,
53812
54615
  updateTriggers
53813
54616
  } = this.props;
53814
54617
  let layer;
53815
54618
  /* global URLSearchParams */
53816
54619
 
53817
54620
  const tilesFormat = apiVersion === _api__WEBPACK_IMPORTED_MODULE_2__["API_VERSIONS"].V3 && format === _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["FORMATS"].TILEJSON && new URLSearchParams(data.tiles[0]).get('format');
54621
+ const nonMvtTiles = tilesFormat && tilesFormat !== _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["TILE_FORMATS"].MVT;
54622
+ const dynamicTiles = apiVersion === _api__WEBPACK_IMPORTED_MODULE_2__["API_VERSIONS"].V3 && type === _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["MAP_TYPES"].TABLE && format === _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["FORMATS"].TILEJSON;
53818
54623
 
53819
- if (tilesFormat && tilesFormat !== _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["TILE_FORMATS"].MVT) {
54624
+ if (nonMvtTiles || dynamicTiles) {
53820
54625
  layer = _carto_dynamic_tile_layer__WEBPACK_IMPORTED_MODULE_1__["default"];
53821
54626
  } else if (apiVersion === _api__WEBPACK_IMPORTED_MODULE_2__["API_VERSIONS"].V1 || apiVersion === _api__WEBPACK_IMPORTED_MODULE_2__["API_VERSIONS"].V2 || format === _api_maps_api_common__WEBPACK_IMPORTED_MODULE_3__["FORMATS"].TILEJSON) {
53822
54627
  layer = _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["MVTLayer"];
@@ -53825,9 +54630,11 @@ class CartoLayer extends _deck_gl_core__WEBPACK_IMPORTED_MODULE_0__["CompositeLa
53825
54630
  }
53826
54631
 
53827
54632
  const {
54633
+ formatTiles,
53828
54634
  uniqueIdProperty
53829
54635
  } = defaultProps;
53830
54636
  const props = {
54637
+ formatTiles,
53831
54638
  uniqueIdProperty,
53832
54639
  ...this.props
53833
54640
  };
@@ -53846,6 +54653,222 @@ CartoLayer.defaultProps = defaultProps;
53846
54653
 
53847
54654
  /***/ }),
53848
54655
 
54656
+ /***/ "./src/layers/schema/carto-dynamic-tile.js":
54657
+ /*!*************************************************!*\
54658
+ !*** ./src/layers/schema/carto-dynamic-tile.js ***!
54659
+ \*************************************************/
54660
+ /*! exports provided: Tile */
54661
+ /***/ (function(module, __webpack_exports__, __webpack_require__) {
54662
+
54663
+ "use strict";
54664
+ __webpack_require__.r(__webpack_exports__);
54665
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tile", function() { return Tile; });
54666
+ // KeyValueObject ========================================
54667
+ const KeyValueObject = {};
54668
+
54669
+ KeyValueObject.read = function (pbf, end) {
54670
+ return pbf.readFields(KeyValueObject._readField, {
54671
+ key: '',
54672
+ value: ''
54673
+ }, end);
54674
+ };
54675
+
54676
+ KeyValueObject._readField = function (tag, obj, pbf) {
54677
+ if (tag === 1) obj.key = pbf.readString();else if (tag === 2) obj.value = pbf.readString();
54678
+ }; // Properties ========================================
54679
+
54680
+
54681
+ const Properties = {};
54682
+
54683
+ Properties.read = function (pbf, end) {
54684
+ return pbf.readFields(Properties._readField, {
54685
+ data: []
54686
+ }, end);
54687
+ };
54688
+
54689
+ Properties._readField = function (tag, obj, pbf) {
54690
+ if (tag === 1) obj.data.push(KeyValueObject.read(pbf, pbf.readVarint() + pbf.pos));
54691
+ }; // Doubles ========================================
54692
+
54693
+
54694
+ const Doubles = {};
54695
+
54696
+ Doubles.read = function (pbf, end) {
54697
+ // TODO perhaps we can do better and directly map from the source
54698
+ // ArrayBuffer using ArrayBuffer.slice()
54699
+ const {
54700
+ value,
54701
+ size
54702
+ } = pbf.readFields(Doubles._readField, {
54703
+ value: [],
54704
+ size: 0
54705
+ }, end);
54706
+ return {
54707
+ value: new Float32Array(value),
54708
+ size
54709
+ };
54710
+ };
54711
+
54712
+ Doubles._readField = function (tag, obj, pbf) {
54713
+ if (tag === 1) pbf.readPackedDouble(obj.value);else if (tag === 2) obj.size = pbf.readVarint(true);
54714
+ }; // Ints ========================================
54715
+
54716
+
54717
+ const Ints = {};
54718
+
54719
+ Ints.read = function (pbf, end) {
54720
+ const {
54721
+ value,
54722
+ size
54723
+ } = pbf.readFields(Ints._readField, {
54724
+ value: [],
54725
+ size: 0
54726
+ }, end);
54727
+ return {
54728
+ value: new Uint32Array(value),
54729
+ size
54730
+ };
54731
+ };
54732
+
54733
+ Ints._readField = function (tag, obj, pbf) {
54734
+ if (tag === 1) pbf.readPackedVarint(obj.value);else if (tag === 2) obj.size = pbf.readVarint(true);
54735
+ }; // NumericProp ========================================
54736
+
54737
+
54738
+ const NumericProp = {};
54739
+
54740
+ NumericProp.read = function (pbf, end) {
54741
+ return pbf.readFields(NumericProp._readField, {
54742
+ value: []
54743
+ }, end);
54744
+ };
54745
+
54746
+ NumericProp._readField = function (tag, obj, pbf) {
54747
+ if (tag === 1) pbf.readPackedDouble(obj.value);
54748
+ }; // NumericPropKeyValue ========================================
54749
+
54750
+
54751
+ const NumericPropKeyValue = {};
54752
+
54753
+ NumericPropKeyValue.read = function (pbf, end) {
54754
+ return pbf.readFields(NumericPropKeyValue._readField, {
54755
+ key: '',
54756
+ value: null
54757
+ }, end);
54758
+ };
54759
+
54760
+ NumericPropKeyValue._readField = function (tag, obj, pbf) {
54761
+ if (tag === 1) obj.key = pbf.readString();else if (tag === 2) obj.value = NumericProp.read(pbf, pbf.readVarint() + pbf.pos);
54762
+ }; // NumericProp._FieldEntry1 ========================================
54763
+
54764
+
54765
+ NumericProp._FieldEntry1 = {};
54766
+
54767
+ NumericProp._FieldEntry1.read = function (pbf, end) {
54768
+ return pbf.readFields(NumericProp._FieldEntry1._readField, {
54769
+ key: '',
54770
+ value: 0
54771
+ }, end);
54772
+ };
54773
+
54774
+ NumericProp._FieldEntry1._readField = function (tag, obj, pbf) {
54775
+ if (tag === 1) obj.key = pbf.readString();else if (tag === 2) obj.value = pbf.readDouble();
54776
+ }; // StringProp ========================================
54777
+
54778
+
54779
+ const StringProp = {};
54780
+
54781
+ StringProp.read = function (pbf, end) {
54782
+ return pbf.readFields(StringProp._readField, {
54783
+ value: []
54784
+ }, end);
54785
+ };
54786
+
54787
+ StringProp._readField = function (tag, obj, pbf) {
54788
+ if (tag === 1) obj.value.push(pbf.readString());
54789
+ }; // Points ========================================
54790
+
54791
+
54792
+ const Points = {};
54793
+
54794
+ Points.read = function (pbf, end) {
54795
+ return pbf.readFields(Points._readField, {
54796
+ positions: null,
54797
+ globalFeatureIds: null,
54798
+ featureIds: null,
54799
+ properties: [],
54800
+ numericProps: {}
54801
+ }, end);
54802
+ };
54803
+
54804
+ Points._readField = function (tag, obj, pbf) {
54805
+ if (tag === 1) obj.positions = Doubles.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 2) obj.globalFeatureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 3) obj.featureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 4) obj.properties.push(Properties.read(pbf, pbf.readVarint() + pbf.pos));else if (tag === 5) {
54806
+ const entry = NumericPropKeyValue.read(pbf, pbf.readVarint() + pbf.pos);
54807
+ obj.numericProps[entry.key] = entry.value;
54808
+ }
54809
+ }; // Lines ========================================
54810
+
54811
+
54812
+ const Lines = {};
54813
+
54814
+ Lines.read = function (pbf, end) {
54815
+ return pbf.readFields(Lines._readField, {
54816
+ positions: null,
54817
+ pathIndices: null,
54818
+ globalFeatureIds: null,
54819
+ featureIds: null,
54820
+ properties: [],
54821
+ numericProps: {}
54822
+ }, end);
54823
+ };
54824
+
54825
+ Lines._readField = function (tag, obj, pbf) {
54826
+ if (tag === 1) obj.positions = Doubles.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 2) obj.pathIndices = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 3) obj.globalFeatureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 4) obj.featureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 5) obj.properties.push(Properties.read(pbf, pbf.readVarint() + pbf.pos));else if (tag === 6) {
54827
+ const entry = NumericPropKeyValue.read(pbf, pbf.readVarint() + pbf.pos);
54828
+ obj.numericProps[entry.key] = entry.value;
54829
+ }
54830
+ }; // Polygons ========================================
54831
+
54832
+
54833
+ const Polygons = {};
54834
+
54835
+ Polygons.read = function (pbf, end) {
54836
+ return pbf.readFields(Polygons._readField, {
54837
+ positions: null,
54838
+ polygonIndices: null,
54839
+ globalFeatureIds: null,
54840
+ featureIds: null,
54841
+ primitivePolygonIndices: null,
54842
+ triangles: null,
54843
+ properties: [],
54844
+ numericProps: {}
54845
+ }, end);
54846
+ };
54847
+
54848
+ Polygons._readField = function (tag, obj, pbf) {
54849
+ if (tag === 1) obj.positions = Doubles.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 2) obj.polygonIndices = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 3) obj.globalFeatureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 4) obj.featureIds = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 5) obj.primitivePolygonIndices = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 6) obj.triangles = Ints.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 7) obj.properties.push(Properties.read(pbf, pbf.readVarint() + pbf.pos));else if (tag === 8) {
54850
+ const entry = NumericPropKeyValue.read(pbf, pbf.readVarint() + pbf.pos);
54851
+ obj.numericProps[entry.key] = entry.value;
54852
+ }
54853
+ }; // Tile ========================================
54854
+
54855
+
54856
+ const Tile = {};
54857
+
54858
+ Tile.read = function (pbf, end) {
54859
+ return pbf.readFields(Tile._readField, {
54860
+ points: null,
54861
+ lines: null,
54862
+ polygons: null
54863
+ }, end);
54864
+ };
54865
+
54866
+ Tile._readField = function (tag, obj, pbf) {
54867
+ if (tag === 1) obj.points = Points.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 2) obj.lines = Lines.read(pbf, pbf.readVarint() + pbf.pos);else if (tag === 3) obj.polygons = Polygons.read(pbf, pbf.readVarint() + pbf.pos);
54868
+ };
54869
+
54870
+ /***/ }),
54871
+
53849
54872
  /***/ "./src/style/color-bins-style.js":
53850
54873
  /*!***************************************!*\
53851
54874
  !*** ./src/style/color-bins-style.js ***!