@bigbinary/neeto-github-frontend 1.0.7 → 1.0.9
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/app/javascript/src/translations/en.json +1 -1
- package/dist/index.cjs.js +2255 -2253
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +2256 -2255
- package/dist/index.js.map +1 -1
- package/package.json +75 -70
package/dist/index.js
CHANGED
|
@@ -1,177 +1,618 @@
|
|
|
1
1
|
import React, { useState, useRef } from 'react';
|
|
2
|
-
import { isPresent, noop } from '@bigbinary/neeto-cist';
|
|
3
|
-
import { Button, Typography, Input, Pane } from '@bigbinary/neetoui';
|
|
4
|
-
import { Trans, useTranslation } from 'react-i18next';
|
|
5
|
-
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
6
|
-
import require$$0 from 'util';
|
|
7
2
|
import { withT } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
8
3
|
import { Settings, Plus, Building, User, CannedResponses, Lock } from '@bigbinary/neeto-icons';
|
|
4
|
+
import { Button, Typography, Input, Pane } from '@bigbinary/neetoui';
|
|
9
5
|
import { Github } from '@bigbinary/neeto-icons/misc';
|
|
10
6
|
import classNames from 'classnames';
|
|
7
|
+
import { isPresent, noop } from '@bigbinary/neeto-cist';
|
|
11
8
|
import Search from '@bigbinary/neeto-molecules/Search';
|
|
9
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
12
10
|
import Scrollable from '@bigbinary/neeto-molecules/Scrollable';
|
|
13
11
|
import DateFormat from '@bigbinary/neeto-molecules/DateFormat';
|
|
12
|
+
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
13
|
+
import require$$0 from 'util';
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
// if (sym instanceof Symbol) { return false; }
|
|
32
|
-
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
33
|
-
// if (!(symObj instanceof Symbol)) { return false; }
|
|
34
|
-
|
|
35
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
36
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
37
|
-
|
|
38
|
-
var symVal = 42;
|
|
39
|
-
obj[sym] = symVal;
|
|
40
|
-
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
41
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
42
|
-
|
|
43
|
-
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
44
|
-
|
|
45
|
-
var syms = Object.getOwnPropertySymbols(obj);
|
|
46
|
-
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
47
|
-
|
|
48
|
-
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
49
|
-
|
|
50
|
-
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
51
|
-
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
52
|
-
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return true;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
59
|
-
var hasSymbolSham = shams;
|
|
60
|
-
|
|
61
|
-
var hasSymbols$1 = function hasNativeSymbols() {
|
|
62
|
-
if (typeof origSymbol !== 'function') { return false; }
|
|
63
|
-
if (typeof Symbol !== 'function') { return false; }
|
|
64
|
-
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
65
|
-
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
66
|
-
|
|
67
|
-
return hasSymbolSham();
|
|
68
|
-
};
|
|
15
|
+
var Configure = withT(function (_ref) {
|
|
16
|
+
var t = _ref.t,
|
|
17
|
+
isConnected = _ref.isConnected,
|
|
18
|
+
installationUrl = _ref.installationUrl;
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
22
|
+
className: "mt-1 text-indigo-600 xl:mt-3",
|
|
23
|
+
href: installationUrl,
|
|
24
|
+
icon: isConnected ? Settings : Plus,
|
|
25
|
+
iconPosition: "left",
|
|
26
|
+
iconSize: 20,
|
|
27
|
+
size: "small",
|
|
28
|
+
style: "text"
|
|
29
|
+
}, isConnected ? t("neetoGithub.configureAccount") : t("neetoGithub.connectAccount")));
|
|
30
|
+
});
|
|
69
31
|
|
|
70
|
-
var
|
|
71
|
-
|
|
72
|
-
|
|
32
|
+
var Header = withT(function (_ref) {
|
|
33
|
+
var t = _ref.t;
|
|
34
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
35
|
+
className: "neeto-ui-text-gray-800 mb-1 flex w-full flex-row items-center space-x-2 font-sans text-lg font-medium leading-6 antialiased"
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Github, {
|
|
37
|
+
size: 16
|
|
38
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
39
|
+
style: "h4"
|
|
40
|
+
}, t("neetoGithub.github")));
|
|
41
|
+
});
|
|
73
42
|
|
|
74
|
-
var $
|
|
43
|
+
var List$1 = withT(function (_ref) {
|
|
44
|
+
var t = _ref.t,
|
|
45
|
+
accounts = _ref.accounts;
|
|
46
|
+
return accounts.map(function (_ref2) {
|
|
47
|
+
var id = _ref2.id,
|
|
48
|
+
name = _ref2.name,
|
|
49
|
+
avatarUrl = _ref2.avatarUrl,
|
|
50
|
+
type = _ref2.type,
|
|
51
|
+
profileUrl = _ref2.profileUrl,
|
|
52
|
+
count = _ref2.count;
|
|
53
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
|
|
55
|
+
key: id
|
|
56
|
+
}, type === "Organization" ? /*#__PURE__*/React.createElement(Building, {
|
|
57
|
+
className: "neeto-ui-text-gray-600",
|
|
58
|
+
size: 16
|
|
59
|
+
}) : /*#__PURE__*/React.createElement(User, {
|
|
60
|
+
className: "neeto-ui-text-gray-600",
|
|
61
|
+
size: 16
|
|
62
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
63
|
+
className: "neeto-ui-text-gray-900",
|
|
64
|
+
style: "body2"
|
|
65
|
+
}, "@", name), /*#__PURE__*/React.createElement("img", {
|
|
66
|
+
alt: name,
|
|
67
|
+
className: "neeto-ui-rounded-full h-4 w-4",
|
|
68
|
+
src: avatarUrl
|
|
69
|
+
}), /*#__PURE__*/React.createElement(Button, {
|
|
70
|
+
className: "text-indigo-600",
|
|
71
|
+
icon: CannedResponses,
|
|
72
|
+
iconPosition: "left",
|
|
73
|
+
iconSize: 16,
|
|
74
|
+
size: "small",
|
|
75
|
+
style: "text",
|
|
76
|
+
onClick: function onClick() {
|
|
77
|
+
return window.open(profileUrl, "_blank");
|
|
78
|
+
}
|
|
79
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
80
|
+
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
81
|
+
component: "span",
|
|
82
|
+
style: "h3"
|
|
83
|
+
}, "\u2022"), /*#__PURE__*/React.createElement(Typography, {
|
|
84
|
+
style: "body2"
|
|
85
|
+
}, t("neetoGithub.countOf.repos", {
|
|
86
|
+
count: count
|
|
87
|
+
})));
|
|
88
|
+
});
|
|
89
|
+
});
|
|
75
90
|
|
|
76
|
-
var
|
|
77
|
-
|
|
91
|
+
var Accounts = function Accounts(_ref) {
|
|
92
|
+
var isPane = _ref.isPane,
|
|
93
|
+
accounts = _ref.accounts,
|
|
94
|
+
isConnected = _ref.isConnected,
|
|
95
|
+
onConnect = _ref.onConnect,
|
|
96
|
+
installationUrl = _ref.installationUrl;
|
|
97
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
98
|
+
className: classNames("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
|
|
99
|
+
"2xl:max-w-sm 2xl:px-8": isPane,
|
|
100
|
+
"xl:max-w-sm xl:px-8": !isPane
|
|
101
|
+
})
|
|
102
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
className: "mb-2"
|
|
104
|
+
}, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(List$1, {
|
|
105
|
+
accounts: accounts,
|
|
106
|
+
isConnected: isConnected
|
|
107
|
+
}), /*#__PURE__*/React.createElement(Configure, {
|
|
108
|
+
installationUrl: installationUrl,
|
|
109
|
+
isConnected: isConnected,
|
|
110
|
+
onConnect: onConnect
|
|
111
|
+
})));
|
|
78
112
|
};
|
|
79
113
|
|
|
80
|
-
|
|
114
|
+
function _arrayWithHoles(arr) {
|
|
115
|
+
if (Array.isArray(arr)) return arr;
|
|
116
|
+
}
|
|
81
117
|
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
var
|
|
118
|
+
function _iterableToArrayLimit(r, l) {
|
|
119
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
120
|
+
if (null != t) {
|
|
121
|
+
var e,
|
|
122
|
+
n,
|
|
123
|
+
i,
|
|
124
|
+
u,
|
|
125
|
+
a = [],
|
|
126
|
+
f = !0,
|
|
127
|
+
o = !1;
|
|
128
|
+
try {
|
|
129
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
130
|
+
if (Object(t) !== t) return;
|
|
131
|
+
f = !1;
|
|
132
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
133
|
+
} catch (r) {
|
|
134
|
+
o = !0, n = r;
|
|
135
|
+
} finally {
|
|
136
|
+
try {
|
|
137
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
138
|
+
} finally {
|
|
139
|
+
if (o) throw n;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return a;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
86
145
|
|
|
87
|
-
|
|
88
|
-
|
|
146
|
+
function _arrayLikeToArray(arr, len) {
|
|
147
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
148
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
149
|
+
return arr2;
|
|
150
|
+
}
|
|
89
151
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
152
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
153
|
+
if (!o) return;
|
|
154
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
155
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
156
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
157
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
158
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
159
|
+
}
|
|
96
160
|
|
|
97
|
-
|
|
98
|
-
|
|
161
|
+
function _nonIterableRest() {
|
|
162
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
163
|
+
}
|
|
99
164
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
arr[j] = arrLike[i];
|
|
104
|
-
}
|
|
105
|
-
return arr;
|
|
106
|
-
};
|
|
165
|
+
function _slicedToArray(arr, i) {
|
|
166
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
167
|
+
}
|
|
107
168
|
|
|
108
|
-
var
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
169
|
+
var NoRepositories = withT(function (_ref) {
|
|
170
|
+
var t = _ref.t,
|
|
171
|
+
installationUrl = _ref.installationUrl,
|
|
172
|
+
troubleshootUrl = _ref.troubleshootUrl;
|
|
173
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
174
|
+
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
|
|
175
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
176
|
+
style: "body2"
|
|
177
|
+
}, t("neetoGithub.noReposDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
178
|
+
href: installationUrl,
|
|
179
|
+
icon: Github,
|
|
180
|
+
iconPosition: "left",
|
|
181
|
+
label: t("neetoGithub.connectRepository"),
|
|
182
|
+
size: "medium",
|
|
183
|
+
style: "primary"
|
|
184
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
185
|
+
className: "text-xs"
|
|
186
|
+
}, /*#__PURE__*/React.createElement(Trans, {
|
|
187
|
+
i18nKey: "troubleshoot",
|
|
188
|
+
components: {
|
|
189
|
+
troubleshootLink: /*#__PURE__*/React.createElement("a", {
|
|
190
|
+
className: "text-indigo-600 underline",
|
|
191
|
+
href: troubleshootUrl,
|
|
192
|
+
rel: "noopener noreferrer",
|
|
193
|
+
target: "_blank"
|
|
194
|
+
})
|
|
115
195
|
}
|
|
116
|
-
|
|
117
|
-
};
|
|
196
|
+
})));
|
|
197
|
+
});
|
|
118
198
|
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
199
|
+
var RepositoryTile = function RepositoryTile(_ref) {
|
|
200
|
+
var onConnect = _ref.onConnect,
|
|
201
|
+
repository = _ref.repository;
|
|
202
|
+
var _useTranslation = useTranslation(),
|
|
203
|
+
t = _useTranslation.t;
|
|
204
|
+
var id = repository.id,
|
|
205
|
+
fullName = repository.fullName,
|
|
206
|
+
isPrivate = repository.isPrivate,
|
|
207
|
+
updatedAt = repository.updatedAt;
|
|
208
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
209
|
+
className: "neeto-ui-border-gray-300 flex items-center justify-between border-b border-l-0 border-r-0 border-t-0 border-solid py-3 pl-5 pr-3",
|
|
210
|
+
key: id
|
|
211
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
212
|
+
className: "width-calc flex items-center space-x-2"
|
|
213
|
+
}, /*#__PURE__*/React.createElement(Github, {
|
|
214
|
+
size: 16
|
|
215
|
+
}), /*#__PURE__*/React.createElement(Typography, {
|
|
216
|
+
style: "body2"
|
|
217
|
+
}, fullName), isPrivate && /*#__PURE__*/React.createElement(Lock, {
|
|
218
|
+
size: 16
|
|
219
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
220
|
+
className: "hidden md:inline-block"
|
|
221
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
222
|
+
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
223
|
+
component: "span",
|
|
224
|
+
style: "h3"
|
|
225
|
+
}, "\u2022"), /*#__PURE__*/React.createElement(DateFormat.FromNow, {
|
|
226
|
+
date: updatedAt
|
|
227
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
228
|
+
style: "primary",
|
|
229
|
+
type: "button",
|
|
230
|
+
onClick: function onClick() {
|
|
231
|
+
return onConnect({
|
|
232
|
+
repoType: "private",
|
|
233
|
+
repository: repository
|
|
234
|
+
});
|
|
123
235
|
}
|
|
124
|
-
|
|
236
|
+
}, t("neetoGithub.connect")));
|
|
237
|
+
};
|
|
125
238
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
239
|
+
var List = withT(function (_ref) {
|
|
240
|
+
var t = _ref.t,
|
|
241
|
+
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
242
|
+
filteredRepositories = _ref.filteredRepositories,
|
|
243
|
+
repositories = _ref.repositories,
|
|
244
|
+
onConnect = _ref.onConnect,
|
|
245
|
+
installationUrl = _ref.installationUrl,
|
|
246
|
+
troubleshootUrl = _ref.troubleshootUrl;
|
|
247
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
248
|
+
className: classNames("neeto-ui-border-gray-300 neeto-ui-rounded-md m-0 flex flex-col items-center justify-center border border-solid p-0 2xl:h-96", {
|
|
249
|
+
"h-52": isPublicRepoAllowed,
|
|
250
|
+
"h-72": !isPublicRepoAllowed
|
|
251
|
+
})
|
|
252
|
+
}, isPresent(repositories) ? /*#__PURE__*/React.createElement(Scrollable, {
|
|
253
|
+
className: "m-0 h-full w-full overflow-y-scroll p-0 shadow-inner"
|
|
254
|
+
}, isPresent(filteredRepositories) ? filteredRepositories.map(function (repository) {
|
|
255
|
+
return /*#__PURE__*/React.createElement(RepositoryTile, {
|
|
256
|
+
onConnect: onConnect,
|
|
257
|
+
repository: repository
|
|
258
|
+
});
|
|
259
|
+
}) : /*#__PURE__*/React.createElement(Typography, {
|
|
260
|
+
className: "flex h-full w-full items-center justify-center",
|
|
261
|
+
style: "body2"
|
|
262
|
+
}, t("neetoGithub.noRepos"))) : /*#__PURE__*/React.createElement(NoRepositories, {
|
|
263
|
+
installationUrl: installationUrl,
|
|
264
|
+
troubleshootUrl: troubleshootUrl
|
|
265
|
+
}));
|
|
266
|
+
});
|
|
142
267
|
|
|
143
|
-
|
|
268
|
+
var NotConnected = withT(function (_ref) {
|
|
269
|
+
var t = _ref.t,
|
|
270
|
+
installationUrl = _ref.installationUrl;
|
|
271
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
272
|
+
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
|
|
273
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
274
|
+
style: "body2"
|
|
275
|
+
}, t("neetoGithub.notConnectedDescription", {
|
|
276
|
+
appName: globalProps.appName
|
|
277
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
278
|
+
href: installationUrl,
|
|
279
|
+
icon: Github,
|
|
280
|
+
iconPosition: "left",
|
|
281
|
+
label: t("neetoGithub.connectGithub"),
|
|
282
|
+
size: "medium",
|
|
283
|
+
style: "primary"
|
|
284
|
+
}));
|
|
285
|
+
});
|
|
144
286
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
287
|
+
var Private = function Private(_ref) {
|
|
288
|
+
var isConnected = _ref.isConnected,
|
|
289
|
+
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
290
|
+
repositories = _ref.repositories,
|
|
291
|
+
onConnect = _ref.onConnect,
|
|
292
|
+
installationUrl = _ref.installationUrl,
|
|
293
|
+
troubleshootUrl = _ref.troubleshootUrl;
|
|
294
|
+
var _useTranslation = useTranslation(),
|
|
295
|
+
t = _useTranslation.t;
|
|
296
|
+
var _useState = useState(repositories),
|
|
297
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
298
|
+
filteredRepositories = _useState2[0],
|
|
299
|
+
setFilteredRepositories = _useState2[1];
|
|
300
|
+
var onSearch = function onSearch(searchTerm) {
|
|
301
|
+
if (!isPresent(searchTerm)) {
|
|
302
|
+
setFilteredRepositories(repositories);
|
|
303
|
+
return;
|
|
149
304
|
}
|
|
305
|
+
var filteredRepositories = repositories.filter(function (_ref2) {
|
|
306
|
+
var fullName = _ref2.fullName;
|
|
307
|
+
return fullName.toLowerCase().includes(searchTerm.toLowerCase());
|
|
308
|
+
});
|
|
309
|
+
setFilteredRepositories(filteredRepositories);
|
|
310
|
+
};
|
|
311
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
312
|
+
className: "connect-repo neeto-ui-rounded-md neeto-ui-border-gray-300 border border-solid px-8 py-7"
|
|
313
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
314
|
+
className: "mb-2 pb-5 text-lg font-medium",
|
|
315
|
+
style: "h2"
|
|
316
|
+
}, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
|
|
317
|
+
className: "flex w-full flex-col space-y-6"
|
|
318
|
+
}, /*#__PURE__*/React.createElement(Search, {
|
|
319
|
+
onSearch: onSearch,
|
|
320
|
+
className: "w-full",
|
|
321
|
+
suffix: /*#__PURE__*/React.createElement(Typography, {
|
|
322
|
+
style: "body2"
|
|
323
|
+
}, t("neetoGithub.countOf.repos", {
|
|
324
|
+
count: filteredRepositories.length
|
|
325
|
+
}))
|
|
326
|
+
}), /*#__PURE__*/React.createElement(List, {
|
|
327
|
+
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
328
|
+
filteredRepositories: filteredRepositories,
|
|
329
|
+
installationUrl: installationUrl,
|
|
330
|
+
onConnect: onConnect,
|
|
331
|
+
repositories: repositories,
|
|
332
|
+
troubleshootUrl: troubleshootUrl
|
|
333
|
+
})) : /*#__PURE__*/React.createElement("div", {
|
|
334
|
+
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
335
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
336
|
+
className: "neeto-ui-rounded-md neeto-ui-border-gray-300 m-0 flex h-[366px] flex-col items-center justify-center border border-solid p-4 shadow-inner"
|
|
337
|
+
}, /*#__PURE__*/React.createElement(NotConnected, {
|
|
338
|
+
installationUrl: installationUrl
|
|
339
|
+
}))));
|
|
340
|
+
};
|
|
150
341
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
342
|
+
var Public = function Public(_ref) {
|
|
343
|
+
var onConnect = _ref.onConnect;
|
|
344
|
+
var _useTranslation = useTranslation(),
|
|
345
|
+
t = _useTranslation.t;
|
|
346
|
+
var _useState = useState(""),
|
|
347
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
348
|
+
publicRepoUrl = _useState2[0],
|
|
349
|
+
setPublicRepoUrl = _useState2[1];
|
|
350
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
351
|
+
className: "transition-drop-shadow neeto-ui-border-gray-300 neeto-ui-rounded-md border border-solid px-8 py-7 font-sans transition-colors"
|
|
352
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
353
|
+
className: "mb-2 pb-5"
|
|
354
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
355
|
+
className: "flex justify-between"
|
|
356
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
357
|
+
className: "pr-4"
|
|
358
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
359
|
+
className: "text-lg font-medium",
|
|
360
|
+
style: "h2"
|
|
361
|
+
}, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React.createElement("div", {
|
|
362
|
+
className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
|
|
363
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
364
|
+
style: "body2"
|
|
365
|
+
}, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React.createElement("div", {
|
|
366
|
+
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
367
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
368
|
+
className: "flex"
|
|
369
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
370
|
+
className: "z-0 flex-1"
|
|
371
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
372
|
+
className: "w-full"
|
|
373
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
374
|
+
nakedInput: true,
|
|
375
|
+
autocomplete: "false",
|
|
376
|
+
className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
|
|
377
|
+
placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
|
|
378
|
+
size: "large",
|
|
379
|
+
spellcheck: "false",
|
|
380
|
+
type: "text",
|
|
381
|
+
value: publicRepoUrl,
|
|
382
|
+
onChange: function onChange(e) {
|
|
383
|
+
return setPublicRepoUrl(e.target.value);
|
|
158
384
|
}
|
|
159
|
-
|
|
160
|
-
|
|
385
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
386
|
+
className: "relative"
|
|
387
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
388
|
+
className: "rounded-b rounded-l-none rounded-r rounded-t",
|
|
389
|
+
disabled: !isPresent(publicRepoUrl),
|
|
390
|
+
size: "large",
|
|
391
|
+
style: "primary",
|
|
392
|
+
type: "button",
|
|
393
|
+
onClick: function onClick() {
|
|
394
|
+
return onConnect({
|
|
395
|
+
repoType: "public",
|
|
396
|
+
repository: {
|
|
397
|
+
fullName: publicRepoUrl
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
}, t("neetoGithub.continue"))))));
|
|
161
402
|
};
|
|
162
403
|
|
|
163
|
-
var
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
404
|
+
var Repositories = function Repositories(_ref) {
|
|
405
|
+
var isConnected = _ref.isConnected,
|
|
406
|
+
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
407
|
+
repositories = _ref.repositories,
|
|
408
|
+
onConnect = _ref.onConnect,
|
|
409
|
+
installationUrl = _ref.installationUrl,
|
|
410
|
+
troubleshootUrl = _ref.troubleshootUrl;
|
|
411
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
412
|
+
className: "w-full space-y-6"
|
|
413
|
+
}, /*#__PURE__*/React.createElement(Private, {
|
|
414
|
+
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
415
|
+
installationUrl: installationUrl,
|
|
416
|
+
isConnected: isConnected,
|
|
417
|
+
onConnect: onConnect,
|
|
418
|
+
repositories: repositories,
|
|
419
|
+
troubleshootUrl: troubleshootUrl
|
|
420
|
+
}), isPublicRepoAllowed && /*#__PURE__*/React.createElement(Public, {
|
|
421
|
+
onConnect: onConnect
|
|
422
|
+
}));
|
|
423
|
+
};
|
|
173
424
|
|
|
174
|
-
var
|
|
425
|
+
var NeetoGithubNanoContainer = function NeetoGithubNanoContainer(_ref) {
|
|
426
|
+
var _ref$accounts = _ref.accounts,
|
|
427
|
+
accounts = _ref$accounts === void 0 ? [] : _ref$accounts,
|
|
428
|
+
installationUrl = _ref.installationUrl,
|
|
429
|
+
isConnected = _ref.isConnected,
|
|
430
|
+
_ref$isPublicRepoAllo = _ref.isPublicRepoAllowed,
|
|
431
|
+
isPublicRepoAllowed = _ref$isPublicRepoAllo === void 0 ? false : _ref$isPublicRepoAllo,
|
|
432
|
+
onConnect = _ref.onConnect,
|
|
433
|
+
_ref$repositories = _ref.repositories,
|
|
434
|
+
repositories = _ref$repositories === void 0 ? [] : _ref$repositories,
|
|
435
|
+
troubleshootUrl = _ref.troubleshootUrl,
|
|
436
|
+
_ref$isPane = _ref.isPane,
|
|
437
|
+
isPane = _ref$isPane === void 0 ? false : _ref$isPane;
|
|
438
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
439
|
+
className: "flex w-full flex-col-reverse xl:flex-row"
|
|
440
|
+
}, /*#__PURE__*/React.createElement(Repositories, {
|
|
441
|
+
installationUrl: installationUrl,
|
|
442
|
+
isConnected: isConnected,
|
|
443
|
+
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
444
|
+
onConnect: onConnect,
|
|
445
|
+
repositories: repositories,
|
|
446
|
+
troubleshootUrl: troubleshootUrl
|
|
447
|
+
}), /*#__PURE__*/React.createElement(Accounts, {
|
|
448
|
+
accounts: accounts,
|
|
449
|
+
installationUrl: installationUrl,
|
|
450
|
+
isConnected: isConnected,
|
|
451
|
+
onConnect: onConnect,
|
|
452
|
+
isPane: isPane
|
|
453
|
+
}));
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
457
|
+
|
|
458
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
459
|
+
var shams = function hasSymbols() {
|
|
460
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
461
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
462
|
+
|
|
463
|
+
var obj = {};
|
|
464
|
+
var sym = Symbol('test');
|
|
465
|
+
var symObj = Object(sym);
|
|
466
|
+
if (typeof sym === 'string') { return false; }
|
|
467
|
+
|
|
468
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
469
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
470
|
+
|
|
471
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
472
|
+
// if (sym instanceof Symbol) { return false; }
|
|
473
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
474
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
475
|
+
|
|
476
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
477
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
478
|
+
|
|
479
|
+
var symVal = 42;
|
|
480
|
+
obj[sym] = symVal;
|
|
481
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
482
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
483
|
+
|
|
484
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
485
|
+
|
|
486
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
487
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
488
|
+
|
|
489
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
490
|
+
|
|
491
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
492
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
493
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
return true;
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
500
|
+
var hasSymbolSham = shams;
|
|
501
|
+
|
|
502
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
503
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
504
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
505
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
506
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
507
|
+
|
|
508
|
+
return hasSymbolSham();
|
|
509
|
+
};
|
|
510
|
+
|
|
511
|
+
var test = {
|
|
512
|
+
foo: {}
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
var $Object = Object;
|
|
516
|
+
|
|
517
|
+
var hasProto$1 = function hasProto() {
|
|
518
|
+
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/* eslint no-invalid-this: 1 */
|
|
522
|
+
|
|
523
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
524
|
+
var toStr$1 = Object.prototype.toString;
|
|
525
|
+
var max = Math.max;
|
|
526
|
+
var funcType = '[object Function]';
|
|
527
|
+
|
|
528
|
+
var concatty = function concatty(a, b) {
|
|
529
|
+
var arr = [];
|
|
530
|
+
|
|
531
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
532
|
+
arr[i] = a[i];
|
|
533
|
+
}
|
|
534
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
535
|
+
arr[j + a.length] = b[j];
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
return arr;
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
var slicy = function slicy(arrLike, offset) {
|
|
542
|
+
var arr = [];
|
|
543
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
544
|
+
arr[j] = arrLike[i];
|
|
545
|
+
}
|
|
546
|
+
return arr;
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
var joiny = function (arr, joiner) {
|
|
550
|
+
var str = '';
|
|
551
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
552
|
+
str += arr[i];
|
|
553
|
+
if (i + 1 < arr.length) {
|
|
554
|
+
str += joiner;
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
return str;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
var implementation$1 = function bind(that) {
|
|
561
|
+
var target = this;
|
|
562
|
+
if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
|
|
563
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
564
|
+
}
|
|
565
|
+
var args = slicy(arguments, 1);
|
|
566
|
+
|
|
567
|
+
var bound;
|
|
568
|
+
var binder = function () {
|
|
569
|
+
if (this instanceof bound) {
|
|
570
|
+
var result = target.apply(
|
|
571
|
+
this,
|
|
572
|
+
concatty(args, arguments)
|
|
573
|
+
);
|
|
574
|
+
if (Object(result) === result) {
|
|
575
|
+
return result;
|
|
576
|
+
}
|
|
577
|
+
return this;
|
|
578
|
+
}
|
|
579
|
+
return target.apply(
|
|
580
|
+
that,
|
|
581
|
+
concatty(args, arguments)
|
|
582
|
+
);
|
|
583
|
+
|
|
584
|
+
};
|
|
585
|
+
|
|
586
|
+
var boundLength = max(0, target.length - args.length);
|
|
587
|
+
var boundArgs = [];
|
|
588
|
+
for (var i = 0; i < boundLength; i++) {
|
|
589
|
+
boundArgs[i] = '$' + i;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
593
|
+
|
|
594
|
+
if (target.prototype) {
|
|
595
|
+
var Empty = function Empty() {};
|
|
596
|
+
Empty.prototype = target.prototype;
|
|
597
|
+
bound.prototype = new Empty();
|
|
598
|
+
Empty.prototype = null;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
return bound;
|
|
602
|
+
};
|
|
603
|
+
|
|
604
|
+
var implementation = implementation$1;
|
|
605
|
+
|
|
606
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
607
|
+
|
|
608
|
+
var call = Function.prototype.call;
|
|
609
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
610
|
+
var bind$1 = functionBind;
|
|
611
|
+
|
|
612
|
+
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */
|
|
613
|
+
var hasown = bind$1.call(call, $hasOwn);
|
|
614
|
+
|
|
615
|
+
var undefined$1;
|
|
175
616
|
|
|
176
617
|
var $SyntaxError$1 = SyntaxError;
|
|
177
618
|
var $Function = Function;
|
|
@@ -338,2377 +779,1933 @@ var LEGACY_ALIASES = {
|
|
|
338
779
|
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
339
780
|
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
340
781
|
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
341
|
-
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
342
|
-
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
343
|
-
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
344
|
-
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
345
|
-
'%DatePrototype%': ['Date', 'prototype'],
|
|
346
|
-
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
347
|
-
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
348
|
-
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
349
|
-
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
350
|
-
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
351
|
-
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
352
|
-
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
353
|
-
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
354
|
-
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
355
|
-
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
356
|
-
'%JSONParse%': ['JSON', 'parse'],
|
|
357
|
-
'%JSONStringify%': ['JSON', 'stringify'],
|
|
358
|
-
'%MapPrototype%': ['Map', 'prototype'],
|
|
359
|
-
'%NumberPrototype%': ['Number', 'prototype'],
|
|
360
|
-
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
361
|
-
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
362
|
-
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
363
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
364
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
365
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
366
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
367
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
368
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
369
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
370
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
371
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
372
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
373
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
374
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
375
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
376
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
377
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
378
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
379
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
380
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
381
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
382
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
383
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
384
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
385
|
-
};
|
|
386
|
-
|
|
387
|
-
var bind = functionBind;
|
|
388
|
-
var hasOwn$1 = hasown;
|
|
389
|
-
var $concat$1 = bind.call(Function.call, Array.prototype.concat);
|
|
390
|
-
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
391
|
-
var $replace$1 = bind.call(Function.call, String.prototype.replace);
|
|
392
|
-
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
393
|
-
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
394
|
-
|
|
395
|
-
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
396
|
-
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
397
|
-
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
398
|
-
var stringToPath = function stringToPath(string) {
|
|
399
|
-
var first = $strSlice(string, 0, 1);
|
|
400
|
-
var last = $strSlice(string, -1);
|
|
401
|
-
if (first === '%' && last !== '%') {
|
|
402
|
-
throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
|
|
403
|
-
} else if (last === '%' && first !== '%') {
|
|
404
|
-
throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
|
|
405
|
-
}
|
|
406
|
-
var result = [];
|
|
407
|
-
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
408
|
-
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
409
|
-
});
|
|
410
|
-
return result;
|
|
411
|
-
};
|
|
412
|
-
/* end adaptation */
|
|
413
|
-
|
|
414
|
-
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
415
|
-
var intrinsicName = name;
|
|
416
|
-
var alias;
|
|
417
|
-
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
418
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
419
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
423
|
-
var value = INTRINSICS[intrinsicName];
|
|
424
|
-
if (value === needsEval) {
|
|
425
|
-
value = doEval(intrinsicName);
|
|
426
|
-
}
|
|
427
|
-
if (typeof value === 'undefined' && !allowMissing) {
|
|
428
|
-
throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
return {
|
|
432
|
-
alias: alias,
|
|
433
|
-
name: intrinsicName,
|
|
434
|
-
value: value
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
|
|
438
|
-
throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
442
|
-
if (typeof name !== 'string' || name.length === 0) {
|
|
443
|
-
throw new $TypeError$3('intrinsic name must be a non-empty string');
|
|
444
|
-
}
|
|
445
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
446
|
-
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
450
|
-
throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
451
|
-
}
|
|
452
|
-
var parts = stringToPath(name);
|
|
453
|
-
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
454
|
-
|
|
455
|
-
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
456
|
-
var intrinsicRealName = intrinsic.name;
|
|
457
|
-
var value = intrinsic.value;
|
|
458
|
-
var skipFurtherCaching = false;
|
|
459
|
-
|
|
460
|
-
var alias = intrinsic.alias;
|
|
461
|
-
if (alias) {
|
|
462
|
-
intrinsicBaseName = alias[0];
|
|
463
|
-
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
467
|
-
var part = parts[i];
|
|
468
|
-
var first = $strSlice(part, 0, 1);
|
|
469
|
-
var last = $strSlice(part, -1);
|
|
470
|
-
if (
|
|
471
|
-
(
|
|
472
|
-
(first === '"' || first === "'" || first === '`')
|
|
473
|
-
|| (last === '"' || last === "'" || last === '`')
|
|
474
|
-
)
|
|
475
|
-
&& first !== last
|
|
476
|
-
) {
|
|
477
|
-
throw new $SyntaxError$1('property names with quotes must have matching quotes');
|
|
478
|
-
}
|
|
479
|
-
if (part === 'constructor' || !isOwn) {
|
|
480
|
-
skipFurtherCaching = true;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
intrinsicBaseName += '.' + part;
|
|
484
|
-
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
485
|
-
|
|
486
|
-
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
487
|
-
value = INTRINSICS[intrinsicRealName];
|
|
488
|
-
} else if (value != null) {
|
|
489
|
-
if (!(part in value)) {
|
|
490
|
-
if (!allowMissing) {
|
|
491
|
-
throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
492
|
-
}
|
|
493
|
-
return void undefined$1;
|
|
494
|
-
}
|
|
495
|
-
if ($gOPD$1 && (i + 1) >= parts.length) {
|
|
496
|
-
var desc = $gOPD$1(value, part);
|
|
497
|
-
isOwn = !!desc;
|
|
498
|
-
|
|
499
|
-
// By convention, when a data property is converted to an accessor
|
|
500
|
-
// property to emulate a data property that does not suffer from
|
|
501
|
-
// the override mistake, that accessor's getter is marked with
|
|
502
|
-
// an `originalValue` property. Here, when we detect this, we
|
|
503
|
-
// uphold the illusion by pretending to see that original data
|
|
504
|
-
// property, i.e., returning the value rather than the getter
|
|
505
|
-
// itself.
|
|
506
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
507
|
-
value = desc.get;
|
|
508
|
-
} else {
|
|
509
|
-
value = value[part];
|
|
510
|
-
}
|
|
511
|
-
} else {
|
|
512
|
-
isOwn = hasOwn$1(value, part);
|
|
513
|
-
value = value[part];
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
if (isOwn && !skipFurtherCaching) {
|
|
517
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
return value;
|
|
522
|
-
};
|
|
523
|
-
|
|
524
|
-
var callBind$1 = {exports: {}};
|
|
525
|
-
|
|
526
|
-
var GetIntrinsic$5 = getIntrinsic;
|
|
527
|
-
|
|
528
|
-
var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
|
|
529
|
-
|
|
530
|
-
var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
|
|
531
|
-
if ($defineProperty$1) {
|
|
532
|
-
try {
|
|
533
|
-
$defineProperty$1({}, 'a', { value: 1 });
|
|
534
|
-
return true;
|
|
535
|
-
} catch (e) {
|
|
536
|
-
// IE 8 has a broken defineProperty
|
|
537
|
-
return false;
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
return false;
|
|
541
|
-
};
|
|
542
|
-
|
|
543
|
-
hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
544
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
545
|
-
if (!hasPropertyDescriptors$1()) {
|
|
546
|
-
return null;
|
|
547
|
-
}
|
|
548
|
-
try {
|
|
549
|
-
return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
|
|
550
|
-
} catch (e) {
|
|
551
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
|
552
|
-
return true;
|
|
553
|
-
}
|
|
554
|
-
};
|
|
555
|
-
|
|
556
|
-
var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
|
|
557
|
-
|
|
558
|
-
var GetIntrinsic$4 = getIntrinsic;
|
|
559
|
-
|
|
560
|
-
var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
|
|
561
|
-
|
|
562
|
-
if ($gOPD) {
|
|
563
|
-
try {
|
|
564
|
-
$gOPD([], 'length');
|
|
565
|
-
} catch (e) {
|
|
566
|
-
// IE 8 has a broken gOPD
|
|
567
|
-
$gOPD = null;
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
var gopd$1 = $gOPD;
|
|
572
|
-
|
|
573
|
-
var hasPropertyDescriptors = hasPropertyDescriptors_1();
|
|
574
|
-
|
|
575
|
-
var GetIntrinsic$3 = getIntrinsic;
|
|
576
|
-
|
|
577
|
-
var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
|
|
578
|
-
if ($defineProperty) {
|
|
579
|
-
try {
|
|
580
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
581
|
-
} catch (e) {
|
|
582
|
-
// IE 8 has a broken defineProperty
|
|
583
|
-
$defineProperty = false;
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
|
|
588
|
-
var $TypeError$2 = GetIntrinsic$3('%TypeError%');
|
|
589
|
-
|
|
590
|
-
var gopd = gopd$1;
|
|
591
|
-
|
|
592
|
-
/** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
|
|
593
|
-
var defineDataProperty = function defineDataProperty(
|
|
594
|
-
obj,
|
|
595
|
-
property,
|
|
596
|
-
value
|
|
597
|
-
) {
|
|
598
|
-
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
599
|
-
throw new $TypeError$2('`obj` must be an object or a function`');
|
|
600
|
-
}
|
|
601
|
-
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
602
|
-
throw new $TypeError$2('`property` must be a string or a symbol`');
|
|
603
|
-
}
|
|
604
|
-
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
605
|
-
throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
|
|
606
|
-
}
|
|
607
|
-
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
608
|
-
throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
|
|
609
|
-
}
|
|
610
|
-
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
611
|
-
throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
|
|
612
|
-
}
|
|
613
|
-
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
614
|
-
throw new $TypeError$2('`loose`, if provided, must be a boolean');
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
618
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
619
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
620
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
621
|
-
|
|
622
|
-
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
623
|
-
var desc = !!gopd && gopd(obj, property);
|
|
624
|
-
|
|
625
|
-
if ($defineProperty) {
|
|
626
|
-
$defineProperty(obj, property, {
|
|
627
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
628
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
629
|
-
value: value,
|
|
630
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
631
|
-
});
|
|
632
|
-
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
633
|
-
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
634
|
-
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
635
|
-
} else {
|
|
636
|
-
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
637
|
-
}
|
|
638
|
-
};
|
|
639
|
-
|
|
640
|
-
var GetIntrinsic$2 = getIntrinsic;
|
|
641
|
-
var define = defineDataProperty;
|
|
642
|
-
var hasDescriptors = hasPropertyDescriptors_1();
|
|
643
|
-
var gOPD = gopd$1;
|
|
644
|
-
|
|
645
|
-
var $TypeError$1 = GetIntrinsic$2('%TypeError%');
|
|
646
|
-
var $floor$1 = GetIntrinsic$2('%Math.floor%');
|
|
647
|
-
|
|
648
|
-
var setFunctionLength = function setFunctionLength(fn, length) {
|
|
649
|
-
if (typeof fn !== 'function') {
|
|
650
|
-
throw new $TypeError$1('`fn` is not a function');
|
|
651
|
-
}
|
|
652
|
-
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
653
|
-
throw new $TypeError$1('`length` must be a positive 32-bit integer');
|
|
654
|
-
}
|
|
655
|
-
|
|
656
|
-
var loose = arguments.length > 2 && !!arguments[2];
|
|
657
|
-
|
|
658
|
-
var functionLengthIsConfigurable = true;
|
|
659
|
-
var functionLengthIsWritable = true;
|
|
660
|
-
if ('length' in fn && gOPD) {
|
|
661
|
-
var desc = gOPD(fn, 'length');
|
|
662
|
-
if (desc && !desc.configurable) {
|
|
663
|
-
functionLengthIsConfigurable = false;
|
|
664
|
-
}
|
|
665
|
-
if (desc && !desc.writable) {
|
|
666
|
-
functionLengthIsWritable = false;
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
|
|
670
|
-
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
671
|
-
if (hasDescriptors) {
|
|
672
|
-
define(fn, 'length', length, true, true);
|
|
673
|
-
} else {
|
|
674
|
-
define(fn, 'length', length);
|
|
675
|
-
}
|
|
676
|
-
}
|
|
677
|
-
return fn;
|
|
678
|
-
};
|
|
679
|
-
|
|
680
|
-
callBind$1.exports;
|
|
681
|
-
|
|
682
|
-
(function (module) {
|
|
683
|
-
|
|
684
|
-
var bind = functionBind;
|
|
685
|
-
var GetIntrinsic = getIntrinsic;
|
|
686
|
-
var setFunctionLength$1 = setFunctionLength;
|
|
687
|
-
|
|
688
|
-
var $TypeError = GetIntrinsic('%TypeError%');
|
|
689
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
690
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
691
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
692
|
-
|
|
693
|
-
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
694
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
695
|
-
|
|
696
|
-
if ($defineProperty) {
|
|
697
|
-
try {
|
|
698
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
699
|
-
} catch (e) {
|
|
700
|
-
// IE 8 has a broken defineProperty
|
|
701
|
-
$defineProperty = null;
|
|
702
|
-
}
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
module.exports = function callBind(originalFunction) {
|
|
706
|
-
if (typeof originalFunction !== 'function') {
|
|
707
|
-
throw new $TypeError('a function is required');
|
|
708
|
-
}
|
|
709
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
710
|
-
return setFunctionLength$1(
|
|
711
|
-
func,
|
|
712
|
-
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
713
|
-
true
|
|
714
|
-
);
|
|
715
|
-
};
|
|
716
|
-
|
|
717
|
-
var applyBind = function applyBind() {
|
|
718
|
-
return $reflectApply(bind, $apply, arguments);
|
|
719
|
-
};
|
|
720
|
-
|
|
721
|
-
if ($defineProperty) {
|
|
722
|
-
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
723
|
-
} else {
|
|
724
|
-
module.exports.apply = applyBind;
|
|
725
|
-
}
|
|
726
|
-
} (callBind$1));
|
|
727
|
-
|
|
728
|
-
var callBindExports = callBind$1.exports;
|
|
729
|
-
|
|
730
|
-
var GetIntrinsic$1 = getIntrinsic;
|
|
731
|
-
|
|
732
|
-
var callBind = callBindExports;
|
|
733
|
-
|
|
734
|
-
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
735
|
-
|
|
736
|
-
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
737
|
-
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
738
|
-
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
739
|
-
return callBind(intrinsic);
|
|
740
|
-
}
|
|
741
|
-
return intrinsic;
|
|
742
|
-
};
|
|
743
|
-
|
|
744
|
-
var util_inspect = require$$0.inspect;
|
|
745
|
-
|
|
746
|
-
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
747
|
-
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
748
|
-
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
749
|
-
var mapForEach = hasMap && Map.prototype.forEach;
|
|
750
|
-
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
751
|
-
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
752
|
-
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
753
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
754
|
-
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
755
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
756
|
-
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
757
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
758
|
-
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
759
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
760
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
761
|
-
var objectToString = Object.prototype.toString;
|
|
762
|
-
var functionToString = Function.prototype.toString;
|
|
763
|
-
var $match = String.prototype.match;
|
|
764
|
-
var $slice = String.prototype.slice;
|
|
765
|
-
var $replace = String.prototype.replace;
|
|
766
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
767
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
768
|
-
var $test = RegExp.prototype.test;
|
|
769
|
-
var $concat = Array.prototype.concat;
|
|
770
|
-
var $join = Array.prototype.join;
|
|
771
|
-
var $arrSlice = Array.prototype.slice;
|
|
772
|
-
var $floor = Math.floor;
|
|
773
|
-
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
774
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
775
|
-
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
776
|
-
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
777
|
-
// ie, `has-tostringtag/shams
|
|
778
|
-
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
779
|
-
? Symbol.toStringTag
|
|
780
|
-
: null;
|
|
781
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
782
|
-
|
|
783
|
-
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
784
|
-
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
785
|
-
? function (O) {
|
|
786
|
-
return O.__proto__; // eslint-disable-line no-proto
|
|
787
|
-
}
|
|
788
|
-
: null
|
|
789
|
-
);
|
|
790
|
-
|
|
791
|
-
function addNumericSeparator(num, str) {
|
|
792
|
-
if (
|
|
793
|
-
num === Infinity
|
|
794
|
-
|| num === -Infinity
|
|
795
|
-
|| num !== num
|
|
796
|
-
|| (num && num > -1000 && num < 1000)
|
|
797
|
-
|| $test.call(/e/, str)
|
|
798
|
-
) {
|
|
799
|
-
return str;
|
|
800
|
-
}
|
|
801
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
802
|
-
if (typeof num === 'number') {
|
|
803
|
-
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
804
|
-
if (int !== num) {
|
|
805
|
-
var intStr = String(int);
|
|
806
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
807
|
-
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return $replace.call(str, sepRegex, '$&_');
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
var utilInspect = util_inspect;
|
|
814
|
-
var inspectCustom = utilInspect.custom;
|
|
815
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
816
|
-
|
|
817
|
-
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
818
|
-
var opts = options || {};
|
|
819
|
-
|
|
820
|
-
if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
821
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
822
|
-
}
|
|
823
|
-
if (
|
|
824
|
-
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
825
|
-
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
826
|
-
: opts.maxStringLength !== null
|
|
827
|
-
)
|
|
828
|
-
) {
|
|
829
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
830
|
-
}
|
|
831
|
-
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
832
|
-
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
833
|
-
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
if (
|
|
837
|
-
has$3(opts, 'indent')
|
|
838
|
-
&& opts.indent !== null
|
|
839
|
-
&& opts.indent !== '\t'
|
|
840
|
-
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
841
|
-
) {
|
|
842
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
843
|
-
}
|
|
844
|
-
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
845
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
846
|
-
}
|
|
847
|
-
var numericSeparator = opts.numericSeparator;
|
|
848
|
-
|
|
849
|
-
if (typeof obj === 'undefined') {
|
|
850
|
-
return 'undefined';
|
|
851
|
-
}
|
|
852
|
-
if (obj === null) {
|
|
853
|
-
return 'null';
|
|
854
|
-
}
|
|
855
|
-
if (typeof obj === 'boolean') {
|
|
856
|
-
return obj ? 'true' : 'false';
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
if (typeof obj === 'string') {
|
|
860
|
-
return inspectString(obj, opts);
|
|
861
|
-
}
|
|
862
|
-
if (typeof obj === 'number') {
|
|
863
|
-
if (obj === 0) {
|
|
864
|
-
return Infinity / obj > 0 ? '0' : '-0';
|
|
865
|
-
}
|
|
866
|
-
var str = String(obj);
|
|
867
|
-
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
868
|
-
}
|
|
869
|
-
if (typeof obj === 'bigint') {
|
|
870
|
-
var bigIntStr = String(obj) + 'n';
|
|
871
|
-
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
875
|
-
if (typeof depth === 'undefined') { depth = 0; }
|
|
876
|
-
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
877
|
-
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
var indent = getIndent(opts, depth);
|
|
881
|
-
|
|
882
|
-
if (typeof seen === 'undefined') {
|
|
883
|
-
seen = [];
|
|
884
|
-
} else if (indexOf(seen, obj) >= 0) {
|
|
885
|
-
return '[Circular]';
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
function inspect(value, from, noIndent) {
|
|
889
|
-
if (from) {
|
|
890
|
-
seen = $arrSlice.call(seen);
|
|
891
|
-
seen.push(from);
|
|
892
|
-
}
|
|
893
|
-
if (noIndent) {
|
|
894
|
-
var newOpts = {
|
|
895
|
-
depth: opts.depth
|
|
896
|
-
};
|
|
897
|
-
if (has$3(opts, 'quoteStyle')) {
|
|
898
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
899
|
-
}
|
|
900
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
901
|
-
}
|
|
902
|
-
return inspect_(value, opts, depth + 1, seen);
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
|
|
906
|
-
var name = nameOf(obj);
|
|
907
|
-
var keys = arrObjKeys(obj, inspect);
|
|
908
|
-
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
909
|
-
}
|
|
910
|
-
if (isSymbol(obj)) {
|
|
911
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
912
|
-
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
913
|
-
}
|
|
914
|
-
if (isElement(obj)) {
|
|
915
|
-
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
916
|
-
var attrs = obj.attributes || [];
|
|
917
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
918
|
-
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
919
|
-
}
|
|
920
|
-
s += '>';
|
|
921
|
-
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
922
|
-
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
923
|
-
return s;
|
|
924
|
-
}
|
|
925
|
-
if (isArray$3(obj)) {
|
|
926
|
-
if (obj.length === 0) { return '[]'; }
|
|
927
|
-
var xs = arrObjKeys(obj, inspect);
|
|
928
|
-
if (indent && !singleLineValues(xs)) {
|
|
929
|
-
return '[' + indentedJoin(xs, indent) + ']';
|
|
930
|
-
}
|
|
931
|
-
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
932
|
-
}
|
|
933
|
-
if (isError(obj)) {
|
|
934
|
-
var parts = arrObjKeys(obj, inspect);
|
|
935
|
-
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
936
|
-
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
937
|
-
}
|
|
938
|
-
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
939
|
-
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
940
|
-
}
|
|
941
|
-
if (typeof obj === 'object' && customInspect) {
|
|
942
|
-
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
943
|
-
return utilInspect(obj, { depth: maxDepth - depth });
|
|
944
|
-
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
945
|
-
return obj.inspect();
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
if (isMap(obj)) {
|
|
949
|
-
var mapParts = [];
|
|
950
|
-
if (mapForEach) {
|
|
951
|
-
mapForEach.call(obj, function (value, key) {
|
|
952
|
-
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
953
|
-
});
|
|
954
|
-
}
|
|
955
|
-
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
956
|
-
}
|
|
957
|
-
if (isSet(obj)) {
|
|
958
|
-
var setParts = [];
|
|
959
|
-
if (setForEach) {
|
|
960
|
-
setForEach.call(obj, function (value) {
|
|
961
|
-
setParts.push(inspect(value, obj));
|
|
962
|
-
});
|
|
963
|
-
}
|
|
964
|
-
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
965
|
-
}
|
|
966
|
-
if (isWeakMap(obj)) {
|
|
967
|
-
return weakCollectionOf('WeakMap');
|
|
968
|
-
}
|
|
969
|
-
if (isWeakSet(obj)) {
|
|
970
|
-
return weakCollectionOf('WeakSet');
|
|
971
|
-
}
|
|
972
|
-
if (isWeakRef(obj)) {
|
|
973
|
-
return weakCollectionOf('WeakRef');
|
|
974
|
-
}
|
|
975
|
-
if (isNumber(obj)) {
|
|
976
|
-
return markBoxed(inspect(Number(obj)));
|
|
977
|
-
}
|
|
978
|
-
if (isBigInt(obj)) {
|
|
979
|
-
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
980
|
-
}
|
|
981
|
-
if (isBoolean(obj)) {
|
|
982
|
-
return markBoxed(booleanValueOf.call(obj));
|
|
983
|
-
}
|
|
984
|
-
if (isString(obj)) {
|
|
985
|
-
return markBoxed(inspect(String(obj)));
|
|
986
|
-
}
|
|
987
|
-
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
988
|
-
/* eslint-env browser */
|
|
989
|
-
if (typeof window !== 'undefined' && obj === window) {
|
|
990
|
-
return '{ [object Window] }';
|
|
991
|
-
}
|
|
992
|
-
if (obj === commonjsGlobal) {
|
|
993
|
-
return '{ [object globalThis] }';
|
|
994
|
-
}
|
|
995
|
-
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
996
|
-
var ys = arrObjKeys(obj, inspect);
|
|
997
|
-
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
998
|
-
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
999
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
1000
|
-
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
1001
|
-
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
1002
|
-
if (ys.length === 0) { return tag + '{}'; }
|
|
1003
|
-
if (indent) {
|
|
1004
|
-
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
1005
|
-
}
|
|
1006
|
-
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
1007
|
-
}
|
|
1008
|
-
return String(obj);
|
|
782
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
783
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
784
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
785
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
786
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
787
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
788
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
789
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
790
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
791
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
792
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
793
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
794
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
795
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
796
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
797
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
798
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
799
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
800
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
801
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
802
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
803
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
804
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
805
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
806
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
807
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
808
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
809
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
810
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
811
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
812
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
813
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
814
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
815
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
816
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
817
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
818
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
819
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
820
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
821
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
822
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
823
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
824
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
825
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1009
826
|
};
|
|
1010
827
|
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
828
|
+
var bind = functionBind;
|
|
829
|
+
var hasOwn$1 = hasown;
|
|
830
|
+
var $concat$1 = bind.call(Function.call, Array.prototype.concat);
|
|
831
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
832
|
+
var $replace$1 = bind.call(Function.call, String.prototype.replace);
|
|
833
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
834
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
1015
835
|
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
836
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
837
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
838
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
839
|
+
var stringToPath = function stringToPath(string) {
|
|
840
|
+
var first = $strSlice(string, 0, 1);
|
|
841
|
+
var last = $strSlice(string, -1);
|
|
842
|
+
if (first === '%' && last !== '%') {
|
|
843
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
|
|
844
|
+
} else if (last === '%' && first !== '%') {
|
|
845
|
+
throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
|
|
846
|
+
}
|
|
847
|
+
var result = [];
|
|
848
|
+
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
849
|
+
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
850
|
+
});
|
|
851
|
+
return result;
|
|
852
|
+
};
|
|
853
|
+
/* end adaptation */
|
|
1019
854
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
855
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
856
|
+
var intrinsicName = name;
|
|
857
|
+
var alias;
|
|
858
|
+
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
859
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
860
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
861
|
+
}
|
|
1027
862
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
1037
|
-
return false;
|
|
1038
|
-
}
|
|
1039
|
-
try {
|
|
1040
|
-
symToString.call(obj);
|
|
1041
|
-
return true;
|
|
1042
|
-
} catch (e) {}
|
|
1043
|
-
return false;
|
|
1044
|
-
}
|
|
863
|
+
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
864
|
+
var value = INTRINSICS[intrinsicName];
|
|
865
|
+
if (value === needsEval) {
|
|
866
|
+
value = doEval(intrinsicName);
|
|
867
|
+
}
|
|
868
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
869
|
+
throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
870
|
+
}
|
|
1045
871
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
return true;
|
|
1053
|
-
} catch (e) {}
|
|
1054
|
-
return false;
|
|
1055
|
-
}
|
|
872
|
+
return {
|
|
873
|
+
alias: alias,
|
|
874
|
+
name: intrinsicName,
|
|
875
|
+
value: value
|
|
876
|
+
};
|
|
877
|
+
}
|
|
1056
878
|
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
return hasOwn.call(obj, key);
|
|
1060
|
-
}
|
|
879
|
+
throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
|
|
880
|
+
};
|
|
1061
881
|
|
|
1062
|
-
function
|
|
1063
|
-
|
|
1064
|
-
|
|
882
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
883
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
884
|
+
throw new $TypeError$3('intrinsic name must be a non-empty string');
|
|
885
|
+
}
|
|
886
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
887
|
+
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
888
|
+
}
|
|
1065
889
|
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
}
|
|
890
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
891
|
+
throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
892
|
+
}
|
|
893
|
+
var parts = stringToPath(name);
|
|
894
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1072
895
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
}
|
|
1078
|
-
return -1;
|
|
1079
|
-
}
|
|
896
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
897
|
+
var intrinsicRealName = intrinsic.name;
|
|
898
|
+
var value = intrinsic.value;
|
|
899
|
+
var skipFurtherCaching = false;
|
|
1080
900
|
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
901
|
+
var alias = intrinsic.alias;
|
|
902
|
+
if (alias) {
|
|
903
|
+
intrinsicBaseName = alias[0];
|
|
904
|
+
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
908
|
+
var part = parts[i];
|
|
909
|
+
var first = $strSlice(part, 0, 1);
|
|
910
|
+
var last = $strSlice(part, -1);
|
|
911
|
+
if (
|
|
912
|
+
(
|
|
913
|
+
(first === '"' || first === "'" || first === '`')
|
|
914
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
915
|
+
)
|
|
916
|
+
&& first !== last
|
|
917
|
+
) {
|
|
918
|
+
throw new $SyntaxError$1('property names with quotes must have matching quotes');
|
|
919
|
+
}
|
|
920
|
+
if (part === 'constructor' || !isOwn) {
|
|
921
|
+
skipFurtherCaching = true;
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
intrinsicBaseName += '.' + part;
|
|
925
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
926
|
+
|
|
927
|
+
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
928
|
+
value = INTRINSICS[intrinsicRealName];
|
|
929
|
+
} else if (value != null) {
|
|
930
|
+
if (!(part in value)) {
|
|
931
|
+
if (!allowMissing) {
|
|
932
|
+
throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
933
|
+
}
|
|
934
|
+
return void undefined$1;
|
|
935
|
+
}
|
|
936
|
+
if ($gOPD$1 && (i + 1) >= parts.length) {
|
|
937
|
+
var desc = $gOPD$1(value, part);
|
|
938
|
+
isOwn = !!desc;
|
|
939
|
+
|
|
940
|
+
// By convention, when a data property is converted to an accessor
|
|
941
|
+
// property to emulate a data property that does not suffer from
|
|
942
|
+
// the override mistake, that accessor's getter is marked with
|
|
943
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
944
|
+
// uphold the illusion by pretending to see that original data
|
|
945
|
+
// property, i.e., returning the value rather than the getter
|
|
946
|
+
// itself.
|
|
947
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
948
|
+
value = desc.get;
|
|
949
|
+
} else {
|
|
950
|
+
value = value[part];
|
|
951
|
+
}
|
|
952
|
+
} else {
|
|
953
|
+
isOwn = hasOwn$1(value, part);
|
|
954
|
+
value = value[part];
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
if (isOwn && !skipFurtherCaching) {
|
|
958
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
return value;
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
var callBind$1 = {exports: {}};
|
|
966
|
+
|
|
967
|
+
var GetIntrinsic$5 = getIntrinsic;
|
|
968
|
+
|
|
969
|
+
var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
|
|
970
|
+
|
|
971
|
+
var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
|
|
972
|
+
if ($defineProperty$1) {
|
|
973
|
+
try {
|
|
974
|
+
$defineProperty$1({}, 'a', { value: 1 });
|
|
975
|
+
return true;
|
|
976
|
+
} catch (e) {
|
|
977
|
+
// IE 8 has a broken defineProperty
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
return false;
|
|
982
|
+
};
|
|
1096
983
|
|
|
1097
|
-
function
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
} catch (e) {}
|
|
1110
|
-
return false;
|
|
1111
|
-
}
|
|
984
|
+
hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
985
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
986
|
+
if (!hasPropertyDescriptors$1()) {
|
|
987
|
+
return null;
|
|
988
|
+
}
|
|
989
|
+
try {
|
|
990
|
+
return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
|
|
991
|
+
} catch (e) {
|
|
992
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
993
|
+
return true;
|
|
994
|
+
}
|
|
995
|
+
};
|
|
1112
996
|
|
|
1113
|
-
|
|
1114
|
-
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
1115
|
-
return false;
|
|
1116
|
-
}
|
|
1117
|
-
try {
|
|
1118
|
-
weakRefDeref.call(x);
|
|
1119
|
-
return true;
|
|
1120
|
-
} catch (e) {}
|
|
1121
|
-
return false;
|
|
1122
|
-
}
|
|
997
|
+
var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
|
|
1123
998
|
|
|
1124
|
-
|
|
1125
|
-
if (!setSize || !x || typeof x !== 'object') {
|
|
1126
|
-
return false;
|
|
1127
|
-
}
|
|
1128
|
-
try {
|
|
1129
|
-
setSize.call(x);
|
|
1130
|
-
try {
|
|
1131
|
-
mapSize.call(x);
|
|
1132
|
-
} catch (m) {
|
|
1133
|
-
return true;
|
|
1134
|
-
}
|
|
1135
|
-
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
1136
|
-
} catch (e) {}
|
|
1137
|
-
return false;
|
|
1138
|
-
}
|
|
999
|
+
var GetIntrinsic$4 = getIntrinsic;
|
|
1139
1000
|
|
|
1140
|
-
|
|
1141
|
-
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
1142
|
-
return false;
|
|
1143
|
-
}
|
|
1144
|
-
try {
|
|
1145
|
-
weakSetHas.call(x, weakSetHas);
|
|
1146
|
-
try {
|
|
1147
|
-
weakMapHas.call(x, weakMapHas);
|
|
1148
|
-
} catch (s) {
|
|
1149
|
-
return true;
|
|
1150
|
-
}
|
|
1151
|
-
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
1152
|
-
} catch (e) {}
|
|
1153
|
-
return false;
|
|
1154
|
-
}
|
|
1001
|
+
var $gOPD = GetIntrinsic$4('%Object.getOwnPropertyDescriptor%', true);
|
|
1155
1002
|
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1003
|
+
if ($gOPD) {
|
|
1004
|
+
try {
|
|
1005
|
+
$gOPD([], 'length');
|
|
1006
|
+
} catch (e) {
|
|
1007
|
+
// IE 8 has a broken gOPD
|
|
1008
|
+
$gOPD = null;
|
|
1009
|
+
}
|
|
1162
1010
|
}
|
|
1163
1011
|
|
|
1164
|
-
|
|
1165
|
-
if (str.length > opts.maxStringLength) {
|
|
1166
|
-
var remaining = str.length - opts.maxStringLength;
|
|
1167
|
-
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1168
|
-
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1169
|
-
}
|
|
1170
|
-
// eslint-disable-next-line no-control-regex
|
|
1171
|
-
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1172
|
-
return wrapQuotes(s, 'single', opts);
|
|
1173
|
-
}
|
|
1012
|
+
var gopd$1 = $gOPD;
|
|
1174
1013
|
|
|
1175
|
-
|
|
1176
|
-
var n = c.charCodeAt(0);
|
|
1177
|
-
var x = {
|
|
1178
|
-
8: 'b',
|
|
1179
|
-
9: 't',
|
|
1180
|
-
10: 'n',
|
|
1181
|
-
12: 'f',
|
|
1182
|
-
13: 'r'
|
|
1183
|
-
}[n];
|
|
1184
|
-
if (x) { return '\\' + x; }
|
|
1185
|
-
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
1186
|
-
}
|
|
1014
|
+
var hasPropertyDescriptors = hasPropertyDescriptors_1();
|
|
1187
1015
|
|
|
1188
|
-
|
|
1189
|
-
return 'Object(' + str + ')';
|
|
1190
|
-
}
|
|
1016
|
+
var GetIntrinsic$3 = getIntrinsic;
|
|
1191
1017
|
|
|
1192
|
-
|
|
1193
|
-
|
|
1018
|
+
var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
|
|
1019
|
+
if ($defineProperty) {
|
|
1020
|
+
try {
|
|
1021
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1022
|
+
} catch (e) {
|
|
1023
|
+
// IE 8 has a broken defineProperty
|
|
1024
|
+
$defineProperty = false;
|
|
1025
|
+
}
|
|
1194
1026
|
}
|
|
1195
1027
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
1199
|
-
}
|
|
1028
|
+
var $SyntaxError = GetIntrinsic$3('%SyntaxError%');
|
|
1029
|
+
var $TypeError$2 = GetIntrinsic$3('%TypeError%');
|
|
1200
1030
|
|
|
1201
|
-
|
|
1202
|
-
for (var i = 0; i < xs.length; i++) {
|
|
1203
|
-
if (indexOf(xs[i], '\n') >= 0) {
|
|
1204
|
-
return false;
|
|
1205
|
-
}
|
|
1206
|
-
}
|
|
1207
|
-
return true;
|
|
1208
|
-
}
|
|
1031
|
+
var gopd = gopd$1;
|
|
1209
1032
|
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1033
|
+
/** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
|
|
1034
|
+
var defineDataProperty = function defineDataProperty(
|
|
1035
|
+
obj,
|
|
1036
|
+
property,
|
|
1037
|
+
value
|
|
1038
|
+
) {
|
|
1039
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
1040
|
+
throw new $TypeError$2('`obj` must be an object or a function`');
|
|
1041
|
+
}
|
|
1042
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
|
1043
|
+
throw new $TypeError$2('`property` must be a string or a symbol`');
|
|
1044
|
+
}
|
|
1045
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
1046
|
+
throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
|
|
1047
|
+
}
|
|
1048
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
1049
|
+
throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
|
|
1050
|
+
}
|
|
1051
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
1052
|
+
throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
|
|
1053
|
+
}
|
|
1054
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
1055
|
+
throw new $TypeError$2('`loose`, if provided, must be a boolean');
|
|
1056
|
+
}
|
|
1224
1057
|
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
}
|
|
1058
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
1059
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
1060
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
1061
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
1230
1062
|
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
var xs = [];
|
|
1234
|
-
if (isArr) {
|
|
1235
|
-
xs.length = obj.length;
|
|
1236
|
-
for (var i = 0; i < obj.length; i++) {
|
|
1237
|
-
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
1241
|
-
var symMap;
|
|
1242
|
-
if (hasShammedSymbols) {
|
|
1243
|
-
symMap = {};
|
|
1244
|
-
for (var k = 0; k < syms.length; k++) {
|
|
1245
|
-
symMap['$' + syms[k]] = syms[k];
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1063
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
1064
|
+
var desc = !!gopd && gopd(obj, property);
|
|
1248
1065
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
if (isEnumerable.call(obj, syms[j])) {
|
|
1264
|
-
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
1265
|
-
}
|
|
1266
|
-
}
|
|
1267
|
-
}
|
|
1268
|
-
return xs;
|
|
1269
|
-
}
|
|
1066
|
+
if ($defineProperty) {
|
|
1067
|
+
$defineProperty(obj, property, {
|
|
1068
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
1069
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
1070
|
+
value: value,
|
|
1071
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
1072
|
+
});
|
|
1073
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
|
1074
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
1075
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
1076
|
+
} else {
|
|
1077
|
+
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1270
1080
|
|
|
1271
|
-
var GetIntrinsic = getIntrinsic;
|
|
1272
|
-
var
|
|
1273
|
-
var
|
|
1081
|
+
var GetIntrinsic$2 = getIntrinsic;
|
|
1082
|
+
var define = defineDataProperty;
|
|
1083
|
+
var hasDescriptors = hasPropertyDescriptors_1();
|
|
1084
|
+
var gOPD = gopd$1;
|
|
1085
|
+
|
|
1086
|
+
var $TypeError$1 = GetIntrinsic$2('%TypeError%');
|
|
1087
|
+
var $floor$1 = GetIntrinsic$2('%Math.floor%');
|
|
1274
1088
|
|
|
1275
|
-
var
|
|
1276
|
-
|
|
1277
|
-
|
|
1089
|
+
var setFunctionLength = function setFunctionLength(fn, length) {
|
|
1090
|
+
if (typeof fn !== 'function') {
|
|
1091
|
+
throw new $TypeError$1('`fn` is not a function');
|
|
1092
|
+
}
|
|
1093
|
+
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
1094
|
+
throw new $TypeError$1('`length` must be a positive 32-bit integer');
|
|
1095
|
+
}
|
|
1278
1096
|
|
|
1279
|
-
var
|
|
1280
|
-
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
1281
|
-
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
1282
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
1283
|
-
var $mapSet = callBound('Map.prototype.set', true);
|
|
1284
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
1097
|
+
var loose = arguments.length > 2 && !!arguments[2];
|
|
1285
1098
|
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
1296
|
-
if (curr.key === key) {
|
|
1297
|
-
prev.next = curr.next;
|
|
1298
|
-
curr.next = list.next;
|
|
1299
|
-
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1300
|
-
return curr;
|
|
1099
|
+
var functionLengthIsConfigurable = true;
|
|
1100
|
+
var functionLengthIsWritable = true;
|
|
1101
|
+
if ('length' in fn && gOPD) {
|
|
1102
|
+
var desc = gOPD(fn, 'length');
|
|
1103
|
+
if (desc && !desc.configurable) {
|
|
1104
|
+
functionLengthIsConfigurable = false;
|
|
1105
|
+
}
|
|
1106
|
+
if (desc && !desc.writable) {
|
|
1107
|
+
functionLengthIsWritable = false;
|
|
1301
1108
|
}
|
|
1302
1109
|
}
|
|
1303
|
-
};
|
|
1304
1110
|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
if (node) {
|
|
1312
|
-
node.value = value;
|
|
1313
|
-
} else {
|
|
1314
|
-
// Prepend the new node to the beginning of the list
|
|
1315
|
-
objects.next = { // eslint-disable-line no-param-reassign
|
|
1316
|
-
key: key,
|
|
1317
|
-
next: objects.next,
|
|
1318
|
-
value: value
|
|
1319
|
-
};
|
|
1111
|
+
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
1112
|
+
if (hasDescriptors) {
|
|
1113
|
+
define(fn, 'length', length, true, true);
|
|
1114
|
+
} else {
|
|
1115
|
+
define(fn, 'length', length);
|
|
1116
|
+
}
|
|
1320
1117
|
}
|
|
1321
|
-
|
|
1322
|
-
var listHas = function (objects, key) {
|
|
1323
|
-
return !!listGetNode(objects, key);
|
|
1118
|
+
return fn;
|
|
1324
1119
|
};
|
|
1325
1120
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
var
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
return $weakMapHas($wm, key);
|
|
1355
|
-
}
|
|
1356
|
-
} else if ($Map) {
|
|
1357
|
-
if ($m) {
|
|
1358
|
-
return $mapHas($m, key);
|
|
1359
|
-
}
|
|
1360
|
-
} else {
|
|
1361
|
-
if ($o) { // eslint-disable-line no-lonely-if
|
|
1362
|
-
return listHas($o, key);
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
return false;
|
|
1366
|
-
},
|
|
1367
|
-
set: function (key, value) {
|
|
1368
|
-
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1369
|
-
if (!$wm) {
|
|
1370
|
-
$wm = new $WeakMap();
|
|
1371
|
-
}
|
|
1372
|
-
$weakMapSet($wm, key, value);
|
|
1373
|
-
} else if ($Map) {
|
|
1374
|
-
if (!$m) {
|
|
1375
|
-
$m = new $Map();
|
|
1376
|
-
}
|
|
1377
|
-
$mapSet($m, key, value);
|
|
1378
|
-
} else {
|
|
1379
|
-
if (!$o) {
|
|
1380
|
-
/*
|
|
1381
|
-
* Initialize the linked list as an empty node, so that we don't have
|
|
1382
|
-
* to special-case handling of the first node: we can always refer to
|
|
1383
|
-
* it as (previous node).next, instead of something like (list).head
|
|
1384
|
-
*/
|
|
1385
|
-
$o = { key: {}, next: null };
|
|
1386
|
-
}
|
|
1387
|
-
listSet($o, key, value);
|
|
1388
|
-
}
|
|
1121
|
+
callBind$1.exports;
|
|
1122
|
+
|
|
1123
|
+
(function (module) {
|
|
1124
|
+
|
|
1125
|
+
var bind = functionBind;
|
|
1126
|
+
var GetIntrinsic = getIntrinsic;
|
|
1127
|
+
var setFunctionLength$1 = setFunctionLength;
|
|
1128
|
+
|
|
1129
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
1130
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
1131
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
1132
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
1133
|
+
|
|
1134
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
1135
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
1136
|
+
|
|
1137
|
+
if ($defineProperty) {
|
|
1138
|
+
try {
|
|
1139
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1140
|
+
} catch (e) {
|
|
1141
|
+
// IE 8 has a broken defineProperty
|
|
1142
|
+
$defineProperty = null;
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
module.exports = function callBind(originalFunction) {
|
|
1147
|
+
if (typeof originalFunction !== 'function') {
|
|
1148
|
+
throw new $TypeError('a function is required');
|
|
1389
1149
|
}
|
|
1150
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
1151
|
+
return setFunctionLength$1(
|
|
1152
|
+
func,
|
|
1153
|
+
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
|
1154
|
+
true
|
|
1155
|
+
);
|
|
1390
1156
|
};
|
|
1391
|
-
|
|
1157
|
+
|
|
1158
|
+
var applyBind = function applyBind() {
|
|
1159
|
+
return $reflectApply(bind, $apply, arguments);
|
|
1160
|
+
};
|
|
1161
|
+
|
|
1162
|
+
if ($defineProperty) {
|
|
1163
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
1164
|
+
} else {
|
|
1165
|
+
module.exports.apply = applyBind;
|
|
1166
|
+
}
|
|
1167
|
+
} (callBind$1));
|
|
1168
|
+
|
|
1169
|
+
var callBindExports = callBind$1.exports;
|
|
1170
|
+
|
|
1171
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
1172
|
+
|
|
1173
|
+
var callBind = callBindExports;
|
|
1174
|
+
|
|
1175
|
+
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
1176
|
+
|
|
1177
|
+
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
1178
|
+
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
1179
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
1180
|
+
return callBind(intrinsic);
|
|
1181
|
+
}
|
|
1182
|
+
return intrinsic;
|
|
1392
1183
|
};
|
|
1393
1184
|
|
|
1394
|
-
var
|
|
1395
|
-
|
|
1185
|
+
var util_inspect = require$$0.inspect;
|
|
1186
|
+
|
|
1187
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
1188
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
1189
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
1190
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
1191
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
1192
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
1193
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
1194
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
1195
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
1196
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
1197
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
1198
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
1199
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
1200
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
1201
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
1202
|
+
var objectToString = Object.prototype.toString;
|
|
1203
|
+
var functionToString = Function.prototype.toString;
|
|
1204
|
+
var $match = String.prototype.match;
|
|
1205
|
+
var $slice = String.prototype.slice;
|
|
1206
|
+
var $replace = String.prototype.replace;
|
|
1207
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
1208
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
1209
|
+
var $test = RegExp.prototype.test;
|
|
1210
|
+
var $concat = Array.prototype.concat;
|
|
1211
|
+
var $join = Array.prototype.join;
|
|
1212
|
+
var $arrSlice = Array.prototype.slice;
|
|
1213
|
+
var $floor = Math.floor;
|
|
1214
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
1215
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
1216
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
1217
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
1218
|
+
// ie, `has-tostringtag/shams
|
|
1219
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
1220
|
+
? Symbol.toStringTag
|
|
1221
|
+
: null;
|
|
1222
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1223
|
+
|
|
1224
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
1225
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
1226
|
+
? function (O) {
|
|
1227
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
1228
|
+
}
|
|
1229
|
+
: null
|
|
1230
|
+
);
|
|
1231
|
+
|
|
1232
|
+
function addNumericSeparator(num, str) {
|
|
1233
|
+
if (
|
|
1234
|
+
num === Infinity
|
|
1235
|
+
|| num === -Infinity
|
|
1236
|
+
|| num !== num
|
|
1237
|
+
|| (num && num > -1000 && num < 1000)
|
|
1238
|
+
|| $test.call(/e/, str)
|
|
1239
|
+
) {
|
|
1240
|
+
return str;
|
|
1241
|
+
}
|
|
1242
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
1243
|
+
if (typeof num === 'number') {
|
|
1244
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
1245
|
+
if (int !== num) {
|
|
1246
|
+
var intStr = String(int);
|
|
1247
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
1248
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
var utilInspect = util_inspect;
|
|
1255
|
+
var inspectCustom = utilInspect.custom;
|
|
1256
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
1396
1257
|
|
|
1397
|
-
var
|
|
1398
|
-
|
|
1399
|
-
RFC3986: 'RFC3986'
|
|
1400
|
-
};
|
|
1258
|
+
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
1259
|
+
var opts = options || {};
|
|
1401
1260
|
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1261
|
+
if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
1262
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1263
|
+
}
|
|
1264
|
+
if (
|
|
1265
|
+
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
1266
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
1267
|
+
: opts.maxStringLength !== null
|
|
1268
|
+
)
|
|
1269
|
+
) {
|
|
1270
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
1271
|
+
}
|
|
1272
|
+
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
1273
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
1274
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
1275
|
+
}
|
|
1415
1276
|
|
|
1416
|
-
|
|
1277
|
+
if (
|
|
1278
|
+
has$3(opts, 'indent')
|
|
1279
|
+
&& opts.indent !== null
|
|
1280
|
+
&& opts.indent !== '\t'
|
|
1281
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
1282
|
+
) {
|
|
1283
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
1284
|
+
}
|
|
1285
|
+
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
1286
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
1287
|
+
}
|
|
1288
|
+
var numericSeparator = opts.numericSeparator;
|
|
1417
1289
|
|
|
1418
|
-
|
|
1419
|
-
|
|
1290
|
+
if (typeof obj === 'undefined') {
|
|
1291
|
+
return 'undefined';
|
|
1292
|
+
}
|
|
1293
|
+
if (obj === null) {
|
|
1294
|
+
return 'null';
|
|
1295
|
+
}
|
|
1296
|
+
if (typeof obj === 'boolean') {
|
|
1297
|
+
return obj ? 'true' : 'false';
|
|
1298
|
+
}
|
|
1420
1299
|
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1300
|
+
if (typeof obj === 'string') {
|
|
1301
|
+
return inspectString(obj, opts);
|
|
1302
|
+
}
|
|
1303
|
+
if (typeof obj === 'number') {
|
|
1304
|
+
if (obj === 0) {
|
|
1305
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
1306
|
+
}
|
|
1307
|
+
var str = String(obj);
|
|
1308
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
1309
|
+
}
|
|
1310
|
+
if (typeof obj === 'bigint') {
|
|
1311
|
+
var bigIntStr = String(obj) + 'n';
|
|
1312
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
1425
1313
|
}
|
|
1426
1314
|
|
|
1427
|
-
|
|
1428
|
-
|
|
1315
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
1316
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
1317
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
1318
|
+
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
1319
|
+
}
|
|
1429
1320
|
|
|
1430
|
-
var
|
|
1431
|
-
while (queue.length > 1) {
|
|
1432
|
-
var item = queue.pop();
|
|
1433
|
-
var obj = item.obj[item.prop];
|
|
1321
|
+
var indent = getIndent(opts, depth);
|
|
1434
1322
|
|
|
1435
|
-
|
|
1436
|
-
|
|
1323
|
+
if (typeof seen === 'undefined') {
|
|
1324
|
+
seen = [];
|
|
1325
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
1326
|
+
return '[Circular]';
|
|
1327
|
+
}
|
|
1437
1328
|
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1329
|
+
function inspect(value, from, noIndent) {
|
|
1330
|
+
if (from) {
|
|
1331
|
+
seen = $arrSlice.call(seen);
|
|
1332
|
+
seen.push(from);
|
|
1333
|
+
}
|
|
1334
|
+
if (noIndent) {
|
|
1335
|
+
var newOpts = {
|
|
1336
|
+
depth: opts.depth
|
|
1337
|
+
};
|
|
1338
|
+
if (has$3(opts, 'quoteStyle')) {
|
|
1339
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
1442
1340
|
}
|
|
1341
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
1342
|
+
}
|
|
1343
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
1344
|
+
}
|
|
1443
1345
|
|
|
1444
|
-
|
|
1346
|
+
if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
|
|
1347
|
+
var name = nameOf(obj);
|
|
1348
|
+
var keys = arrObjKeys(obj, inspect);
|
|
1349
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
1350
|
+
}
|
|
1351
|
+
if (isSymbol(obj)) {
|
|
1352
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
1353
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
1354
|
+
}
|
|
1355
|
+
if (isElement(obj)) {
|
|
1356
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
1357
|
+
var attrs = obj.attributes || [];
|
|
1358
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
1359
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
1360
|
+
}
|
|
1361
|
+
s += '>';
|
|
1362
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
1363
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
1364
|
+
return s;
|
|
1365
|
+
}
|
|
1366
|
+
if (isArray$3(obj)) {
|
|
1367
|
+
if (obj.length === 0) { return '[]'; }
|
|
1368
|
+
var xs = arrObjKeys(obj, inspect);
|
|
1369
|
+
if (indent && !singleLineValues(xs)) {
|
|
1370
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
1371
|
+
}
|
|
1372
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
1373
|
+
}
|
|
1374
|
+
if (isError(obj)) {
|
|
1375
|
+
var parts = arrObjKeys(obj, inspect);
|
|
1376
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
1377
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
1378
|
+
}
|
|
1379
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
1380
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
1381
|
+
}
|
|
1382
|
+
if (typeof obj === 'object' && customInspect) {
|
|
1383
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
1384
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
1385
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
1386
|
+
return obj.inspect();
|
|
1387
|
+
}
|
|
1388
|
+
}
|
|
1389
|
+
if (isMap(obj)) {
|
|
1390
|
+
var mapParts = [];
|
|
1391
|
+
if (mapForEach) {
|
|
1392
|
+
mapForEach.call(obj, function (value, key) {
|
|
1393
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
1394
|
+
});
|
|
1395
|
+
}
|
|
1396
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
1397
|
+
}
|
|
1398
|
+
if (isSet(obj)) {
|
|
1399
|
+
var setParts = [];
|
|
1400
|
+
if (setForEach) {
|
|
1401
|
+
setForEach.call(obj, function (value) {
|
|
1402
|
+
setParts.push(inspect(value, obj));
|
|
1403
|
+
});
|
|
1404
|
+
}
|
|
1405
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
1406
|
+
}
|
|
1407
|
+
if (isWeakMap(obj)) {
|
|
1408
|
+
return weakCollectionOf('WeakMap');
|
|
1409
|
+
}
|
|
1410
|
+
if (isWeakSet(obj)) {
|
|
1411
|
+
return weakCollectionOf('WeakSet');
|
|
1412
|
+
}
|
|
1413
|
+
if (isWeakRef(obj)) {
|
|
1414
|
+
return weakCollectionOf('WeakRef');
|
|
1415
|
+
}
|
|
1416
|
+
if (isNumber(obj)) {
|
|
1417
|
+
return markBoxed(inspect(Number(obj)));
|
|
1418
|
+
}
|
|
1419
|
+
if (isBigInt(obj)) {
|
|
1420
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
1421
|
+
}
|
|
1422
|
+
if (isBoolean(obj)) {
|
|
1423
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
1424
|
+
}
|
|
1425
|
+
if (isString(obj)) {
|
|
1426
|
+
return markBoxed(inspect(String(obj)));
|
|
1427
|
+
}
|
|
1428
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
1429
|
+
/* eslint-env browser */
|
|
1430
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
1431
|
+
return '{ [object Window] }';
|
|
1432
|
+
}
|
|
1433
|
+
if (obj === commonjsGlobal) {
|
|
1434
|
+
return '{ [object globalThis] }';
|
|
1435
|
+
}
|
|
1436
|
+
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
1437
|
+
var ys = arrObjKeys(obj, inspect);
|
|
1438
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
1439
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
1440
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
1441
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
1442
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
1443
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
1444
|
+
if (indent) {
|
|
1445
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
1445
1446
|
}
|
|
1447
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
1446
1448
|
}
|
|
1449
|
+
return String(obj);
|
|
1447
1450
|
};
|
|
1448
1451
|
|
|
1449
|
-
|
|
1450
|
-
var
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1452
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
1453
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
1454
|
+
return quoteChar + s + quoteChar;
|
|
1455
|
+
}
|
|
1456
|
+
|
|
1457
|
+
function quote(s) {
|
|
1458
|
+
return $replace.call(String(s), /"/g, '"');
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1462
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1463
|
+
function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1464
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1465
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1466
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1467
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
1468
|
+
|
|
1469
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
1470
|
+
function isSymbol(obj) {
|
|
1471
|
+
if (hasShammedSymbols) {
|
|
1472
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
1473
|
+
}
|
|
1474
|
+
if (typeof obj === 'symbol') {
|
|
1475
|
+
return true;
|
|
1476
|
+
}
|
|
1477
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
1478
|
+
return false;
|
|
1479
|
+
}
|
|
1480
|
+
try {
|
|
1481
|
+
symToString.call(obj);
|
|
1482
|
+
return true;
|
|
1483
|
+
} catch (e) {}
|
|
1484
|
+
return false;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
function isBigInt(obj) {
|
|
1488
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
1489
|
+
return false;
|
|
1455
1490
|
}
|
|
1491
|
+
try {
|
|
1492
|
+
bigIntValueOf.call(obj);
|
|
1493
|
+
return true;
|
|
1494
|
+
} catch (e) {}
|
|
1495
|
+
return false;
|
|
1496
|
+
}
|
|
1456
1497
|
|
|
1457
|
-
|
|
1458
|
-
|
|
1498
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
1499
|
+
function has$3(obj, key) {
|
|
1500
|
+
return hasOwn.call(obj, key);
|
|
1501
|
+
}
|
|
1459
1502
|
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
return target;
|
|
1464
|
-
}
|
|
1503
|
+
function toStr(obj) {
|
|
1504
|
+
return objectToString.call(obj);
|
|
1505
|
+
}
|
|
1465
1506
|
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
}
|
|
1473
|
-
} else {
|
|
1474
|
-
return [target, source];
|
|
1475
|
-
}
|
|
1507
|
+
function nameOf(f) {
|
|
1508
|
+
if (f.name) { return f.name; }
|
|
1509
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
1510
|
+
if (m) { return m[1]; }
|
|
1511
|
+
return null;
|
|
1512
|
+
}
|
|
1476
1513
|
|
|
1477
|
-
|
|
1514
|
+
function indexOf(xs, x) {
|
|
1515
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
1516
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
1517
|
+
if (xs[i] === x) { return i; }
|
|
1478
1518
|
}
|
|
1519
|
+
return -1;
|
|
1520
|
+
}
|
|
1479
1521
|
|
|
1480
|
-
|
|
1481
|
-
|
|
1522
|
+
function isMap(x) {
|
|
1523
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
1524
|
+
return false;
|
|
1482
1525
|
}
|
|
1526
|
+
try {
|
|
1527
|
+
mapSize.call(x);
|
|
1528
|
+
try {
|
|
1529
|
+
setSize.call(x);
|
|
1530
|
+
} catch (s) {
|
|
1531
|
+
return true;
|
|
1532
|
+
}
|
|
1533
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
1534
|
+
} catch (e) {}
|
|
1535
|
+
return false;
|
|
1536
|
+
}
|
|
1483
1537
|
|
|
1484
|
-
|
|
1485
|
-
if (
|
|
1486
|
-
|
|
1538
|
+
function isWeakMap(x) {
|
|
1539
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
1540
|
+
return false;
|
|
1487
1541
|
}
|
|
1542
|
+
try {
|
|
1543
|
+
weakMapHas.call(x, weakMapHas);
|
|
1544
|
+
try {
|
|
1545
|
+
weakSetHas.call(x, weakSetHas);
|
|
1546
|
+
} catch (s) {
|
|
1547
|
+
return true;
|
|
1548
|
+
}
|
|
1549
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
1550
|
+
} catch (e) {}
|
|
1551
|
+
return false;
|
|
1552
|
+
}
|
|
1488
1553
|
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
var targetItem = target[i];
|
|
1493
|
-
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
1494
|
-
target[i] = merge(targetItem, item, options);
|
|
1495
|
-
} else {
|
|
1496
|
-
target.push(item);
|
|
1497
|
-
}
|
|
1498
|
-
} else {
|
|
1499
|
-
target[i] = item;
|
|
1500
|
-
}
|
|
1501
|
-
});
|
|
1502
|
-
return target;
|
|
1554
|
+
function isWeakRef(x) {
|
|
1555
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
1556
|
+
return false;
|
|
1503
1557
|
}
|
|
1558
|
+
try {
|
|
1559
|
+
weakRefDeref.call(x);
|
|
1560
|
+
return true;
|
|
1561
|
+
} catch (e) {}
|
|
1562
|
+
return false;
|
|
1563
|
+
}
|
|
1504
1564
|
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1565
|
+
function isSet(x) {
|
|
1566
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
1567
|
+
return false;
|
|
1568
|
+
}
|
|
1569
|
+
try {
|
|
1570
|
+
setSize.call(x);
|
|
1571
|
+
try {
|
|
1572
|
+
mapSize.call(x);
|
|
1573
|
+
} catch (m) {
|
|
1574
|
+
return true;
|
|
1512
1575
|
}
|
|
1513
|
-
return
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
var assign = function assignSingleSource(target, source) {
|
|
1518
|
-
return Object.keys(source).reduce(function (acc, key) {
|
|
1519
|
-
acc[key] = source[key];
|
|
1520
|
-
return acc;
|
|
1521
|
-
}, target);
|
|
1522
|
-
};
|
|
1576
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
1577
|
+
} catch (e) {}
|
|
1578
|
+
return false;
|
|
1579
|
+
}
|
|
1523
1580
|
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
// unescape never throws, no try...catch needed:
|
|
1528
|
-
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
1581
|
+
function isWeakSet(x) {
|
|
1582
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
1583
|
+
return false;
|
|
1529
1584
|
}
|
|
1530
|
-
// utf-8
|
|
1531
1585
|
try {
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1586
|
+
weakSetHas.call(x, weakSetHas);
|
|
1587
|
+
try {
|
|
1588
|
+
weakMapHas.call(x, weakMapHas);
|
|
1589
|
+
} catch (s) {
|
|
1590
|
+
return true;
|
|
1591
|
+
}
|
|
1592
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
1593
|
+
} catch (e) {}
|
|
1594
|
+
return false;
|
|
1595
|
+
}
|
|
1537
1596
|
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
return str;
|
|
1597
|
+
function isElement(x) {
|
|
1598
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
1599
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
1600
|
+
return true;
|
|
1543
1601
|
}
|
|
1602
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
1603
|
+
}
|
|
1544
1604
|
|
|
1545
|
-
|
|
1546
|
-
if (
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1605
|
+
function inspectString(str, opts) {
|
|
1606
|
+
if (str.length > opts.maxStringLength) {
|
|
1607
|
+
var remaining = str.length - opts.maxStringLength;
|
|
1608
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
1609
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
1550
1610
|
}
|
|
1611
|
+
// eslint-disable-next-line no-control-regex
|
|
1612
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
1613
|
+
return wrapQuotes(s, 'single', opts);
|
|
1614
|
+
}
|
|
1551
1615
|
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1616
|
+
function lowbyte(c) {
|
|
1617
|
+
var n = c.charCodeAt(0);
|
|
1618
|
+
var x = {
|
|
1619
|
+
8: 'b',
|
|
1620
|
+
9: 't',
|
|
1621
|
+
10: 'n',
|
|
1622
|
+
12: 'f',
|
|
1623
|
+
13: 'r'
|
|
1624
|
+
}[n];
|
|
1625
|
+
if (x) { return '\\' + x; }
|
|
1626
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
1627
|
+
}
|
|
1557
1628
|
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1629
|
+
function markBoxed(str) {
|
|
1630
|
+
return 'Object(' + str + ')';
|
|
1631
|
+
}
|
|
1561
1632
|
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1633
|
+
function weakCollectionOf(type) {
|
|
1634
|
+
return type + ' { ? }';
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1637
|
+
function collectionOf(type, size, entries, indent) {
|
|
1638
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
1639
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
function singleLineValues(xs) {
|
|
1643
|
+
for (var i = 0; i < xs.length; i++) {
|
|
1644
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
1645
|
+
return false;
|
|
1574
1646
|
}
|
|
1647
|
+
}
|
|
1648
|
+
return true;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
function getIndent(opts, depth) {
|
|
1652
|
+
var baseIndent;
|
|
1653
|
+
if (opts.indent === '\t') {
|
|
1654
|
+
baseIndent = '\t';
|
|
1655
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
1656
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
1657
|
+
} else {
|
|
1658
|
+
return null;
|
|
1659
|
+
}
|
|
1660
|
+
return {
|
|
1661
|
+
base: baseIndent,
|
|
1662
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1575
1665
|
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1666
|
+
function indentedJoin(xs, indent) {
|
|
1667
|
+
if (xs.length === 0) { return ''; }
|
|
1668
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
1669
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
1670
|
+
}
|
|
1580
1671
|
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1672
|
+
function arrObjKeys(obj, inspect) {
|
|
1673
|
+
var isArr = isArray$3(obj);
|
|
1674
|
+
var xs = [];
|
|
1675
|
+
if (isArr) {
|
|
1676
|
+
xs.length = obj.length;
|
|
1677
|
+
for (var i = 0; i < obj.length; i++) {
|
|
1678
|
+
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
1584
1679
|
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1680
|
+
}
|
|
1681
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
1682
|
+
var symMap;
|
|
1683
|
+
if (hasShammedSymbols) {
|
|
1684
|
+
symMap = {};
|
|
1685
|
+
for (var k = 0; k < syms.length; k++) {
|
|
1686
|
+
symMap['$' + syms[k]] = syms[k];
|
|
1589
1687
|
}
|
|
1590
|
-
|
|
1591
|
-
i += 1;
|
|
1592
|
-
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
1593
|
-
/* eslint operator-linebreak: [2, "before"] */
|
|
1594
|
-
out += hexTable[0xF0 | (c >> 18)]
|
|
1595
|
-
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
1596
|
-
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
1597
|
-
+ hexTable[0x80 | (c & 0x3F)];
|
|
1598
1688
|
}
|
|
1599
1689
|
|
|
1600
|
-
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
queue.push({ obj: obj, prop: key });
|
|
1617
|
-
refs.push(val);
|
|
1690
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
1691
|
+
if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1692
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
1693
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
1694
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
1695
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
1696
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
1697
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
1698
|
+
} else {
|
|
1699
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
if (typeof gOPS === 'function') {
|
|
1703
|
+
for (var j = 0; j < syms.length; j++) {
|
|
1704
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
1705
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
1618
1706
|
}
|
|
1619
1707
|
}
|
|
1620
1708
|
}
|
|
1709
|
+
return xs;
|
|
1710
|
+
}
|
|
1621
1711
|
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
};
|
|
1712
|
+
var GetIntrinsic = getIntrinsic;
|
|
1713
|
+
var callBound = callBound$1;
|
|
1714
|
+
var inspect = objectInspect;
|
|
1626
1715
|
|
|
1627
|
-
var
|
|
1628
|
-
|
|
1629
|
-
|
|
1716
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
1717
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
1718
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
1630
1719
|
|
|
1631
|
-
var
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1720
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
1721
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
1722
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
1723
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
1724
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
1725
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
1635
1726
|
|
|
1636
|
-
|
|
1727
|
+
/*
|
|
1728
|
+
* This function traverses the list returning the node corresponding to the
|
|
1729
|
+
* given key.
|
|
1730
|
+
*
|
|
1731
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
1732
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
1733
|
+
* used nodes can be accessed relatively quickly.
|
|
1734
|
+
*/
|
|
1735
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
1736
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
1737
|
+
if (curr.key === key) {
|
|
1738
|
+
prev.next = curr.next;
|
|
1739
|
+
curr.next = list.next;
|
|
1740
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1741
|
+
return curr;
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1637
1744
|
};
|
|
1638
1745
|
|
|
1639
|
-
var
|
|
1640
|
-
|
|
1746
|
+
var listGet = function (objects, key) {
|
|
1747
|
+
var node = listGetNode(objects, key);
|
|
1748
|
+
return node && node.value;
|
|
1641
1749
|
};
|
|
1642
|
-
|
|
1643
|
-
var
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1750
|
+
var listSet = function (objects, key, value) {
|
|
1751
|
+
var node = listGetNode(objects, key);
|
|
1752
|
+
if (node) {
|
|
1753
|
+
node.value = value;
|
|
1754
|
+
} else {
|
|
1755
|
+
// Prepend the new node to the beginning of the list
|
|
1756
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
1757
|
+
key: key,
|
|
1758
|
+
next: objects.next,
|
|
1759
|
+
value: value
|
|
1760
|
+
};
|
|
1761
|
+
}
|
|
1762
|
+
};
|
|
1763
|
+
var listHas = function (objects, key) {
|
|
1764
|
+
return !!listGetNode(objects, key);
|
|
1652
1765
|
};
|
|
1653
1766
|
|
|
1654
|
-
var
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1767
|
+
var sideChannel = function getSideChannel() {
|
|
1768
|
+
var $wm;
|
|
1769
|
+
var $m;
|
|
1770
|
+
var $o;
|
|
1771
|
+
var channel = {
|
|
1772
|
+
assert: function (key) {
|
|
1773
|
+
if (!channel.has(key)) {
|
|
1774
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
1775
|
+
}
|
|
1776
|
+
},
|
|
1777
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
1778
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1779
|
+
if ($wm) {
|
|
1780
|
+
return $weakMapGet($wm, key);
|
|
1781
|
+
}
|
|
1782
|
+
} else if ($Map) {
|
|
1783
|
+
if ($m) {
|
|
1784
|
+
return $mapGet($m, key);
|
|
1785
|
+
}
|
|
1786
|
+
} else {
|
|
1787
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
1788
|
+
return listGet($o, key);
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
},
|
|
1792
|
+
has: function (key) {
|
|
1793
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1794
|
+
if ($wm) {
|
|
1795
|
+
return $weakMapHas($wm, key);
|
|
1796
|
+
}
|
|
1797
|
+
} else if ($Map) {
|
|
1798
|
+
if ($m) {
|
|
1799
|
+
return $mapHas($m, key);
|
|
1800
|
+
}
|
|
1801
|
+
} else {
|
|
1802
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
1803
|
+
return listHas($o, key);
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
return false;
|
|
1807
|
+
},
|
|
1808
|
+
set: function (key, value) {
|
|
1809
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
1810
|
+
if (!$wm) {
|
|
1811
|
+
$wm = new $WeakMap();
|
|
1812
|
+
}
|
|
1813
|
+
$weakMapSet($wm, key, value);
|
|
1814
|
+
} else if ($Map) {
|
|
1815
|
+
if (!$m) {
|
|
1816
|
+
$m = new $Map();
|
|
1817
|
+
}
|
|
1818
|
+
$mapSet($m, key, value);
|
|
1819
|
+
} else {
|
|
1820
|
+
if (!$o) {
|
|
1821
|
+
/*
|
|
1822
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
1823
|
+
* to special-case handling of the first node: we can always refer to
|
|
1824
|
+
* it as (previous node).next, instead of something like (list).head
|
|
1825
|
+
*/
|
|
1826
|
+
$o = { key: {}, next: null };
|
|
1827
|
+
}
|
|
1828
|
+
listSet($o, key, value);
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
};
|
|
1832
|
+
return channel;
|
|
1665
1833
|
};
|
|
1666
1834
|
|
|
1667
|
-
var
|
|
1668
|
-
var
|
|
1669
|
-
var formats$1 = formats$3;
|
|
1670
|
-
var has$1 = Object.prototype.hasOwnProperty;
|
|
1835
|
+
var replace = String.prototype.replace;
|
|
1836
|
+
var percentTwenties = /%20/g;
|
|
1671
1837
|
|
|
1672
|
-
var
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1838
|
+
var Format = {
|
|
1839
|
+
RFC1738: 'RFC1738',
|
|
1840
|
+
RFC3986: 'RFC3986'
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
var formats$3 = {
|
|
1844
|
+
'default': Format.RFC3986,
|
|
1845
|
+
formatters: {
|
|
1846
|
+
RFC1738: function (value) {
|
|
1847
|
+
return replace.call(value, percentTwenties, '+');
|
|
1848
|
+
},
|
|
1849
|
+
RFC3986: function (value) {
|
|
1850
|
+
return String(value);
|
|
1851
|
+
}
|
|
1679
1852
|
},
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
}
|
|
1853
|
+
RFC1738: Format.RFC1738,
|
|
1854
|
+
RFC3986: Format.RFC3986
|
|
1683
1855
|
};
|
|
1684
1856
|
|
|
1685
|
-
var
|
|
1686
|
-
var split = String.prototype.split;
|
|
1687
|
-
var push = Array.prototype.push;
|
|
1688
|
-
var pushToArray = function (arr, valueOrArray) {
|
|
1689
|
-
push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
1690
|
-
};
|
|
1857
|
+
var formats$2 = formats$3;
|
|
1691
1858
|
|
|
1692
|
-
var
|
|
1859
|
+
var has$2 = Object.prototype.hasOwnProperty;
|
|
1860
|
+
var isArray$2 = Array.isArray;
|
|
1693
1861
|
|
|
1694
|
-
var
|
|
1695
|
-
var
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
charsetSentinel: false,
|
|
1700
|
-
delimiter: '&',
|
|
1701
|
-
encode: true,
|
|
1702
|
-
encoder: utils$1.encode,
|
|
1703
|
-
encodeValuesOnly: false,
|
|
1704
|
-
format: defaultFormat,
|
|
1705
|
-
formatter: formats$1.formatters[defaultFormat],
|
|
1706
|
-
// deprecated
|
|
1707
|
-
indices: false,
|
|
1708
|
-
serializeDate: function serializeDate(date) {
|
|
1709
|
-
return toISO.call(date);
|
|
1710
|
-
},
|
|
1711
|
-
skipNulls: false,
|
|
1712
|
-
strictNullHandling: false
|
|
1713
|
-
};
|
|
1862
|
+
var hexTable = (function () {
|
|
1863
|
+
var array = [];
|
|
1864
|
+
for (var i = 0; i < 256; ++i) {
|
|
1865
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
1866
|
+
}
|
|
1714
1867
|
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|| typeof v === 'number'
|
|
1718
|
-
|| typeof v === 'boolean'
|
|
1719
|
-
|| typeof v === 'symbol'
|
|
1720
|
-
|| typeof v === 'bigint';
|
|
1721
|
-
};
|
|
1868
|
+
return array;
|
|
1869
|
+
}());
|
|
1722
1870
|
|
|
1723
|
-
var
|
|
1871
|
+
var compactQueue = function compactQueue(queue) {
|
|
1872
|
+
while (queue.length > 1) {
|
|
1873
|
+
var item = queue.pop();
|
|
1874
|
+
var obj = item.obj[item.prop];
|
|
1724
1875
|
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
prefix,
|
|
1728
|
-
generateArrayPrefix,
|
|
1729
|
-
commaRoundTrip,
|
|
1730
|
-
strictNullHandling,
|
|
1731
|
-
skipNulls,
|
|
1732
|
-
encoder,
|
|
1733
|
-
filter,
|
|
1734
|
-
sort,
|
|
1735
|
-
allowDots,
|
|
1736
|
-
serializeDate,
|
|
1737
|
-
format,
|
|
1738
|
-
formatter,
|
|
1739
|
-
encodeValuesOnly,
|
|
1740
|
-
charset,
|
|
1741
|
-
sideChannel
|
|
1742
|
-
) {
|
|
1743
|
-
var obj = object;
|
|
1876
|
+
if (isArray$2(obj)) {
|
|
1877
|
+
var compacted = [];
|
|
1744
1878
|
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
// Where object last appeared in the ref tree
|
|
1750
|
-
var pos = tmpSc.get(object);
|
|
1751
|
-
step += 1;
|
|
1752
|
-
if (typeof pos !== 'undefined') {
|
|
1753
|
-
if (pos === step) {
|
|
1754
|
-
throw new RangeError('Cyclic object value');
|
|
1755
|
-
} else {
|
|
1756
|
-
findFlag = true; // Break while
|
|
1879
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
1880
|
+
if (typeof obj[j] !== 'undefined') {
|
|
1881
|
+
compacted.push(obj[j]);
|
|
1882
|
+
}
|
|
1757
1883
|
}
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
step = 0;
|
|
1884
|
+
|
|
1885
|
+
item.obj[item.prop] = compacted;
|
|
1761
1886
|
}
|
|
1762
1887
|
}
|
|
1888
|
+
};
|
|
1763
1889
|
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
if (value instanceof Date) {
|
|
1771
|
-
return serializeDate(value);
|
|
1772
|
-
}
|
|
1773
|
-
return value;
|
|
1774
|
-
});
|
|
1890
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
1891
|
+
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
1892
|
+
for (var i = 0; i < source.length; ++i) {
|
|
1893
|
+
if (typeof source[i] !== 'undefined') {
|
|
1894
|
+
obj[i] = source[i];
|
|
1895
|
+
}
|
|
1775
1896
|
}
|
|
1776
1897
|
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
|
|
1780
|
-
}
|
|
1898
|
+
return obj;
|
|
1899
|
+
};
|
|
1781
1900
|
|
|
1782
|
-
|
|
1901
|
+
var merge = function merge(target, source, options) {
|
|
1902
|
+
/* eslint no-param-reassign: 0 */
|
|
1903
|
+
if (!source) {
|
|
1904
|
+
return target;
|
|
1783
1905
|
}
|
|
1784
1906
|
|
|
1785
|
-
if (
|
|
1786
|
-
if (
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
for (var i = 0; i < valuesArray.length; ++i) {
|
|
1792
|
-
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
|
|
1793
|
-
}
|
|
1794
|
-
return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
1907
|
+
if (typeof source !== 'object') {
|
|
1908
|
+
if (isArray$2(target)) {
|
|
1909
|
+
target.push(source);
|
|
1910
|
+
} else if (target && typeof target === 'object') {
|
|
1911
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
|
|
1912
|
+
target[source] = true;
|
|
1795
1913
|
}
|
|
1796
|
-
|
|
1914
|
+
} else {
|
|
1915
|
+
return [target, source];
|
|
1797
1916
|
}
|
|
1798
|
-
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
1799
|
-
}
|
|
1800
1917
|
|
|
1801
|
-
|
|
1918
|
+
return target;
|
|
1919
|
+
}
|
|
1802
1920
|
|
|
1803
|
-
if (typeof
|
|
1804
|
-
return
|
|
1921
|
+
if (!target || typeof target !== 'object') {
|
|
1922
|
+
return [target].concat(source);
|
|
1805
1923
|
}
|
|
1806
1924
|
|
|
1807
|
-
var
|
|
1808
|
-
if (
|
|
1809
|
-
|
|
1810
|
-
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
1811
|
-
} else if (isArray$1(filter)) {
|
|
1812
|
-
objKeys = filter;
|
|
1813
|
-
} else {
|
|
1814
|
-
var keys = Object.keys(obj);
|
|
1815
|
-
objKeys = sort ? keys.sort(sort) : keys;
|
|
1925
|
+
var mergeTarget = target;
|
|
1926
|
+
if (isArray$2(target) && !isArray$2(source)) {
|
|
1927
|
+
mergeTarget = arrayToObject(target, options);
|
|
1816
1928
|
}
|
|
1817
1929
|
|
|
1818
|
-
|
|
1930
|
+
if (isArray$2(target) && isArray$2(source)) {
|
|
1931
|
+
source.forEach(function (item, i) {
|
|
1932
|
+
if (has$2.call(target, i)) {
|
|
1933
|
+
var targetItem = target[i];
|
|
1934
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
1935
|
+
target[i] = merge(targetItem, item, options);
|
|
1936
|
+
} else {
|
|
1937
|
+
target.push(item);
|
|
1938
|
+
}
|
|
1939
|
+
} else {
|
|
1940
|
+
target[i] = item;
|
|
1941
|
+
}
|
|
1942
|
+
});
|
|
1943
|
+
return target;
|
|
1944
|
+
}
|
|
1819
1945
|
|
|
1820
|
-
|
|
1821
|
-
var
|
|
1822
|
-
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
1946
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
1947
|
+
var value = source[key];
|
|
1823
1948
|
|
|
1824
|
-
if (
|
|
1825
|
-
|
|
1949
|
+
if (has$2.call(acc, key)) {
|
|
1950
|
+
acc[key] = merge(acc[key], value, options);
|
|
1951
|
+
} else {
|
|
1952
|
+
acc[key] = value;
|
|
1826
1953
|
}
|
|
1954
|
+
return acc;
|
|
1955
|
+
}, mergeTarget);
|
|
1956
|
+
};
|
|
1827
1957
|
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1958
|
+
var assign = function assignSingleSource(target, source) {
|
|
1959
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
1960
|
+
acc[key] = source[key];
|
|
1961
|
+
return acc;
|
|
1962
|
+
}, target);
|
|
1963
|
+
};
|
|
1831
1964
|
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
filter,
|
|
1844
|
-
sort,
|
|
1845
|
-
allowDots,
|
|
1846
|
-
serializeDate,
|
|
1847
|
-
format,
|
|
1848
|
-
formatter,
|
|
1849
|
-
encodeValuesOnly,
|
|
1850
|
-
charset,
|
|
1851
|
-
valueSideChannel
|
|
1852
|
-
));
|
|
1965
|
+
var decode = function (str, decoder, charset) {
|
|
1966
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
1967
|
+
if (charset === 'iso-8859-1') {
|
|
1968
|
+
// unescape never throws, no try...catch needed:
|
|
1969
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
1970
|
+
}
|
|
1971
|
+
// utf-8
|
|
1972
|
+
try {
|
|
1973
|
+
return decodeURIComponent(strWithoutPlus);
|
|
1974
|
+
} catch (e) {
|
|
1975
|
+
return strWithoutPlus;
|
|
1853
1976
|
}
|
|
1854
|
-
|
|
1855
|
-
return values;
|
|
1856
1977
|
};
|
|
1857
1978
|
|
|
1858
|
-
var
|
|
1859
|
-
|
|
1860
|
-
|
|
1979
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
1980
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
1981
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
1982
|
+
if (str.length === 0) {
|
|
1983
|
+
return str;
|
|
1984
|
+
}
|
|
1985
|
+
|
|
1986
|
+
var string = str;
|
|
1987
|
+
if (typeof str === 'symbol') {
|
|
1988
|
+
string = Symbol.prototype.toString.call(str);
|
|
1989
|
+
} else if (typeof str !== 'string') {
|
|
1990
|
+
string = String(str);
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
if (charset === 'iso-8859-1') {
|
|
1994
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
1995
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
1996
|
+
});
|
|
1861
1997
|
}
|
|
1862
1998
|
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1999
|
+
var out = '';
|
|
2000
|
+
for (var i = 0; i < string.length; ++i) {
|
|
2001
|
+
var c = string.charCodeAt(i);
|
|
2002
|
+
|
|
2003
|
+
if (
|
|
2004
|
+
c === 0x2D // -
|
|
2005
|
+
|| c === 0x2E // .
|
|
2006
|
+
|| c === 0x5F // _
|
|
2007
|
+
|| c === 0x7E // ~
|
|
2008
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
2009
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
2010
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
2011
|
+
|| (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
2012
|
+
) {
|
|
2013
|
+
out += string.charAt(i);
|
|
2014
|
+
continue;
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
if (c < 0x80) {
|
|
2018
|
+
out = out + hexTable[c];
|
|
2019
|
+
continue;
|
|
2020
|
+
}
|
|
1866
2021
|
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
2022
|
+
if (c < 0x800) {
|
|
2023
|
+
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
|
2024
|
+
continue;
|
|
2025
|
+
}
|
|
1871
2026
|
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
throw new TypeError('Unknown format option provided.');
|
|
2027
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
2028
|
+
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
|
2029
|
+
continue;
|
|
1876
2030
|
}
|
|
1877
|
-
format = opts.format;
|
|
1878
|
-
}
|
|
1879
|
-
var formatter = formats$1.formatters[format];
|
|
1880
2031
|
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
2032
|
+
i += 1;
|
|
2033
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
2034
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
2035
|
+
out += hexTable[0xF0 | (c >> 18)]
|
|
2036
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
2037
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
2038
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
1884
2039
|
}
|
|
1885
2040
|
|
|
1886
|
-
return
|
|
1887
|
-
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
|
|
1888
|
-
allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
|
|
1889
|
-
charset: charset,
|
|
1890
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
1891
|
-
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
1892
|
-
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
1893
|
-
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
|
|
1894
|
-
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
|
|
1895
|
-
filter: filter,
|
|
1896
|
-
format: format,
|
|
1897
|
-
formatter: formatter,
|
|
1898
|
-
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
|
|
1899
|
-
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
|
|
1900
|
-
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
1901
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
|
|
1902
|
-
};
|
|
2041
|
+
return out;
|
|
1903
2042
|
};
|
|
1904
2043
|
|
|
1905
|
-
var
|
|
1906
|
-
var
|
|
1907
|
-
var
|
|
2044
|
+
var compact = function compact(value) {
|
|
2045
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
2046
|
+
var refs = [];
|
|
1908
2047
|
|
|
1909
|
-
var
|
|
1910
|
-
|
|
2048
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
2049
|
+
var item = queue[i];
|
|
2050
|
+
var obj = item.obj[item.prop];
|
|
1911
2051
|
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2052
|
+
var keys = Object.keys(obj);
|
|
2053
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
2054
|
+
var key = keys[j];
|
|
2055
|
+
var val = obj[key];
|
|
2056
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
2057
|
+
queue.push({ obj: obj, prop: key });
|
|
2058
|
+
refs.push(val);
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
1918
2061
|
}
|
|
1919
2062
|
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
if (typeof obj !== 'object' || obj === null) {
|
|
1923
|
-
return '';
|
|
1924
|
-
}
|
|
2063
|
+
compactQueue(queue);
|
|
1925
2064
|
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
arrayFormat = opts.arrayFormat;
|
|
1929
|
-
} else if (opts && 'indices' in opts) {
|
|
1930
|
-
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
1931
|
-
} else {
|
|
1932
|
-
arrayFormat = 'indices';
|
|
1933
|
-
}
|
|
2065
|
+
return value;
|
|
2066
|
+
};
|
|
1934
2067
|
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
}
|
|
1939
|
-
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
2068
|
+
var isRegExp = function isRegExp(obj) {
|
|
2069
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
2070
|
+
};
|
|
1940
2071
|
|
|
1941
|
-
|
|
1942
|
-
|
|
2072
|
+
var isBuffer = function isBuffer(obj) {
|
|
2073
|
+
if (!obj || typeof obj !== 'object') {
|
|
2074
|
+
return false;
|
|
1943
2075
|
}
|
|
1944
2076
|
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
}
|
|
2077
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
2078
|
+
};
|
|
1948
2079
|
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
2080
|
+
var combine = function combine(a, b) {
|
|
2081
|
+
return [].concat(a, b);
|
|
2082
|
+
};
|
|
1952
2083
|
|
|
1953
|
-
|
|
1954
|
-
|
|
2084
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
2085
|
+
if (isArray$2(val)) {
|
|
2086
|
+
var mapped = [];
|
|
2087
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
2088
|
+
mapped.push(fn(val[i]));
|
|
1955
2089
|
}
|
|
1956
|
-
|
|
1957
|
-
obj[key],
|
|
1958
|
-
key,
|
|
1959
|
-
generateArrayPrefix,
|
|
1960
|
-
commaRoundTrip,
|
|
1961
|
-
options.strictNullHandling,
|
|
1962
|
-
options.skipNulls,
|
|
1963
|
-
options.encode ? options.encoder : null,
|
|
1964
|
-
options.filter,
|
|
1965
|
-
options.sort,
|
|
1966
|
-
options.allowDots,
|
|
1967
|
-
options.serializeDate,
|
|
1968
|
-
options.format,
|
|
1969
|
-
options.formatter,
|
|
1970
|
-
options.encodeValuesOnly,
|
|
1971
|
-
options.charset,
|
|
1972
|
-
sideChannel
|
|
1973
|
-
));
|
|
2090
|
+
return mapped;
|
|
1974
2091
|
}
|
|
2092
|
+
return fn(val);
|
|
2093
|
+
};
|
|
1975
2094
|
|
|
1976
|
-
|
|
1977
|
-
|
|
2095
|
+
var utils$2 = {
|
|
2096
|
+
arrayToObject: arrayToObject,
|
|
2097
|
+
assign: assign,
|
|
2098
|
+
combine: combine,
|
|
2099
|
+
compact: compact,
|
|
2100
|
+
decode: decode,
|
|
2101
|
+
encode: encode,
|
|
2102
|
+
isBuffer: isBuffer,
|
|
2103
|
+
isRegExp: isRegExp,
|
|
2104
|
+
maybeMap: maybeMap,
|
|
2105
|
+
merge: merge
|
|
2106
|
+
};
|
|
1978
2107
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
} else {
|
|
1984
|
-
// encodeURIComponent('✓')
|
|
1985
|
-
prefix += 'utf8=%E2%9C%93&';
|
|
1986
|
-
}
|
|
1987
|
-
}
|
|
2108
|
+
var getSideChannel = sideChannel;
|
|
2109
|
+
var utils$1 = utils$2;
|
|
2110
|
+
var formats$1 = formats$3;
|
|
2111
|
+
var has$1 = Object.prototype.hasOwnProperty;
|
|
1988
2112
|
|
|
1989
|
-
|
|
2113
|
+
var arrayPrefixGenerators = {
|
|
2114
|
+
brackets: function brackets(prefix) {
|
|
2115
|
+
return prefix + '[]';
|
|
2116
|
+
},
|
|
2117
|
+
comma: 'comma',
|
|
2118
|
+
indices: function indices(prefix, key) {
|
|
2119
|
+
return prefix + '[' + key + ']';
|
|
2120
|
+
},
|
|
2121
|
+
repeat: function repeat(prefix) {
|
|
2122
|
+
return prefix;
|
|
2123
|
+
}
|
|
1990
2124
|
};
|
|
1991
2125
|
|
|
1992
|
-
var
|
|
2126
|
+
var isArray$1 = Array.isArray;
|
|
2127
|
+
var push = Array.prototype.push;
|
|
2128
|
+
var pushToArray = function (arr, valueOrArray) {
|
|
2129
|
+
push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
2130
|
+
};
|
|
1993
2131
|
|
|
1994
|
-
var
|
|
1995
|
-
var isArray = Array.isArray;
|
|
2132
|
+
var toISO = Date.prototype.toISOString;
|
|
1996
2133
|
|
|
1997
|
-
var
|
|
2134
|
+
var defaultFormat = formats$1['default'];
|
|
2135
|
+
var defaults$1 = {
|
|
2136
|
+
addQueryPrefix: false,
|
|
1998
2137
|
allowDots: false,
|
|
1999
|
-
allowPrototypes: false,
|
|
2000
|
-
allowSparse: false,
|
|
2001
|
-
arrayLimit: 20,
|
|
2002
2138
|
charset: 'utf-8',
|
|
2003
2139
|
charsetSentinel: false,
|
|
2004
|
-
comma: false,
|
|
2005
|
-
decoder: utils.decode,
|
|
2006
2140
|
delimiter: '&',
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2141
|
+
encode: true,
|
|
2142
|
+
encoder: utils$1.encode,
|
|
2143
|
+
encodeValuesOnly: false,
|
|
2144
|
+
format: defaultFormat,
|
|
2145
|
+
formatter: formats$1.formatters[defaultFormat],
|
|
2146
|
+
// deprecated
|
|
2147
|
+
indices: false,
|
|
2148
|
+
serializeDate: function serializeDate(date) {
|
|
2149
|
+
return toISO.call(date);
|
|
2150
|
+
},
|
|
2151
|
+
skipNulls: false,
|
|
2013
2152
|
strictNullHandling: false
|
|
2014
2153
|
};
|
|
2015
2154
|
|
|
2016
|
-
var
|
|
2017
|
-
return
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
2024
|
-
return val.split(',');
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
return val;
|
|
2028
|
-
};
|
|
2029
|
-
|
|
2030
|
-
// This is what browsers will submit when the ✓ character occurs in an
|
|
2031
|
-
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
2032
|
-
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
2033
|
-
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
2034
|
-
// the ✓ character, such as us-ascii.
|
|
2035
|
-
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
2155
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
2156
|
+
return typeof v === 'string'
|
|
2157
|
+
|| typeof v === 'number'
|
|
2158
|
+
|| typeof v === 'boolean'
|
|
2159
|
+
|| typeof v === 'symbol'
|
|
2160
|
+
|| typeof v === 'bigint';
|
|
2161
|
+
};
|
|
2036
2162
|
|
|
2037
|
-
|
|
2038
|
-
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
2163
|
+
var sentinel = {};
|
|
2039
2164
|
|
|
2040
|
-
var
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2165
|
+
var stringify$1 = function stringify(
|
|
2166
|
+
object,
|
|
2167
|
+
prefix,
|
|
2168
|
+
generateArrayPrefix,
|
|
2169
|
+
commaRoundTrip,
|
|
2170
|
+
strictNullHandling,
|
|
2171
|
+
skipNulls,
|
|
2172
|
+
encoder,
|
|
2173
|
+
filter,
|
|
2174
|
+
sort,
|
|
2175
|
+
allowDots,
|
|
2176
|
+
serializeDate,
|
|
2177
|
+
format,
|
|
2178
|
+
formatter,
|
|
2179
|
+
encodeValuesOnly,
|
|
2180
|
+
charset,
|
|
2181
|
+
sideChannel
|
|
2182
|
+
) {
|
|
2183
|
+
var obj = object;
|
|
2047
2184
|
|
|
2048
|
-
var
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2185
|
+
var tmpSc = sideChannel;
|
|
2186
|
+
var step = 0;
|
|
2187
|
+
var findFlag = false;
|
|
2188
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
2189
|
+
// Where object last appeared in the ref tree
|
|
2190
|
+
var pos = tmpSc.get(object);
|
|
2191
|
+
step += 1;
|
|
2192
|
+
if (typeof pos !== 'undefined') {
|
|
2193
|
+
if (pos === step) {
|
|
2194
|
+
throw new RangeError('Cyclic object value');
|
|
2195
|
+
} else {
|
|
2196
|
+
findFlag = true; // Break while
|
|
2059
2197
|
}
|
|
2060
2198
|
}
|
|
2199
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
2200
|
+
step = 0;
|
|
2201
|
+
}
|
|
2061
2202
|
}
|
|
2062
2203
|
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2204
|
+
if (typeof filter === 'function') {
|
|
2205
|
+
obj = filter(prefix, obj);
|
|
2206
|
+
} else if (obj instanceof Date) {
|
|
2207
|
+
obj = serializeDate(obj);
|
|
2208
|
+
} else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2209
|
+
obj = utils$1.maybeMap(obj, function (value) {
|
|
2210
|
+
if (value instanceof Date) {
|
|
2211
|
+
return serializeDate(value);
|
|
2212
|
+
}
|
|
2213
|
+
return value;
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
|
|
2217
|
+
if (obj === null) {
|
|
2218
|
+
if (strictNullHandling) {
|
|
2219
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
|
|
2066
2220
|
}
|
|
2067
|
-
var part = parts[i];
|
|
2068
2221
|
|
|
2069
|
-
|
|
2070
|
-
|
|
2222
|
+
obj = '';
|
|
2223
|
+
}
|
|
2071
2224
|
|
|
2072
|
-
|
|
2073
|
-
if (
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
} else {
|
|
2077
|
-
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
2078
|
-
val = utils.maybeMap(
|
|
2079
|
-
parseArrayValue(part.slice(pos + 1), options),
|
|
2080
|
-
function (encodedVal) {
|
|
2081
|
-
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
2082
|
-
}
|
|
2083
|
-
);
|
|
2225
|
+
if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
|
|
2226
|
+
if (encoder) {
|
|
2227
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
|
|
2228
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
|
|
2084
2229
|
}
|
|
2230
|
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
2231
|
+
}
|
|
2085
2232
|
|
|
2086
|
-
|
|
2087
|
-
val = interpretNumericEntities(val);
|
|
2088
|
-
}
|
|
2233
|
+
var values = [];
|
|
2089
2234
|
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2235
|
+
if (typeof obj === 'undefined') {
|
|
2236
|
+
return values;
|
|
2237
|
+
}
|
|
2093
2238
|
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2239
|
+
var objKeys;
|
|
2240
|
+
if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2241
|
+
// we need to join elements in
|
|
2242
|
+
if (encodeValuesOnly && encoder) {
|
|
2243
|
+
obj = utils$1.maybeMap(obj, encoder);
|
|
2098
2244
|
}
|
|
2245
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
2246
|
+
} else if (isArray$1(filter)) {
|
|
2247
|
+
objKeys = filter;
|
|
2248
|
+
} else {
|
|
2249
|
+
var keys = Object.keys(obj);
|
|
2250
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
2099
2251
|
}
|
|
2100
2252
|
|
|
2101
|
-
|
|
2102
|
-
};
|
|
2103
|
-
|
|
2104
|
-
var parseObject = function (chain, val, options, valuesParsed) {
|
|
2105
|
-
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
2253
|
+
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
2106
2254
|
|
|
2107
|
-
for (var
|
|
2108
|
-
var
|
|
2109
|
-
var
|
|
2255
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
2256
|
+
var key = objKeys[j];
|
|
2257
|
+
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
2110
2258
|
|
|
2111
|
-
if (
|
|
2112
|
-
|
|
2113
|
-
} else {
|
|
2114
|
-
obj = options.plainObjects ? Object.create(null) : {};
|
|
2115
|
-
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
2116
|
-
var index = parseInt(cleanRoot, 10);
|
|
2117
|
-
if (!options.parseArrays && cleanRoot === '') {
|
|
2118
|
-
obj = { 0: leaf };
|
|
2119
|
-
} else if (
|
|
2120
|
-
!isNaN(index)
|
|
2121
|
-
&& root !== cleanRoot
|
|
2122
|
-
&& String(index) === cleanRoot
|
|
2123
|
-
&& index >= 0
|
|
2124
|
-
&& (options.parseArrays && index <= options.arrayLimit)
|
|
2125
|
-
) {
|
|
2126
|
-
obj = [];
|
|
2127
|
-
obj[index] = leaf;
|
|
2128
|
-
} else if (cleanRoot !== '__proto__') {
|
|
2129
|
-
obj[cleanRoot] = leaf;
|
|
2130
|
-
}
|
|
2259
|
+
if (skipNulls && value === null) {
|
|
2260
|
+
continue;
|
|
2131
2261
|
}
|
|
2132
2262
|
|
|
2133
|
-
|
|
2263
|
+
var keyPrefix = isArray$1(obj)
|
|
2264
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
2265
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
2266
|
+
|
|
2267
|
+
sideChannel.set(object, step);
|
|
2268
|
+
var valueSideChannel = getSideChannel();
|
|
2269
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
2270
|
+
pushToArray(values, stringify(
|
|
2271
|
+
value,
|
|
2272
|
+
keyPrefix,
|
|
2273
|
+
generateArrayPrefix,
|
|
2274
|
+
commaRoundTrip,
|
|
2275
|
+
strictNullHandling,
|
|
2276
|
+
skipNulls,
|
|
2277
|
+
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
|
|
2278
|
+
filter,
|
|
2279
|
+
sort,
|
|
2280
|
+
allowDots,
|
|
2281
|
+
serializeDate,
|
|
2282
|
+
format,
|
|
2283
|
+
formatter,
|
|
2284
|
+
encodeValuesOnly,
|
|
2285
|
+
charset,
|
|
2286
|
+
valueSideChannel
|
|
2287
|
+
));
|
|
2134
2288
|
}
|
|
2135
2289
|
|
|
2136
|
-
return
|
|
2290
|
+
return values;
|
|
2137
2291
|
};
|
|
2138
2292
|
|
|
2139
|
-
var
|
|
2140
|
-
if (!
|
|
2141
|
-
return;
|
|
2293
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
2294
|
+
if (!opts) {
|
|
2295
|
+
return defaults$1;
|
|
2142
2296
|
}
|
|
2143
2297
|
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
// The regex chunks
|
|
2148
|
-
|
|
2149
|
-
var brackets = /(\[[^[\]]*])/;
|
|
2150
|
-
var child = /(\[[^[\]]*])/g;
|
|
2151
|
-
|
|
2152
|
-
// Get the parent
|
|
2153
|
-
|
|
2154
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
2155
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
2298
|
+
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
2299
|
+
throw new TypeError('Encoder has to be a function.');
|
|
2300
|
+
}
|
|
2156
2301
|
|
|
2157
|
-
|
|
2302
|
+
var charset = opts.charset || defaults$1.charset;
|
|
2303
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2304
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2305
|
+
}
|
|
2158
2306
|
|
|
2159
|
-
var
|
|
2160
|
-
if (
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
if (!options.allowPrototypes) {
|
|
2164
|
-
return;
|
|
2165
|
-
}
|
|
2307
|
+
var format = formats$1['default'];
|
|
2308
|
+
if (typeof opts.format !== 'undefined') {
|
|
2309
|
+
if (!has$1.call(formats$1.formatters, opts.format)) {
|
|
2310
|
+
throw new TypeError('Unknown format option provided.');
|
|
2166
2311
|
}
|
|
2312
|
+
format = opts.format;
|
|
2313
|
+
}
|
|
2314
|
+
var formatter = formats$1.formatters[format];
|
|
2167
2315
|
|
|
2168
|
-
|
|
2316
|
+
var filter = defaults$1.filter;
|
|
2317
|
+
if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
|
|
2318
|
+
filter = opts.filter;
|
|
2169
2319
|
}
|
|
2170
2320
|
|
|
2171
|
-
|
|
2321
|
+
return {
|
|
2322
|
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
|
|
2323
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
|
|
2324
|
+
charset: charset,
|
|
2325
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
2326
|
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
2327
|
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
2328
|
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
|
|
2329
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
|
|
2330
|
+
filter: filter,
|
|
2331
|
+
format: format,
|
|
2332
|
+
formatter: formatter,
|
|
2333
|
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
|
|
2334
|
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
|
|
2335
|
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
2336
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
|
|
2337
|
+
};
|
|
2338
|
+
};
|
|
2172
2339
|
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
2177
|
-
if (!options.allowPrototypes) {
|
|
2178
|
-
return;
|
|
2179
|
-
}
|
|
2180
|
-
}
|
|
2181
|
-
keys.push(segment[1]);
|
|
2182
|
-
}
|
|
2340
|
+
var stringify_1 = function (object, opts) {
|
|
2341
|
+
var obj = object;
|
|
2342
|
+
var options = normalizeStringifyOptions(opts);
|
|
2183
2343
|
|
|
2184
|
-
|
|
2344
|
+
var objKeys;
|
|
2345
|
+
var filter;
|
|
2185
2346
|
|
|
2186
|
-
if (
|
|
2187
|
-
|
|
2347
|
+
if (typeof options.filter === 'function') {
|
|
2348
|
+
filter = options.filter;
|
|
2349
|
+
obj = filter('', obj);
|
|
2350
|
+
} else if (isArray$1(options.filter)) {
|
|
2351
|
+
filter = options.filter;
|
|
2352
|
+
objKeys = filter;
|
|
2188
2353
|
}
|
|
2189
2354
|
|
|
2190
|
-
|
|
2191
|
-
};
|
|
2355
|
+
var keys = [];
|
|
2192
2356
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
return defaults;
|
|
2357
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
2358
|
+
return '';
|
|
2196
2359
|
}
|
|
2197
2360
|
|
|
2198
|
-
|
|
2199
|
-
|
|
2361
|
+
var arrayFormat;
|
|
2362
|
+
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
|
2363
|
+
arrayFormat = opts.arrayFormat;
|
|
2364
|
+
} else if (opts && 'indices' in opts) {
|
|
2365
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
2366
|
+
} else {
|
|
2367
|
+
arrayFormat = 'indices';
|
|
2200
2368
|
}
|
|
2201
2369
|
|
|
2202
|
-
|
|
2203
|
-
|
|
2370
|
+
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
2371
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
2372
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
2204
2373
|
}
|
|
2205
|
-
var
|
|
2206
|
-
|
|
2207
|
-
return {
|
|
2208
|
-
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
2209
|
-
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
2210
|
-
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
2211
|
-
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
2212
|
-
charset: charset,
|
|
2213
|
-
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
2214
|
-
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
2215
|
-
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
2216
|
-
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
2217
|
-
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2218
|
-
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
2219
|
-
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
2220
|
-
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
2221
|
-
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
2222
|
-
parseArrays: opts.parseArrays !== false,
|
|
2223
|
-
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
2224
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
2225
|
-
};
|
|
2226
|
-
};
|
|
2227
|
-
|
|
2228
|
-
var parse$1 = function (str, opts) {
|
|
2229
|
-
var options = normalizeParseOptions(opts);
|
|
2374
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
2230
2375
|
|
|
2231
|
-
if (
|
|
2232
|
-
|
|
2376
|
+
if (!objKeys) {
|
|
2377
|
+
objKeys = Object.keys(obj);
|
|
2233
2378
|
}
|
|
2234
2379
|
|
|
2235
|
-
|
|
2236
|
-
|
|
2380
|
+
if (options.sort) {
|
|
2381
|
+
objKeys.sort(options.sort);
|
|
2382
|
+
}
|
|
2237
2383
|
|
|
2238
|
-
|
|
2384
|
+
var sideChannel = getSideChannel();
|
|
2385
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
2386
|
+
var key = objKeys[i];
|
|
2239
2387
|
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2388
|
+
if (options.skipNulls && obj[key] === null) {
|
|
2389
|
+
continue;
|
|
2390
|
+
}
|
|
2391
|
+
pushToArray(keys, stringify$1(
|
|
2392
|
+
obj[key],
|
|
2393
|
+
key,
|
|
2394
|
+
generateArrayPrefix,
|
|
2395
|
+
commaRoundTrip,
|
|
2396
|
+
options.strictNullHandling,
|
|
2397
|
+
options.skipNulls,
|
|
2398
|
+
options.encode ? options.encoder : null,
|
|
2399
|
+
options.filter,
|
|
2400
|
+
options.sort,
|
|
2401
|
+
options.allowDots,
|
|
2402
|
+
options.serializeDate,
|
|
2403
|
+
options.format,
|
|
2404
|
+
options.formatter,
|
|
2405
|
+
options.encodeValuesOnly,
|
|
2406
|
+
options.charset,
|
|
2407
|
+
sideChannel
|
|
2408
|
+
));
|
|
2245
2409
|
}
|
|
2246
2410
|
|
|
2247
|
-
|
|
2248
|
-
|
|
2411
|
+
var joined = keys.join(options.delimiter);
|
|
2412
|
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
2413
|
+
|
|
2414
|
+
if (options.charsetSentinel) {
|
|
2415
|
+
if (options.charset === 'iso-8859-1') {
|
|
2416
|
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
2417
|
+
prefix += 'utf8=%26%2310003%3B&';
|
|
2418
|
+
} else {
|
|
2419
|
+
// encodeURIComponent('✓')
|
|
2420
|
+
prefix += 'utf8=%E2%9C%93&';
|
|
2421
|
+
}
|
|
2249
2422
|
}
|
|
2250
2423
|
|
|
2251
|
-
return
|
|
2424
|
+
return joined.length > 0 ? prefix + joined : '';
|
|
2252
2425
|
};
|
|
2253
2426
|
|
|
2254
|
-
var
|
|
2255
|
-
var parse = parse$1;
|
|
2256
|
-
var formats = formats$3;
|
|
2257
|
-
|
|
2258
|
-
var lib = {
|
|
2259
|
-
formats: formats,
|
|
2260
|
-
parse: parse,
|
|
2261
|
-
stringify: stringify
|
|
2262
|
-
};
|
|
2427
|
+
var utils = utils$2;
|
|
2263
2428
|
|
|
2264
|
-
var
|
|
2265
|
-
var
|
|
2266
|
-
integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
|
|
2267
|
-
integrator_type: "Organization",
|
|
2268
|
-
redirect_path: "/projects/new"
|
|
2269
|
-
});
|
|
2270
|
-
var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
|
|
2271
|
-
var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
|
|
2429
|
+
var has = Object.prototype.hasOwnProperty;
|
|
2430
|
+
var isArray = Array.isArray;
|
|
2272
2431
|
|
|
2273
|
-
var
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2432
|
+
var defaults = {
|
|
2433
|
+
allowDots: false,
|
|
2434
|
+
allowPrototypes: false,
|
|
2435
|
+
allowSparse: false,
|
|
2436
|
+
arrayLimit: 20,
|
|
2437
|
+
charset: 'utf-8',
|
|
2438
|
+
charsetSentinel: false,
|
|
2439
|
+
comma: false,
|
|
2440
|
+
decoder: utils.decode,
|
|
2441
|
+
delimiter: '&',
|
|
2442
|
+
depth: 5,
|
|
2443
|
+
ignoreQueryPrefix: false,
|
|
2444
|
+
interpretNumericEntities: false,
|
|
2445
|
+
parameterLimit: 1000,
|
|
2446
|
+
parseArrays: true,
|
|
2447
|
+
plainObjects: false,
|
|
2448
|
+
strictNullHandling: false
|
|
2449
|
+
};
|
|
2289
2450
|
|
|
2290
|
-
var
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
size: 16
|
|
2296
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2297
|
-
style: "h4"
|
|
2298
|
-
}, t("neetoGithub.github")));
|
|
2299
|
-
});
|
|
2451
|
+
var interpretNumericEntities = function (str) {
|
|
2452
|
+
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
2453
|
+
return String.fromCharCode(parseInt(numberStr, 10));
|
|
2454
|
+
});
|
|
2455
|
+
};
|
|
2300
2456
|
|
|
2301
|
-
var
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
var id = _ref2.id,
|
|
2306
|
-
name = _ref2.name,
|
|
2307
|
-
avatarUrl = _ref2.avatarUrl,
|
|
2308
|
-
type = _ref2.type,
|
|
2309
|
-
profileUrl = _ref2.profileUrl,
|
|
2310
|
-
count = _ref2.count;
|
|
2311
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2312
|
-
className: "neeto-ui-border-gray-300 flex w-full items-center space-x-2 border-b border-l-0 border-r-0 border-t-0 border-solid p-2",
|
|
2313
|
-
key: id
|
|
2314
|
-
}, type === "Organization" ? /*#__PURE__*/React.createElement(Building, {
|
|
2315
|
-
className: "neeto-ui-text-gray-600",
|
|
2316
|
-
size: 16
|
|
2317
|
-
}) : /*#__PURE__*/React.createElement(User, {
|
|
2318
|
-
className: "neeto-ui-text-gray-600",
|
|
2319
|
-
size: 16
|
|
2320
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2321
|
-
className: "neeto-ui-text-gray-900",
|
|
2322
|
-
style: "body2"
|
|
2323
|
-
}, "@", name), /*#__PURE__*/React.createElement("img", {
|
|
2324
|
-
alt: name,
|
|
2325
|
-
className: "neeto-ui-rounded-full h-4 w-4",
|
|
2326
|
-
src: avatarUrl
|
|
2327
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
2328
|
-
className: "text-indigo-600",
|
|
2329
|
-
icon: CannedResponses,
|
|
2330
|
-
iconPosition: "left",
|
|
2331
|
-
iconSize: 16,
|
|
2332
|
-
size: "small",
|
|
2333
|
-
style: "text",
|
|
2334
|
-
onClick: function onClick() {
|
|
2335
|
-
return window.open(profileUrl, "_blank");
|
|
2336
|
-
}
|
|
2337
|
-
}), /*#__PURE__*/React.createElement(Typography, {
|
|
2338
|
-
className: "neeto-ui-text-gray-900 mx-2 text-sm",
|
|
2339
|
-
component: "span",
|
|
2340
|
-
style: "h3"
|
|
2341
|
-
}, "\u2022"), /*#__PURE__*/React.createElement(Typography, {
|
|
2342
|
-
style: "body2"
|
|
2343
|
-
}, t("neetoGithub.countOf.repos", {
|
|
2344
|
-
count: count
|
|
2345
|
-
})));
|
|
2346
|
-
});
|
|
2347
|
-
});
|
|
2457
|
+
var parseArrayValue = function (val, options) {
|
|
2458
|
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
2459
|
+
return val.split(',');
|
|
2460
|
+
}
|
|
2348
2461
|
|
|
2349
|
-
|
|
2350
|
-
var isPane = _ref.isPane,
|
|
2351
|
-
accounts = _ref.accounts,
|
|
2352
|
-
isConnected = _ref.isConnected,
|
|
2353
|
-
onConnect = _ref.onConnect,
|
|
2354
|
-
installationUrl = _ref.installationUrl;
|
|
2355
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2356
|
-
className: classNames("flex w-full flex-col border border-solid border-transparent px-0 py-2", {
|
|
2357
|
-
"2xl:max-w-sm 2xl:px-8": isPane,
|
|
2358
|
-
"xl:max-w-sm xl:px-8": !isPane
|
|
2359
|
-
})
|
|
2360
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2361
|
-
className: "mb-2"
|
|
2362
|
-
}, /*#__PURE__*/React.createElement(Header, null), /*#__PURE__*/React.createElement(List$1, {
|
|
2363
|
-
accounts: accounts,
|
|
2364
|
-
isConnected: isConnected
|
|
2365
|
-
}), /*#__PURE__*/React.createElement(Configure, {
|
|
2366
|
-
installationUrl: installationUrl,
|
|
2367
|
-
isConnected: isConnected,
|
|
2368
|
-
onConnect: onConnect
|
|
2369
|
-
})));
|
|
2462
|
+
return val;
|
|
2370
2463
|
};
|
|
2371
2464
|
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2465
|
+
// This is what browsers will submit when the ✓ character occurs in an
|
|
2466
|
+
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
2467
|
+
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
2468
|
+
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
2469
|
+
// the ✓ character, such as us-ascii.
|
|
2470
|
+
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
2375
2471
|
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2472
|
+
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
2473
|
+
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
2474
|
+
|
|
2475
|
+
var parseValues = function parseQueryStringValues(str, options) {
|
|
2476
|
+
var obj = { __proto__: null };
|
|
2477
|
+
|
|
2478
|
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
2479
|
+
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
2480
|
+
var parts = cleanStr.split(options.delimiter, limit);
|
|
2481
|
+
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
2482
|
+
var i;
|
|
2483
|
+
|
|
2484
|
+
var charset = options.charset;
|
|
2485
|
+
if (options.charsetSentinel) {
|
|
2486
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2487
|
+
if (parts[i].indexOf('utf8=') === 0) {
|
|
2488
|
+
if (parts[i] === charsetSentinel) {
|
|
2489
|
+
charset = 'utf-8';
|
|
2490
|
+
} else if (parts[i] === isoSentinel) {
|
|
2491
|
+
charset = 'iso-8859-1';
|
|
2492
|
+
}
|
|
2493
|
+
skipIndex = i;
|
|
2494
|
+
i = parts.length; // The eslint settings do not allow break;
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2399
2497
|
}
|
|
2400
|
-
return _arr;
|
|
2401
|
-
}
|
|
2402
|
-
}
|
|
2403
2498
|
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2499
|
+
for (i = 0; i < parts.length; ++i) {
|
|
2500
|
+
if (i === skipIndex) {
|
|
2501
|
+
continue;
|
|
2502
|
+
}
|
|
2503
|
+
var part = parts[i];
|
|
2409
2504
|
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
2413
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2414
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2415
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
2416
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
2417
|
-
}
|
|
2505
|
+
var bracketEqualsPos = part.indexOf(']=');
|
|
2506
|
+
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
2418
2507
|
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2508
|
+
var key, val;
|
|
2509
|
+
if (pos === -1) {
|
|
2510
|
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
2511
|
+
val = options.strictNullHandling ? null : '';
|
|
2512
|
+
} else {
|
|
2513
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
2514
|
+
val = utils.maybeMap(
|
|
2515
|
+
parseArrayValue(part.slice(pos + 1), options),
|
|
2516
|
+
function (encodedVal) {
|
|
2517
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
2518
|
+
}
|
|
2519
|
+
);
|
|
2520
|
+
}
|
|
2422
2521
|
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
}
|
|
2522
|
+
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
2523
|
+
val = interpretNumericEntities(val);
|
|
2524
|
+
}
|
|
2426
2525
|
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
href: installationUrl,
|
|
2437
|
-
icon: Github,
|
|
2438
|
-
iconPosition: "left",
|
|
2439
|
-
label: t("neetoGithub.connectRepository"),
|
|
2440
|
-
size: "medium",
|
|
2441
|
-
style: "primary"
|
|
2442
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
2443
|
-
className: "text-xs"
|
|
2444
|
-
}, /*#__PURE__*/React.createElement(Trans, {
|
|
2445
|
-
i18nKey: "troubleshoot",
|
|
2446
|
-
components: {
|
|
2447
|
-
troubleshootLink: /*#__PURE__*/React.createElement("a", {
|
|
2448
|
-
className: "text-indigo-600 underline",
|
|
2449
|
-
href: troubleshootUrl,
|
|
2450
|
-
rel: "noopener noreferrer",
|
|
2451
|
-
target: "_blank"
|
|
2452
|
-
})
|
|
2526
|
+
if (part.indexOf('[]=') > -1) {
|
|
2527
|
+
val = isArray(val) ? [val] : val;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
if (has.call(obj, key)) {
|
|
2531
|
+
obj[key] = utils.combine(obj[key], val);
|
|
2532
|
+
} else {
|
|
2533
|
+
obj[key] = val;
|
|
2534
|
+
}
|
|
2453
2535
|
}
|
|
2454
|
-
})));
|
|
2455
|
-
});
|
|
2456
2536
|
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
repoType: "private",
|
|
2491
|
-
repository: repository
|
|
2492
|
-
});
|
|
2537
|
+
return obj;
|
|
2538
|
+
};
|
|
2539
|
+
|
|
2540
|
+
var parseObject = function (chain, val, options, valuesParsed) {
|
|
2541
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
2542
|
+
|
|
2543
|
+
for (var i = chain.length - 1; i >= 0; --i) {
|
|
2544
|
+
var obj;
|
|
2545
|
+
var root = chain[i];
|
|
2546
|
+
|
|
2547
|
+
if (root === '[]' && options.parseArrays) {
|
|
2548
|
+
obj = [].concat(leaf);
|
|
2549
|
+
} else {
|
|
2550
|
+
obj = options.plainObjects ? Object.create(null) : {};
|
|
2551
|
+
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
2552
|
+
var index = parseInt(cleanRoot, 10);
|
|
2553
|
+
if (!options.parseArrays && cleanRoot === '') {
|
|
2554
|
+
obj = { 0: leaf };
|
|
2555
|
+
} else if (
|
|
2556
|
+
!isNaN(index)
|
|
2557
|
+
&& root !== cleanRoot
|
|
2558
|
+
&& String(index) === cleanRoot
|
|
2559
|
+
&& index >= 0
|
|
2560
|
+
&& (options.parseArrays && index <= options.arrayLimit)
|
|
2561
|
+
) {
|
|
2562
|
+
obj = [];
|
|
2563
|
+
obj[index] = leaf;
|
|
2564
|
+
} else if (cleanRoot !== '__proto__') {
|
|
2565
|
+
obj[cleanRoot] = leaf;
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
|
|
2569
|
+
leaf = obj;
|
|
2493
2570
|
}
|
|
2494
|
-
|
|
2571
|
+
|
|
2572
|
+
return leaf;
|
|
2495
2573
|
};
|
|
2496
2574
|
|
|
2497
|
-
var
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
}
|
|
2575
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
2576
|
+
if (!givenKey) {
|
|
2577
|
+
return;
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
// Transform dot notation to bracket notation
|
|
2581
|
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
2582
|
+
|
|
2583
|
+
// The regex chunks
|
|
2584
|
+
|
|
2585
|
+
var brackets = /(\[[^[\]]*])/;
|
|
2586
|
+
var child = /(\[[^[\]]*])/g;
|
|
2587
|
+
|
|
2588
|
+
// Get the parent
|
|
2589
|
+
|
|
2590
|
+
var segment = options.depth > 0 && brackets.exec(key);
|
|
2591
|
+
var parent = segment ? key.slice(0, segment.index) : key;
|
|
2592
|
+
|
|
2593
|
+
// Stash the parent if it exists
|
|
2594
|
+
|
|
2595
|
+
var keys = [];
|
|
2596
|
+
if (parent) {
|
|
2597
|
+
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
2598
|
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
2599
|
+
if (!options.allowPrototypes) {
|
|
2600
|
+
return;
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
|
|
2604
|
+
keys.push(parent);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
// Loop through children appending to the array until we hit depth
|
|
2608
|
+
|
|
2609
|
+
var i = 0;
|
|
2610
|
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
2611
|
+
i += 1;
|
|
2612
|
+
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
2613
|
+
if (!options.allowPrototypes) {
|
|
2614
|
+
return;
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
keys.push(segment[1]);
|
|
2618
|
+
}
|
|
2525
2619
|
|
|
2526
|
-
|
|
2527
|
-
var t = _ref.t,
|
|
2528
|
-
installationUrl = _ref.installationUrl;
|
|
2529
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2530
|
-
className: "flex w-full max-w-sm flex-col items-center justify-center space-y-4 text-center"
|
|
2531
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2532
|
-
style: "body2"
|
|
2533
|
-
}, t("neetoGithub.notConnectedDescription")), /*#__PURE__*/React.createElement(Button, {
|
|
2534
|
-
href: installationUrl,
|
|
2535
|
-
icon: Github,
|
|
2536
|
-
iconPosition: "left",
|
|
2537
|
-
label: t("neetoGithub.connectGithub"),
|
|
2538
|
-
size: "medium",
|
|
2539
|
-
style: "primary"
|
|
2540
|
-
}));
|
|
2541
|
-
});
|
|
2620
|
+
// If there's a remainder, just add whatever is left
|
|
2542
2621
|
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
isPublicRepoAllowed = _ref.isPublicRepoAllowed,
|
|
2546
|
-
repositories = _ref.repositories,
|
|
2547
|
-
onConnect = _ref.onConnect,
|
|
2548
|
-
installationUrl = _ref.installationUrl,
|
|
2549
|
-
troubleshootUrl = _ref.troubleshootUrl;
|
|
2550
|
-
var _useTranslation = useTranslation(),
|
|
2551
|
-
t = _useTranslation.t;
|
|
2552
|
-
var _useState = useState(repositories),
|
|
2553
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2554
|
-
filteredRepositories = _useState2[0],
|
|
2555
|
-
setFilteredRepositories = _useState2[1];
|
|
2556
|
-
var onSearch = function onSearch(searchTerm) {
|
|
2557
|
-
if (!isPresent(searchTerm)) {
|
|
2558
|
-
setFilteredRepositories(repositories);
|
|
2559
|
-
return;
|
|
2622
|
+
if (segment) {
|
|
2623
|
+
keys.push('[' + key.slice(segment.index) + ']');
|
|
2560
2624
|
}
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
return fullName.toLowerCase().includes(searchTerm.toLowerCase());
|
|
2564
|
-
});
|
|
2565
|
-
setFilteredRepositories(filteredRepositories);
|
|
2566
|
-
};
|
|
2567
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2568
|
-
className: "connect-repo neeto-ui-rounded-md neeto-ui-border-gray-300 border border-solid px-8 py-7"
|
|
2569
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2570
|
-
className: "mb-2 pb-5 text-lg font-medium",
|
|
2571
|
-
style: "h2"
|
|
2572
|
-
}, t("neetoGithub.connectARepo")), isConnected ? /*#__PURE__*/React.createElement("div", {
|
|
2573
|
-
className: "flex w-full flex-col space-y-6"
|
|
2574
|
-
}, /*#__PURE__*/React.createElement(Search, {
|
|
2575
|
-
onSearch: onSearch,
|
|
2576
|
-
className: "w-full",
|
|
2577
|
-
suffix: /*#__PURE__*/React.createElement(Typography, {
|
|
2578
|
-
style: "body2"
|
|
2579
|
-
}, t("neetoGithub.countOf.repos", {
|
|
2580
|
-
count: filteredRepositories.length
|
|
2581
|
-
}))
|
|
2582
|
-
}), /*#__PURE__*/React.createElement(List, {
|
|
2583
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2584
|
-
filteredRepositories: filteredRepositories,
|
|
2585
|
-
installationUrl: installationUrl,
|
|
2586
|
-
onConnect: onConnect,
|
|
2587
|
-
repositories: repositories,
|
|
2588
|
-
troubleshootUrl: troubleshootUrl
|
|
2589
|
-
})) : /*#__PURE__*/React.createElement("div", {
|
|
2590
|
-
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
2591
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2592
|
-
className: "neeto-ui-rounded-md neeto-ui-border-gray-300 m-0 flex h-[366px] flex-col items-center justify-center border border-solid p-4 shadow-inner"
|
|
2593
|
-
}, /*#__PURE__*/React.createElement(NotConnected, {
|
|
2594
|
-
installationUrl: installationUrl
|
|
2595
|
-
}))));
|
|
2625
|
+
|
|
2626
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
2596
2627
|
};
|
|
2597
2628
|
|
|
2598
|
-
var
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
t = _useTranslation.t;
|
|
2602
|
-
var _useState = useState(""),
|
|
2603
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2604
|
-
publicRepoUrl = _useState2[0],
|
|
2605
|
-
setPublicRepoUrl = _useState2[1];
|
|
2606
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2607
|
-
className: "transition-drop-shadow neeto-ui-border-gray-300 neeto-ui-rounded-md border border-solid px-8 py-7 font-sans transition-colors"
|
|
2608
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2609
|
-
className: "mb-2 pb-5"
|
|
2610
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2611
|
-
className: "flex justify-between"
|
|
2612
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2613
|
-
className: "pr-4"
|
|
2614
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2615
|
-
className: "text-lg font-medium",
|
|
2616
|
-
style: "h2"
|
|
2617
|
-
}, t("neetoGithub.publicGitRepo")), /*#__PURE__*/React.createElement("div", {
|
|
2618
|
-
className: "neeto-ui-text-gray-900 mt-2 flex max-w-xl space-x-1 font-sans text-sm font-normal leading-6 antialiased"
|
|
2619
|
-
}, /*#__PURE__*/React.createElement(Typography, {
|
|
2620
|
-
style: "body2"
|
|
2621
|
-
}, t("neetoGithub.publicGitRepoDescription")))))), /*#__PURE__*/React.createElement("div", {
|
|
2622
|
-
className: "neeto-ui-text-gray-900 font-sans text-sm font-normal leading-6 antialiased"
|
|
2623
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2624
|
-
className: "flex"
|
|
2625
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2626
|
-
className: "z-0 flex-1"
|
|
2627
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
2628
|
-
className: "w-full"
|
|
2629
|
-
}, /*#__PURE__*/React.createElement(Input, {
|
|
2630
|
-
nakedInput: true,
|
|
2631
|
-
autocomplete: "false",
|
|
2632
|
-
className: "relative rounded-b rounded-l rounded-r-none rounded-t border-b border-l border-r-0 border-t border-solid px-2",
|
|
2633
|
-
placeholder: t("neetoGithub.publicGitRepoPlaceholder"),
|
|
2634
|
-
size: "large",
|
|
2635
|
-
spellcheck: "false",
|
|
2636
|
-
type: "text",
|
|
2637
|
-
value: publicRepoUrl,
|
|
2638
|
-
onChange: function onChange(e) {
|
|
2639
|
-
return setPublicRepoUrl(e.target.value);
|
|
2629
|
+
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
2630
|
+
if (!opts) {
|
|
2631
|
+
return defaults;
|
|
2640
2632
|
}
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
className: "rounded-b rounded-l-none rounded-r rounded-t",
|
|
2645
|
-
disabled: !isPresent(publicRepoUrl),
|
|
2646
|
-
size: "large",
|
|
2647
|
-
style: "primary",
|
|
2648
|
-
type: "button",
|
|
2649
|
-
onClick: function onClick() {
|
|
2650
|
-
return onConnect({
|
|
2651
|
-
repoType: "public",
|
|
2652
|
-
repository: {
|
|
2653
|
-
fullName: publicRepoUrl
|
|
2654
|
-
}
|
|
2655
|
-
});
|
|
2633
|
+
|
|
2634
|
+
if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
|
2635
|
+
throw new TypeError('Decoder has to be a function.');
|
|
2656
2636
|
}
|
|
2657
|
-
|
|
2637
|
+
|
|
2638
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2639
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2640
|
+
}
|
|
2641
|
+
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
2642
|
+
|
|
2643
|
+
return {
|
|
2644
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
2645
|
+
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
2646
|
+
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
2647
|
+
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
2648
|
+
charset: charset,
|
|
2649
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
2650
|
+
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
2651
|
+
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
2652
|
+
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
2653
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2654
|
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
2655
|
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
2656
|
+
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
2657
|
+
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
2658
|
+
parseArrays: opts.parseArrays !== false,
|
|
2659
|
+
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
2660
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
2661
|
+
};
|
|
2658
2662
|
};
|
|
2659
2663
|
|
|
2660
|
-
var
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2664
|
+
var parse$1 = function (str, opts) {
|
|
2665
|
+
var options = normalizeParseOptions(opts);
|
|
2666
|
+
|
|
2667
|
+
if (str === '' || str === null || typeof str === 'undefined') {
|
|
2668
|
+
return options.plainObjects ? Object.create(null) : {};
|
|
2669
|
+
}
|
|
2670
|
+
|
|
2671
|
+
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
2672
|
+
var obj = options.plainObjects ? Object.create(null) : {};
|
|
2673
|
+
|
|
2674
|
+
// Iterate over the keys and setup the new object
|
|
2675
|
+
|
|
2676
|
+
var keys = Object.keys(tempObj);
|
|
2677
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
2678
|
+
var key = keys[i];
|
|
2679
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
2680
|
+
obj = utils.merge(obj, newObj, options);
|
|
2681
|
+
}
|
|
2682
|
+
|
|
2683
|
+
if (options.allowSparse === true) {
|
|
2684
|
+
return obj;
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
return utils.compact(obj);
|
|
2679
2688
|
};
|
|
2680
2689
|
|
|
2681
|
-
var
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
_ref$repositories = _ref.repositories,
|
|
2690
|
-
repositories = _ref$repositories === void 0 ? [] : _ref$repositories,
|
|
2691
|
-
troubleshootUrl = _ref.troubleshootUrl,
|
|
2692
|
-
_ref$isPane = _ref.isPane,
|
|
2693
|
-
isPane = _ref$isPane === void 0 ? false : _ref$isPane;
|
|
2694
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
2695
|
-
className: "flex w-full flex-col-reverse 2xl:flex-row"
|
|
2696
|
-
}, /*#__PURE__*/React.createElement(Repositories, {
|
|
2697
|
-
installationUrl: installationUrl,
|
|
2698
|
-
isConnected: isConnected,
|
|
2699
|
-
isPublicRepoAllowed: isPublicRepoAllowed,
|
|
2700
|
-
onConnect: onConnect,
|
|
2701
|
-
repositories: repositories,
|
|
2702
|
-
troubleshootUrl: troubleshootUrl
|
|
2703
|
-
}), /*#__PURE__*/React.createElement(Accounts, {
|
|
2704
|
-
accounts: accounts,
|
|
2705
|
-
installationUrl: installationUrl,
|
|
2706
|
-
isConnected: isConnected,
|
|
2707
|
-
onConnect: onConnect,
|
|
2708
|
-
isPane: isPane
|
|
2709
|
-
}));
|
|
2690
|
+
var stringify = stringify_1;
|
|
2691
|
+
var parse = parse$1;
|
|
2692
|
+
var formats = formats$3;
|
|
2693
|
+
|
|
2694
|
+
var lib = {
|
|
2695
|
+
formats: formats,
|
|
2696
|
+
parse: parse,
|
|
2697
|
+
stringify: stringify
|
|
2710
2698
|
};
|
|
2711
2699
|
|
|
2700
|
+
var _globalProps$organiza;
|
|
2701
|
+
var newInstallationParams = lib.stringify({
|
|
2702
|
+
integrator_id: globalProps === null || globalProps === void 0 || (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.id,
|
|
2703
|
+
integrator_type: "Organization",
|
|
2704
|
+
redirect_path: "/projects/new"
|
|
2705
|
+
});
|
|
2706
|
+
var NEW_INSTALLATION_URL = "/github_integrations/app_installations/new?".concat(newInstallationParams);
|
|
2707
|
+
var TROUBLESHOOT_URL = "https://render.com/docs/github#troubleshooting";
|
|
2708
|
+
|
|
2712
2709
|
var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
2713
2710
|
var isOpen = _ref.isOpen,
|
|
2714
2711
|
onClose = _ref.onClose,
|
|
@@ -2725,7 +2722,11 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
|
2725
2722
|
_ref$troubleshootUrl = _ref.troubleshootUrl,
|
|
2726
2723
|
troubleshootUrl = _ref$troubleshootUrl === void 0 ? TROUBLESHOOT_URL : _ref$troubleshootUrl,
|
|
2727
2724
|
_ref$onConnect = _ref.onConnect,
|
|
2728
|
-
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect
|
|
2725
|
+
onConnect = _ref$onConnect === void 0 ? noop : _ref$onConnect,
|
|
2726
|
+
_ref$title = _ref.title,
|
|
2727
|
+
title = _ref$title === void 0 ? "" : _ref$title,
|
|
2728
|
+
_ref$description = _ref.description,
|
|
2729
|
+
description = _ref$description === void 0 ? "" : _ref$description;
|
|
2729
2730
|
var _useTranslation = useTranslation(),
|
|
2730
2731
|
t = _useTranslation.t;
|
|
2731
2732
|
var initialFocusRef = useRef(null);
|
|
@@ -2737,10 +2738,10 @@ var NeetoGithubNanoModal = function NeetoGithubNanoModal(_ref) {
|
|
|
2737
2738
|
size: "large"
|
|
2738
2739
|
}, /*#__PURE__*/React.createElement(Pane.Header, null, /*#__PURE__*/React.createElement(Typography, {
|
|
2739
2740
|
style: "h2"
|
|
2740
|
-
}, t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(Typography, {
|
|
2741
|
+
}, isPresent(title) ? title : t("neetoGithub.modal.title")), /*#__PURE__*/React.createElement(Typography, {
|
|
2741
2742
|
className: "mt-4",
|
|
2742
2743
|
style: "body2"
|
|
2743
|
-
}, t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
|
|
2744
|
+
}, isPresent(description) ? description : t("neetoGithub.modal.description"))), /*#__PURE__*/React.createElement(Pane.Body, null, /*#__PURE__*/React.createElement(NeetoGithubNanoContainer, {
|
|
2744
2745
|
accounts: accounts,
|
|
2745
2746
|
installationUrl: installationUrl,
|
|
2746
2747
|
isConnected: isConnected,
|
|
@@ -2757,5 +2758,5 @@ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r
|
|
|
2757
2758
|
var css = ".width-calc{width:calc(100% - 82px)}.neeto-github-modal-pane-wrapper{width:min(75%,1280px)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3JlcG9zaXRvcnktdGlsZS5zY3NzIiwiYXBwL2phdmFzY3JpcHQvc3R5bGVzaGVldHMvYXBwbGljYXRpb24uc2NzcyIsImFwcC9qYXZhc2NyaXB0L3N0eWxlc2hlZXRzL2NvbXBvbmVudHMvX3BhbmUuc2NzcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxZQUNFLHVCQ0NGLENDRkEsaUNBQ0UscUJES0YiLCJzb3VyY2VzQ29udGVudCI6WyIud2lkdGgtY2FsYyB7XG4gIHdpZHRoOiBjYWxjKDEwMCUgLSA4MnB4KTtcbn1cbiIsIi53aWR0aC1jYWxjIHtcbiAgd2lkdGg6IGNhbGMoMTAwJSAtIDgycHgpO1xufVxuXG4ubmVldG8tZ2l0aHViLW1vZGFsLXBhbmUtd3JhcHBlciB7XG4gIHdpZHRoOiBtaW4oNzUlLCAxMjgwcHgpO1xufSIsIi5uZWV0by1naXRodWItbW9kYWwtcGFuZS13cmFwcGVyIHtcbiAgd2lkdGg6IG1pbig3NSUsIDEyODBweCk7XG59XG4iXX0= */";
|
|
2758
2759
|
n(css,{});
|
|
2759
2760
|
|
|
2760
|
-
export { NeetoGithubNanoModal };
|
|
2761
|
+
export { NeetoGithubNanoContainer, NeetoGithubNanoModal };
|
|
2761
2762
|
//# sourceMappingURL=index.js.map
|