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