@allthings/sdk 7.1.0 → 7.2.0-dev.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +1107 -27
- package/dist/lib.cjs.js +1107 -27
- package/dist/lib.esm.js +1107 -27
- package/dist/lib.umd.min.js +1 -1
- package/dist/src/rest/methods/idLookup.d.ts +2 -0
- package/dist/test/constants.js +16 -0
- package/dist/test/helpers.js +56 -0
- package/package.json +46 -37
package/dist/lib.esm.js
CHANGED
|
@@ -18,7 +18,7 @@ function createTokenStore(initialToken) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
const version = "7.
|
|
21
|
+
const version = "7.2.0-dev.0";
|
|
22
22
|
|
|
23
23
|
const REST_API_URL = 'https://api.allthings.me';
|
|
24
24
|
const OAUTH_URL = 'https://accounts.allthings.me';
|
|
@@ -191,7 +191,7 @@ async function del(request, method, body, returnRawResultObject, headers) {
|
|
|
191
191
|
return request('delete', method, { body, headers }, returnRawResultObject);
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
async function get(request, method, query, returnRawResultObject, headers) {
|
|
194
|
+
async function get$1(request, method, query, returnRawResultObject, headers) {
|
|
195
195
|
return request('get', method, { headers, query }, returnRawResultObject);
|
|
196
196
|
}
|
|
197
197
|
|
|
@@ -481,7 +481,10 @@ async function getGroups(client, page = 1, limit = -1, filter = {}) {
|
|
|
481
481
|
}
|
|
482
482
|
|
|
483
483
|
async function lookupIds(client, appId, data) {
|
|
484
|
-
|
|
484
|
+
const url = data.dataSource
|
|
485
|
+
? `/v1/id-lookup/${appId}/${data.resource}/${data.dataSource}`
|
|
486
|
+
: `/v1/id-lookup/${appId}/${data.resource}`;
|
|
487
|
+
return client.post(url, Object.assign(Object.assign({ externalIds: typeof data.externalIds === 'string'
|
|
485
488
|
? [data.externalIds]
|
|
486
489
|
: data.externalIds }, (data.parentId ? { parentId: data.parentId } : {})), (data.userType ? { userType: data.userType } : {})));
|
|
487
490
|
}
|
|
@@ -12569,6 +12572,1081 @@ function requireAsynckit () {
|
|
|
12569
12572
|
return asynckit;
|
|
12570
12573
|
}
|
|
12571
12574
|
|
|
12575
|
+
var esObjectAtoms;
|
|
12576
|
+
var hasRequiredEsObjectAtoms;
|
|
12577
|
+
|
|
12578
|
+
function requireEsObjectAtoms () {
|
|
12579
|
+
if (hasRequiredEsObjectAtoms) return esObjectAtoms;
|
|
12580
|
+
hasRequiredEsObjectAtoms = 1;
|
|
12581
|
+
|
|
12582
|
+
/** @type {import('.')} */
|
|
12583
|
+
esObjectAtoms = Object;
|
|
12584
|
+
return esObjectAtoms;
|
|
12585
|
+
}
|
|
12586
|
+
|
|
12587
|
+
var esErrors;
|
|
12588
|
+
var hasRequiredEsErrors;
|
|
12589
|
+
|
|
12590
|
+
function requireEsErrors () {
|
|
12591
|
+
if (hasRequiredEsErrors) return esErrors;
|
|
12592
|
+
hasRequiredEsErrors = 1;
|
|
12593
|
+
|
|
12594
|
+
/** @type {import('.')} */
|
|
12595
|
+
esErrors = Error;
|
|
12596
|
+
return esErrors;
|
|
12597
|
+
}
|
|
12598
|
+
|
|
12599
|
+
var _eval;
|
|
12600
|
+
var hasRequired_eval;
|
|
12601
|
+
|
|
12602
|
+
function require_eval () {
|
|
12603
|
+
if (hasRequired_eval) return _eval;
|
|
12604
|
+
hasRequired_eval = 1;
|
|
12605
|
+
|
|
12606
|
+
/** @type {import('./eval')} */
|
|
12607
|
+
_eval = EvalError;
|
|
12608
|
+
return _eval;
|
|
12609
|
+
}
|
|
12610
|
+
|
|
12611
|
+
var range;
|
|
12612
|
+
var hasRequiredRange;
|
|
12613
|
+
|
|
12614
|
+
function requireRange () {
|
|
12615
|
+
if (hasRequiredRange) return range;
|
|
12616
|
+
hasRequiredRange = 1;
|
|
12617
|
+
|
|
12618
|
+
/** @type {import('./range')} */
|
|
12619
|
+
range = RangeError;
|
|
12620
|
+
return range;
|
|
12621
|
+
}
|
|
12622
|
+
|
|
12623
|
+
var ref;
|
|
12624
|
+
var hasRequiredRef;
|
|
12625
|
+
|
|
12626
|
+
function requireRef () {
|
|
12627
|
+
if (hasRequiredRef) return ref;
|
|
12628
|
+
hasRequiredRef = 1;
|
|
12629
|
+
|
|
12630
|
+
/** @type {import('./ref')} */
|
|
12631
|
+
ref = ReferenceError;
|
|
12632
|
+
return ref;
|
|
12633
|
+
}
|
|
12634
|
+
|
|
12635
|
+
var syntax;
|
|
12636
|
+
var hasRequiredSyntax;
|
|
12637
|
+
|
|
12638
|
+
function requireSyntax () {
|
|
12639
|
+
if (hasRequiredSyntax) return syntax;
|
|
12640
|
+
hasRequiredSyntax = 1;
|
|
12641
|
+
|
|
12642
|
+
/** @type {import('./syntax')} */
|
|
12643
|
+
syntax = SyntaxError;
|
|
12644
|
+
return syntax;
|
|
12645
|
+
}
|
|
12646
|
+
|
|
12647
|
+
var type;
|
|
12648
|
+
var hasRequiredType;
|
|
12649
|
+
|
|
12650
|
+
function requireType () {
|
|
12651
|
+
if (hasRequiredType) return type;
|
|
12652
|
+
hasRequiredType = 1;
|
|
12653
|
+
|
|
12654
|
+
/** @type {import('./type')} */
|
|
12655
|
+
type = TypeError;
|
|
12656
|
+
return type;
|
|
12657
|
+
}
|
|
12658
|
+
|
|
12659
|
+
var uri;
|
|
12660
|
+
var hasRequiredUri;
|
|
12661
|
+
|
|
12662
|
+
function requireUri () {
|
|
12663
|
+
if (hasRequiredUri) return uri;
|
|
12664
|
+
hasRequiredUri = 1;
|
|
12665
|
+
|
|
12666
|
+
/** @type {import('./uri')} */
|
|
12667
|
+
uri = URIError;
|
|
12668
|
+
return uri;
|
|
12669
|
+
}
|
|
12670
|
+
|
|
12671
|
+
var abs;
|
|
12672
|
+
var hasRequiredAbs;
|
|
12673
|
+
|
|
12674
|
+
function requireAbs () {
|
|
12675
|
+
if (hasRequiredAbs) return abs;
|
|
12676
|
+
hasRequiredAbs = 1;
|
|
12677
|
+
|
|
12678
|
+
/** @type {import('./abs')} */
|
|
12679
|
+
abs = Math.abs;
|
|
12680
|
+
return abs;
|
|
12681
|
+
}
|
|
12682
|
+
|
|
12683
|
+
var floor;
|
|
12684
|
+
var hasRequiredFloor;
|
|
12685
|
+
|
|
12686
|
+
function requireFloor () {
|
|
12687
|
+
if (hasRequiredFloor) return floor;
|
|
12688
|
+
hasRequiredFloor = 1;
|
|
12689
|
+
|
|
12690
|
+
/** @type {import('./floor')} */
|
|
12691
|
+
floor = Math.floor;
|
|
12692
|
+
return floor;
|
|
12693
|
+
}
|
|
12694
|
+
|
|
12695
|
+
var max;
|
|
12696
|
+
var hasRequiredMax;
|
|
12697
|
+
|
|
12698
|
+
function requireMax () {
|
|
12699
|
+
if (hasRequiredMax) return max;
|
|
12700
|
+
hasRequiredMax = 1;
|
|
12701
|
+
|
|
12702
|
+
/** @type {import('./max')} */
|
|
12703
|
+
max = Math.max;
|
|
12704
|
+
return max;
|
|
12705
|
+
}
|
|
12706
|
+
|
|
12707
|
+
var min;
|
|
12708
|
+
var hasRequiredMin;
|
|
12709
|
+
|
|
12710
|
+
function requireMin () {
|
|
12711
|
+
if (hasRequiredMin) return min;
|
|
12712
|
+
hasRequiredMin = 1;
|
|
12713
|
+
|
|
12714
|
+
/** @type {import('./min')} */
|
|
12715
|
+
min = Math.min;
|
|
12716
|
+
return min;
|
|
12717
|
+
}
|
|
12718
|
+
|
|
12719
|
+
var pow;
|
|
12720
|
+
var hasRequiredPow;
|
|
12721
|
+
|
|
12722
|
+
function requirePow () {
|
|
12723
|
+
if (hasRequiredPow) return pow;
|
|
12724
|
+
hasRequiredPow = 1;
|
|
12725
|
+
|
|
12726
|
+
/** @type {import('./pow')} */
|
|
12727
|
+
pow = Math.pow;
|
|
12728
|
+
return pow;
|
|
12729
|
+
}
|
|
12730
|
+
|
|
12731
|
+
var round;
|
|
12732
|
+
var hasRequiredRound;
|
|
12733
|
+
|
|
12734
|
+
function requireRound () {
|
|
12735
|
+
if (hasRequiredRound) return round;
|
|
12736
|
+
hasRequiredRound = 1;
|
|
12737
|
+
|
|
12738
|
+
/** @type {import('./round')} */
|
|
12739
|
+
round = Math.round;
|
|
12740
|
+
return round;
|
|
12741
|
+
}
|
|
12742
|
+
|
|
12743
|
+
var _isNaN;
|
|
12744
|
+
var hasRequired_isNaN;
|
|
12745
|
+
|
|
12746
|
+
function require_isNaN () {
|
|
12747
|
+
if (hasRequired_isNaN) return _isNaN;
|
|
12748
|
+
hasRequired_isNaN = 1;
|
|
12749
|
+
|
|
12750
|
+
/** @type {import('./isNaN')} */
|
|
12751
|
+
_isNaN = Number.isNaN || function isNaN(a) {
|
|
12752
|
+
return a !== a;
|
|
12753
|
+
};
|
|
12754
|
+
return _isNaN;
|
|
12755
|
+
}
|
|
12756
|
+
|
|
12757
|
+
var sign;
|
|
12758
|
+
var hasRequiredSign;
|
|
12759
|
+
|
|
12760
|
+
function requireSign () {
|
|
12761
|
+
if (hasRequiredSign) return sign;
|
|
12762
|
+
hasRequiredSign = 1;
|
|
12763
|
+
|
|
12764
|
+
var $isNaN = /*@__PURE__*/ require_isNaN();
|
|
12765
|
+
|
|
12766
|
+
/** @type {import('./sign')} */
|
|
12767
|
+
sign = function sign(number) {
|
|
12768
|
+
if ($isNaN(number) || number === 0) {
|
|
12769
|
+
return number;
|
|
12770
|
+
}
|
|
12771
|
+
return number < 0 ? -1 : 1;
|
|
12772
|
+
};
|
|
12773
|
+
return sign;
|
|
12774
|
+
}
|
|
12775
|
+
|
|
12776
|
+
var gOPD;
|
|
12777
|
+
var hasRequiredGOPD;
|
|
12778
|
+
|
|
12779
|
+
function requireGOPD () {
|
|
12780
|
+
if (hasRequiredGOPD) return gOPD;
|
|
12781
|
+
hasRequiredGOPD = 1;
|
|
12782
|
+
|
|
12783
|
+
/** @type {import('./gOPD')} */
|
|
12784
|
+
gOPD = Object.getOwnPropertyDescriptor;
|
|
12785
|
+
return gOPD;
|
|
12786
|
+
}
|
|
12787
|
+
|
|
12788
|
+
var gopd;
|
|
12789
|
+
var hasRequiredGopd;
|
|
12790
|
+
|
|
12791
|
+
function requireGopd () {
|
|
12792
|
+
if (hasRequiredGopd) return gopd;
|
|
12793
|
+
hasRequiredGopd = 1;
|
|
12794
|
+
|
|
12795
|
+
/** @type {import('.')} */
|
|
12796
|
+
var $gOPD = /*@__PURE__*/ requireGOPD();
|
|
12797
|
+
|
|
12798
|
+
if ($gOPD) {
|
|
12799
|
+
try {
|
|
12800
|
+
$gOPD([], 'length');
|
|
12801
|
+
} catch (e) {
|
|
12802
|
+
// IE 8 has a broken gOPD
|
|
12803
|
+
$gOPD = null;
|
|
12804
|
+
}
|
|
12805
|
+
}
|
|
12806
|
+
|
|
12807
|
+
gopd = $gOPD;
|
|
12808
|
+
return gopd;
|
|
12809
|
+
}
|
|
12810
|
+
|
|
12811
|
+
var esDefineProperty;
|
|
12812
|
+
var hasRequiredEsDefineProperty;
|
|
12813
|
+
|
|
12814
|
+
function requireEsDefineProperty () {
|
|
12815
|
+
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
12816
|
+
hasRequiredEsDefineProperty = 1;
|
|
12817
|
+
|
|
12818
|
+
/** @type {import('.')} */
|
|
12819
|
+
var $defineProperty = Object.defineProperty || false;
|
|
12820
|
+
if ($defineProperty) {
|
|
12821
|
+
try {
|
|
12822
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
12823
|
+
} catch (e) {
|
|
12824
|
+
// IE 8 has a broken defineProperty
|
|
12825
|
+
$defineProperty = false;
|
|
12826
|
+
}
|
|
12827
|
+
}
|
|
12828
|
+
|
|
12829
|
+
esDefineProperty = $defineProperty;
|
|
12830
|
+
return esDefineProperty;
|
|
12831
|
+
}
|
|
12832
|
+
|
|
12833
|
+
var shams$1;
|
|
12834
|
+
var hasRequiredShams$1;
|
|
12835
|
+
|
|
12836
|
+
function requireShams$1 () {
|
|
12837
|
+
if (hasRequiredShams$1) return shams$1;
|
|
12838
|
+
hasRequiredShams$1 = 1;
|
|
12839
|
+
|
|
12840
|
+
/** @type {import('./shams')} */
|
|
12841
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
12842
|
+
shams$1 = function hasSymbols() {
|
|
12843
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
12844
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
12845
|
+
|
|
12846
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
12847
|
+
var obj = {};
|
|
12848
|
+
var sym = Symbol('test');
|
|
12849
|
+
var symObj = Object(sym);
|
|
12850
|
+
if (typeof sym === 'string') { return false; }
|
|
12851
|
+
|
|
12852
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
12853
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
12854
|
+
|
|
12855
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
12856
|
+
// if (sym instanceof Symbol) { return false; }
|
|
12857
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
12858
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
12859
|
+
|
|
12860
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
12861
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
12862
|
+
|
|
12863
|
+
var symVal = 42;
|
|
12864
|
+
obj[sym] = symVal;
|
|
12865
|
+
for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
12866
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
12867
|
+
|
|
12868
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
12869
|
+
|
|
12870
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
12871
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
12872
|
+
|
|
12873
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
12874
|
+
|
|
12875
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
12876
|
+
// eslint-disable-next-line no-extra-parens
|
|
12877
|
+
var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
|
|
12878
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
12879
|
+
}
|
|
12880
|
+
|
|
12881
|
+
return true;
|
|
12882
|
+
};
|
|
12883
|
+
return shams$1;
|
|
12884
|
+
}
|
|
12885
|
+
|
|
12886
|
+
var hasSymbols;
|
|
12887
|
+
var hasRequiredHasSymbols;
|
|
12888
|
+
|
|
12889
|
+
function requireHasSymbols () {
|
|
12890
|
+
if (hasRequiredHasSymbols) return hasSymbols;
|
|
12891
|
+
hasRequiredHasSymbols = 1;
|
|
12892
|
+
|
|
12893
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
12894
|
+
var hasSymbolSham = requireShams$1();
|
|
12895
|
+
|
|
12896
|
+
/** @type {import('.')} */
|
|
12897
|
+
hasSymbols = function hasNativeSymbols() {
|
|
12898
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
12899
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
12900
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
12901
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
12902
|
+
|
|
12903
|
+
return hasSymbolSham();
|
|
12904
|
+
};
|
|
12905
|
+
return hasSymbols;
|
|
12906
|
+
}
|
|
12907
|
+
|
|
12908
|
+
var Reflect_getPrototypeOf;
|
|
12909
|
+
var hasRequiredReflect_getPrototypeOf;
|
|
12910
|
+
|
|
12911
|
+
function requireReflect_getPrototypeOf () {
|
|
12912
|
+
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
12913
|
+
hasRequiredReflect_getPrototypeOf = 1;
|
|
12914
|
+
|
|
12915
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
12916
|
+
Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
|
|
12917
|
+
return Reflect_getPrototypeOf;
|
|
12918
|
+
}
|
|
12919
|
+
|
|
12920
|
+
var Object_getPrototypeOf;
|
|
12921
|
+
var hasRequiredObject_getPrototypeOf;
|
|
12922
|
+
|
|
12923
|
+
function requireObject_getPrototypeOf () {
|
|
12924
|
+
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
12925
|
+
hasRequiredObject_getPrototypeOf = 1;
|
|
12926
|
+
|
|
12927
|
+
var $Object = /*@__PURE__*/ requireEsObjectAtoms();
|
|
12928
|
+
|
|
12929
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
12930
|
+
Object_getPrototypeOf = $Object.getPrototypeOf || null;
|
|
12931
|
+
return Object_getPrototypeOf;
|
|
12932
|
+
}
|
|
12933
|
+
|
|
12934
|
+
var implementation;
|
|
12935
|
+
var hasRequiredImplementation;
|
|
12936
|
+
|
|
12937
|
+
function requireImplementation () {
|
|
12938
|
+
if (hasRequiredImplementation) return implementation;
|
|
12939
|
+
hasRequiredImplementation = 1;
|
|
12940
|
+
|
|
12941
|
+
/* eslint no-invalid-this: 1 */
|
|
12942
|
+
|
|
12943
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
12944
|
+
var toStr = Object.prototype.toString;
|
|
12945
|
+
var max = Math.max;
|
|
12946
|
+
var funcType = '[object Function]';
|
|
12947
|
+
|
|
12948
|
+
var concatty = function concatty(a, b) {
|
|
12949
|
+
var arr = [];
|
|
12950
|
+
|
|
12951
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
12952
|
+
arr[i] = a[i];
|
|
12953
|
+
}
|
|
12954
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
12955
|
+
arr[j + a.length] = b[j];
|
|
12956
|
+
}
|
|
12957
|
+
|
|
12958
|
+
return arr;
|
|
12959
|
+
};
|
|
12960
|
+
|
|
12961
|
+
var slicy = function slicy(arrLike, offset) {
|
|
12962
|
+
var arr = [];
|
|
12963
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
12964
|
+
arr[j] = arrLike[i];
|
|
12965
|
+
}
|
|
12966
|
+
return arr;
|
|
12967
|
+
};
|
|
12968
|
+
|
|
12969
|
+
var joiny = function (arr, joiner) {
|
|
12970
|
+
var str = '';
|
|
12971
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
12972
|
+
str += arr[i];
|
|
12973
|
+
if (i + 1 < arr.length) {
|
|
12974
|
+
str += joiner;
|
|
12975
|
+
}
|
|
12976
|
+
}
|
|
12977
|
+
return str;
|
|
12978
|
+
};
|
|
12979
|
+
|
|
12980
|
+
implementation = function bind(that) {
|
|
12981
|
+
var target = this;
|
|
12982
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
12983
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
12984
|
+
}
|
|
12985
|
+
var args = slicy(arguments, 1);
|
|
12986
|
+
|
|
12987
|
+
var bound;
|
|
12988
|
+
var binder = function () {
|
|
12989
|
+
if (this instanceof bound) {
|
|
12990
|
+
var result = target.apply(
|
|
12991
|
+
this,
|
|
12992
|
+
concatty(args, arguments)
|
|
12993
|
+
);
|
|
12994
|
+
if (Object(result) === result) {
|
|
12995
|
+
return result;
|
|
12996
|
+
}
|
|
12997
|
+
return this;
|
|
12998
|
+
}
|
|
12999
|
+
return target.apply(
|
|
13000
|
+
that,
|
|
13001
|
+
concatty(args, arguments)
|
|
13002
|
+
);
|
|
13003
|
+
|
|
13004
|
+
};
|
|
13005
|
+
|
|
13006
|
+
var boundLength = max(0, target.length - args.length);
|
|
13007
|
+
var boundArgs = [];
|
|
13008
|
+
for (var i = 0; i < boundLength; i++) {
|
|
13009
|
+
boundArgs[i] = '$' + i;
|
|
13010
|
+
}
|
|
13011
|
+
|
|
13012
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
13013
|
+
|
|
13014
|
+
if (target.prototype) {
|
|
13015
|
+
var Empty = function Empty() {};
|
|
13016
|
+
Empty.prototype = target.prototype;
|
|
13017
|
+
bound.prototype = new Empty();
|
|
13018
|
+
Empty.prototype = null;
|
|
13019
|
+
}
|
|
13020
|
+
|
|
13021
|
+
return bound;
|
|
13022
|
+
};
|
|
13023
|
+
return implementation;
|
|
13024
|
+
}
|
|
13025
|
+
|
|
13026
|
+
var functionBind;
|
|
13027
|
+
var hasRequiredFunctionBind;
|
|
13028
|
+
|
|
13029
|
+
function requireFunctionBind () {
|
|
13030
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
13031
|
+
hasRequiredFunctionBind = 1;
|
|
13032
|
+
|
|
13033
|
+
var implementation = requireImplementation();
|
|
13034
|
+
|
|
13035
|
+
functionBind = Function.prototype.bind || implementation;
|
|
13036
|
+
return functionBind;
|
|
13037
|
+
}
|
|
13038
|
+
|
|
13039
|
+
var functionCall;
|
|
13040
|
+
var hasRequiredFunctionCall;
|
|
13041
|
+
|
|
13042
|
+
function requireFunctionCall () {
|
|
13043
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
13044
|
+
hasRequiredFunctionCall = 1;
|
|
13045
|
+
|
|
13046
|
+
/** @type {import('./functionCall')} */
|
|
13047
|
+
functionCall = Function.prototype.call;
|
|
13048
|
+
return functionCall;
|
|
13049
|
+
}
|
|
13050
|
+
|
|
13051
|
+
var functionApply;
|
|
13052
|
+
var hasRequiredFunctionApply;
|
|
13053
|
+
|
|
13054
|
+
function requireFunctionApply () {
|
|
13055
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
13056
|
+
hasRequiredFunctionApply = 1;
|
|
13057
|
+
|
|
13058
|
+
/** @type {import('./functionApply')} */
|
|
13059
|
+
functionApply = Function.prototype.apply;
|
|
13060
|
+
return functionApply;
|
|
13061
|
+
}
|
|
13062
|
+
|
|
13063
|
+
var reflectApply;
|
|
13064
|
+
var hasRequiredReflectApply;
|
|
13065
|
+
|
|
13066
|
+
function requireReflectApply () {
|
|
13067
|
+
if (hasRequiredReflectApply) return reflectApply;
|
|
13068
|
+
hasRequiredReflectApply = 1;
|
|
13069
|
+
|
|
13070
|
+
/** @type {import('./reflectApply')} */
|
|
13071
|
+
reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
13072
|
+
return reflectApply;
|
|
13073
|
+
}
|
|
13074
|
+
|
|
13075
|
+
var actualApply;
|
|
13076
|
+
var hasRequiredActualApply;
|
|
13077
|
+
|
|
13078
|
+
function requireActualApply () {
|
|
13079
|
+
if (hasRequiredActualApply) return actualApply;
|
|
13080
|
+
hasRequiredActualApply = 1;
|
|
13081
|
+
|
|
13082
|
+
var bind = requireFunctionBind();
|
|
13083
|
+
|
|
13084
|
+
var $apply = requireFunctionApply();
|
|
13085
|
+
var $call = requireFunctionCall();
|
|
13086
|
+
var $reflectApply = requireReflectApply();
|
|
13087
|
+
|
|
13088
|
+
/** @type {import('./actualApply')} */
|
|
13089
|
+
actualApply = $reflectApply || bind.call($call, $apply);
|
|
13090
|
+
return actualApply;
|
|
13091
|
+
}
|
|
13092
|
+
|
|
13093
|
+
var callBindApplyHelpers;
|
|
13094
|
+
var hasRequiredCallBindApplyHelpers;
|
|
13095
|
+
|
|
13096
|
+
function requireCallBindApplyHelpers () {
|
|
13097
|
+
if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
|
|
13098
|
+
hasRequiredCallBindApplyHelpers = 1;
|
|
13099
|
+
|
|
13100
|
+
var bind = requireFunctionBind();
|
|
13101
|
+
var $TypeError = /*@__PURE__*/ requireType();
|
|
13102
|
+
|
|
13103
|
+
var $call = requireFunctionCall();
|
|
13104
|
+
var $actualApply = requireActualApply();
|
|
13105
|
+
|
|
13106
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
13107
|
+
callBindApplyHelpers = function callBindBasic(args) {
|
|
13108
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
13109
|
+
throw new $TypeError('a function is required');
|
|
13110
|
+
}
|
|
13111
|
+
return $actualApply(bind, $call, args);
|
|
13112
|
+
};
|
|
13113
|
+
return callBindApplyHelpers;
|
|
13114
|
+
}
|
|
13115
|
+
|
|
13116
|
+
var get;
|
|
13117
|
+
var hasRequiredGet;
|
|
13118
|
+
|
|
13119
|
+
function requireGet () {
|
|
13120
|
+
if (hasRequiredGet) return get;
|
|
13121
|
+
hasRequiredGet = 1;
|
|
13122
|
+
|
|
13123
|
+
var callBind = requireCallBindApplyHelpers();
|
|
13124
|
+
var gOPD = /*@__PURE__*/ requireGopd();
|
|
13125
|
+
|
|
13126
|
+
var hasProtoAccessor;
|
|
13127
|
+
try {
|
|
13128
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
13129
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
13130
|
+
} catch (e) {
|
|
13131
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
13132
|
+
throw e;
|
|
13133
|
+
}
|
|
13134
|
+
}
|
|
13135
|
+
|
|
13136
|
+
// eslint-disable-next-line no-extra-parens
|
|
13137
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
13138
|
+
|
|
13139
|
+
var $Object = Object;
|
|
13140
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
13141
|
+
|
|
13142
|
+
/** @type {import('./get')} */
|
|
13143
|
+
get = desc && typeof desc.get === 'function'
|
|
13144
|
+
? callBind([desc.get])
|
|
13145
|
+
: typeof $getPrototypeOf === 'function'
|
|
13146
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
13147
|
+
// eslint-disable-next-line eqeqeq
|
|
13148
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
13149
|
+
}
|
|
13150
|
+
: false;
|
|
13151
|
+
return get;
|
|
13152
|
+
}
|
|
13153
|
+
|
|
13154
|
+
var getProto;
|
|
13155
|
+
var hasRequiredGetProto;
|
|
13156
|
+
|
|
13157
|
+
function requireGetProto () {
|
|
13158
|
+
if (hasRequiredGetProto) return getProto;
|
|
13159
|
+
hasRequiredGetProto = 1;
|
|
13160
|
+
|
|
13161
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
13162
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
13163
|
+
|
|
13164
|
+
var getDunderProto = /*@__PURE__*/ requireGet();
|
|
13165
|
+
|
|
13166
|
+
/** @type {import('.')} */
|
|
13167
|
+
getProto = reflectGetProto
|
|
13168
|
+
? function getProto(O) {
|
|
13169
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
13170
|
+
return reflectGetProto(O);
|
|
13171
|
+
}
|
|
13172
|
+
: originalGetProto
|
|
13173
|
+
? function getProto(O) {
|
|
13174
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
13175
|
+
throw new TypeError('getProto: not an object');
|
|
13176
|
+
}
|
|
13177
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
13178
|
+
return originalGetProto(O);
|
|
13179
|
+
}
|
|
13180
|
+
: getDunderProto
|
|
13181
|
+
? function getProto(O) {
|
|
13182
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
13183
|
+
return getDunderProto(O);
|
|
13184
|
+
}
|
|
13185
|
+
: null;
|
|
13186
|
+
return getProto;
|
|
13187
|
+
}
|
|
13188
|
+
|
|
13189
|
+
var hasown;
|
|
13190
|
+
var hasRequiredHasown;
|
|
13191
|
+
|
|
13192
|
+
function requireHasown () {
|
|
13193
|
+
if (hasRequiredHasown) return hasown;
|
|
13194
|
+
hasRequiredHasown = 1;
|
|
13195
|
+
|
|
13196
|
+
var call = Function.prototype.call;
|
|
13197
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
13198
|
+
var bind = requireFunctionBind();
|
|
13199
|
+
|
|
13200
|
+
/** @type {import('.')} */
|
|
13201
|
+
hasown = bind.call(call, $hasOwn);
|
|
13202
|
+
return hasown;
|
|
13203
|
+
}
|
|
13204
|
+
|
|
13205
|
+
var getIntrinsic;
|
|
13206
|
+
var hasRequiredGetIntrinsic;
|
|
13207
|
+
|
|
13208
|
+
function requireGetIntrinsic () {
|
|
13209
|
+
if (hasRequiredGetIntrinsic) return getIntrinsic;
|
|
13210
|
+
hasRequiredGetIntrinsic = 1;
|
|
13211
|
+
|
|
13212
|
+
var undefined$1;
|
|
13213
|
+
|
|
13214
|
+
var $Object = /*@__PURE__*/ requireEsObjectAtoms();
|
|
13215
|
+
|
|
13216
|
+
var $Error = /*@__PURE__*/ requireEsErrors();
|
|
13217
|
+
var $EvalError = /*@__PURE__*/ require_eval();
|
|
13218
|
+
var $RangeError = /*@__PURE__*/ requireRange();
|
|
13219
|
+
var $ReferenceError = /*@__PURE__*/ requireRef();
|
|
13220
|
+
var $SyntaxError = /*@__PURE__*/ requireSyntax();
|
|
13221
|
+
var $TypeError = /*@__PURE__*/ requireType();
|
|
13222
|
+
var $URIError = /*@__PURE__*/ requireUri();
|
|
13223
|
+
|
|
13224
|
+
var abs = /*@__PURE__*/ requireAbs();
|
|
13225
|
+
var floor = /*@__PURE__*/ requireFloor();
|
|
13226
|
+
var max = /*@__PURE__*/ requireMax();
|
|
13227
|
+
var min = /*@__PURE__*/ requireMin();
|
|
13228
|
+
var pow = /*@__PURE__*/ requirePow();
|
|
13229
|
+
var round = /*@__PURE__*/ requireRound();
|
|
13230
|
+
var sign = /*@__PURE__*/ requireSign();
|
|
13231
|
+
|
|
13232
|
+
var $Function = Function;
|
|
13233
|
+
|
|
13234
|
+
// eslint-disable-next-line consistent-return
|
|
13235
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
13236
|
+
try {
|
|
13237
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
13238
|
+
} catch (e) {}
|
|
13239
|
+
};
|
|
13240
|
+
|
|
13241
|
+
var $gOPD = /*@__PURE__*/ requireGopd();
|
|
13242
|
+
var $defineProperty = /*@__PURE__*/ requireEsDefineProperty();
|
|
13243
|
+
|
|
13244
|
+
var throwTypeError = function () {
|
|
13245
|
+
throw new $TypeError();
|
|
13246
|
+
};
|
|
13247
|
+
var ThrowTypeError = $gOPD
|
|
13248
|
+
? (function () {
|
|
13249
|
+
try {
|
|
13250
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
13251
|
+
arguments.callee; // IE 8 does not throw here
|
|
13252
|
+
return throwTypeError;
|
|
13253
|
+
} catch (calleeThrows) {
|
|
13254
|
+
try {
|
|
13255
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
13256
|
+
return $gOPD(arguments, 'callee').get;
|
|
13257
|
+
} catch (gOPDthrows) {
|
|
13258
|
+
return throwTypeError;
|
|
13259
|
+
}
|
|
13260
|
+
}
|
|
13261
|
+
}())
|
|
13262
|
+
: throwTypeError;
|
|
13263
|
+
|
|
13264
|
+
var hasSymbols = requireHasSymbols()();
|
|
13265
|
+
|
|
13266
|
+
var getProto = requireGetProto();
|
|
13267
|
+
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
13268
|
+
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
13269
|
+
|
|
13270
|
+
var $apply = requireFunctionApply();
|
|
13271
|
+
var $call = requireFunctionCall();
|
|
13272
|
+
|
|
13273
|
+
var needsEval = {};
|
|
13274
|
+
|
|
13275
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
13276
|
+
|
|
13277
|
+
var INTRINSICS = {
|
|
13278
|
+
__proto__: null,
|
|
13279
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
13280
|
+
'%Array%': Array,
|
|
13281
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
13282
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
13283
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
13284
|
+
'%AsyncFunction%': needsEval,
|
|
13285
|
+
'%AsyncGenerator%': needsEval,
|
|
13286
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
13287
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
13288
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
13289
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
13290
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
13291
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
13292
|
+
'%Boolean%': Boolean,
|
|
13293
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
13294
|
+
'%Date%': Date,
|
|
13295
|
+
'%decodeURI%': decodeURI,
|
|
13296
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
13297
|
+
'%encodeURI%': encodeURI,
|
|
13298
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
13299
|
+
'%Error%': $Error,
|
|
13300
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
13301
|
+
'%EvalError%': $EvalError,
|
|
13302
|
+
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
|
|
13303
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
13304
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
13305
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
13306
|
+
'%Function%': $Function,
|
|
13307
|
+
'%GeneratorFunction%': needsEval,
|
|
13308
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
13309
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
13310
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
13311
|
+
'%isFinite%': isFinite,
|
|
13312
|
+
'%isNaN%': isNaN,
|
|
13313
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
13314
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
13315
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
13316
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
13317
|
+
'%Math%': Math,
|
|
13318
|
+
'%Number%': Number,
|
|
13319
|
+
'%Object%': $Object,
|
|
13320
|
+
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
|
13321
|
+
'%parseFloat%': parseFloat,
|
|
13322
|
+
'%parseInt%': parseInt,
|
|
13323
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
13324
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
13325
|
+
'%RangeError%': $RangeError,
|
|
13326
|
+
'%ReferenceError%': $ReferenceError,
|
|
13327
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
13328
|
+
'%RegExp%': RegExp,
|
|
13329
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
13330
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
13331
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
13332
|
+
'%String%': String,
|
|
13333
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
13334
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
13335
|
+
'%SyntaxError%': $SyntaxError,
|
|
13336
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
13337
|
+
'%TypedArray%': TypedArray,
|
|
13338
|
+
'%TypeError%': $TypeError,
|
|
13339
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
13340
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
13341
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
13342
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
13343
|
+
'%URIError%': $URIError,
|
|
13344
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
13345
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
13346
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
13347
|
+
|
|
13348
|
+
'%Function.prototype.call%': $call,
|
|
13349
|
+
'%Function.prototype.apply%': $apply,
|
|
13350
|
+
'%Object.defineProperty%': $defineProperty,
|
|
13351
|
+
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
13352
|
+
'%Math.abs%': abs,
|
|
13353
|
+
'%Math.floor%': floor,
|
|
13354
|
+
'%Math.max%': max,
|
|
13355
|
+
'%Math.min%': min,
|
|
13356
|
+
'%Math.pow%': pow,
|
|
13357
|
+
'%Math.round%': round,
|
|
13358
|
+
'%Math.sign%': sign,
|
|
13359
|
+
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
13360
|
+
};
|
|
13361
|
+
|
|
13362
|
+
if (getProto) {
|
|
13363
|
+
try {
|
|
13364
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
13365
|
+
} catch (e) {
|
|
13366
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
13367
|
+
var errorProto = getProto(getProto(e));
|
|
13368
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
13369
|
+
}
|
|
13370
|
+
}
|
|
13371
|
+
|
|
13372
|
+
var doEval = function doEval(name) {
|
|
13373
|
+
var value;
|
|
13374
|
+
if (name === '%AsyncFunction%') {
|
|
13375
|
+
value = getEvalledConstructor('async function () {}');
|
|
13376
|
+
} else if (name === '%GeneratorFunction%') {
|
|
13377
|
+
value = getEvalledConstructor('function* () {}');
|
|
13378
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
13379
|
+
value = getEvalledConstructor('async function* () {}');
|
|
13380
|
+
} else if (name === '%AsyncGenerator%') {
|
|
13381
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
13382
|
+
if (fn) {
|
|
13383
|
+
value = fn.prototype;
|
|
13384
|
+
}
|
|
13385
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
13386
|
+
var gen = doEval('%AsyncGenerator%');
|
|
13387
|
+
if (gen && getProto) {
|
|
13388
|
+
value = getProto(gen.prototype);
|
|
13389
|
+
}
|
|
13390
|
+
}
|
|
13391
|
+
|
|
13392
|
+
INTRINSICS[name] = value;
|
|
13393
|
+
|
|
13394
|
+
return value;
|
|
13395
|
+
};
|
|
13396
|
+
|
|
13397
|
+
var LEGACY_ALIASES = {
|
|
13398
|
+
__proto__: null,
|
|
13399
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
13400
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
13401
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
13402
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
13403
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
13404
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
13405
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
13406
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
13407
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
13408
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
13409
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
13410
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
13411
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
13412
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
13413
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
13414
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
13415
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
13416
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
13417
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
13418
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
13419
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
13420
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
13421
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
13422
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
13423
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
13424
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
13425
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
13426
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
13427
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
13428
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
13429
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
13430
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
13431
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
13432
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
13433
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
13434
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
13435
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
13436
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
13437
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
13438
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
13439
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
13440
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
13441
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
13442
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
13443
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
13444
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
13445
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
13446
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
13447
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
13448
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
13449
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
13450
|
+
};
|
|
13451
|
+
|
|
13452
|
+
var bind = requireFunctionBind();
|
|
13453
|
+
var hasOwn = /*@__PURE__*/ requireHasown();
|
|
13454
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
13455
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
13456
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
13457
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
13458
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
13459
|
+
|
|
13460
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
13461
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
13462
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
13463
|
+
var stringToPath = function stringToPath(string) {
|
|
13464
|
+
var first = $strSlice(string, 0, 1);
|
|
13465
|
+
var last = $strSlice(string, -1);
|
|
13466
|
+
if (first === '%' && last !== '%') {
|
|
13467
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
13468
|
+
} else if (last === '%' && first !== '%') {
|
|
13469
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
13470
|
+
}
|
|
13471
|
+
var result = [];
|
|
13472
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
13473
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
13474
|
+
});
|
|
13475
|
+
return result;
|
|
13476
|
+
};
|
|
13477
|
+
/* end adaptation */
|
|
13478
|
+
|
|
13479
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
13480
|
+
var intrinsicName = name;
|
|
13481
|
+
var alias;
|
|
13482
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
13483
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
13484
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
13485
|
+
}
|
|
13486
|
+
|
|
13487
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
13488
|
+
var value = INTRINSICS[intrinsicName];
|
|
13489
|
+
if (value === needsEval) {
|
|
13490
|
+
value = doEval(intrinsicName);
|
|
13491
|
+
}
|
|
13492
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
13493
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
13494
|
+
}
|
|
13495
|
+
|
|
13496
|
+
return {
|
|
13497
|
+
alias: alias,
|
|
13498
|
+
name: intrinsicName,
|
|
13499
|
+
value: value
|
|
13500
|
+
};
|
|
13501
|
+
}
|
|
13502
|
+
|
|
13503
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
13504
|
+
};
|
|
13505
|
+
|
|
13506
|
+
getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
13507
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
13508
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
13509
|
+
}
|
|
13510
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
13511
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
13512
|
+
}
|
|
13513
|
+
|
|
13514
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
13515
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
13516
|
+
}
|
|
13517
|
+
var parts = stringToPath(name);
|
|
13518
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
13519
|
+
|
|
13520
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
13521
|
+
var intrinsicRealName = intrinsic.name;
|
|
13522
|
+
var value = intrinsic.value;
|
|
13523
|
+
var skipFurtherCaching = false;
|
|
13524
|
+
|
|
13525
|
+
var alias = intrinsic.alias;
|
|
13526
|
+
if (alias) {
|
|
13527
|
+
intrinsicBaseName = alias[0];
|
|
13528
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
13529
|
+
}
|
|
13530
|
+
|
|
13531
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
13532
|
+
var part = parts[i];
|
|
13533
|
+
var first = $strSlice(part, 0, 1);
|
|
13534
|
+
var last = $strSlice(part, -1);
|
|
13535
|
+
if (
|
|
13536
|
+
(
|
|
13537
|
+
(first === '"' || first === "'" || first === '`')
|
|
13538
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
13539
|
+
)
|
|
13540
|
+
&& first !== last
|
|
13541
|
+
) {
|
|
13542
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
13543
|
+
}
|
|
13544
|
+
if (part === 'constructor' || !isOwn) {
|
|
13545
|
+
skipFurtherCaching = true;
|
|
13546
|
+
}
|
|
13547
|
+
|
|
13548
|
+
intrinsicBaseName += '.' + part;
|
|
13549
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
13550
|
+
|
|
13551
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
13552
|
+
value = INTRINSICS[intrinsicRealName];
|
|
13553
|
+
} else if (value != null) {
|
|
13554
|
+
if (!(part in value)) {
|
|
13555
|
+
if (!allowMissing) {
|
|
13556
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
13557
|
+
}
|
|
13558
|
+
return void 0;
|
|
13559
|
+
}
|
|
13560
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
13561
|
+
var desc = $gOPD(value, part);
|
|
13562
|
+
isOwn = !!desc;
|
|
13563
|
+
|
|
13564
|
+
// By convention, when a data property is converted to an accessor
|
|
13565
|
+
// property to emulate a data property that does not suffer from
|
|
13566
|
+
// the override mistake, that accessor's getter is marked with
|
|
13567
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
13568
|
+
// uphold the illusion by pretending to see that original data
|
|
13569
|
+
// property, i.e., returning the value rather than the getter
|
|
13570
|
+
// itself.
|
|
13571
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
13572
|
+
value = desc.get;
|
|
13573
|
+
} else {
|
|
13574
|
+
value = value[part];
|
|
13575
|
+
}
|
|
13576
|
+
} else {
|
|
13577
|
+
isOwn = hasOwn(value, part);
|
|
13578
|
+
value = value[part];
|
|
13579
|
+
}
|
|
13580
|
+
|
|
13581
|
+
if (isOwn && !skipFurtherCaching) {
|
|
13582
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
13583
|
+
}
|
|
13584
|
+
}
|
|
13585
|
+
}
|
|
13586
|
+
return value;
|
|
13587
|
+
};
|
|
13588
|
+
return getIntrinsic;
|
|
13589
|
+
}
|
|
13590
|
+
|
|
13591
|
+
var shams;
|
|
13592
|
+
var hasRequiredShams;
|
|
13593
|
+
|
|
13594
|
+
function requireShams () {
|
|
13595
|
+
if (hasRequiredShams) return shams;
|
|
13596
|
+
hasRequiredShams = 1;
|
|
13597
|
+
|
|
13598
|
+
var hasSymbols = requireShams$1();
|
|
13599
|
+
|
|
13600
|
+
/** @type {import('.')} */
|
|
13601
|
+
shams = function hasToStringTagShams() {
|
|
13602
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
13603
|
+
};
|
|
13604
|
+
return shams;
|
|
13605
|
+
}
|
|
13606
|
+
|
|
13607
|
+
var esSetTostringtag;
|
|
13608
|
+
var hasRequiredEsSetTostringtag;
|
|
13609
|
+
|
|
13610
|
+
function requireEsSetTostringtag () {
|
|
13611
|
+
if (hasRequiredEsSetTostringtag) return esSetTostringtag;
|
|
13612
|
+
hasRequiredEsSetTostringtag = 1;
|
|
13613
|
+
|
|
13614
|
+
var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
|
|
13615
|
+
|
|
13616
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
13617
|
+
|
|
13618
|
+
var hasToStringTag = requireShams()();
|
|
13619
|
+
var hasOwn = /*@__PURE__*/ requireHasown();
|
|
13620
|
+
var $TypeError = /*@__PURE__*/ requireType();
|
|
13621
|
+
|
|
13622
|
+
var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
|
|
13623
|
+
|
|
13624
|
+
/** @type {import('.')} */
|
|
13625
|
+
esSetTostringtag = function setToStringTag(object, value) {
|
|
13626
|
+
var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
|
|
13627
|
+
var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
13628
|
+
if (
|
|
13629
|
+
(typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
|
|
13630
|
+
|| (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
|
|
13631
|
+
) {
|
|
13632
|
+
throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
|
|
13633
|
+
}
|
|
13634
|
+
if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
|
|
13635
|
+
if ($defineProperty) {
|
|
13636
|
+
$defineProperty(object, toStringTag, {
|
|
13637
|
+
configurable: !nonConfigurable,
|
|
13638
|
+
enumerable: false,
|
|
13639
|
+
value: value,
|
|
13640
|
+
writable: false
|
|
13641
|
+
});
|
|
13642
|
+
} else {
|
|
13643
|
+
object[toStringTag] = value; // eslint-disable-line no-param-reassign
|
|
13644
|
+
}
|
|
13645
|
+
}
|
|
13646
|
+
};
|
|
13647
|
+
return esSetTostringtag;
|
|
13648
|
+
}
|
|
13649
|
+
|
|
12572
13650
|
var populate;
|
|
12573
13651
|
var hasRequiredPopulate;
|
|
12574
13652
|
|
|
@@ -12604,6 +13682,7 @@ function requireForm_data () {
|
|
|
12604
13682
|
var Stream = require$$0$1.Stream;
|
|
12605
13683
|
var mime = requireMimeTypes();
|
|
12606
13684
|
var asynckit = requireAsynckit();
|
|
13685
|
+
var setToStringTag = /*@__PURE__*/ requireEsSetTostringtag();
|
|
12607
13686
|
var populate = requirePopulate();
|
|
12608
13687
|
|
|
12609
13688
|
// Public API
|
|
@@ -12698,7 +13777,7 @@ function requireForm_data () {
|
|
|
12698
13777
|
FormData.LINE_BREAK.length;
|
|
12699
13778
|
|
|
12700
13779
|
// empty or either doesn't have path or not an http response or not a stream
|
|
12701
|
-
if (!value || ( !value.path && !(value.readable &&
|
|
13780
|
+
if (!value || ( !value.path && !(value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) && !(value instanceof Stream))) {
|
|
12702
13781
|
return;
|
|
12703
13782
|
}
|
|
12704
13783
|
|
|
@@ -12709,8 +13788,7 @@ function requireForm_data () {
|
|
|
12709
13788
|
};
|
|
12710
13789
|
|
|
12711
13790
|
FormData.prototype._lengthRetriever = function(value, callback) {
|
|
12712
|
-
|
|
12713
|
-
if (value.hasOwnProperty('fd')) {
|
|
13791
|
+
if (Object.prototype.hasOwnProperty.call(value, 'fd')) {
|
|
12714
13792
|
|
|
12715
13793
|
// take read range into a account
|
|
12716
13794
|
// `end` = Infinity –> read file till the end
|
|
@@ -12745,11 +13823,11 @@ function requireForm_data () {
|
|
|
12745
13823
|
}
|
|
12746
13824
|
|
|
12747
13825
|
// or http response
|
|
12748
|
-
} else if (
|
|
13826
|
+
} else if (Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
|
|
12749
13827
|
callback(null, +value.headers['content-length']);
|
|
12750
13828
|
|
|
12751
13829
|
// or request stream http://github.com/mikeal/request
|
|
12752
|
-
} else if (
|
|
13830
|
+
} else if (Object.prototype.hasOwnProperty.call(value, 'httpModule')) {
|
|
12753
13831
|
// wait till response come back
|
|
12754
13832
|
value.on('response', function(response) {
|
|
12755
13833
|
value.pause();
|
|
@@ -12789,22 +13867,23 @@ function requireForm_data () {
|
|
|
12789
13867
|
|
|
12790
13868
|
var header;
|
|
12791
13869
|
for (var prop in headers) {
|
|
12792
|
-
if (
|
|
12793
|
-
|
|
13870
|
+
if (Object.prototype.hasOwnProperty.call(headers, prop)) {
|
|
13871
|
+
header = headers[prop];
|
|
12794
13872
|
|
|
12795
|
-
|
|
12796
|
-
|
|
12797
|
-
|
|
12798
|
-
|
|
13873
|
+
// skip nullish headers.
|
|
13874
|
+
if (header == null) {
|
|
13875
|
+
continue;
|
|
13876
|
+
}
|
|
12799
13877
|
|
|
12800
|
-
|
|
12801
|
-
|
|
12802
|
-
|
|
12803
|
-
|
|
13878
|
+
// convert all headers to arrays.
|
|
13879
|
+
if (!Array.isArray(header)) {
|
|
13880
|
+
header = [header];
|
|
13881
|
+
}
|
|
12804
13882
|
|
|
12805
|
-
|
|
12806
|
-
|
|
12807
|
-
|
|
13883
|
+
// add non-empty headers.
|
|
13884
|
+
if (header.length) {
|
|
13885
|
+
contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
|
|
13886
|
+
}
|
|
12808
13887
|
}
|
|
12809
13888
|
}
|
|
12810
13889
|
|
|
@@ -12825,7 +13904,7 @@ function requireForm_data () {
|
|
|
12825
13904
|
// formidable and the browser add a name property
|
|
12826
13905
|
// fs- and request- streams have path property
|
|
12827
13906
|
filename = path.basename(options.filename || value.name || value.path);
|
|
12828
|
-
} else if (value.readable &&
|
|
13907
|
+
} else if (value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
|
|
12829
13908
|
// or try http response
|
|
12830
13909
|
filename = path.basename(value.client._httpMessage.path || '');
|
|
12831
13910
|
}
|
|
@@ -12853,7 +13932,7 @@ function requireForm_data () {
|
|
|
12853
13932
|
}
|
|
12854
13933
|
|
|
12855
13934
|
// or if it's http-reponse
|
|
12856
|
-
if (!contentType && value.readable &&
|
|
13935
|
+
if (!contentType && value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
|
|
12857
13936
|
contentType = value.headers['content-type'];
|
|
12858
13937
|
}
|
|
12859
13938
|
|
|
@@ -12894,7 +13973,7 @@ function requireForm_data () {
|
|
|
12894
13973
|
};
|
|
12895
13974
|
|
|
12896
13975
|
for (header in userHeaders) {
|
|
12897
|
-
if (
|
|
13976
|
+
if (Object.prototype.hasOwnProperty.call(userHeaders, header)) {
|
|
12898
13977
|
formHeaders[header.toLowerCase()] = userHeaders[header];
|
|
12899
13978
|
}
|
|
12900
13979
|
}
|
|
@@ -12915,7 +13994,7 @@ function requireForm_data () {
|
|
|
12915
13994
|
};
|
|
12916
13995
|
|
|
12917
13996
|
FormData.prototype.getBuffer = function() {
|
|
12918
|
-
var dataBuffer = new Buffer.alloc(
|
|
13997
|
+
var dataBuffer = new Buffer.alloc(0);
|
|
12919
13998
|
var boundary = this.getBoundary();
|
|
12920
13999
|
|
|
12921
14000
|
// Create the form content. Add Line breaks to the end of data.
|
|
@@ -13095,6 +14174,7 @@ function requireForm_data () {
|
|
|
13095
14174
|
FormData.prototype.toString = function () {
|
|
13096
14175
|
return '[object FormData]';
|
|
13097
14176
|
};
|
|
14177
|
+
setToStringTag(FormData, 'FormData');
|
|
13098
14178
|
return form_data;
|
|
13099
14179
|
}
|
|
13100
14180
|
|
|
@@ -13431,7 +14511,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
13431
14511
|
});
|
|
13432
14512
|
const request$1 = partial(request, tokenStore, tokenRequester, options);
|
|
13433
14513
|
const del$1 = partial(del, request$1);
|
|
13434
|
-
const get
|
|
14514
|
+
const get = partial(get$1, request$1);
|
|
13435
14515
|
const post$1 = partial(post, request$1);
|
|
13436
14516
|
const patch$1 = partial(patch, request$1);
|
|
13437
14517
|
const put$1 = partial(put, request$1);
|
|
@@ -13445,7 +14525,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
|
|
|
13445
14525
|
};
|
|
13446
14526
|
const client = API_METHODS.reduce((methods, method) => (Object.assign(Object.assign({}, methods), { [method.name]: (...args) => method(client, ...args) })), {
|
|
13447
14527
|
delete: del$1,
|
|
13448
|
-
get
|
|
14528
|
+
get,
|
|
13449
14529
|
oauth,
|
|
13450
14530
|
options,
|
|
13451
14531
|
patch: patch$1,
|