mapshaper 0.6.80 → 0.6.82

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/www/modules.js CHANGED
@@ -153,6 +153,760 @@ function fromByteArray (uint8) {
153
153
  },{}],2:[function(require,module,exports){
154
154
 
155
155
  },{}],3:[function(require,module,exports){
156
+ 'use strict';
157
+
158
+ var GetIntrinsic = require('get-intrinsic');
159
+
160
+ var callBind = require('./');
161
+
162
+ var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
163
+
164
+ module.exports = function callBoundIntrinsic(name, allowMissing) {
165
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
166
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
167
+ return callBind(intrinsic);
168
+ }
169
+ return intrinsic;
170
+ };
171
+
172
+ },{"./":4,"get-intrinsic":16}],4:[function(require,module,exports){
173
+ 'use strict';
174
+
175
+ var bind = require('function-bind');
176
+ var GetIntrinsic = require('get-intrinsic');
177
+ var setFunctionLength = require('set-function-length');
178
+
179
+ var $TypeError = require('es-errors/type');
180
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
181
+ var $call = GetIntrinsic('%Function.prototype.call%');
182
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
183
+
184
+ var $defineProperty = require('es-define-property');
185
+ var $max = GetIntrinsic('%Math.max%');
186
+
187
+ module.exports = function callBind(originalFunction) {
188
+ if (typeof originalFunction !== 'function') {
189
+ throw new $TypeError('a function is required');
190
+ }
191
+ var func = $reflectApply(bind, $call, arguments);
192
+ return setFunctionLength(
193
+ func,
194
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
195
+ true
196
+ );
197
+ };
198
+
199
+ var applyBind = function applyBind() {
200
+ return $reflectApply(bind, $apply, arguments);
201
+ };
202
+
203
+ if ($defineProperty) {
204
+ $defineProperty(module.exports, 'apply', { value: applyBind });
205
+ } else {
206
+ module.exports.apply = applyBind;
207
+ }
208
+
209
+ },{"es-define-property":6,"es-errors/type":12,"function-bind":15,"get-intrinsic":16,"set-function-length":61}],5:[function(require,module,exports){
210
+ 'use strict';
211
+
212
+ var $defineProperty = require('es-define-property');
213
+
214
+ var $SyntaxError = require('es-errors/syntax');
215
+ var $TypeError = require('es-errors/type');
216
+
217
+ var gopd = require('gopd');
218
+
219
+ /** @type {import('.')} */
220
+ module.exports = function defineDataProperty(
221
+ obj,
222
+ property,
223
+ value
224
+ ) {
225
+ if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
226
+ throw new $TypeError('`obj` must be an object or a function`');
227
+ }
228
+ if (typeof property !== 'string' && typeof property !== 'symbol') {
229
+ throw new $TypeError('`property` must be a string or a symbol`');
230
+ }
231
+ if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
232
+ throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
233
+ }
234
+ if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
235
+ throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
236
+ }
237
+ if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
238
+ throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
239
+ }
240
+ if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
241
+ throw new $TypeError('`loose`, if provided, must be a boolean');
242
+ }
243
+
244
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
245
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
246
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
247
+ var loose = arguments.length > 6 ? arguments[6] : false;
248
+
249
+ /* @type {false | TypedPropertyDescriptor<unknown>} */
250
+ var desc = !!gopd && gopd(obj, property);
251
+
252
+ if ($defineProperty) {
253
+ $defineProperty(obj, property, {
254
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
255
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
256
+ value: value,
257
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
258
+ });
259
+ } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
260
+ // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
261
+ obj[property] = value; // eslint-disable-line no-param-reassign
262
+ } else {
263
+ throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
264
+ }
265
+ };
266
+
267
+ },{"es-define-property":6,"es-errors/syntax":11,"es-errors/type":12,"gopd":17}],6:[function(require,module,exports){
268
+ 'use strict';
269
+
270
+ var GetIntrinsic = require('get-intrinsic');
271
+
272
+ /** @type {import('.')} */
273
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
274
+ if ($defineProperty) {
275
+ try {
276
+ $defineProperty({}, 'a', { value: 1 });
277
+ } catch (e) {
278
+ // IE 8 has a broken defineProperty
279
+ $defineProperty = false;
280
+ }
281
+ }
282
+
283
+ module.exports = $defineProperty;
284
+
285
+ },{"get-intrinsic":16}],7:[function(require,module,exports){
286
+ 'use strict';
287
+
288
+ /** @type {import('./eval')} */
289
+ module.exports = EvalError;
290
+
291
+ },{}],8:[function(require,module,exports){
292
+ 'use strict';
293
+
294
+ /** @type {import('.')} */
295
+ module.exports = Error;
296
+
297
+ },{}],9:[function(require,module,exports){
298
+ 'use strict';
299
+
300
+ /** @type {import('./range')} */
301
+ module.exports = RangeError;
302
+
303
+ },{}],10:[function(require,module,exports){
304
+ 'use strict';
305
+
306
+ /** @type {import('./ref')} */
307
+ module.exports = ReferenceError;
308
+
309
+ },{}],11:[function(require,module,exports){
310
+ 'use strict';
311
+
312
+ /** @type {import('./syntax')} */
313
+ module.exports = SyntaxError;
314
+
315
+ },{}],12:[function(require,module,exports){
316
+ 'use strict';
317
+
318
+ /** @type {import('./type')} */
319
+ module.exports = TypeError;
320
+
321
+ },{}],13:[function(require,module,exports){
322
+ 'use strict';
323
+
324
+ /** @type {import('./uri')} */
325
+ module.exports = URIError;
326
+
327
+ },{}],14:[function(require,module,exports){
328
+ 'use strict';
329
+
330
+ /* eslint no-invalid-this: 1 */
331
+
332
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
333
+ var toStr = Object.prototype.toString;
334
+ var max = Math.max;
335
+ var funcType = '[object Function]';
336
+
337
+ var concatty = function concatty(a, b) {
338
+ var arr = [];
339
+
340
+ for (var i = 0; i < a.length; i += 1) {
341
+ arr[i] = a[i];
342
+ }
343
+ for (var j = 0; j < b.length; j += 1) {
344
+ arr[j + a.length] = b[j];
345
+ }
346
+
347
+ return arr;
348
+ };
349
+
350
+ var slicy = function slicy(arrLike, offset) {
351
+ var arr = [];
352
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
353
+ arr[j] = arrLike[i];
354
+ }
355
+ return arr;
356
+ };
357
+
358
+ var joiny = function (arr, joiner) {
359
+ var str = '';
360
+ for (var i = 0; i < arr.length; i += 1) {
361
+ str += arr[i];
362
+ if (i + 1 < arr.length) {
363
+ str += joiner;
364
+ }
365
+ }
366
+ return str;
367
+ };
368
+
369
+ module.exports = function bind(that) {
370
+ var target = this;
371
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
372
+ throw new TypeError(ERROR_MESSAGE + target);
373
+ }
374
+ var args = slicy(arguments, 1);
375
+
376
+ var bound;
377
+ var binder = function () {
378
+ if (this instanceof bound) {
379
+ var result = target.apply(
380
+ this,
381
+ concatty(args, arguments)
382
+ );
383
+ if (Object(result) === result) {
384
+ return result;
385
+ }
386
+ return this;
387
+ }
388
+ return target.apply(
389
+ that,
390
+ concatty(args, arguments)
391
+ );
392
+
393
+ };
394
+
395
+ var boundLength = max(0, target.length - args.length);
396
+ var boundArgs = [];
397
+ for (var i = 0; i < boundLength; i++) {
398
+ boundArgs[i] = '$' + i;
399
+ }
400
+
401
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
402
+
403
+ if (target.prototype) {
404
+ var Empty = function Empty() {};
405
+ Empty.prototype = target.prototype;
406
+ bound.prototype = new Empty();
407
+ Empty.prototype = null;
408
+ }
409
+
410
+ return bound;
411
+ };
412
+
413
+ },{}],15:[function(require,module,exports){
414
+ 'use strict';
415
+
416
+ var implementation = require('./implementation');
417
+
418
+ module.exports = Function.prototype.bind || implementation;
419
+
420
+ },{"./implementation":14}],16:[function(require,module,exports){
421
+ 'use strict';
422
+
423
+ var undefined;
424
+
425
+ var $Error = require('es-errors');
426
+ var $EvalError = require('es-errors/eval');
427
+ var $RangeError = require('es-errors/range');
428
+ var $ReferenceError = require('es-errors/ref');
429
+ var $SyntaxError = require('es-errors/syntax');
430
+ var $TypeError = require('es-errors/type');
431
+ var $URIError = require('es-errors/uri');
432
+
433
+ var $Function = Function;
434
+
435
+ // eslint-disable-next-line consistent-return
436
+ var getEvalledConstructor = function (expressionSyntax) {
437
+ try {
438
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
439
+ } catch (e) {}
440
+ };
441
+
442
+ var $gOPD = Object.getOwnPropertyDescriptor;
443
+ if ($gOPD) {
444
+ try {
445
+ $gOPD({}, '');
446
+ } catch (e) {
447
+ $gOPD = null; // this is IE 8, which has a broken gOPD
448
+ }
449
+ }
450
+
451
+ var throwTypeError = function () {
452
+ throw new $TypeError();
453
+ };
454
+ var ThrowTypeError = $gOPD
455
+ ? (function () {
456
+ try {
457
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
458
+ arguments.callee; // IE 8 does not throw here
459
+ return throwTypeError;
460
+ } catch (calleeThrows) {
461
+ try {
462
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
463
+ return $gOPD(arguments, 'callee').get;
464
+ } catch (gOPDthrows) {
465
+ return throwTypeError;
466
+ }
467
+ }
468
+ }())
469
+ : throwTypeError;
470
+
471
+ var hasSymbols = require('has-symbols')();
472
+ var hasProto = require('has-proto')();
473
+
474
+ var getProto = Object.getPrototypeOf || (
475
+ hasProto
476
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
477
+ : null
478
+ );
479
+
480
+ var needsEval = {};
481
+
482
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
483
+
484
+ var INTRINSICS = {
485
+ __proto__: null,
486
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
487
+ '%Array%': Array,
488
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
489
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
490
+ '%AsyncFromSyncIteratorPrototype%': undefined,
491
+ '%AsyncFunction%': needsEval,
492
+ '%AsyncGenerator%': needsEval,
493
+ '%AsyncGeneratorFunction%': needsEval,
494
+ '%AsyncIteratorPrototype%': needsEval,
495
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
496
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
497
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
498
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
499
+ '%Boolean%': Boolean,
500
+ '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
501
+ '%Date%': Date,
502
+ '%decodeURI%': decodeURI,
503
+ '%decodeURIComponent%': decodeURIComponent,
504
+ '%encodeURI%': encodeURI,
505
+ '%encodeURIComponent%': encodeURIComponent,
506
+ '%Error%': $Error,
507
+ '%eval%': eval, // eslint-disable-line no-eval
508
+ '%EvalError%': $EvalError,
509
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
510
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
511
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
512
+ '%Function%': $Function,
513
+ '%GeneratorFunction%': needsEval,
514
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
515
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
516
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
517
+ '%isFinite%': isFinite,
518
+ '%isNaN%': isNaN,
519
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
520
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined,
521
+ '%Map%': typeof Map === 'undefined' ? undefined : Map,
522
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
523
+ '%Math%': Math,
524
+ '%Number%': Number,
525
+ '%Object%': Object,
526
+ '%parseFloat%': parseFloat,
527
+ '%parseInt%': parseInt,
528
+ '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
529
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
530
+ '%RangeError%': $RangeError,
531
+ '%ReferenceError%': $ReferenceError,
532
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
533
+ '%RegExp%': RegExp,
534
+ '%Set%': typeof Set === 'undefined' ? undefined : Set,
535
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
536
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
537
+ '%String%': String,
538
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
539
+ '%Symbol%': hasSymbols ? Symbol : undefined,
540
+ '%SyntaxError%': $SyntaxError,
541
+ '%ThrowTypeError%': ThrowTypeError,
542
+ '%TypedArray%': TypedArray,
543
+ '%TypeError%': $TypeError,
544
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
545
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
546
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
547
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
548
+ '%URIError%': $URIError,
549
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
550
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
551
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
552
+ };
553
+
554
+ if (getProto) {
555
+ try {
556
+ null.error; // eslint-disable-line no-unused-expressions
557
+ } catch (e) {
558
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
559
+ var errorProto = getProto(getProto(e));
560
+ INTRINSICS['%Error.prototype%'] = errorProto;
561
+ }
562
+ }
563
+
564
+ var doEval = function doEval(name) {
565
+ var value;
566
+ if (name === '%AsyncFunction%') {
567
+ value = getEvalledConstructor('async function () {}');
568
+ } else if (name === '%GeneratorFunction%') {
569
+ value = getEvalledConstructor('function* () {}');
570
+ } else if (name === '%AsyncGeneratorFunction%') {
571
+ value = getEvalledConstructor('async function* () {}');
572
+ } else if (name === '%AsyncGenerator%') {
573
+ var fn = doEval('%AsyncGeneratorFunction%');
574
+ if (fn) {
575
+ value = fn.prototype;
576
+ }
577
+ } else if (name === '%AsyncIteratorPrototype%') {
578
+ var gen = doEval('%AsyncGenerator%');
579
+ if (gen && getProto) {
580
+ value = getProto(gen.prototype);
581
+ }
582
+ }
583
+
584
+ INTRINSICS[name] = value;
585
+
586
+ return value;
587
+ };
588
+
589
+ var LEGACY_ALIASES = {
590
+ __proto__: null,
591
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
592
+ '%ArrayPrototype%': ['Array', 'prototype'],
593
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
594
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
595
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
596
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
597
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
598
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
599
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
600
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
601
+ '%DataViewPrototype%': ['DataView', 'prototype'],
602
+ '%DatePrototype%': ['Date', 'prototype'],
603
+ '%ErrorPrototype%': ['Error', 'prototype'],
604
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
605
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
606
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
607
+ '%FunctionPrototype%': ['Function', 'prototype'],
608
+ '%Generator%': ['GeneratorFunction', 'prototype'],
609
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
610
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
611
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
612
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
613
+ '%JSONParse%': ['JSON', 'parse'],
614
+ '%JSONStringify%': ['JSON', 'stringify'],
615
+ '%MapPrototype%': ['Map', 'prototype'],
616
+ '%NumberPrototype%': ['Number', 'prototype'],
617
+ '%ObjectPrototype%': ['Object', 'prototype'],
618
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
619
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
620
+ '%PromisePrototype%': ['Promise', 'prototype'],
621
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
622
+ '%Promise_all%': ['Promise', 'all'],
623
+ '%Promise_reject%': ['Promise', 'reject'],
624
+ '%Promise_resolve%': ['Promise', 'resolve'],
625
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
626
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
627
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
628
+ '%SetPrototype%': ['Set', 'prototype'],
629
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
630
+ '%StringPrototype%': ['String', 'prototype'],
631
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
632
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
633
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
634
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
635
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
636
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
637
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
638
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
639
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
640
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
641
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
642
+ };
643
+
644
+ var bind = require('function-bind');
645
+ var hasOwn = require('hasown');
646
+ var $concat = bind.call(Function.call, Array.prototype.concat);
647
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
648
+ var $replace = bind.call(Function.call, String.prototype.replace);
649
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
650
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
651
+
652
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
653
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
654
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
655
+ var stringToPath = function stringToPath(string) {
656
+ var first = $strSlice(string, 0, 1);
657
+ var last = $strSlice(string, -1);
658
+ if (first === '%' && last !== '%') {
659
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
660
+ } else if (last === '%' && first !== '%') {
661
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
662
+ }
663
+ var result = [];
664
+ $replace(string, rePropName, function (match, number, quote, subString) {
665
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
666
+ });
667
+ return result;
668
+ };
669
+ /* end adaptation */
670
+
671
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
672
+ var intrinsicName = name;
673
+ var alias;
674
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
675
+ alias = LEGACY_ALIASES[intrinsicName];
676
+ intrinsicName = '%' + alias[0] + '%';
677
+ }
678
+
679
+ if (hasOwn(INTRINSICS, intrinsicName)) {
680
+ var value = INTRINSICS[intrinsicName];
681
+ if (value === needsEval) {
682
+ value = doEval(intrinsicName);
683
+ }
684
+ if (typeof value === 'undefined' && !allowMissing) {
685
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
686
+ }
687
+
688
+ return {
689
+ alias: alias,
690
+ name: intrinsicName,
691
+ value: value
692
+ };
693
+ }
694
+
695
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
696
+ };
697
+
698
+ module.exports = function GetIntrinsic(name, allowMissing) {
699
+ if (typeof name !== 'string' || name.length === 0) {
700
+ throw new $TypeError('intrinsic name must be a non-empty string');
701
+ }
702
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
703
+ throw new $TypeError('"allowMissing" argument must be a boolean');
704
+ }
705
+
706
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
707
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
708
+ }
709
+ var parts = stringToPath(name);
710
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
711
+
712
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
713
+ var intrinsicRealName = intrinsic.name;
714
+ var value = intrinsic.value;
715
+ var skipFurtherCaching = false;
716
+
717
+ var alias = intrinsic.alias;
718
+ if (alias) {
719
+ intrinsicBaseName = alias[0];
720
+ $spliceApply(parts, $concat([0, 1], alias));
721
+ }
722
+
723
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
724
+ var part = parts[i];
725
+ var first = $strSlice(part, 0, 1);
726
+ var last = $strSlice(part, -1);
727
+ if (
728
+ (
729
+ (first === '"' || first === "'" || first === '`')
730
+ || (last === '"' || last === "'" || last === '`')
731
+ )
732
+ && first !== last
733
+ ) {
734
+ throw new $SyntaxError('property names with quotes must have matching quotes');
735
+ }
736
+ if (part === 'constructor' || !isOwn) {
737
+ skipFurtherCaching = true;
738
+ }
739
+
740
+ intrinsicBaseName += '.' + part;
741
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
742
+
743
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
744
+ value = INTRINSICS[intrinsicRealName];
745
+ } else if (value != null) {
746
+ if (!(part in value)) {
747
+ if (!allowMissing) {
748
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
749
+ }
750
+ return void undefined;
751
+ }
752
+ if ($gOPD && (i + 1) >= parts.length) {
753
+ var desc = $gOPD(value, part);
754
+ isOwn = !!desc;
755
+
756
+ // By convention, when a data property is converted to an accessor
757
+ // property to emulate a data property that does not suffer from
758
+ // the override mistake, that accessor's getter is marked with
759
+ // an `originalValue` property. Here, when we detect this, we
760
+ // uphold the illusion by pretending to see that original data
761
+ // property, i.e., returning the value rather than the getter
762
+ // itself.
763
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
764
+ value = desc.get;
765
+ } else {
766
+ value = value[part];
767
+ }
768
+ } else {
769
+ isOwn = hasOwn(value, part);
770
+ value = value[part];
771
+ }
772
+
773
+ if (isOwn && !skipFurtherCaching) {
774
+ INTRINSICS[intrinsicRealName] = value;
775
+ }
776
+ }
777
+ }
778
+ return value;
779
+ };
780
+
781
+ },{"es-errors":8,"es-errors/eval":7,"es-errors/range":9,"es-errors/ref":10,"es-errors/syntax":11,"es-errors/type":12,"es-errors/uri":13,"function-bind":15,"has-proto":19,"has-symbols":20,"hasown":22}],17:[function(require,module,exports){
782
+ 'use strict';
783
+
784
+ var GetIntrinsic = require('get-intrinsic');
785
+
786
+ var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
787
+
788
+ if ($gOPD) {
789
+ try {
790
+ $gOPD([], 'length');
791
+ } catch (e) {
792
+ // IE 8 has a broken gOPD
793
+ $gOPD = null;
794
+ }
795
+ }
796
+
797
+ module.exports = $gOPD;
798
+
799
+ },{"get-intrinsic":16}],18:[function(require,module,exports){
800
+ 'use strict';
801
+
802
+ var $defineProperty = require('es-define-property');
803
+
804
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
805
+ return !!$defineProperty;
806
+ };
807
+
808
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
809
+ // node v0.6 has a bug where array lengths can be Set but not Defined
810
+ if (!$defineProperty) {
811
+ return null;
812
+ }
813
+ try {
814
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
815
+ } catch (e) {
816
+ // In Firefox 4-22, defining length on an array throws an exception.
817
+ return true;
818
+ }
819
+ };
820
+
821
+ module.exports = hasPropertyDescriptors;
822
+
823
+ },{"es-define-property":6}],19:[function(require,module,exports){
824
+ 'use strict';
825
+
826
+ var test = {
827
+ __proto__: null,
828
+ foo: {}
829
+ };
830
+
831
+ var $Object = Object;
832
+
833
+ /** @type {import('.')} */
834
+ module.exports = function hasProto() {
835
+ // @ts-expect-error: TS errors on an inherited property for some reason
836
+ return { __proto__: test }.foo === test.foo
837
+ && !(test instanceof $Object);
838
+ };
839
+
840
+ },{}],20:[function(require,module,exports){
841
+ 'use strict';
842
+
843
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
844
+ var hasSymbolSham = require('./shams');
845
+
846
+ module.exports = function hasNativeSymbols() {
847
+ if (typeof origSymbol !== 'function') { return false; }
848
+ if (typeof Symbol !== 'function') { return false; }
849
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
850
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
851
+
852
+ return hasSymbolSham();
853
+ };
854
+
855
+ },{"./shams":21}],21:[function(require,module,exports){
856
+ 'use strict';
857
+
858
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
859
+ module.exports = function hasSymbols() {
860
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
861
+ if (typeof Symbol.iterator === 'symbol') { return true; }
862
+
863
+ var obj = {};
864
+ var sym = Symbol('test');
865
+ var symObj = Object(sym);
866
+ if (typeof sym === 'string') { return false; }
867
+
868
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
869
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
870
+
871
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
872
+ // if (sym instanceof Symbol) { return false; }
873
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
874
+ // if (!(symObj instanceof Symbol)) { return false; }
875
+
876
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
877
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
878
+
879
+ var symVal = 42;
880
+ obj[sym] = symVal;
881
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
882
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
883
+
884
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
885
+
886
+ var syms = Object.getOwnPropertySymbols(obj);
887
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
888
+
889
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
890
+
891
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
892
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
893
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
894
+ }
895
+
896
+ return true;
897
+ };
898
+
899
+ },{}],22:[function(require,module,exports){
900
+ 'use strict';
901
+
902
+ var call = Function.prototype.call;
903
+ var $hasOwn = Object.prototype.hasOwnProperty;
904
+ var bind = require('function-bind');
905
+
906
+ /** @type {import('.')} */
907
+ module.exports = bind.call(call, $hasOwn);
908
+
909
+ },{"function-bind":15}],23:[function(require,module,exports){
156
910
  "use strict";
157
911
  /**
158
912
  * A response from a web request
@@ -214,7 +968,7 @@ var Response = /** @class */ (function () {
214
968
  }());
215
969
  module.exports = Response;
216
970
 
217
- },{}],4:[function(require,module,exports){
971
+ },{}],24:[function(require,module,exports){
218
972
  "use strict";
219
973
  var Buffer = require("safer-buffer").Buffer;
220
974
 
@@ -813,7 +1567,7 @@ function findIdx(table, val) {
813
1567
  }
814
1568
 
815
1569
 
816
- },{"safer-buffer":39}],5:[function(require,module,exports){
1570
+ },{"safer-buffer":60}],25:[function(require,module,exports){
817
1571
  "use strict";
818
1572
 
819
1573
  // Description of supported double byte encodings and aliases.
@@ -1003,7 +1757,7 @@ module.exports = {
1003
1757
  'xxbig5': 'big5hkscs',
1004
1758
  };
1005
1759
 
1006
- },{"./tables/big5-added.json":11,"./tables/cp936.json":12,"./tables/cp949.json":13,"./tables/cp950.json":14,"./tables/eucjp.json":15,"./tables/gb18030-ranges.json":16,"./tables/gbk-added.json":17,"./tables/shiftjis.json":18}],6:[function(require,module,exports){
1760
+ },{"./tables/big5-added.json":31,"./tables/cp936.json":32,"./tables/cp949.json":33,"./tables/cp950.json":34,"./tables/eucjp.json":35,"./tables/gb18030-ranges.json":36,"./tables/gbk-added.json":37,"./tables/shiftjis.json":38}],26:[function(require,module,exports){
1007
1761
  "use strict";
1008
1762
 
1009
1763
  // Update this array if you add/rename/remove files in this directory.
@@ -1028,7 +1782,7 @@ for (var i = 0; i < modules.length; i++) {
1028
1782
  exports[enc] = module[enc];
1029
1783
  }
1030
1784
 
1031
- },{"./dbcs-codec":4,"./dbcs-data":5,"./internal":7,"./sbcs-codec":8,"./sbcs-data":10,"./sbcs-data-generated":9,"./utf16":19,"./utf32":20,"./utf7":21}],7:[function(require,module,exports){
1785
+ },{"./dbcs-codec":24,"./dbcs-data":25,"./internal":27,"./sbcs-codec":28,"./sbcs-data":30,"./sbcs-data-generated":29,"./utf16":39,"./utf32":40,"./utf7":41}],27:[function(require,module,exports){
1032
1786
  "use strict";
1033
1787
  var Buffer = require("safer-buffer").Buffer;
1034
1788
 
@@ -1228,7 +1982,7 @@ InternalDecoderCesu8.prototype.end = function() {
1228
1982
  return res;
1229
1983
  }
1230
1984
 
1231
- },{"safer-buffer":39,"string_decoder":40}],8:[function(require,module,exports){
1985
+ },{"safer-buffer":60,"string_decoder":63}],28:[function(require,module,exports){
1232
1986
  "use strict";
1233
1987
  var Buffer = require("safer-buffer").Buffer;
1234
1988
 
@@ -1302,7 +2056,7 @@ SBCSDecoder.prototype.write = function(buf) {
1302
2056
  SBCSDecoder.prototype.end = function() {
1303
2057
  }
1304
2058
 
1305
- },{"safer-buffer":39}],9:[function(require,module,exports){
2059
+ },{"safer-buffer":60}],29:[function(require,module,exports){
1306
2060
  "use strict";
1307
2061
 
1308
2062
  // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
@@ -1754,7 +2508,7 @@ module.exports = {
1754
2508
  "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
1755
2509
  }
1756
2510
  }
1757
- },{}],10:[function(require,module,exports){
2511
+ },{}],30:[function(require,module,exports){
1758
2512
  "use strict";
1759
2513
 
1760
2514
  // Manually added data to be used by sbcs codec in addition to generated one.
@@ -1935,7 +2689,7 @@ module.exports = {
1935
2689
  };
1936
2690
 
1937
2691
 
1938
- },{}],11:[function(require,module,exports){
2692
+ },{}],31:[function(require,module,exports){
1939
2693
  module.exports=[
1940
2694
  ["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],
1941
2695
  ["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],
@@ -2059,7 +2813,7 @@ module.exports=[
2059
2813
  ["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]
2060
2814
  ]
2061
2815
 
2062
- },{}],12:[function(require,module,exports){
2816
+ },{}],32:[function(require,module,exports){
2063
2817
  module.exports=[
2064
2818
  ["0","\u0000",127,"€"],
2065
2819
  ["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],
@@ -2325,7 +3079,7 @@ module.exports=[
2325
3079
  ["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]
2326
3080
  ]
2327
3081
 
2328
- },{}],13:[function(require,module,exports){
3082
+ },{}],33:[function(require,module,exports){
2329
3083
  module.exports=[
2330
3084
  ["0","\u0000",127],
2331
3085
  ["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],
@@ -2600,7 +3354,7 @@ module.exports=[
2600
3354
  ["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]
2601
3355
  ]
2602
3356
 
2603
- },{}],14:[function(require,module,exports){
3357
+ },{}],34:[function(require,module,exports){
2604
3358
  module.exports=[
2605
3359
  ["0","\u0000",127],
2606
3360
  ["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],
@@ -2779,7 +3533,7 @@ module.exports=[
2779
3533
  ["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]
2780
3534
  ]
2781
3535
 
2782
- },{}],15:[function(require,module,exports){
3536
+ },{}],35:[function(require,module,exports){
2783
3537
  module.exports=[
2784
3538
  ["0","\u0000",127],
2785
3539
  ["8ea1","。",62],
@@ -2963,9 +3717,9 @@ module.exports=[
2963
3717
  ["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]
2964
3718
  ]
2965
3719
 
2966
- },{}],16:[function(require,module,exports){
3720
+ },{}],36:[function(require,module,exports){
2967
3721
  module.exports={"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}
2968
- },{}],17:[function(require,module,exports){
3722
+ },{}],37:[function(require,module,exports){
2969
3723
  module.exports=[
2970
3724
  ["a140","",62],
2971
3725
  ["a180","",32],
@@ -3023,7 +3777,7 @@ module.exports=[
3023
3777
  ["8135f437",""]
3024
3778
  ]
3025
3779
 
3026
- },{}],18:[function(require,module,exports){
3780
+ },{}],38:[function(require,module,exports){
3027
3781
  module.exports=[
3028
3782
  ["0","\u0000",128],
3029
3783
  ["a1","。",62],
@@ -3150,7 +3904,7 @@ module.exports=[
3150
3904
  ["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]
3151
3905
  ]
3152
3906
 
3153
- },{}],19:[function(require,module,exports){
3907
+ },{}],39:[function(require,module,exports){
3154
3908
  "use strict";
3155
3909
  var Buffer = require("safer-buffer").Buffer;
3156
3910
 
@@ -3349,7 +4103,7 @@ function detectEncoding(bufs, defaultEncoding) {
3349
4103
 
3350
4104
 
3351
4105
 
3352
- },{"safer-buffer":39}],20:[function(require,module,exports){
4106
+ },{"safer-buffer":60}],40:[function(require,module,exports){
3353
4107
  'use strict';
3354
4108
 
3355
4109
  var Buffer = require('safer-buffer').Buffer;
@@ -3670,7 +4424,7 @@ function detectEncoding(bufs, defaultEncoding) {
3670
4424
  return defaultEncoding || 'utf-32le';
3671
4425
  }
3672
4426
 
3673
- },{"safer-buffer":39}],21:[function(require,module,exports){
4427
+ },{"safer-buffer":60}],41:[function(require,module,exports){
3674
4428
  "use strict";
3675
4429
  var Buffer = require("safer-buffer").Buffer;
3676
4430
 
@@ -3962,7 +4716,7 @@ Utf7IMAPDecoder.prototype.end = function() {
3962
4716
 
3963
4717
 
3964
4718
 
3965
- },{"safer-buffer":39}],22:[function(require,module,exports){
4719
+ },{"safer-buffer":60}],42:[function(require,module,exports){
3966
4720
  "use strict";
3967
4721
 
3968
4722
  var BOMChar = '\uFEFF';
@@ -4016,7 +4770,7 @@ StripBOMWrapper.prototype.end = function() {
4016
4770
  }
4017
4771
 
4018
4772
 
4019
- },{}],23:[function(require,module,exports){
4773
+ },{}],43:[function(require,module,exports){
4020
4774
  "use strict";
4021
4775
 
4022
4776
  var Buffer = require("safer-buffer").Buffer;
@@ -4127,7 +4881,7 @@ module.exports = function(stream_module) {
4127
4881
  };
4128
4882
  };
4129
4883
 
4130
- },{"safer-buffer":39}],24:[function(require,module,exports){
4884
+ },{"safer-buffer":60}],44:[function(require,module,exports){
4131
4885
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
4132
4886
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
4133
4887
  var e, m
@@ -4214,7 +4968,535 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
4214
4968
  buffer[offset + i - d] |= s * 128
4215
4969
  }
4216
4970
 
4217
- },{}],25:[function(require,module,exports){
4971
+ },{}],45:[function(require,module,exports){
4972
+ (function (global){(function (){
4973
+ var hasMap = typeof Map === 'function' && Map.prototype;
4974
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
4975
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
4976
+ var mapForEach = hasMap && Map.prototype.forEach;
4977
+ var hasSet = typeof Set === 'function' && Set.prototype;
4978
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
4979
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
4980
+ var setForEach = hasSet && Set.prototype.forEach;
4981
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
4982
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
4983
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
4984
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
4985
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
4986
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
4987
+ var booleanValueOf = Boolean.prototype.valueOf;
4988
+ var objectToString = Object.prototype.toString;
4989
+ var functionToString = Function.prototype.toString;
4990
+ var $match = String.prototype.match;
4991
+ var $slice = String.prototype.slice;
4992
+ var $replace = String.prototype.replace;
4993
+ var $toUpperCase = String.prototype.toUpperCase;
4994
+ var $toLowerCase = String.prototype.toLowerCase;
4995
+ var $test = RegExp.prototype.test;
4996
+ var $concat = Array.prototype.concat;
4997
+ var $join = Array.prototype.join;
4998
+ var $arrSlice = Array.prototype.slice;
4999
+ var $floor = Math.floor;
5000
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
5001
+ var gOPS = Object.getOwnPropertySymbols;
5002
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
5003
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
5004
+ // ie, `has-tostringtag/shams
5005
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
5006
+ ? Symbol.toStringTag
5007
+ : null;
5008
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
5009
+
5010
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
5011
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
5012
+ ? function (O) {
5013
+ return O.__proto__; // eslint-disable-line no-proto
5014
+ }
5015
+ : null
5016
+ );
5017
+
5018
+ function addNumericSeparator(num, str) {
5019
+ if (
5020
+ num === Infinity
5021
+ || num === -Infinity
5022
+ || num !== num
5023
+ || (num && num > -1000 && num < 1000)
5024
+ || $test.call(/e/, str)
5025
+ ) {
5026
+ return str;
5027
+ }
5028
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
5029
+ if (typeof num === 'number') {
5030
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
5031
+ if (int !== num) {
5032
+ var intStr = String(int);
5033
+ var dec = $slice.call(str, intStr.length + 1);
5034
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
5035
+ }
5036
+ }
5037
+ return $replace.call(str, sepRegex, '$&_');
5038
+ }
5039
+
5040
+ var utilInspect = require('./util.inspect');
5041
+ var inspectCustom = utilInspect.custom;
5042
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
5043
+
5044
+ module.exports = function inspect_(obj, options, depth, seen) {
5045
+ var opts = options || {};
5046
+
5047
+ if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
5048
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
5049
+ }
5050
+ if (
5051
+ has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
5052
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
5053
+ : opts.maxStringLength !== null
5054
+ )
5055
+ ) {
5056
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
5057
+ }
5058
+ var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
5059
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
5060
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
5061
+ }
5062
+
5063
+ if (
5064
+ has(opts, 'indent')
5065
+ && opts.indent !== null
5066
+ && opts.indent !== '\t'
5067
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
5068
+ ) {
5069
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
5070
+ }
5071
+ if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
5072
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
5073
+ }
5074
+ var numericSeparator = opts.numericSeparator;
5075
+
5076
+ if (typeof obj === 'undefined') {
5077
+ return 'undefined';
5078
+ }
5079
+ if (obj === null) {
5080
+ return 'null';
5081
+ }
5082
+ if (typeof obj === 'boolean') {
5083
+ return obj ? 'true' : 'false';
5084
+ }
5085
+
5086
+ if (typeof obj === 'string') {
5087
+ return inspectString(obj, opts);
5088
+ }
5089
+ if (typeof obj === 'number') {
5090
+ if (obj === 0) {
5091
+ return Infinity / obj > 0 ? '0' : '-0';
5092
+ }
5093
+ var str = String(obj);
5094
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
5095
+ }
5096
+ if (typeof obj === 'bigint') {
5097
+ var bigIntStr = String(obj) + 'n';
5098
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
5099
+ }
5100
+
5101
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
5102
+ if (typeof depth === 'undefined') { depth = 0; }
5103
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
5104
+ return isArray(obj) ? '[Array]' : '[Object]';
5105
+ }
5106
+
5107
+ var indent = getIndent(opts, depth);
5108
+
5109
+ if (typeof seen === 'undefined') {
5110
+ seen = [];
5111
+ } else if (indexOf(seen, obj) >= 0) {
5112
+ return '[Circular]';
5113
+ }
5114
+
5115
+ function inspect(value, from, noIndent) {
5116
+ if (from) {
5117
+ seen = $arrSlice.call(seen);
5118
+ seen.push(from);
5119
+ }
5120
+ if (noIndent) {
5121
+ var newOpts = {
5122
+ depth: opts.depth
5123
+ };
5124
+ if (has(opts, 'quoteStyle')) {
5125
+ newOpts.quoteStyle = opts.quoteStyle;
5126
+ }
5127
+ return inspect_(value, newOpts, depth + 1, seen);
5128
+ }
5129
+ return inspect_(value, opts, depth + 1, seen);
5130
+ }
5131
+
5132
+ if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
5133
+ var name = nameOf(obj);
5134
+ var keys = arrObjKeys(obj, inspect);
5135
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
5136
+ }
5137
+ if (isSymbol(obj)) {
5138
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
5139
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
5140
+ }
5141
+ if (isElement(obj)) {
5142
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
5143
+ var attrs = obj.attributes || [];
5144
+ for (var i = 0; i < attrs.length; i++) {
5145
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
5146
+ }
5147
+ s += '>';
5148
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
5149
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
5150
+ return s;
5151
+ }
5152
+ if (isArray(obj)) {
5153
+ if (obj.length === 0) { return '[]'; }
5154
+ var xs = arrObjKeys(obj, inspect);
5155
+ if (indent && !singleLineValues(xs)) {
5156
+ return '[' + indentedJoin(xs, indent) + ']';
5157
+ }
5158
+ return '[ ' + $join.call(xs, ', ') + ' ]';
5159
+ }
5160
+ if (isError(obj)) {
5161
+ var parts = arrObjKeys(obj, inspect);
5162
+ if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
5163
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
5164
+ }
5165
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
5166
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
5167
+ }
5168
+ if (typeof obj === 'object' && customInspect) {
5169
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
5170
+ return utilInspect(obj, { depth: maxDepth - depth });
5171
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
5172
+ return obj.inspect();
5173
+ }
5174
+ }
5175
+ if (isMap(obj)) {
5176
+ var mapParts = [];
5177
+ if (mapForEach) {
5178
+ mapForEach.call(obj, function (value, key) {
5179
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
5180
+ });
5181
+ }
5182
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
5183
+ }
5184
+ if (isSet(obj)) {
5185
+ var setParts = [];
5186
+ if (setForEach) {
5187
+ setForEach.call(obj, function (value) {
5188
+ setParts.push(inspect(value, obj));
5189
+ });
5190
+ }
5191
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
5192
+ }
5193
+ if (isWeakMap(obj)) {
5194
+ return weakCollectionOf('WeakMap');
5195
+ }
5196
+ if (isWeakSet(obj)) {
5197
+ return weakCollectionOf('WeakSet');
5198
+ }
5199
+ if (isWeakRef(obj)) {
5200
+ return weakCollectionOf('WeakRef');
5201
+ }
5202
+ if (isNumber(obj)) {
5203
+ return markBoxed(inspect(Number(obj)));
5204
+ }
5205
+ if (isBigInt(obj)) {
5206
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
5207
+ }
5208
+ if (isBoolean(obj)) {
5209
+ return markBoxed(booleanValueOf.call(obj));
5210
+ }
5211
+ if (isString(obj)) {
5212
+ return markBoxed(inspect(String(obj)));
5213
+ }
5214
+ // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
5215
+ /* eslint-env browser */
5216
+ if (typeof window !== 'undefined' && obj === window) {
5217
+ return '{ [object Window] }';
5218
+ }
5219
+ if (obj === global) {
5220
+ return '{ [object globalThis] }';
5221
+ }
5222
+ if (!isDate(obj) && !isRegExp(obj)) {
5223
+ var ys = arrObjKeys(obj, inspect);
5224
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
5225
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
5226
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
5227
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
5228
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
5229
+ if (ys.length === 0) { return tag + '{}'; }
5230
+ if (indent) {
5231
+ return tag + '{' + indentedJoin(ys, indent) + '}';
5232
+ }
5233
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
5234
+ }
5235
+ return String(obj);
5236
+ };
5237
+
5238
+ function wrapQuotes(s, defaultStyle, opts) {
5239
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
5240
+ return quoteChar + s + quoteChar;
5241
+ }
5242
+
5243
+ function quote(s) {
5244
+ return $replace.call(String(s), /"/g, '&quot;');
5245
+ }
5246
+
5247
+ function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5248
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5249
+ function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5250
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5251
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5252
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5253
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
5254
+
5255
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
5256
+ function isSymbol(obj) {
5257
+ if (hasShammedSymbols) {
5258
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
5259
+ }
5260
+ if (typeof obj === 'symbol') {
5261
+ return true;
5262
+ }
5263
+ if (!obj || typeof obj !== 'object' || !symToString) {
5264
+ return false;
5265
+ }
5266
+ try {
5267
+ symToString.call(obj);
5268
+ return true;
5269
+ } catch (e) {}
5270
+ return false;
5271
+ }
5272
+
5273
+ function isBigInt(obj) {
5274
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
5275
+ return false;
5276
+ }
5277
+ try {
5278
+ bigIntValueOf.call(obj);
5279
+ return true;
5280
+ } catch (e) {}
5281
+ return false;
5282
+ }
5283
+
5284
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
5285
+ function has(obj, key) {
5286
+ return hasOwn.call(obj, key);
5287
+ }
5288
+
5289
+ function toStr(obj) {
5290
+ return objectToString.call(obj);
5291
+ }
5292
+
5293
+ function nameOf(f) {
5294
+ if (f.name) { return f.name; }
5295
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
5296
+ if (m) { return m[1]; }
5297
+ return null;
5298
+ }
5299
+
5300
+ function indexOf(xs, x) {
5301
+ if (xs.indexOf) { return xs.indexOf(x); }
5302
+ for (var i = 0, l = xs.length; i < l; i++) {
5303
+ if (xs[i] === x) { return i; }
5304
+ }
5305
+ return -1;
5306
+ }
5307
+
5308
+ function isMap(x) {
5309
+ if (!mapSize || !x || typeof x !== 'object') {
5310
+ return false;
5311
+ }
5312
+ try {
5313
+ mapSize.call(x);
5314
+ try {
5315
+ setSize.call(x);
5316
+ } catch (s) {
5317
+ return true;
5318
+ }
5319
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
5320
+ } catch (e) {}
5321
+ return false;
5322
+ }
5323
+
5324
+ function isWeakMap(x) {
5325
+ if (!weakMapHas || !x || typeof x !== 'object') {
5326
+ return false;
5327
+ }
5328
+ try {
5329
+ weakMapHas.call(x, weakMapHas);
5330
+ try {
5331
+ weakSetHas.call(x, weakSetHas);
5332
+ } catch (s) {
5333
+ return true;
5334
+ }
5335
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
5336
+ } catch (e) {}
5337
+ return false;
5338
+ }
5339
+
5340
+ function isWeakRef(x) {
5341
+ if (!weakRefDeref || !x || typeof x !== 'object') {
5342
+ return false;
5343
+ }
5344
+ try {
5345
+ weakRefDeref.call(x);
5346
+ return true;
5347
+ } catch (e) {}
5348
+ return false;
5349
+ }
5350
+
5351
+ function isSet(x) {
5352
+ if (!setSize || !x || typeof x !== 'object') {
5353
+ return false;
5354
+ }
5355
+ try {
5356
+ setSize.call(x);
5357
+ try {
5358
+ mapSize.call(x);
5359
+ } catch (m) {
5360
+ return true;
5361
+ }
5362
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
5363
+ } catch (e) {}
5364
+ return false;
5365
+ }
5366
+
5367
+ function isWeakSet(x) {
5368
+ if (!weakSetHas || !x || typeof x !== 'object') {
5369
+ return false;
5370
+ }
5371
+ try {
5372
+ weakSetHas.call(x, weakSetHas);
5373
+ try {
5374
+ weakMapHas.call(x, weakMapHas);
5375
+ } catch (s) {
5376
+ return true;
5377
+ }
5378
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
5379
+ } catch (e) {}
5380
+ return false;
5381
+ }
5382
+
5383
+ function isElement(x) {
5384
+ if (!x || typeof x !== 'object') { return false; }
5385
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
5386
+ return true;
5387
+ }
5388
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
5389
+ }
5390
+
5391
+ function inspectString(str, opts) {
5392
+ if (str.length > opts.maxStringLength) {
5393
+ var remaining = str.length - opts.maxStringLength;
5394
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
5395
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
5396
+ }
5397
+ // eslint-disable-next-line no-control-regex
5398
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
5399
+ return wrapQuotes(s, 'single', opts);
5400
+ }
5401
+
5402
+ function lowbyte(c) {
5403
+ var n = c.charCodeAt(0);
5404
+ var x = {
5405
+ 8: 'b',
5406
+ 9: 't',
5407
+ 10: 'n',
5408
+ 12: 'f',
5409
+ 13: 'r'
5410
+ }[n];
5411
+ if (x) { return '\\' + x; }
5412
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
5413
+ }
5414
+
5415
+ function markBoxed(str) {
5416
+ return 'Object(' + str + ')';
5417
+ }
5418
+
5419
+ function weakCollectionOf(type) {
5420
+ return type + ' { ? }';
5421
+ }
5422
+
5423
+ function collectionOf(type, size, entries, indent) {
5424
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
5425
+ return type + ' (' + size + ') {' + joinedEntries + '}';
5426
+ }
5427
+
5428
+ function singleLineValues(xs) {
5429
+ for (var i = 0; i < xs.length; i++) {
5430
+ if (indexOf(xs[i], '\n') >= 0) {
5431
+ return false;
5432
+ }
5433
+ }
5434
+ return true;
5435
+ }
5436
+
5437
+ function getIndent(opts, depth) {
5438
+ var baseIndent;
5439
+ if (opts.indent === '\t') {
5440
+ baseIndent = '\t';
5441
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
5442
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
5443
+ } else {
5444
+ return null;
5445
+ }
5446
+ return {
5447
+ base: baseIndent,
5448
+ prev: $join.call(Array(depth + 1), baseIndent)
5449
+ };
5450
+ }
5451
+
5452
+ function indentedJoin(xs, indent) {
5453
+ if (xs.length === 0) { return ''; }
5454
+ var lineJoiner = '\n' + indent.prev + indent.base;
5455
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
5456
+ }
5457
+
5458
+ function arrObjKeys(obj, inspect) {
5459
+ var isArr = isArray(obj);
5460
+ var xs = [];
5461
+ if (isArr) {
5462
+ xs.length = obj.length;
5463
+ for (var i = 0; i < obj.length; i++) {
5464
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
5465
+ }
5466
+ }
5467
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
5468
+ var symMap;
5469
+ if (hasShammedSymbols) {
5470
+ symMap = {};
5471
+ for (var k = 0; k < syms.length; k++) {
5472
+ symMap['$' + syms[k]] = syms[k];
5473
+ }
5474
+ }
5475
+
5476
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
5477
+ if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
5478
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
5479
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
5480
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
5481
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
5482
+ } else if ($test.call(/[^\w$]/, key)) {
5483
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
5484
+ } else {
5485
+ xs.push(key + ': ' + inspect(obj[key], obj));
5486
+ }
5487
+ }
5488
+ if (typeof gOPS === 'function') {
5489
+ for (var j = 0; j < syms.length; j++) {
5490
+ if (isEnumerable.call(obj, syms[j])) {
5491
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
5492
+ }
5493
+ }
5494
+ }
5495
+ return xs;
5496
+ }
5497
+
5498
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
5499
+ },{"./util.inspect":2}],46:[function(require,module,exports){
4218
5500
  // shim for using process in browser
4219
5501
  var process = module.exports = {};
4220
5502
 
@@ -4400,35 +5682,32 @@ process.chdir = function (dir) {
4400
5682
  };
4401
5683
  process.umask = function() { return 0; };
4402
5684
 
4403
- },{}],26:[function(require,module,exports){
5685
+ },{}],47:[function(require,module,exports){
4404
5686
  'use strict';
4405
5687
 
4406
5688
  var replace = String.prototype.replace;
4407
5689
  var percentTwenties = /%20/g;
4408
5690
 
4409
- var util = require('./utils');
4410
-
4411
5691
  var Format = {
4412
5692
  RFC1738: 'RFC1738',
4413
5693
  RFC3986: 'RFC3986'
4414
5694
  };
4415
5695
 
4416
- module.exports = util.assign(
4417
- {
4418
- 'default': Format.RFC3986,
4419
- formatters: {
4420
- RFC1738: function (value) {
4421
- return replace.call(value, percentTwenties, '+');
4422
- },
4423
- RFC3986: function (value) {
4424
- return String(value);
4425
- }
5696
+ module.exports = {
5697
+ 'default': Format.RFC3986,
5698
+ formatters: {
5699
+ RFC1738: function (value) {
5700
+ return replace.call(value, percentTwenties, '+');
5701
+ },
5702
+ RFC3986: function (value) {
5703
+ return String(value);
4426
5704
  }
4427
5705
  },
4428
- Format
4429
- );
5706
+ RFC1738: Format.RFC1738,
5707
+ RFC3986: Format.RFC3986
5708
+ };
4430
5709
 
4431
- },{"./utils":30}],27:[function(require,module,exports){
5710
+ },{}],48:[function(require,module,exports){
4432
5711
  'use strict';
4433
5712
 
4434
5713
  var stringify = require('./stringify');
@@ -4441,7 +5720,7 @@ module.exports = {
4441
5720
  stringify: stringify
4442
5721
  };
4443
5722
 
4444
- },{"./formats":26,"./parse":28,"./stringify":29}],28:[function(require,module,exports){
5723
+ },{"./formats":47,"./parse":49,"./stringify":50}],49:[function(require,module,exports){
4445
5724
  'use strict';
4446
5725
 
4447
5726
  var utils = require('./utils');
@@ -4451,14 +5730,18 @@ var isArray = Array.isArray;
4451
5730
 
4452
5731
  var defaults = {
4453
5732
  allowDots: false,
5733
+ allowEmptyArrays: false,
4454
5734
  allowPrototypes: false,
5735
+ allowSparse: false,
4455
5736
  arrayLimit: 20,
4456
5737
  charset: 'utf-8',
4457
5738
  charsetSentinel: false,
4458
5739
  comma: false,
5740
+ decodeDotInKeys: true,
4459
5741
  decoder: utils.decode,
4460
5742
  delimiter: '&',
4461
5743
  depth: 5,
5744
+ duplicates: 'combine',
4462
5745
  ignoreQueryPrefix: false,
4463
5746
  interpretNumericEntities: false,
4464
5747
  parameterLimit: 1000,
@@ -4481,17 +5764,6 @@ var parseArrayValue = function (val, options) {
4481
5764
  return val;
4482
5765
  };
4483
5766
 
4484
- var maybeMap = function maybeMap(val, fn) {
4485
- if (isArray(val)) {
4486
- var mapped = [];
4487
- for (var i = 0; i < val.length; i += 1) {
4488
- mapped.push(fn(val[i]));
4489
- }
4490
- return mapped;
4491
- }
4492
- return fn(val);
4493
- };
4494
-
4495
5767
  // This is what browsers will submit when the ✓ character occurs in an
4496
5768
  // application/x-www-form-urlencoded body and the encoding of the page containing
4497
5769
  // the form is iso-8859-1, or when the submitted form has an accept-charset
@@ -4503,7 +5775,8 @@ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
4503
5775
  var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
4504
5776
 
4505
5777
  var parseValues = function parseQueryStringValues(str, options) {
4506
- var obj = {};
5778
+ var obj = { __proto__: null };
5779
+
4507
5780
  var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
4508
5781
  var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
4509
5782
  var parts = cleanStr.split(options.delimiter, limit);
@@ -4540,7 +5813,7 @@ var parseValues = function parseQueryStringValues(str, options) {
4540
5813
  val = options.strictNullHandling ? null : '';
4541
5814
  } else {
4542
5815
  key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
4543
- val = maybeMap(
5816
+ val = utils.maybeMap(
4544
5817
  parseArrayValue(part.slice(pos + 1), options),
4545
5818
  function (encodedVal) {
4546
5819
  return options.decoder(encodedVal, defaults.decoder, charset, 'value');
@@ -4556,9 +5829,10 @@ var parseValues = function parseQueryStringValues(str, options) {
4556
5829
  val = isArray(val) ? [val] : val;
4557
5830
  }
4558
5831
 
4559
- if (has.call(obj, key)) {
5832
+ var existing = has.call(obj, key);
5833
+ if (existing && options.duplicates === 'combine') {
4560
5834
  obj[key] = utils.combine(obj[key], val);
4561
- } else {
5835
+ } else if (!existing || options.duplicates === 'last') {
4562
5836
  obj[key] = val;
4563
5837
  }
4564
5838
  }
@@ -4574,28 +5848,29 @@ var parseObject = function (chain, val, options, valuesParsed) {
4574
5848
  var root = chain[i];
4575
5849
 
4576
5850
  if (root === '[]' && options.parseArrays) {
4577
- obj = [].concat(leaf);
5851
+ obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf);
4578
5852
  } else {
4579
5853
  obj = options.plainObjects ? Object.create(null) : {};
4580
5854
  var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
4581
- var index = parseInt(cleanRoot, 10);
4582
- if (!options.parseArrays && cleanRoot === '') {
5855
+ var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
5856
+ var index = parseInt(decodedRoot, 10);
5857
+ if (!options.parseArrays && decodedRoot === '') {
4583
5858
  obj = { 0: leaf };
4584
5859
  } else if (
4585
5860
  !isNaN(index)
4586
- && root !== cleanRoot
4587
- && String(index) === cleanRoot
5861
+ && root !== decodedRoot
5862
+ && String(index) === decodedRoot
4588
5863
  && index >= 0
4589
5864
  && (options.parseArrays && index <= options.arrayLimit)
4590
5865
  ) {
4591
5866
  obj = [];
4592
5867
  obj[index] = leaf;
4593
- } else {
4594
- obj[cleanRoot] = leaf;
5868
+ } else if (decodedRoot !== '__proto__') {
5869
+ obj[decodedRoot] = leaf;
4595
5870
  }
4596
5871
  }
4597
5872
 
4598
- leaf = obj; // eslint-disable-line no-param-reassign
5873
+ leaf = obj;
4599
5874
  }
4600
5875
 
4601
5876
  return leaf;
@@ -4660,7 +5935,15 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
4660
5935
  return defaults;
4661
5936
  }
4662
5937
 
4663
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
5938
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
5939
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
5940
+ }
5941
+
5942
+ if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
5943
+ throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
5944
+ }
5945
+
5946
+ if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
4664
5947
  throw new TypeError('Decoder has to be a function.');
4665
5948
  }
4666
5949
 
@@ -4669,17 +5952,29 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
4669
5952
  }
4670
5953
  var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
4671
5954
 
5955
+ var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
5956
+
5957
+ if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
5958
+ throw new TypeError('The duplicates option must be either combine, first, or last');
5959
+ }
5960
+
5961
+ var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
5962
+
4672
5963
  return {
4673
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
5964
+ allowDots: allowDots,
5965
+ allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
4674
5966
  allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
5967
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
4675
5968
  arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
4676
5969
  charset: charset,
4677
5970
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
4678
5971
  comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
5972
+ decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
4679
5973
  decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
4680
5974
  delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
4681
5975
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
4682
5976
  depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
5977
+ duplicates: duplicates,
4683
5978
  ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
4684
5979
  interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
4685
5980
  parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
@@ -4708,12 +6003,17 @@ module.exports = function (str, opts) {
4708
6003
  obj = utils.merge(obj, newObj, options);
4709
6004
  }
4710
6005
 
6006
+ if (options.allowSparse === true) {
6007
+ return obj;
6008
+ }
6009
+
4711
6010
  return utils.compact(obj);
4712
6011
  };
4713
6012
 
4714
- },{"./utils":30}],29:[function(require,module,exports){
6013
+ },{"./utils":51}],50:[function(require,module,exports){
4715
6014
  'use strict';
4716
6015
 
6016
+ var getSideChannel = require('side-channel');
4717
6017
  var utils = require('./utils');
4718
6018
  var formats = require('./formats');
4719
6019
  var has = Object.prototype.hasOwnProperty;
@@ -4743,10 +6043,13 @@ var defaultFormat = formats['default'];
4743
6043
  var defaults = {
4744
6044
  addQueryPrefix: false,
4745
6045
  allowDots: false,
6046
+ allowEmptyArrays: false,
6047
+ arrayFormat: 'indices',
4746
6048
  charset: 'utf-8',
4747
6049
  charsetSentinel: false,
4748
6050
  delimiter: '&',
4749
6051
  encode: true,
6052
+ encodeDotInKeys: false,
4750
6053
  encoder: utils.encode,
4751
6054
  encodeValuesOnly: false,
4752
6055
  format: defaultFormat,
@@ -4768,33 +6071,65 @@ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
4768
6071
  || typeof v === 'bigint';
4769
6072
  };
4770
6073
 
6074
+ var sentinel = {};
6075
+
4771
6076
  var stringify = function stringify(
4772
6077
  object,
4773
6078
  prefix,
4774
6079
  generateArrayPrefix,
6080
+ commaRoundTrip,
6081
+ allowEmptyArrays,
4775
6082
  strictNullHandling,
4776
6083
  skipNulls,
6084
+ encodeDotInKeys,
4777
6085
  encoder,
4778
6086
  filter,
4779
6087
  sort,
4780
6088
  allowDots,
4781
6089
  serializeDate,
6090
+ format,
4782
6091
  formatter,
4783
6092
  encodeValuesOnly,
4784
- charset
6093
+ charset,
6094
+ sideChannel
4785
6095
  ) {
4786
6096
  var obj = object;
6097
+
6098
+ var tmpSc = sideChannel;
6099
+ var step = 0;
6100
+ var findFlag = false;
6101
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
6102
+ // Where object last appeared in the ref tree
6103
+ var pos = tmpSc.get(object);
6104
+ step += 1;
6105
+ if (typeof pos !== 'undefined') {
6106
+ if (pos === step) {
6107
+ throw new RangeError('Cyclic object value');
6108
+ } else {
6109
+ findFlag = true; // Break while
6110
+ }
6111
+ }
6112
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
6113
+ step = 0;
6114
+ }
6115
+ }
6116
+
4787
6117
  if (typeof filter === 'function') {
4788
6118
  obj = filter(prefix, obj);
4789
6119
  } else if (obj instanceof Date) {
4790
6120
  obj = serializeDate(obj);
4791
6121
  } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
4792
- obj = obj.join(',');
6122
+ obj = utils.maybeMap(obj, function (value) {
6123
+ if (value instanceof Date) {
6124
+ return serializeDate(value);
6125
+ }
6126
+ return value;
6127
+ });
4793
6128
  }
4794
6129
 
4795
6130
  if (obj === null) {
4796
6131
  if (strictNullHandling) {
4797
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
6132
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
4798
6133
  }
4799
6134
 
4800
6135
  obj = '';
@@ -4802,8 +6137,8 @@ var stringify = function stringify(
4802
6137
 
4803
6138
  if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
4804
6139
  if (encoder) {
4805
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
4806
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
6140
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
6141
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
4807
6142
  }
4808
6143
  return [formatter(prefix) + '=' + formatter(String(obj))];
4809
6144
  }
@@ -4815,53 +6150,63 @@ var stringify = function stringify(
4815
6150
  }
4816
6151
 
4817
6152
  var objKeys;
4818
- if (isArray(filter)) {
6153
+ if (generateArrayPrefix === 'comma' && isArray(obj)) {
6154
+ // we need to join elements in
6155
+ if (encodeValuesOnly && encoder) {
6156
+ obj = utils.maybeMap(obj, encoder);
6157
+ }
6158
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
6159
+ } else if (isArray(filter)) {
4819
6160
  objKeys = filter;
4820
6161
  } else {
4821
6162
  var keys = Object.keys(obj);
4822
6163
  objKeys = sort ? keys.sort(sort) : keys;
4823
6164
  }
4824
6165
 
4825
- for (var i = 0; i < objKeys.length; ++i) {
4826
- var key = objKeys[i];
6166
+ var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
6167
+
6168
+ var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
6169
+
6170
+ if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
6171
+ return adjustedPrefix + '[]';
6172
+ }
6173
+
6174
+ for (var j = 0; j < objKeys.length; ++j) {
6175
+ var key = objKeys[j];
6176
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
4827
6177
 
4828
- if (skipNulls && obj[key] === null) {
6178
+ if (skipNulls && value === null) {
4829
6179
  continue;
4830
6180
  }
4831
6181
 
4832
- if (isArray(obj)) {
4833
- pushToArray(values, stringify(
4834
- obj[key],
4835
- typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix,
4836
- generateArrayPrefix,
4837
- strictNullHandling,
4838
- skipNulls,
4839
- encoder,
4840
- filter,
4841
- sort,
4842
- allowDots,
4843
- serializeDate,
4844
- formatter,
4845
- encodeValuesOnly,
4846
- charset
4847
- ));
4848
- } else {
4849
- pushToArray(values, stringify(
4850
- obj[key],
4851
- prefix + (allowDots ? '.' + key : '[' + key + ']'),
4852
- generateArrayPrefix,
4853
- strictNullHandling,
4854
- skipNulls,
4855
- encoder,
4856
- filter,
4857
- sort,
4858
- allowDots,
4859
- serializeDate,
4860
- formatter,
4861
- encodeValuesOnly,
4862
- charset
4863
- ));
4864
- }
6182
+ var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
6183
+ var keyPrefix = isArray(obj)
6184
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
6185
+ : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
6186
+
6187
+ sideChannel.set(object, step);
6188
+ var valueSideChannel = getSideChannel();
6189
+ valueSideChannel.set(sentinel, sideChannel);
6190
+ pushToArray(values, stringify(
6191
+ value,
6192
+ keyPrefix,
6193
+ generateArrayPrefix,
6194
+ commaRoundTrip,
6195
+ allowEmptyArrays,
6196
+ strictNullHandling,
6197
+ skipNulls,
6198
+ encodeDotInKeys,
6199
+ generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
6200
+ filter,
6201
+ sort,
6202
+ allowDots,
6203
+ serializeDate,
6204
+ format,
6205
+ formatter,
6206
+ encodeValuesOnly,
6207
+ charset,
6208
+ valueSideChannel
6209
+ ));
4865
6210
  }
4866
6211
 
4867
6212
  return values;
@@ -4872,7 +6217,15 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
4872
6217
  return defaults;
4873
6218
  }
4874
6219
 
4875
- if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
6220
+ if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
6221
+ throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
6222
+ }
6223
+
6224
+ if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
6225
+ throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
6226
+ }
6227
+
6228
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
4876
6229
  throw new TypeError('Encoder has to be a function.');
4877
6230
  }
4878
6231
 
@@ -4895,16 +6248,36 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
4895
6248
  filter = opts.filter;
4896
6249
  }
4897
6250
 
6251
+ var arrayFormat;
6252
+ if (opts.arrayFormat in arrayPrefixGenerators) {
6253
+ arrayFormat = opts.arrayFormat;
6254
+ } else if ('indices' in opts) {
6255
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
6256
+ } else {
6257
+ arrayFormat = defaults.arrayFormat;
6258
+ }
6259
+
6260
+ if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
6261
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
6262
+ }
6263
+
6264
+ var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
6265
+
4898
6266
  return {
4899
6267
  addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
4900
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
6268
+ allowDots: allowDots,
6269
+ allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
6270
+ arrayFormat: arrayFormat,
4901
6271
  charset: charset,
4902
6272
  charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
6273
+ commaRoundTrip: opts.commaRoundTrip,
4903
6274
  delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
4904
6275
  encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
6276
+ encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
4905
6277
  encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
4906
6278
  encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
4907
6279
  filter: filter,
6280
+ format: format,
4908
6281
  formatter: formatter,
4909
6282
  serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
4910
6283
  skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
@@ -4934,16 +6307,8 @@ module.exports = function (object, opts) {
4934
6307
  return '';
4935
6308
  }
4936
6309
 
4937
- var arrayFormat;
4938
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
4939
- arrayFormat = opts.arrayFormat;
4940
- } else if (opts && 'indices' in opts) {
4941
- arrayFormat = opts.indices ? 'indices' : 'repeat';
4942
- } else {
4943
- arrayFormat = 'indices';
4944
- }
4945
-
4946
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
6310
+ var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
6311
+ var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
4947
6312
 
4948
6313
  if (!objKeys) {
4949
6314
  objKeys = Object.keys(obj);
@@ -4953,6 +6318,7 @@ module.exports = function (object, opts) {
4953
6318
  objKeys.sort(options.sort);
4954
6319
  }
4955
6320
 
6321
+ var sideChannel = getSideChannel();
4956
6322
  for (var i = 0; i < objKeys.length; ++i) {
4957
6323
  var key = objKeys[i];
4958
6324
 
@@ -4963,16 +6329,21 @@ module.exports = function (object, opts) {
4963
6329
  obj[key],
4964
6330
  key,
4965
6331
  generateArrayPrefix,
6332
+ commaRoundTrip,
6333
+ options.allowEmptyArrays,
4966
6334
  options.strictNullHandling,
4967
6335
  options.skipNulls,
6336
+ options.encodeDotInKeys,
4968
6337
  options.encode ? options.encoder : null,
4969
6338
  options.filter,
4970
6339
  options.sort,
4971
6340
  options.allowDots,
4972
6341
  options.serializeDate,
6342
+ options.format,
4973
6343
  options.formatter,
4974
6344
  options.encodeValuesOnly,
4975
- options.charset
6345
+ options.charset,
6346
+ sideChannel
4976
6347
  ));
4977
6348
  }
4978
6349
 
@@ -4992,9 +6363,11 @@ module.exports = function (object, opts) {
4992
6363
  return joined.length > 0 ? prefix + joined : '';
4993
6364
  };
4994
6365
 
4995
- },{"./formats":26,"./utils":30}],30:[function(require,module,exports){
6366
+ },{"./formats":47,"./utils":51,"side-channel":62}],51:[function(require,module,exports){
4996
6367
  'use strict';
4997
6368
 
6369
+ var formats = require('./formats');
6370
+
4998
6371
  var has = Object.prototype.hasOwnProperty;
4999
6372
  var isArray = Array.isArray;
5000
6373
 
@@ -5115,7 +6488,7 @@ var decode = function (str, decoder, charset) {
5115
6488
  }
5116
6489
  };
5117
6490
 
5118
- var encode = function encode(str, defaultEncoder, charset) {
6491
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
5119
6492
  // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
5120
6493
  // It has been adapted here for stricter adherence to RFC 3986
5121
6494
  if (str.length === 0) {
@@ -5147,6 +6520,7 @@ var encode = function encode(str, defaultEncoder, charset) {
5147
6520
  || (c >= 0x30 && c <= 0x39) // 0-9
5148
6521
  || (c >= 0x41 && c <= 0x5A) // a-z
5149
6522
  || (c >= 0x61 && c <= 0x7A) // A-Z
6523
+ || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
5150
6524
  ) {
5151
6525
  out += string.charAt(i);
5152
6526
  continue;
@@ -5169,6 +6543,7 @@ var encode = function encode(str, defaultEncoder, charset) {
5169
6543
 
5170
6544
  i += 1;
5171
6545
  c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
6546
+ /* eslint operator-linebreak: [2, "before"] */
5172
6547
  out += hexTable[0xF0 | (c >> 18)]
5173
6548
  + hexTable[0x80 | ((c >> 12) & 0x3F)]
5174
6549
  + hexTable[0x80 | ((c >> 6) & 0x3F)]
@@ -5218,6 +6593,17 @@ var combine = function combine(a, b) {
5218
6593
  return [].concat(a, b);
5219
6594
  };
5220
6595
 
6596
+ var maybeMap = function maybeMap(val, fn) {
6597
+ if (isArray(val)) {
6598
+ var mapped = [];
6599
+ for (var i = 0; i < val.length; i += 1) {
6600
+ mapped.push(fn(val[i]));
6601
+ }
6602
+ return mapped;
6603
+ }
6604
+ return fn(val);
6605
+ };
6606
+
5221
6607
  module.exports = {
5222
6608
  arrayToObject: arrayToObject,
5223
6609
  assign: assign,
@@ -5227,10 +6613,11 @@ module.exports = {
5227
6613
  encode: encode,
5228
6614
  isBuffer: isBuffer,
5229
6615
  isRegExp: isRegExp,
6616
+ maybeMap: maybeMap,
5230
6617
  merge: merge
5231
6618
  };
5232
6619
 
5233
- },{}],31:[function(require,module,exports){
6620
+ },{"./formats":47}],52:[function(require,module,exports){
5234
6621
  var slice = Array.prototype.slice;
5235
6622
 
5236
6623
  function dashify(method, file) {
@@ -5246,7 +6633,7 @@ exports.readFileSync = dashify(require("./read-file-sync"), "/dev/stdin");
5246
6633
  exports.writeFile = dashify(require("./write-file"), "/dev/stdout");
5247
6634
  exports.writeFileSync = dashify(require("./write-file-sync"), "/dev/stdout");
5248
6635
 
5249
- },{"./read-file":35,"./read-file-sync":34,"./write-file":37,"./write-file-sync":36}],32:[function(require,module,exports){
6636
+ },{"./read-file":56,"./read-file-sync":55,"./write-file":58,"./write-file-sync":57}],53:[function(require,module,exports){
5250
6637
  (function (Buffer){(function (){
5251
6638
  module.exports = function(options) {
5252
6639
  if (options) {
@@ -5273,7 +6660,7 @@ function encoding(encoding) {
5273
6660
  }
5274
6661
 
5275
6662
  }).call(this)}).call(this,require("buffer").Buffer)
5276
- },{"buffer":"buffer"}],33:[function(require,module,exports){
6663
+ },{"buffer":"buffer"}],54:[function(require,module,exports){
5277
6664
  (function (Buffer){(function (){
5278
6665
  module.exports = function(data, options) {
5279
6666
  return typeof data === "string"
@@ -5284,7 +6671,7 @@ module.exports = function(data, options) {
5284
6671
  };
5285
6672
 
5286
6673
  }).call(this)}).call(this,require("buffer").Buffer)
5287
- },{"buffer":"buffer"}],34:[function(require,module,exports){
6674
+ },{"buffer":"buffer"}],55:[function(require,module,exports){
5288
6675
  (function (Buffer){(function (){
5289
6676
  var fs = require("fs"),
5290
6677
  decode = require("./decode");
@@ -5317,7 +6704,7 @@ module.exports = function(filename, options) {
5317
6704
  var bufferSize = 1 << 16;
5318
6705
 
5319
6706
  }).call(this)}).call(this,require("buffer").Buffer)
5320
- },{"./decode":32,"buffer":"buffer","fs":"fs"}],35:[function(require,module,exports){
6707
+ },{"./decode":53,"buffer":"buffer","fs":"fs"}],56:[function(require,module,exports){
5321
6708
  (function (process){(function (){
5322
6709
  var fs = require("fs"),
5323
6710
  decode = require("./decode");
@@ -5344,7 +6731,7 @@ function readStream(stream, options, callback) {
5344
6731
  }
5345
6732
 
5346
6733
  }).call(this)}).call(this,require('_process'))
5347
- },{"./decode":32,"_process":25,"fs":"fs"}],36:[function(require,module,exports){
6734
+ },{"./decode":53,"_process":46,"fs":"fs"}],57:[function(require,module,exports){
5348
6735
  var fs = require("fs"),
5349
6736
  encode = require("./encode");
5350
6737
 
@@ -5378,7 +6765,7 @@ module.exports = function(filename, data, options) {
5378
6765
  }
5379
6766
  };
5380
6767
 
5381
- },{"./encode":33,"fs":"fs"}],37:[function(require,module,exports){
6768
+ },{"./encode":54,"fs":"fs"}],58:[function(require,module,exports){
5382
6769
  (function (process){(function (){
5383
6770
  var fs = require("fs"),
5384
6771
  encode = require("./encode");
@@ -5404,7 +6791,7 @@ function writeStream(stream, send, data, options, callback) {
5404
6791
  }
5405
6792
 
5406
6793
  }).call(this)}).call(this,require('_process'))
5407
- },{"./encode":33,"_process":25,"fs":"fs"}],38:[function(require,module,exports){
6794
+ },{"./encode":54,"_process":46,"fs":"fs"}],59:[function(require,module,exports){
5408
6795
  /* eslint-disable node/no-deprecated-api */
5409
6796
  var buffer = require('buffer')
5410
6797
  var Buffer = buffer.Buffer
@@ -5468,7 +6855,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
5468
6855
  return buffer.SlowBuffer(size)
5469
6856
  }
5470
6857
 
5471
- },{"buffer":"buffer"}],39:[function(require,module,exports){
6858
+ },{"buffer":"buffer"}],60:[function(require,module,exports){
5472
6859
  (function (process){(function (){
5473
6860
  /* eslint-disable node/no-deprecated-api */
5474
6861
 
@@ -5549,7 +6936,184 @@ if (!safer.constants) {
5549
6936
  module.exports = safer
5550
6937
 
5551
6938
  }).call(this)}).call(this,require('_process'))
5552
- },{"_process":25,"buffer":"buffer"}],40:[function(require,module,exports){
6939
+ },{"_process":46,"buffer":"buffer"}],61:[function(require,module,exports){
6940
+ 'use strict';
6941
+
6942
+ var GetIntrinsic = require('get-intrinsic');
6943
+ var define = require('define-data-property');
6944
+ var hasDescriptors = require('has-property-descriptors')();
6945
+ var gOPD = require('gopd');
6946
+
6947
+ var $TypeError = require('es-errors/type');
6948
+ var $floor = GetIntrinsic('%Math.floor%');
6949
+
6950
+ /** @typedef {(...args: unknown[]) => unknown} Func */
6951
+
6952
+ /** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
6953
+ module.exports = function setFunctionLength(fn, length) {
6954
+ if (typeof fn !== 'function') {
6955
+ throw new $TypeError('`fn` is not a function');
6956
+ }
6957
+ if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
6958
+ throw new $TypeError('`length` must be a positive 32-bit integer');
6959
+ }
6960
+
6961
+ var loose = arguments.length > 2 && !!arguments[2];
6962
+
6963
+ var functionLengthIsConfigurable = true;
6964
+ var functionLengthIsWritable = true;
6965
+ if ('length' in fn && gOPD) {
6966
+ var desc = gOPD(fn, 'length');
6967
+ if (desc && !desc.configurable) {
6968
+ functionLengthIsConfigurable = false;
6969
+ }
6970
+ if (desc && !desc.writable) {
6971
+ functionLengthIsWritable = false;
6972
+ }
6973
+ }
6974
+
6975
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
6976
+ if (hasDescriptors) {
6977
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
6978
+ } else {
6979
+ define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
6980
+ }
6981
+ }
6982
+ return fn;
6983
+ };
6984
+
6985
+ },{"define-data-property":5,"es-errors/type":12,"get-intrinsic":16,"gopd":17,"has-property-descriptors":18}],62:[function(require,module,exports){
6986
+ 'use strict';
6987
+
6988
+ var GetIntrinsic = require('get-intrinsic');
6989
+ var callBound = require('call-bind/callBound');
6990
+ var inspect = require('object-inspect');
6991
+
6992
+ var $TypeError = require('es-errors/type');
6993
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
6994
+ var $Map = GetIntrinsic('%Map%', true);
6995
+
6996
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
6997
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
6998
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
6999
+ var $mapGet = callBound('Map.prototype.get', true);
7000
+ var $mapSet = callBound('Map.prototype.set', true);
7001
+ var $mapHas = callBound('Map.prototype.has', true);
7002
+
7003
+ /*
7004
+ * This function traverses the list returning the node corresponding to the given key.
7005
+ *
7006
+ * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
7007
+ */
7008
+ /** @type {import('.').listGetNode} */
7009
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
7010
+ /** @type {typeof list | NonNullable<(typeof list)['next']>} */
7011
+ var prev = list;
7012
+ /** @type {(typeof list)['next']} */
7013
+ var curr;
7014
+ for (; (curr = prev.next) !== null; prev = curr) {
7015
+ if (curr.key === key) {
7016
+ prev.next = curr.next;
7017
+ // eslint-disable-next-line no-extra-parens
7018
+ curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
7019
+ list.next = curr; // eslint-disable-line no-param-reassign
7020
+ return curr;
7021
+ }
7022
+ }
7023
+ };
7024
+
7025
+ /** @type {import('.').listGet} */
7026
+ var listGet = function (objects, key) {
7027
+ var node = listGetNode(objects, key);
7028
+ return node && node.value;
7029
+ };
7030
+ /** @type {import('.').listSet} */
7031
+ var listSet = function (objects, key, value) {
7032
+ var node = listGetNode(objects, key);
7033
+ if (node) {
7034
+ node.value = value;
7035
+ } else {
7036
+ // Prepend the new node to the beginning of the list
7037
+ objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
7038
+ key: key,
7039
+ next: objects.next,
7040
+ value: value
7041
+ });
7042
+ }
7043
+ };
7044
+ /** @type {import('.').listHas} */
7045
+ var listHas = function (objects, key) {
7046
+ return !!listGetNode(objects, key);
7047
+ };
7048
+
7049
+ /** @type {import('.')} */
7050
+ module.exports = function getSideChannel() {
7051
+ /** @type {WeakMap<object, unknown>} */ var $wm;
7052
+ /** @type {Map<object, unknown>} */ var $m;
7053
+ /** @type {import('.').RootNode<unknown>} */ var $o;
7054
+
7055
+ /** @type {import('.').Channel} */
7056
+ var channel = {
7057
+ assert: function (key) {
7058
+ if (!channel.has(key)) {
7059
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
7060
+ }
7061
+ },
7062
+ get: function (key) { // eslint-disable-line consistent-return
7063
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
7064
+ if ($wm) {
7065
+ return $weakMapGet($wm, key);
7066
+ }
7067
+ } else if ($Map) {
7068
+ if ($m) {
7069
+ return $mapGet($m, key);
7070
+ }
7071
+ } else {
7072
+ if ($o) { // eslint-disable-line no-lonely-if
7073
+ return listGet($o, key);
7074
+ }
7075
+ }
7076
+ },
7077
+ has: function (key) {
7078
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
7079
+ if ($wm) {
7080
+ return $weakMapHas($wm, key);
7081
+ }
7082
+ } else if ($Map) {
7083
+ if ($m) {
7084
+ return $mapHas($m, key);
7085
+ }
7086
+ } else {
7087
+ if ($o) { // eslint-disable-line no-lonely-if
7088
+ return listHas($o, key);
7089
+ }
7090
+ }
7091
+ return false;
7092
+ },
7093
+ set: function (key, value) {
7094
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
7095
+ if (!$wm) {
7096
+ $wm = new $WeakMap();
7097
+ }
7098
+ $weakMapSet($wm, key, value);
7099
+ } else if ($Map) {
7100
+ if (!$m) {
7101
+ $m = new $Map();
7102
+ }
7103
+ $mapSet($m, key, value);
7104
+ } else {
7105
+ if (!$o) {
7106
+ // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
7107
+ $o = { key: {}, next: null };
7108
+ }
7109
+ listSet($o, key, value);
7110
+ }
7111
+ }
7112
+ };
7113
+ return channel;
7114
+ };
7115
+
7116
+ },{"call-bind/callBound":3,"es-errors/type":12,"get-intrinsic":16,"object-inspect":45}],63:[function(require,module,exports){
5553
7117
  // Copyright Joyent, Inc. and other Node contributors.
5554
7118
  //
5555
7119
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -5846,7 +7410,7 @@ function simpleWrite(buf) {
5846
7410
  function simpleEnd(buf) {
5847
7411
  return buf && buf.length ? this.write(buf) : '';
5848
7412
  }
5849
- },{"safe-buffer":38}],41:[function(require,module,exports){
7413
+ },{"safe-buffer":59}],64:[function(require,module,exports){
5850
7414
  "use strict";
5851
7415
  exports.__esModule = true;
5852
7416
  var qs_1 = require("qs");
@@ -5866,7 +7430,7 @@ function handleQs(url, query) {
5866
7430
  }
5867
7431
  exports["default"] = handleQs;
5868
7432
 
5869
- },{"qs":27}],"@placemarkio/tokml":[function(require,module,exports){
7433
+ },{"qs":48}],"@placemarkio/tokml":[function(require,module,exports){
5870
7434
  'use strict';
5871
7435
 
5872
7436
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -8553,7 +10117,7 @@ function numberIsNaN (obj) {
8553
10117
  }
8554
10118
 
8555
10119
  }).call(this)}).call(this,require("buffer").Buffer)
8556
- },{"base64-js":1,"buffer":"buffer","ieee754":24}],"flatbush":[function(require,module,exports){
10120
+ },{"base64-js":1,"buffer":"buffer","ieee754":44}],"flatbush":[function(require,module,exports){
8557
10121
  (function (global, factory) {
8558
10122
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
8559
10123
  typeof define === 'function' && define.amd ? define(factory) :
@@ -9198,7 +10762,7 @@ if ("Ā" != "\u0100") {
9198
10762
  console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info.");
9199
10763
  }
9200
10764
 
9201
- },{"../encodings":6,"./bom-handling":22,"./streams":23,"safer-buffer":39,"stream":2}],"idb-keyval":[function(require,module,exports){
10765
+ },{"../encodings":26,"./bom-handling":42,"./streams":43,"safer-buffer":60,"stream":2}],"idb-keyval":[function(require,module,exports){
9202
10766
  'use strict';
9203
10767
 
9204
10768
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
@@ -9822,7 +11386,9 @@ var pj_err_list = [
9822
11386
  "unknown prime meridian conversion id", /* -46 */
9823
11387
  "illegal axis orientation combination", /* -47 */
9824
11388
  "point not within available datum shift grids", /* -48 */
9825
- "invalid sweep axis, choose x or y"
11389
+ "invalid sweep axis, choose x or y",
11390
+ "invalid value for h", // -50
11391
+ "point outside of projection domain" // -51 taken from Proj v9
9826
11392
  ];
9827
11393
 
9828
11394
 
@@ -16945,6 +18511,156 @@ function pj_geocent(P) {
16945
18511
  }
16946
18512
 
16947
18513
 
18514
+ pj_add(pj_geos, 'geos', 'Geostationary Satellite View', 'Azi, Sph&Ell');
18515
+
18516
+ function pj_geos(P) {
18517
+ var radius_p, radius_p2, radius_p_inv2, radius_g, radius_g_1, C, flip_axis;
18518
+ var h = pj_param(P.params, "dh");
18519
+ var sweep_axis = pj_param(P.params, "ssweep");
18520
+ if (!sweep_axis)
18521
+ flip_axis = 0;
18522
+ else {
18523
+ if (sweep_axis == 'x')
18524
+ flip_axis = 1;
18525
+ else if (sweep_axis == 'y')
18526
+ flip_axis = 0;
18527
+ else
18528
+ e_error(-49);
18529
+ }
18530
+
18531
+ radius_g_1 = h / P.a;
18532
+ if (radius_g_1 <= 0 || radius_g_1 > 1e10) {
18533
+ e_error(-50);
18534
+ }
18535
+ radius_g = 1 + radius_g_1;
18536
+ C = radius_g * radius_g - 1;
18537
+ if (P.es != 0) {
18538
+ radius_p = sqrt(P.one_es);
18539
+ radius_p2 = P.one_es;
18540
+ radius_p_inv2 = P.rone_es;
18541
+ P.inv = e_inv;
18542
+ P.fwd = e_fwd;
18543
+ } else {
18544
+ radius_p = radius_p2 = radius_p_inv2 = 1;
18545
+ P.inv = s_inv;
18546
+ P.fwd = s_fwd;
18547
+ }
18548
+
18549
+ function s_fwd(lp, xy) {
18550
+ var tmp = cos(lp.phi);
18551
+ var Vx = cos(lp.lam) * tmp;
18552
+ var Vy = sin(lp.lam) * tmp;
18553
+ var Vz = sin(lp.phi);
18554
+ /* Calculation based on view angles from satellite.*/
18555
+ tmp = radius_g - Vx;
18556
+
18557
+ if (flip_axis) {
18558
+ xy.x = radius_g_1 * atan(Vy / hypot(Vz, tmp));
18559
+ xy.y = radius_g_1 * atan(Vz / tmp);
18560
+ } else {
18561
+ xy.x = radius_g_1 * atan(Vy / tmp);
18562
+ xy.y = radius_g_1 * atan(Vz / hypot(Vy, tmp));
18563
+ }
18564
+ }
18565
+
18566
+ function s_inv(xy, lp) {
18567
+ var Vx, Vy, Vz, a, b, k;
18568
+
18569
+ /* Setting three components of vector from satellite to position.*/
18570
+ Vx = -1;
18571
+ if (flip_axis) {
18572
+ Vz = tan(xy.y / radius_g_1);
18573
+ Vy = tan(xy.x / radius_g_1) * sqrt(1 + Vz * Vz);
18574
+ } else {
18575
+ Vy = tan(xy.x / radius_g_1);
18576
+ Vz = tan(xy.y / radius_g_1) * sqrt(1 + Vy * Vy);
18577
+ }
18578
+
18579
+ /* Calculation of terms in cubic equation and determinant.*/
18580
+ a = Vy * Vy + Vz * Vz + Vx * Vx;
18581
+ b = 2 * radius_g * Vx;
18582
+ var det = (b * b) - 4 * a * C;
18583
+ if (det < 0) {
18584
+ e_error(-51);
18585
+ }
18586
+
18587
+ /* Calculation of three components of vector from satellite to position.*/
18588
+ k = (-b - sqrt(det)) / (2 * a);
18589
+ Vx = radius_g + k * Vx;
18590
+ Vy *= k;
18591
+ Vz *= k;
18592
+
18593
+ /* Calculation of longitude and latitude.*/
18594
+ lp.lam = atan2(Vy, Vx);
18595
+ lp.phi = atan(Vz * cos(lp.lam) / Vx);
18596
+ }
18597
+
18598
+ function e_fwd(lp, xy) {
18599
+ var r, Vx, Vy, Vz, tmp;
18600
+
18601
+ /* Calculation of geocentric latitude. */
18602
+ lp.phi = atan(radius_p2 * tan(lp.phi));
18603
+
18604
+ /* Calculation of the three components of the vector from satellite to
18605
+ ** position on earth surface (long,lat).*/
18606
+ r = (radius_p) / hypot(radius_p * cos(lp.phi), sin(lp.phi));
18607
+ Vx = r * cos(lp.lam) * cos(lp.phi);
18608
+ Vy = r * sin(lp.lam) * cos(lp.phi);
18609
+ Vz = r * sin(lp.phi);
18610
+
18611
+ /* Check visibility. */
18612
+ if (((radius_g - Vx) * Vx - Vy * Vy - Vz * Vz * radius_p_inv2) < 0.) {
18613
+ e_error(-51);
18614
+ }
18615
+
18616
+ /* Calculation based on view angles from satellite. */
18617
+ tmp = radius_g - Vx;
18618
+ if (flip_axis) {
18619
+ xy.x = radius_g_1 * atan(Vy / hypot(Vz, tmp));
18620
+ xy.y = radius_g_1 * atan(Vz / tmp);
18621
+ } else {
18622
+ xy.x = radius_g_1 * atan(Vy / tmp);
18623
+ xy.y = radius_g_1 * atan(Vz / hypot(Vy, tmp));
18624
+ }
18625
+ }
18626
+
18627
+ function e_inv(xy, lp) {
18628
+ var Vx, Vy, Vz, a, b, k;
18629
+
18630
+ /* Setting three components of vector from satellite to position.*/
18631
+ Vx = -1;
18632
+
18633
+ if (flip_axis) {
18634
+ Vz = tan(xy.y / radius_g_1);
18635
+ Vy = tan(xy.x / radius_g_1) * hypot(1, Vz);
18636
+ } else {
18637
+ Vy = tan(xy.x / radius_g_1);
18638
+ Vz = tan(xy.y / radius_g_1) * hypot(1, Vy);
18639
+ }
18640
+
18641
+ /* Calculation of terms in cubic equation and determinant.*/
18642
+ a = Vz / radius_p;
18643
+ a = Vy * Vy + a * a + Vx * Vx;
18644
+ b = 2 * radius_g * Vx;
18645
+ var det = (b * b) - 4 * a * C;
18646
+ if (det < 0) {
18647
+ e_error(-51);
18648
+ }
18649
+
18650
+ /* Calculation of three components of vector from satellite to position.*/
18651
+ k = (-b - sqrt(det)) / (2 * a);
18652
+ Vx = radius_g + k * Vx;
18653
+ Vy *= k;
18654
+ Vz *= k;
18655
+
18656
+ /* Calculation of longitude and latitude.*/
18657
+ lp.lam = atan2(Vy, Vx);
18658
+ lp.phi = atan(Vz * cos(lp.lam) / Vx);
18659
+ lp.phi = atan(radius_p_inv2 * tan(lp.phi));
18660
+ }
18661
+ }
18662
+
18663
+
16948
18664
  // from
16949
18665
 
16950
18666
  pj_add(pj_gilbert, 'gilbert', 'Gilbert Two World Perspective', 'PCyl., Sph., NoInv.\nlat_1=');
@@ -22349,14 +24065,14 @@ posix.posix = posix;
22349
24065
  module.exports = posix;
22350
24066
 
22351
24067
  }).call(this)}).call(this,require('_process'))
22352
- },{"_process":25}],"rw":[function(require,module,exports){
24068
+ },{"_process":46}],"rw":[function(require,module,exports){
22353
24069
  exports.dash = require("./lib/rw/dash");
22354
24070
  exports.readFile = require("./lib/rw/read-file");
22355
24071
  exports.readFileSync = require("./lib/rw/read-file-sync");
22356
24072
  exports.writeFile = require("./lib/rw/write-file");
22357
24073
  exports.writeFileSync = require("./lib/rw/write-file-sync");
22358
24074
 
22359
- },{"./lib/rw/dash":31,"./lib/rw/read-file":35,"./lib/rw/read-file-sync":34,"./lib/rw/write-file":37,"./lib/rw/write-file-sync":36}],"sync-request":[function(require,module,exports){
24075
+ },{"./lib/rw/dash":52,"./lib/rw/read-file":56,"./lib/rw/read-file-sync":55,"./lib/rw/write-file":58,"./lib/rw/write-file-sync":57}],"sync-request":[function(require,module,exports){
22360
24076
  "use strict";
22361
24077
  exports.__esModule = true;
22362
24078
  var handle_qs_js_1 = require("then-request/lib/handle-qs.js");
@@ -22427,4 +24143,4 @@ module.exports = doRequest;
22427
24143
  module.exports["default"] = doRequest;
22428
24144
  module.exports.FormData = fd;
22429
24145
 
22430
- },{"http-response-object":3,"then-request/lib/handle-qs.js":41}]},{},[]);
24146
+ },{"http-response-object":23,"then-request/lib/handle-qs.js":64}]},{},[]);