1 | module.exports =
|
2 | (function(modules) {
|
3 |
|
4 | var installedModules = {};
|
5 |
|
6 |
|
7 | function __webpack_require__(moduleId) {
|
8 |
|
9 |
|
10 | if(installedModules[moduleId]) {
|
11 | return installedModules[moduleId].exports;
|
12 | }
|
13 |
|
14 | var module = installedModules[moduleId] = {
|
15 | i: moduleId,
|
16 | l: false,
|
17 | exports: {}
|
18 | };
|
19 |
|
20 |
|
21 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
22 |
|
23 |
|
24 | module.l = true;
|
25 |
|
26 |
|
27 | return module.exports;
|
28 | }
|
29 |
|
30 |
|
31 |
|
32 | __webpack_require__.m = modules;
|
33 |
|
34 |
|
35 | __webpack_require__.c = installedModules;
|
36 |
|
37 |
|
38 | __webpack_require__.d = function(exports, name, getter) {
|
39 | if(!__webpack_require__.o(exports, name)) {
|
40 | Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
41 | }
|
42 | };
|
43 |
|
44 |
|
45 | __webpack_require__.r = function(exports) {
|
46 | if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
47 | Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
48 | }
|
49 | Object.defineProperty(exports, '__esModule', { value: true });
|
50 | };
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 | __webpack_require__.t = function(value, mode) {
|
58 | if(mode & 1) value = __webpack_require__(value);
|
59 | if(mode & 8) return value;
|
60 | if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
61 | var ns = Object.create(null);
|
62 | __webpack_require__.r(ns);
|
63 | Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
64 | if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
65 | return ns;
|
66 | };
|
67 |
|
68 |
|
69 | __webpack_require__.n = function(module) {
|
70 | var getter = module && module.__esModule ?
|
71 | function getDefault() { return module['default']; } :
|
72 | function getModuleExports() { return module; };
|
73 | __webpack_require__.d(getter, 'a', getter);
|
74 | return getter;
|
75 | };
|
76 |
|
77 |
|
78 | __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
79 |
|
80 |
|
81 | __webpack_require__.p = "";
|
82 |
|
83 |
|
84 |
|
85 | return __webpack_require__(__webpack_require__.s = 0);
|
86 | })
|
87 |
|
88 | ({
|
89 |
|
90 | "../node_modules/axios/index.js":
|
91 |
|
92 |
|
93 |
|
94 |
|
95 | (function(module, exports, __webpack_require__) {
|
96 |
|
97 | module.exports = __webpack_require__( "../node_modules/axios/lib/axios.js");
|
98 |
|
99 | }),
|
100 |
|
101 | "../node_modules/axios/lib/adapters/http.js":
|
102 |
|
103 |
|
104 |
|
105 |
|
106 | (function(module, exports, __webpack_require__) {
|
107 |
|
108 | "use strict";
|
109 |
|
110 |
|
111 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
112 | var settle = __webpack_require__( "../node_modules/axios/lib/core/settle.js");
|
113 | var buildFullPath = __webpack_require__( "../node_modules/axios/lib/core/buildFullPath.js");
|
114 | var buildURL = __webpack_require__( "../node_modules/axios/lib/helpers/buildURL.js");
|
115 | var http = __webpack_require__( "http");
|
116 | var https = __webpack_require__( "https");
|
117 | var httpFollow = __webpack_require__( "../node_modules/follow-redirects/index.js").http;
|
118 | var httpsFollow = __webpack_require__( "../node_modules/follow-redirects/index.js").https;
|
119 | var url = __webpack_require__( "url");
|
120 | var zlib = __webpack_require__( "zlib");
|
121 | var pkg = __webpack_require__( "../node_modules/axios/package.json");
|
122 | var createError = __webpack_require__( "../node_modules/axios/lib/core/createError.js");
|
123 | var enhanceError = __webpack_require__( "../node_modules/axios/lib/core/enhanceError.js");
|
124 |
|
125 | var isHttps = /https:?/;
|
126 |
|
127 |
|
128 | module.exports = function httpAdapter(config) {
|
129 | return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
|
130 | var resolve = function resolve(value) {
|
131 | resolvePromise(value);
|
132 | };
|
133 | var reject = function reject(value) {
|
134 | rejectPromise(value);
|
135 | };
|
136 | var data = config.data;
|
137 | var headers = config.headers;
|
138 |
|
139 |
|
140 |
|
141 |
|
142 | if (!headers['User-Agent'] && !headers['user-agent']) {
|
143 | headers['User-Agent'] = 'axios/' + pkg.version;
|
144 | }
|
145 |
|
146 | if (data && !utils.isStream(data)) {
|
147 | if (Buffer.isBuffer(data)) {
|
148 |
|
149 | } else if (utils.isArrayBuffer(data)) {
|
150 | data = Buffer.from(new Uint8Array(data));
|
151 | } else if (utils.isString(data)) {
|
152 | data = Buffer.from(data, 'utf-8');
|
153 | } else {
|
154 | return reject(createError(
|
155 | 'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
|
156 | config
|
157 | ));
|
158 | }
|
159 |
|
160 |
|
161 | headers['Content-Length'] = data.length;
|
162 | }
|
163 |
|
164 |
|
165 | var auth = undefined;
|
166 | if (config.auth) {
|
167 | var username = config.auth.username || '';
|
168 | var password = config.auth.password || '';
|
169 | auth = username + ':' + password;
|
170 | }
|
171 |
|
172 |
|
173 | var fullPath = buildFullPath(config.baseURL, config.url);
|
174 | var parsed = url.parse(fullPath);
|
175 | var protocol = parsed.protocol || 'http:';
|
176 |
|
177 | if (!auth && parsed.auth) {
|
178 | var urlAuth = parsed.auth.split(':');
|
179 | var urlUsername = urlAuth[0] || '';
|
180 | var urlPassword = urlAuth[1] || '';
|
181 | auth = urlUsername + ':' + urlPassword;
|
182 | }
|
183 |
|
184 | if (auth) {
|
185 | delete headers.Authorization;
|
186 | }
|
187 |
|
188 | var isHttpsRequest = isHttps.test(protocol);
|
189 | var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;
|
190 |
|
191 | var options = {
|
192 | path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
|
193 | method: config.method.toUpperCase(),
|
194 | headers: headers,
|
195 | agent: agent,
|
196 | agents: { http: config.httpAgent, https: config.httpsAgent },
|
197 | auth: auth
|
198 | };
|
199 |
|
200 | if (config.socketPath) {
|
201 | options.socketPath = config.socketPath;
|
202 | } else {
|
203 | options.hostname = parsed.hostname;
|
204 | options.port = parsed.port;
|
205 | }
|
206 |
|
207 | var proxy = config.proxy;
|
208 | if (!proxy && proxy !== false) {
|
209 | var proxyEnv = protocol.slice(0, -1) + '_proxy';
|
210 | var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
|
211 | if (proxyUrl) {
|
212 | var parsedProxyUrl = url.parse(proxyUrl);
|
213 | var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
|
214 | var shouldProxy = true;
|
215 |
|
216 | if (noProxyEnv) {
|
217 | var noProxy = noProxyEnv.split(',').map(function trim(s) {
|
218 | return s.trim();
|
219 | });
|
220 |
|
221 | shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
|
222 | if (!proxyElement) {
|
223 | return false;
|
224 | }
|
225 | if (proxyElement === '*') {
|
226 | return true;
|
227 | }
|
228 | if (proxyElement[0] === '.' &&
|
229 | parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
|
230 | return true;
|
231 | }
|
232 |
|
233 | return parsed.hostname === proxyElement;
|
234 | });
|
235 | }
|
236 |
|
237 |
|
238 | if (shouldProxy) {
|
239 | proxy = {
|
240 | host: parsedProxyUrl.hostname,
|
241 | port: parsedProxyUrl.port
|
242 | };
|
243 |
|
244 | if (parsedProxyUrl.auth) {
|
245 | var proxyUrlAuth = parsedProxyUrl.auth.split(':');
|
246 | proxy.auth = {
|
247 | username: proxyUrlAuth[0],
|
248 | password: proxyUrlAuth[1]
|
249 | };
|
250 | }
|
251 | }
|
252 | }
|
253 | }
|
254 |
|
255 | if (proxy) {
|
256 | options.hostname = proxy.host;
|
257 | options.host = proxy.host;
|
258 | options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
|
259 | options.port = proxy.port;
|
260 | options.path = protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path;
|
261 |
|
262 |
|
263 | if (proxy.auth) {
|
264 | var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
|
265 | options.headers['Proxy-Authorization'] = 'Basic ' + base64;
|
266 | }
|
267 | }
|
268 |
|
269 | var transport;
|
270 | var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
|
271 | if (config.transport) {
|
272 | transport = config.transport;
|
273 | } else if (config.maxRedirects === 0) {
|
274 | transport = isHttpsProxy ? https : http;
|
275 | } else {
|
276 | if (config.maxRedirects) {
|
277 | options.maxRedirects = config.maxRedirects;
|
278 | }
|
279 | transport = isHttpsProxy ? httpsFollow : httpFollow;
|
280 | }
|
281 |
|
282 | if (config.maxContentLength && config.maxContentLength > -1) {
|
283 | options.maxBodyLength = config.maxContentLength;
|
284 | }
|
285 |
|
286 |
|
287 | var req = transport.request(options, function handleResponse(res) {
|
288 | if (req.aborted) return;
|
289 |
|
290 |
|
291 | var stream = res;
|
292 | switch (res.headers['content-encoding']) {
|
293 |
|
294 | case 'gzip':
|
295 | case 'compress':
|
296 | case 'deflate':
|
297 |
|
298 | stream = (res.statusCode === 204) ? stream : stream.pipe(zlib.createUnzip());
|
299 |
|
300 |
|
301 | delete res.headers['content-encoding'];
|
302 | break;
|
303 | }
|
304 |
|
305 |
|
306 | var lastRequest = res.req || req;
|
307 |
|
308 | var response = {
|
309 | status: res.statusCode,
|
310 | statusText: res.statusMessage,
|
311 | headers: res.headers,
|
312 | config: config,
|
313 | request: lastRequest
|
314 | };
|
315 |
|
316 | if (config.responseType === 'stream') {
|
317 | response.data = stream;
|
318 | settle(resolve, reject, response);
|
319 | } else {
|
320 | var responseBuffer = [];
|
321 | stream.on('data', function handleStreamData(chunk) {
|
322 | responseBuffer.push(chunk);
|
323 |
|
324 |
|
325 | if (config.maxContentLength > -1 && Buffer.concat(responseBuffer).length > config.maxContentLength) {
|
326 | stream.destroy();
|
327 | reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
|
328 | config, null, lastRequest));
|
329 | }
|
330 | });
|
331 |
|
332 | stream.on('error', function handleStreamError(err) {
|
333 | if (req.aborted) return;
|
334 | reject(enhanceError(err, config, null, lastRequest));
|
335 | });
|
336 |
|
337 | stream.on('end', function handleStreamEnd() {
|
338 | var responseData = Buffer.concat(responseBuffer);
|
339 | if (config.responseType !== 'arraybuffer') {
|
340 | responseData = responseData.toString(config.responseEncoding);
|
341 | }
|
342 |
|
343 | response.data = responseData;
|
344 | settle(resolve, reject, response);
|
345 | });
|
346 | }
|
347 | });
|
348 |
|
349 |
|
350 | req.on('error', function handleRequestError(err) {
|
351 | if (req.aborted) return;
|
352 | reject(enhanceError(err, config, null, req));
|
353 | });
|
354 |
|
355 |
|
356 | if (config.timeout) {
|
357 |
|
358 |
|
359 |
|
360 |
|
361 |
|
362 | req.setTimeout(config.timeout, function handleRequestTimeout() {
|
363 | req.abort();
|
364 | reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', req));
|
365 | });
|
366 | }
|
367 |
|
368 | if (config.cancelToken) {
|
369 |
|
370 | config.cancelToken.promise.then(function onCanceled(cancel) {
|
371 | if (req.aborted) return;
|
372 |
|
373 | req.abort();
|
374 | reject(cancel);
|
375 | });
|
376 | }
|
377 |
|
378 |
|
379 | if (utils.isStream(data)) {
|
380 | data.on('error', function handleStreamError(err) {
|
381 | reject(enhanceError(err, config, null, req));
|
382 | }).pipe(req);
|
383 | } else {
|
384 | req.end(data);
|
385 | }
|
386 | });
|
387 | };
|
388 |
|
389 |
|
390 | }),
|
391 |
|
392 | "../node_modules/axios/lib/adapters/xhr.js":
|
393 |
|
394 |
|
395 |
|
396 |
|
397 | (function(module, exports, __webpack_require__) {
|
398 |
|
399 | "use strict";
|
400 |
|
401 |
|
402 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
403 | var settle = __webpack_require__( "../node_modules/axios/lib/core/settle.js");
|
404 | var buildURL = __webpack_require__( "../node_modules/axios/lib/helpers/buildURL.js");
|
405 | var buildFullPath = __webpack_require__( "../node_modules/axios/lib/core/buildFullPath.js");
|
406 | var parseHeaders = __webpack_require__( "../node_modules/axios/lib/helpers/parseHeaders.js");
|
407 | var isURLSameOrigin = __webpack_require__( "../node_modules/axios/lib/helpers/isURLSameOrigin.js");
|
408 | var createError = __webpack_require__( "../node_modules/axios/lib/core/createError.js");
|
409 |
|
410 | module.exports = function xhrAdapter(config) {
|
411 | return new Promise(function dispatchXhrRequest(resolve, reject) {
|
412 | var requestData = config.data;
|
413 | var requestHeaders = config.headers;
|
414 |
|
415 | if (utils.isFormData(requestData)) {
|
416 | delete requestHeaders['Content-Type'];
|
417 | }
|
418 |
|
419 | var request = new XMLHttpRequest();
|
420 |
|
421 |
|
422 | if (config.auth) {
|
423 | var username = config.auth.username || '';
|
424 | var password = config.auth.password || '';
|
425 | requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
426 | }
|
427 |
|
428 | var fullPath = buildFullPath(config.baseURL, config.url);
|
429 | request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
430 |
|
431 |
|
432 | request.timeout = config.timeout;
|
433 |
|
434 |
|
435 | request.onreadystatechange = function handleLoad() {
|
436 | if (!request || request.readyState !== 4) {
|
437 | return;
|
438 | }
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 | if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
|
445 | return;
|
446 | }
|
447 |
|
448 |
|
449 | var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
|
450 | var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
451 | var response = {
|
452 | data: responseData,
|
453 | status: request.status,
|
454 | statusText: request.statusText,
|
455 | headers: responseHeaders,
|
456 | config: config,
|
457 | request: request
|
458 | };
|
459 |
|
460 | settle(resolve, reject, response);
|
461 |
|
462 |
|
463 | request = null;
|
464 | };
|
465 |
|
466 |
|
467 | request.onabort = function handleAbort() {
|
468 | if (!request) {
|
469 | return;
|
470 | }
|
471 |
|
472 | reject(createError('Request aborted', config, 'ECONNABORTED', request));
|
473 |
|
474 |
|
475 | request = null;
|
476 | };
|
477 |
|
478 |
|
479 | request.onerror = function handleError() {
|
480 |
|
481 |
|
482 | reject(createError('Network Error', config, null, request));
|
483 |
|
484 |
|
485 | request = null;
|
486 | };
|
487 |
|
488 |
|
489 | request.ontimeout = function handleTimeout() {
|
490 | var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
491 | if (config.timeoutErrorMessage) {
|
492 | timeoutErrorMessage = config.timeoutErrorMessage;
|
493 | }
|
494 | reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
|
495 | request));
|
496 |
|
497 |
|
498 | request = null;
|
499 | };
|
500 |
|
501 |
|
502 |
|
503 |
|
504 | if (utils.isStandardBrowserEnv()) {
|
505 | var cookies = __webpack_require__( "../node_modules/axios/lib/helpers/cookies.js");
|
506 |
|
507 |
|
508 | var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
509 | cookies.read(config.xsrfCookieName) :
|
510 | undefined;
|
511 |
|
512 | if (xsrfValue) {
|
513 | requestHeaders[config.xsrfHeaderName] = xsrfValue;
|
514 | }
|
515 | }
|
516 |
|
517 |
|
518 | if ('setRequestHeader' in request) {
|
519 | utils.forEach(requestHeaders, function setRequestHeader(val, key) {
|
520 | if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
|
521 |
|
522 | delete requestHeaders[key];
|
523 | } else {
|
524 |
|
525 | request.setRequestHeader(key, val);
|
526 | }
|
527 | });
|
528 | }
|
529 |
|
530 |
|
531 | if (!utils.isUndefined(config.withCredentials)) {
|
532 | request.withCredentials = !!config.withCredentials;
|
533 | }
|
534 |
|
535 |
|
536 | if (config.responseType) {
|
537 | try {
|
538 | request.responseType = config.responseType;
|
539 | } catch (e) {
|
540 |
|
541 |
|
542 | if (config.responseType !== 'json') {
|
543 | throw e;
|
544 | }
|
545 | }
|
546 | }
|
547 |
|
548 |
|
549 | if (typeof config.onDownloadProgress === 'function') {
|
550 | request.addEventListener('progress', config.onDownloadProgress);
|
551 | }
|
552 |
|
553 |
|
554 | if (typeof config.onUploadProgress === 'function' && request.upload) {
|
555 | request.upload.addEventListener('progress', config.onUploadProgress);
|
556 | }
|
557 |
|
558 | if (config.cancelToken) {
|
559 |
|
560 | config.cancelToken.promise.then(function onCanceled(cancel) {
|
561 | if (!request) {
|
562 | return;
|
563 | }
|
564 |
|
565 | request.abort();
|
566 | reject(cancel);
|
567 |
|
568 | request = null;
|
569 | });
|
570 | }
|
571 |
|
572 | if (requestData === undefined) {
|
573 | requestData = null;
|
574 | }
|
575 |
|
576 |
|
577 | request.send(requestData);
|
578 | });
|
579 | };
|
580 |
|
581 |
|
582 | }),
|
583 |
|
584 | "../node_modules/axios/lib/axios.js":
|
585 |
|
586 |
|
587 |
|
588 |
|
589 | (function(module, exports, __webpack_require__) {
|
590 |
|
591 | "use strict";
|
592 |
|
593 |
|
594 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
595 | var bind = __webpack_require__( "../node_modules/axios/lib/helpers/bind.js");
|
596 | var Axios = __webpack_require__( "../node_modules/axios/lib/core/Axios.js");
|
597 | var mergeConfig = __webpack_require__( "../node_modules/axios/lib/core/mergeConfig.js");
|
598 | var defaults = __webpack_require__( "../node_modules/axios/lib/defaults.js");
|
599 |
|
600 |
|
601 |
|
602 |
|
603 |
|
604 |
|
605 |
|
606 | function createInstance(defaultConfig) {
|
607 | var context = new Axios(defaultConfig);
|
608 | var instance = bind(Axios.prototype.request, context);
|
609 |
|
610 |
|
611 | utils.extend(instance, Axios.prototype, context);
|
612 |
|
613 |
|
614 | utils.extend(instance, context);
|
615 |
|
616 | return instance;
|
617 | }
|
618 |
|
619 |
|
620 | var axios = createInstance(defaults);
|
621 |
|
622 |
|
623 | axios.Axios = Axios;
|
624 |
|
625 |
|
626 | axios.create = function create(instanceConfig) {
|
627 | return createInstance(mergeConfig(axios.defaults, instanceConfig));
|
628 | };
|
629 |
|
630 |
|
631 | axios.Cancel = __webpack_require__( "../node_modules/axios/lib/cancel/Cancel.js");
|
632 | axios.CancelToken = __webpack_require__( "../node_modules/axios/lib/cancel/CancelToken.js");
|
633 | axios.isCancel = __webpack_require__( "../node_modules/axios/lib/cancel/isCancel.js");
|
634 |
|
635 |
|
636 | axios.all = function all(promises) {
|
637 | return Promise.all(promises);
|
638 | };
|
639 | axios.spread = __webpack_require__( "../node_modules/axios/lib/helpers/spread.js");
|
640 |
|
641 | module.exports = axios;
|
642 |
|
643 |
|
644 | module.exports.default = axios;
|
645 |
|
646 |
|
647 | }),
|
648 |
|
649 | "../node_modules/axios/lib/cancel/Cancel.js":
|
650 |
|
651 |
|
652 |
|
653 |
|
654 | (function(module, exports, __webpack_require__) {
|
655 |
|
656 | "use strict";
|
657 |
|
658 |
|
659 |
|
660 |
|
661 |
|
662 |
|
663 |
|
664 |
|
665 | function Cancel(message) {
|
666 | this.message = message;
|
667 | }
|
668 |
|
669 | Cancel.prototype.toString = function toString() {
|
670 | return 'Cancel' + (this.message ? ': ' + this.message : '');
|
671 | };
|
672 |
|
673 | Cancel.prototype.__CANCEL__ = true;
|
674 |
|
675 | module.exports = Cancel;
|
676 |
|
677 |
|
678 | }),
|
679 |
|
680 | "../node_modules/axios/lib/cancel/CancelToken.js":
|
681 |
|
682 |
|
683 |
|
684 |
|
685 | (function(module, exports, __webpack_require__) {
|
686 |
|
687 | "use strict";
|
688 |
|
689 |
|
690 | var Cancel = __webpack_require__( "../node_modules/axios/lib/cancel/Cancel.js");
|
691 |
|
692 |
|
693 |
|
694 |
|
695 |
|
696 |
|
697 |
|
698 | function CancelToken(executor) {
|
699 | if (typeof executor !== 'function') {
|
700 | throw new TypeError('executor must be a function.');
|
701 | }
|
702 |
|
703 | var resolvePromise;
|
704 | this.promise = new Promise(function promiseExecutor(resolve) {
|
705 | resolvePromise = resolve;
|
706 | });
|
707 |
|
708 | var token = this;
|
709 | executor(function cancel(message) {
|
710 | if (token.reason) {
|
711 |
|
712 | return;
|
713 | }
|
714 |
|
715 | token.reason = new Cancel(message);
|
716 | resolvePromise(token.reason);
|
717 | });
|
718 | }
|
719 |
|
720 |
|
721 |
|
722 |
|
723 | CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
724 | if (this.reason) {
|
725 | throw this.reason;
|
726 | }
|
727 | };
|
728 |
|
729 |
|
730 |
|
731 |
|
732 |
|
733 | CancelToken.source = function source() {
|
734 | var cancel;
|
735 | var token = new CancelToken(function executor(c) {
|
736 | cancel = c;
|
737 | });
|
738 | return {
|
739 | token: token,
|
740 | cancel: cancel
|
741 | };
|
742 | };
|
743 |
|
744 | module.exports = CancelToken;
|
745 |
|
746 |
|
747 | }),
|
748 |
|
749 | "../node_modules/axios/lib/cancel/isCancel.js":
|
750 |
|
751 |
|
752 |
|
753 |
|
754 | (function(module, exports, __webpack_require__) {
|
755 |
|
756 | "use strict";
|
757 |
|
758 |
|
759 | module.exports = function isCancel(value) {
|
760 | return !!(value && value.__CANCEL__);
|
761 | };
|
762 |
|
763 |
|
764 | }),
|
765 |
|
766 | "../node_modules/axios/lib/core/Axios.js":
|
767 |
|
768 |
|
769 |
|
770 |
|
771 | (function(module, exports, __webpack_require__) {
|
772 |
|
773 | "use strict";
|
774 |
|
775 |
|
776 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
777 | var buildURL = __webpack_require__( "../node_modules/axios/lib/helpers/buildURL.js");
|
778 | var InterceptorManager = __webpack_require__( "../node_modules/axios/lib/core/InterceptorManager.js");
|
779 | var dispatchRequest = __webpack_require__( "../node_modules/axios/lib/core/dispatchRequest.js");
|
780 | var mergeConfig = __webpack_require__( "../node_modules/axios/lib/core/mergeConfig.js");
|
781 |
|
782 |
|
783 |
|
784 |
|
785 |
|
786 |
|
787 | function Axios(instanceConfig) {
|
788 | this.defaults = instanceConfig;
|
789 | this.interceptors = {
|
790 | request: new InterceptorManager(),
|
791 | response: new InterceptorManager()
|
792 | };
|
793 | }
|
794 |
|
795 |
|
796 |
|
797 |
|
798 |
|
799 |
|
800 | Axios.prototype.request = function request(config) {
|
801 |
|
802 |
|
803 | if (typeof config === 'string') {
|
804 | config = arguments[1] || {};
|
805 | config.url = arguments[0];
|
806 | } else {
|
807 | config = config || {};
|
808 | }
|
809 |
|
810 | config = mergeConfig(this.defaults, config);
|
811 |
|
812 |
|
813 | if (config.method) {
|
814 | config.method = config.method.toLowerCase();
|
815 | } else if (this.defaults.method) {
|
816 | config.method = this.defaults.method.toLowerCase();
|
817 | } else {
|
818 | config.method = 'get';
|
819 | }
|
820 |
|
821 |
|
822 | var chain = [dispatchRequest, undefined];
|
823 | var promise = Promise.resolve(config);
|
824 |
|
825 | this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
|
826 | chain.unshift(interceptor.fulfilled, interceptor.rejected);
|
827 | });
|
828 |
|
829 | this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
|
830 | chain.push(interceptor.fulfilled, interceptor.rejected);
|
831 | });
|
832 |
|
833 | while (chain.length) {
|
834 | promise = promise.then(chain.shift(), chain.shift());
|
835 | }
|
836 |
|
837 | return promise;
|
838 | };
|
839 |
|
840 | Axios.prototype.getUri = function getUri(config) {
|
841 | config = mergeConfig(this.defaults, config);
|
842 | return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
843 | };
|
844 |
|
845 |
|
846 | utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
847 |
|
848 | Axios.prototype[method] = function(url, config) {
|
849 | return this.request(utils.merge(config || {}, {
|
850 | method: method,
|
851 | url: url
|
852 | }));
|
853 | };
|
854 | });
|
855 |
|
856 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
857 |
|
858 | Axios.prototype[method] = function(url, data, config) {
|
859 | return this.request(utils.merge(config || {}, {
|
860 | method: method,
|
861 | url: url,
|
862 | data: data
|
863 | }));
|
864 | };
|
865 | });
|
866 |
|
867 | module.exports = Axios;
|
868 |
|
869 |
|
870 | }),
|
871 |
|
872 | "../node_modules/axios/lib/core/InterceptorManager.js":
|
873 |
|
874 |
|
875 |
|
876 |
|
877 | (function(module, exports, __webpack_require__) {
|
878 |
|
879 | "use strict";
|
880 |
|
881 |
|
882 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
883 |
|
884 | function InterceptorManager() {
|
885 | this.handlers = [];
|
886 | }
|
887 |
|
888 |
|
889 |
|
890 |
|
891 |
|
892 |
|
893 |
|
894 |
|
895 |
|
896 | InterceptorManager.prototype.use = function use(fulfilled, rejected) {
|
897 | this.handlers.push({
|
898 | fulfilled: fulfilled,
|
899 | rejected: rejected
|
900 | });
|
901 | return this.handlers.length - 1;
|
902 | };
|
903 |
|
904 |
|
905 |
|
906 |
|
907 |
|
908 |
|
909 | InterceptorManager.prototype.eject = function eject(id) {
|
910 | if (this.handlers[id]) {
|
911 | this.handlers[id] = null;
|
912 | }
|
913 | };
|
914 |
|
915 |
|
916 |
|
917 |
|
918 |
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | InterceptorManager.prototype.forEach = function forEach(fn) {
|
924 | utils.forEach(this.handlers, function forEachHandler(h) {
|
925 | if (h !== null) {
|
926 | fn(h);
|
927 | }
|
928 | });
|
929 | };
|
930 |
|
931 | module.exports = InterceptorManager;
|
932 |
|
933 |
|
934 | }),
|
935 |
|
936 | "../node_modules/axios/lib/core/buildFullPath.js":
|
937 |
|
938 |
|
939 |
|
940 |
|
941 | (function(module, exports, __webpack_require__) {
|
942 |
|
943 | "use strict";
|
944 |
|
945 |
|
946 | var isAbsoluteURL = __webpack_require__( "../node_modules/axios/lib/helpers/isAbsoluteURL.js");
|
947 | var combineURLs = __webpack_require__( "../node_modules/axios/lib/helpers/combineURLs.js");
|
948 |
|
949 |
|
950 |
|
951 |
|
952 |
|
953 |
|
954 |
|
955 |
|
956 |
|
957 |
|
958 | module.exports = function buildFullPath(baseURL, requestedURL) {
|
959 | if (baseURL && !isAbsoluteURL(requestedURL)) {
|
960 | return combineURLs(baseURL, requestedURL);
|
961 | }
|
962 | return requestedURL;
|
963 | };
|
964 |
|
965 |
|
966 | }),
|
967 |
|
968 | "../node_modules/axios/lib/core/createError.js":
|
969 |
|
970 |
|
971 |
|
972 |
|
973 | (function(module, exports, __webpack_require__) {
|
974 |
|
975 | "use strict";
|
976 |
|
977 |
|
978 | var enhanceError = __webpack_require__( "../node_modules/axios/lib/core/enhanceError.js");
|
979 |
|
980 |
|
981 |
|
982 |
|
983 |
|
984 |
|
985 |
|
986 |
|
987 |
|
988 |
|
989 |
|
990 | module.exports = function createError(message, config, code, request, response) {
|
991 | var error = new Error(message);
|
992 | return enhanceError(error, config, code, request, response);
|
993 | };
|
994 |
|
995 |
|
996 | }),
|
997 |
|
998 | "../node_modules/axios/lib/core/dispatchRequest.js":
|
999 |
|
1000 |
|
1001 |
|
1002 |
|
1003 | (function(module, exports, __webpack_require__) {
|
1004 |
|
1005 | "use strict";
|
1006 |
|
1007 |
|
1008 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1009 | var transformData = __webpack_require__( "../node_modules/axios/lib/core/transformData.js");
|
1010 | var isCancel = __webpack_require__( "../node_modules/axios/lib/cancel/isCancel.js");
|
1011 | var defaults = __webpack_require__( "../node_modules/axios/lib/defaults.js");
|
1012 |
|
1013 |
|
1014 |
|
1015 |
|
1016 | function throwIfCancellationRequested(config) {
|
1017 | if (config.cancelToken) {
|
1018 | config.cancelToken.throwIfRequested();
|
1019 | }
|
1020 | }
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 | module.exports = function dispatchRequest(config) {
|
1029 | throwIfCancellationRequested(config);
|
1030 |
|
1031 |
|
1032 | config.headers = config.headers || {};
|
1033 |
|
1034 |
|
1035 | config.data = transformData(
|
1036 | config.data,
|
1037 | config.headers,
|
1038 | config.transformRequest
|
1039 | );
|
1040 |
|
1041 |
|
1042 | config.headers = utils.merge(
|
1043 | config.headers.common || {},
|
1044 | config.headers[config.method] || {},
|
1045 | config.headers
|
1046 | );
|
1047 |
|
1048 | utils.forEach(
|
1049 | ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
1050 | function cleanHeaderConfig(method) {
|
1051 | delete config.headers[method];
|
1052 | }
|
1053 | );
|
1054 |
|
1055 | var adapter = config.adapter || defaults.adapter;
|
1056 |
|
1057 | return adapter(config).then(function onAdapterResolution(response) {
|
1058 | throwIfCancellationRequested(config);
|
1059 |
|
1060 |
|
1061 | response.data = transformData(
|
1062 | response.data,
|
1063 | response.headers,
|
1064 | config.transformResponse
|
1065 | );
|
1066 |
|
1067 | return response;
|
1068 | }, function onAdapterRejection(reason) {
|
1069 | if (!isCancel(reason)) {
|
1070 | throwIfCancellationRequested(config);
|
1071 |
|
1072 |
|
1073 | if (reason && reason.response) {
|
1074 | reason.response.data = transformData(
|
1075 | reason.response.data,
|
1076 | reason.response.headers,
|
1077 | config.transformResponse
|
1078 | );
|
1079 | }
|
1080 | }
|
1081 |
|
1082 | return Promise.reject(reason);
|
1083 | });
|
1084 | };
|
1085 |
|
1086 |
|
1087 | }),
|
1088 |
|
1089 | "../node_modules/axios/lib/core/enhanceError.js":
|
1090 |
|
1091 |
|
1092 |
|
1093 |
|
1094 | (function(module, exports, __webpack_require__) {
|
1095 |
|
1096 | "use strict";
|
1097 |
|
1098 |
|
1099 |
|
1100 |
|
1101 |
|
1102 |
|
1103 |
|
1104 |
|
1105 |
|
1106 |
|
1107 |
|
1108 |
|
1109 | module.exports = function enhanceError(error, config, code, request, response) {
|
1110 | error.config = config;
|
1111 | if (code) {
|
1112 | error.code = code;
|
1113 | }
|
1114 |
|
1115 | error.request = request;
|
1116 | error.response = response;
|
1117 | error.isAxiosError = true;
|
1118 |
|
1119 | error.toJSON = function() {
|
1120 | return {
|
1121 |
|
1122 | message: this.message,
|
1123 | name: this.name,
|
1124 |
|
1125 | description: this.description,
|
1126 | number: this.number,
|
1127 |
|
1128 | fileName: this.fileName,
|
1129 | lineNumber: this.lineNumber,
|
1130 | columnNumber: this.columnNumber,
|
1131 | stack: this.stack,
|
1132 |
|
1133 | config: this.config,
|
1134 | code: this.code
|
1135 | };
|
1136 | };
|
1137 | return error;
|
1138 | };
|
1139 |
|
1140 |
|
1141 | }),
|
1142 |
|
1143 | "../node_modules/axios/lib/core/mergeConfig.js":
|
1144 |
|
1145 |
|
1146 |
|
1147 |
|
1148 | (function(module, exports, __webpack_require__) {
|
1149 |
|
1150 | "use strict";
|
1151 |
|
1152 |
|
1153 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1154 |
|
1155 |
|
1156 |
|
1157 |
|
1158 |
|
1159 |
|
1160 |
|
1161 |
|
1162 |
|
1163 | module.exports = function mergeConfig(config1, config2) {
|
1164 |
|
1165 | config2 = config2 || {};
|
1166 | var config = {};
|
1167 |
|
1168 | var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
|
1169 | var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
|
1170 | var defaultToConfig2Keys = [
|
1171 | 'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
1172 | 'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
1173 | 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
|
1174 | 'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
|
1175 | 'httpsAgent', 'cancelToken', 'socketPath'
|
1176 | ];
|
1177 |
|
1178 | utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
1179 | if (typeof config2[prop] !== 'undefined') {
|
1180 | config[prop] = config2[prop];
|
1181 | }
|
1182 | });
|
1183 |
|
1184 | utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
|
1185 | if (utils.isObject(config2[prop])) {
|
1186 | config[prop] = utils.deepMerge(config1[prop], config2[prop]);
|
1187 | } else if (typeof config2[prop] !== 'undefined') {
|
1188 | config[prop] = config2[prop];
|
1189 | } else if (utils.isObject(config1[prop])) {
|
1190 | config[prop] = utils.deepMerge(config1[prop]);
|
1191 | } else if (typeof config1[prop] !== 'undefined') {
|
1192 | config[prop] = config1[prop];
|
1193 | }
|
1194 | });
|
1195 |
|
1196 | utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
1197 | if (typeof config2[prop] !== 'undefined') {
|
1198 | config[prop] = config2[prop];
|
1199 | } else if (typeof config1[prop] !== 'undefined') {
|
1200 | config[prop] = config1[prop];
|
1201 | }
|
1202 | });
|
1203 |
|
1204 | var axiosKeys = valueFromConfig2Keys
|
1205 | .concat(mergeDeepPropertiesKeys)
|
1206 | .concat(defaultToConfig2Keys);
|
1207 |
|
1208 | var otherKeys = Object
|
1209 | .keys(config2)
|
1210 | .filter(function filterAxiosKeys(key) {
|
1211 | return axiosKeys.indexOf(key) === -1;
|
1212 | });
|
1213 |
|
1214 | utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
|
1215 | if (typeof config2[prop] !== 'undefined') {
|
1216 | config[prop] = config2[prop];
|
1217 | } else if (typeof config1[prop] !== 'undefined') {
|
1218 | config[prop] = config1[prop];
|
1219 | }
|
1220 | });
|
1221 |
|
1222 | return config;
|
1223 | };
|
1224 |
|
1225 |
|
1226 | }),
|
1227 |
|
1228 | "../node_modules/axios/lib/core/settle.js":
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 | (function(module, exports, __webpack_require__) {
|
1234 |
|
1235 | "use strict";
|
1236 |
|
1237 |
|
1238 | var createError = __webpack_require__( "../node_modules/axios/lib/core/createError.js");
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 | module.exports = function settle(resolve, reject, response) {
|
1248 | var validateStatus = response.config.validateStatus;
|
1249 | if (!validateStatus || validateStatus(response.status)) {
|
1250 | resolve(response);
|
1251 | } else {
|
1252 | reject(createError(
|
1253 | 'Request failed with status code ' + response.status,
|
1254 | response.config,
|
1255 | null,
|
1256 | response.request,
|
1257 | response
|
1258 | ));
|
1259 | }
|
1260 | };
|
1261 |
|
1262 |
|
1263 | }),
|
1264 |
|
1265 | "../node_modules/axios/lib/core/transformData.js":
|
1266 |
|
1267 |
|
1268 |
|
1269 |
|
1270 | (function(module, exports, __webpack_require__) {
|
1271 |
|
1272 | "use strict";
|
1273 |
|
1274 |
|
1275 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1276 |
|
1277 |
|
1278 |
|
1279 |
|
1280 |
|
1281 |
|
1282 |
|
1283 |
|
1284 |
|
1285 | module.exports = function transformData(data, headers, fns) {
|
1286 |
|
1287 | utils.forEach(fns, function transform(fn) {
|
1288 | data = fn(data, headers);
|
1289 | });
|
1290 |
|
1291 | return data;
|
1292 | };
|
1293 |
|
1294 |
|
1295 | }),
|
1296 |
|
1297 | "../node_modules/axios/lib/defaults.js":
|
1298 |
|
1299 |
|
1300 |
|
1301 |
|
1302 | (function(module, exports, __webpack_require__) {
|
1303 |
|
1304 | "use strict";
|
1305 |
|
1306 |
|
1307 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1308 | var normalizeHeaderName = __webpack_require__( "../node_modules/axios/lib/helpers/normalizeHeaderName.js");
|
1309 |
|
1310 | var DEFAULT_CONTENT_TYPE = {
|
1311 | 'Content-Type': 'application/x-www-form-urlencoded'
|
1312 | };
|
1313 |
|
1314 | function setContentTypeIfUnset(headers, value) {
|
1315 | if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
|
1316 | headers['Content-Type'] = value;
|
1317 | }
|
1318 | }
|
1319 |
|
1320 | function getDefaultAdapter() {
|
1321 | var adapter;
|
1322 | if (typeof XMLHttpRequest !== 'undefined') {
|
1323 |
|
1324 | adapter = __webpack_require__( "../node_modules/axios/lib/adapters/xhr.js");
|
1325 | } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
1326 |
|
1327 | adapter = __webpack_require__( "../node_modules/axios/lib/adapters/http.js");
|
1328 | }
|
1329 | return adapter;
|
1330 | }
|
1331 |
|
1332 | var defaults = {
|
1333 | adapter: getDefaultAdapter(),
|
1334 |
|
1335 | transformRequest: [function transformRequest(data, headers) {
|
1336 | normalizeHeaderName(headers, 'Accept');
|
1337 | normalizeHeaderName(headers, 'Content-Type');
|
1338 | if (utils.isFormData(data) ||
|
1339 | utils.isArrayBuffer(data) ||
|
1340 | utils.isBuffer(data) ||
|
1341 | utils.isStream(data) ||
|
1342 | utils.isFile(data) ||
|
1343 | utils.isBlob(data)
|
1344 | ) {
|
1345 | return data;
|
1346 | }
|
1347 | if (utils.isArrayBufferView(data)) {
|
1348 | return data.buffer;
|
1349 | }
|
1350 | if (utils.isURLSearchParams(data)) {
|
1351 | setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
1352 | return data.toString();
|
1353 | }
|
1354 | if (utils.isObject(data)) {
|
1355 | setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
|
1356 | return JSON.stringify(data);
|
1357 | }
|
1358 | return data;
|
1359 | }],
|
1360 |
|
1361 | transformResponse: [function transformResponse(data) {
|
1362 |
|
1363 | if (typeof data === 'string') {
|
1364 | try {
|
1365 | data = JSON.parse(data);
|
1366 | } catch (e) { }
|
1367 | }
|
1368 | return data;
|
1369 | }],
|
1370 |
|
1371 | |
1372 |
|
1373 |
|
1374 |
|
1375 | timeout: 0,
|
1376 |
|
1377 | xsrfCookieName: 'XSRF-TOKEN',
|
1378 | xsrfHeaderName: 'X-XSRF-TOKEN',
|
1379 |
|
1380 | maxContentLength: -1,
|
1381 |
|
1382 | validateStatus: function validateStatus(status) {
|
1383 | return status >= 200 && status < 300;
|
1384 | }
|
1385 | };
|
1386 |
|
1387 | defaults.headers = {
|
1388 | common: {
|
1389 | 'Accept': 'application/json, text/plain, */*'
|
1390 | }
|
1391 | };
|
1392 |
|
1393 | utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
|
1394 | defaults.headers[method] = {};
|
1395 | });
|
1396 |
|
1397 | utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
1398 | defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
|
1399 | });
|
1400 |
|
1401 | module.exports = defaults;
|
1402 |
|
1403 |
|
1404 | }),
|
1405 |
|
1406 | "../node_modules/axios/lib/helpers/bind.js":
|
1407 |
|
1408 |
|
1409 |
|
1410 |
|
1411 | (function(module, exports, __webpack_require__) {
|
1412 |
|
1413 | "use strict";
|
1414 |
|
1415 |
|
1416 | module.exports = function bind(fn, thisArg) {
|
1417 | return function wrap() {
|
1418 | var args = new Array(arguments.length);
|
1419 | for (var i = 0; i < args.length; i++) {
|
1420 | args[i] = arguments[i];
|
1421 | }
|
1422 | return fn.apply(thisArg, args);
|
1423 | };
|
1424 | };
|
1425 |
|
1426 |
|
1427 | }),
|
1428 |
|
1429 | "../node_modules/axios/lib/helpers/buildURL.js":
|
1430 |
|
1431 |
|
1432 |
|
1433 |
|
1434 | (function(module, exports, __webpack_require__) {
|
1435 |
|
1436 | "use strict";
|
1437 |
|
1438 |
|
1439 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1440 |
|
1441 | function encode(val) {
|
1442 | return encodeURIComponent(val).
|
1443 | replace(/%40/gi, '@').
|
1444 | replace(/%3A/gi, ':').
|
1445 | replace(/%24/g, '$').
|
1446 | replace(/%2C/gi, ',').
|
1447 | replace(/%20/g, '+').
|
1448 | replace(/%5B/gi, '[').
|
1449 | replace(/%5D/gi, ']');
|
1450 | }
|
1451 |
|
1452 |
|
1453 |
|
1454 |
|
1455 |
|
1456 |
|
1457 |
|
1458 |
|
1459 | module.exports = function buildURL(url, params, paramsSerializer) {
|
1460 |
|
1461 | if (!params) {
|
1462 | return url;
|
1463 | }
|
1464 |
|
1465 | var serializedParams;
|
1466 | if (paramsSerializer) {
|
1467 | serializedParams = paramsSerializer(params);
|
1468 | } else if (utils.isURLSearchParams(params)) {
|
1469 | serializedParams = params.toString();
|
1470 | } else {
|
1471 | var parts = [];
|
1472 |
|
1473 | utils.forEach(params, function serialize(val, key) {
|
1474 | if (val === null || typeof val === 'undefined') {
|
1475 | return;
|
1476 | }
|
1477 |
|
1478 | if (utils.isArray(val)) {
|
1479 | key = key + '[]';
|
1480 | } else {
|
1481 | val = [val];
|
1482 | }
|
1483 |
|
1484 | utils.forEach(val, function parseValue(v) {
|
1485 | if (utils.isDate(v)) {
|
1486 | v = v.toISOString();
|
1487 | } else if (utils.isObject(v)) {
|
1488 | v = JSON.stringify(v);
|
1489 | }
|
1490 | parts.push(encode(key) + '=' + encode(v));
|
1491 | });
|
1492 | });
|
1493 |
|
1494 | serializedParams = parts.join('&');
|
1495 | }
|
1496 |
|
1497 | if (serializedParams) {
|
1498 | var hashmarkIndex = url.indexOf('#');
|
1499 | if (hashmarkIndex !== -1) {
|
1500 | url = url.slice(0, hashmarkIndex);
|
1501 | }
|
1502 |
|
1503 | url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
|
1504 | }
|
1505 |
|
1506 | return url;
|
1507 | };
|
1508 |
|
1509 |
|
1510 | }),
|
1511 |
|
1512 | "../node_modules/axios/lib/helpers/combineURLs.js":
|
1513 |
|
1514 |
|
1515 |
|
1516 |
|
1517 | (function(module, exports, __webpack_require__) {
|
1518 |
|
1519 | "use strict";
|
1520 |
|
1521 |
|
1522 |
|
1523 |
|
1524 |
|
1525 |
|
1526 |
|
1527 |
|
1528 |
|
1529 | module.exports = function combineURLs(baseURL, relativeURL) {
|
1530 | return relativeURL
|
1531 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
1532 | : baseURL;
|
1533 | };
|
1534 |
|
1535 |
|
1536 | }),
|
1537 |
|
1538 | "../node_modules/axios/lib/helpers/cookies.js":
|
1539 |
|
1540 |
|
1541 |
|
1542 |
|
1543 | (function(module, exports, __webpack_require__) {
|
1544 |
|
1545 | "use strict";
|
1546 |
|
1547 |
|
1548 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1549 |
|
1550 | module.exports = (
|
1551 | utils.isStandardBrowserEnv() ?
|
1552 |
|
1553 |
|
1554 | (function standardBrowserEnv() {
|
1555 | return {
|
1556 | write: function write(name, value, expires, path, domain, secure) {
|
1557 | var cookie = [];
|
1558 | cookie.push(name + '=' + encodeURIComponent(value));
|
1559 |
|
1560 | if (utils.isNumber(expires)) {
|
1561 | cookie.push('expires=' + new Date(expires).toGMTString());
|
1562 | }
|
1563 |
|
1564 | if (utils.isString(path)) {
|
1565 | cookie.push('path=' + path);
|
1566 | }
|
1567 |
|
1568 | if (utils.isString(domain)) {
|
1569 | cookie.push('domain=' + domain);
|
1570 | }
|
1571 |
|
1572 | if (secure === true) {
|
1573 | cookie.push('secure');
|
1574 | }
|
1575 |
|
1576 | document.cookie = cookie.join('; ');
|
1577 | },
|
1578 |
|
1579 | read: function read(name) {
|
1580 | var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
1581 | return (match ? decodeURIComponent(match[3]) : null);
|
1582 | },
|
1583 |
|
1584 | remove: function remove(name) {
|
1585 | this.write(name, '', Date.now() - 86400000);
|
1586 | }
|
1587 | };
|
1588 | })() :
|
1589 |
|
1590 |
|
1591 | (function nonStandardBrowserEnv() {
|
1592 | return {
|
1593 | write: function write() {},
|
1594 | read: function read() { return null; },
|
1595 | remove: function remove() {}
|
1596 | };
|
1597 | })()
|
1598 | );
|
1599 |
|
1600 |
|
1601 | }),
|
1602 |
|
1603 | "../node_modules/axios/lib/helpers/isAbsoluteURL.js":
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 | (function(module, exports, __webpack_require__) {
|
1609 |
|
1610 | "use strict";
|
1611 |
|
1612 |
|
1613 |
|
1614 |
|
1615 |
|
1616 |
|
1617 |
|
1618 |
|
1619 | module.exports = function isAbsoluteURL(url) {
|
1620 |
|
1621 |
|
1622 |
|
1623 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
1624 | };
|
1625 |
|
1626 |
|
1627 | }),
|
1628 |
|
1629 | "../node_modules/axios/lib/helpers/isURLSameOrigin.js":
|
1630 |
|
1631 |
|
1632 |
|
1633 |
|
1634 | (function(module, exports, __webpack_require__) {
|
1635 |
|
1636 | "use strict";
|
1637 |
|
1638 |
|
1639 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1640 |
|
1641 | module.exports = (
|
1642 | utils.isStandardBrowserEnv() ?
|
1643 |
|
1644 |
|
1645 |
|
1646 | (function standardBrowserEnv() {
|
1647 | var msie = /(msie|trident)/i.test(navigator.userAgent);
|
1648 | var urlParsingNode = document.createElement('a');
|
1649 | var originURL;
|
1650 |
|
1651 | |
1652 |
|
1653 |
|
1654 |
|
1655 |
|
1656 |
|
1657 | function resolveURL(url) {
|
1658 | var href = url;
|
1659 |
|
1660 | if (msie) {
|
1661 |
|
1662 | urlParsingNode.setAttribute('href', href);
|
1663 | href = urlParsingNode.href;
|
1664 | }
|
1665 |
|
1666 | urlParsingNode.setAttribute('href', href);
|
1667 |
|
1668 |
|
1669 | return {
|
1670 | href: urlParsingNode.href,
|
1671 | protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
|
1672 | host: urlParsingNode.host,
|
1673 | search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
|
1674 | hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
|
1675 | hostname: urlParsingNode.hostname,
|
1676 | port: urlParsingNode.port,
|
1677 | pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
|
1678 | urlParsingNode.pathname :
|
1679 | '/' + urlParsingNode.pathname
|
1680 | };
|
1681 | }
|
1682 |
|
1683 | originURL = resolveURL(window.location.href);
|
1684 |
|
1685 | |
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 | return function isURLSameOrigin(requestURL) {
|
1692 | var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
1693 | return (parsed.protocol === originURL.protocol &&
|
1694 | parsed.host === originURL.host);
|
1695 | };
|
1696 | })() :
|
1697 |
|
1698 |
|
1699 | (function nonStandardBrowserEnv() {
|
1700 | return function isURLSameOrigin() {
|
1701 | return true;
|
1702 | };
|
1703 | })()
|
1704 | );
|
1705 |
|
1706 |
|
1707 | }),
|
1708 |
|
1709 | "../node_modules/axios/lib/helpers/normalizeHeaderName.js":
|
1710 |
|
1711 |
|
1712 |
|
1713 |
|
1714 | (function(module, exports, __webpack_require__) {
|
1715 |
|
1716 | "use strict";
|
1717 |
|
1718 |
|
1719 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1720 |
|
1721 | module.exports = function normalizeHeaderName(headers, normalizedName) {
|
1722 | utils.forEach(headers, function processHeader(value, name) {
|
1723 | if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
1724 | headers[normalizedName] = value;
|
1725 | delete headers[name];
|
1726 | }
|
1727 | });
|
1728 | };
|
1729 |
|
1730 |
|
1731 | }),
|
1732 |
|
1733 | "../node_modules/axios/lib/helpers/parseHeaders.js":
|
1734 |
|
1735 |
|
1736 |
|
1737 |
|
1738 | (function(module, exports, __webpack_require__) {
|
1739 |
|
1740 | "use strict";
|
1741 |
|
1742 |
|
1743 | var utils = __webpack_require__( "../node_modules/axios/lib/utils.js");
|
1744 |
|
1745 |
|
1746 |
|
1747 | var ignoreDuplicateOf = [
|
1748 | 'age', 'authorization', 'content-length', 'content-type', 'etag',
|
1749 | 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
1750 | 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
1751 | 'referer', 'retry-after', 'user-agent'
|
1752 | ];
|
1753 |
|
1754 |
|
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 |
|
1760 |
|
1761 |
|
1762 |
|
1763 |
|
1764 |
|
1765 |
|
1766 |
|
1767 | module.exports = function parseHeaders(headers) {
|
1768 | var parsed = {};
|
1769 | var key;
|
1770 | var val;
|
1771 | var i;
|
1772 |
|
1773 | if (!headers) { return parsed; }
|
1774 |
|
1775 | utils.forEach(headers.split('\n'), function parser(line) {
|
1776 | i = line.indexOf(':');
|
1777 | key = utils.trim(line.substr(0, i)).toLowerCase();
|
1778 | val = utils.trim(line.substr(i + 1));
|
1779 |
|
1780 | if (key) {
|
1781 | if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
1782 | return;
|
1783 | }
|
1784 | if (key === 'set-cookie') {
|
1785 | parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
1786 | } else {
|
1787 | parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
1788 | }
|
1789 | }
|
1790 | });
|
1791 |
|
1792 | return parsed;
|
1793 | };
|
1794 |
|
1795 |
|
1796 | }),
|
1797 |
|
1798 | "../node_modules/axios/lib/helpers/spread.js":
|
1799 |
|
1800 |
|
1801 |
|
1802 |
|
1803 | (function(module, exports, __webpack_require__) {
|
1804 |
|
1805 | "use strict";
|
1806 |
|
1807 |
|
1808 |
|
1809 |
|
1810 |
|
1811 |
|
1812 |
|
1813 |
|
1814 |
|
1815 |
|
1816 |
|
1817 |
|
1818 |
|
1819 |
|
1820 |
|
1821 |
|
1822 |
|
1823 |
|
1824 |
|
1825 |
|
1826 |
|
1827 |
|
1828 | module.exports = function spread(callback) {
|
1829 | return function wrap(arr) {
|
1830 | return callback.apply(null, arr);
|
1831 | };
|
1832 | };
|
1833 |
|
1834 |
|
1835 | }),
|
1836 |
|
1837 | "../node_modules/axios/lib/utils.js":
|
1838 |
|
1839 |
|
1840 |
|
1841 |
|
1842 | (function(module, exports, __webpack_require__) {
|
1843 |
|
1844 | "use strict";
|
1845 |
|
1846 |
|
1847 | var bind = __webpack_require__( "../node_modules/axios/lib/helpers/bind.js");
|
1848 |
|
1849 |
|
1850 |
|
1851 |
|
1852 |
|
1853 | var toString = Object.prototype.toString;
|
1854 |
|
1855 |
|
1856 |
|
1857 |
|
1858 |
|
1859 |
|
1860 |
|
1861 | function isArray(val) {
|
1862 | return toString.call(val) === '[object Array]';
|
1863 | }
|
1864 |
|
1865 |
|
1866 |
|
1867 |
|
1868 |
|
1869 |
|
1870 |
|
1871 | function isUndefined(val) {
|
1872 | return typeof val === 'undefined';
|
1873 | }
|
1874 |
|
1875 |
|
1876 |
|
1877 |
|
1878 |
|
1879 |
|
1880 |
|
1881 | function isBuffer(val) {
|
1882 | return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
1883 | && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
1884 | }
|
1885 |
|
1886 |
|
1887 |
|
1888 |
|
1889 |
|
1890 |
|
1891 |
|
1892 | function isArrayBuffer(val) {
|
1893 | return toString.call(val) === '[object ArrayBuffer]';
|
1894 | }
|
1895 |
|
1896 |
|
1897 |
|
1898 |
|
1899 |
|
1900 |
|
1901 |
|
1902 | function isFormData(val) {
|
1903 | return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
1904 | }
|
1905 |
|
1906 |
|
1907 |
|
1908 |
|
1909 |
|
1910 |
|
1911 |
|
1912 | function isArrayBufferView(val) {
|
1913 | var result;
|
1914 | if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
1915 | result = ArrayBuffer.isView(val);
|
1916 | } else {
|
1917 | result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
|
1918 | }
|
1919 | return result;
|
1920 | }
|
1921 |
|
1922 |
|
1923 |
|
1924 |
|
1925 |
|
1926 |
|
1927 |
|
1928 | function isString(val) {
|
1929 | return typeof val === 'string';
|
1930 | }
|
1931 |
|
1932 |
|
1933 |
|
1934 |
|
1935 |
|
1936 |
|
1937 |
|
1938 | function isNumber(val) {
|
1939 | return typeof val === 'number';
|
1940 | }
|
1941 |
|
1942 |
|
1943 |
|
1944 |
|
1945 |
|
1946 |
|
1947 |
|
1948 | function isObject(val) {
|
1949 | return val !== null && typeof val === 'object';
|
1950 | }
|
1951 |
|
1952 |
|
1953 |
|
1954 |
|
1955 |
|
1956 |
|
1957 |
|
1958 | function isDate(val) {
|
1959 | return toString.call(val) === '[object Date]';
|
1960 | }
|
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 |
|
1968 | function isFile(val) {
|
1969 | return toString.call(val) === '[object File]';
|
1970 | }
|
1971 |
|
1972 |
|
1973 |
|
1974 |
|
1975 |
|
1976 |
|
1977 |
|
1978 | function isBlob(val) {
|
1979 | return toString.call(val) === '[object Blob]';
|
1980 | }
|
1981 |
|
1982 |
|
1983 |
|
1984 |
|
1985 |
|
1986 |
|
1987 |
|
1988 | function isFunction(val) {
|
1989 | return toString.call(val) === '[object Function]';
|
1990 | }
|
1991 |
|
1992 |
|
1993 |
|
1994 |
|
1995 |
|
1996 |
|
1997 |
|
1998 | function isStream(val) {
|
1999 | return isObject(val) && isFunction(val.pipe);
|
2000 | }
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 |
|
2007 |
|
2008 | function isURLSearchParams(val) {
|
2009 | return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
2010 | }
|
2011 |
|
2012 |
|
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 |
|
2018 | function trim(str) {
|
2019 | return str.replace(/^\s*/, '').replace(/\s*$/, '');
|
2020 | }
|
2021 |
|
2022 |
|
2023 |
|
2024 |
|
2025 |
|
2026 |
|
2027 |
|
2028 |
|
2029 |
|
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 |
|
2035 |
|
2036 |
|
2037 | function isStandardBrowserEnv() {
|
2038 | if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
|
2039 | navigator.product === 'NativeScript' ||
|
2040 | navigator.product === 'NS')) {
|
2041 | return false;
|
2042 | }
|
2043 | return (
|
2044 | typeof window !== 'undefined' &&
|
2045 | typeof document !== 'undefined'
|
2046 | );
|
2047 | }
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 |
|
2053 |
|
2054 |
|
2055 |
|
2056 |
|
2057 |
|
2058 |
|
2059 |
|
2060 |
|
2061 | function forEach(obj, fn) {
|
2062 |
|
2063 | if (obj === null || typeof obj === 'undefined') {
|
2064 | return;
|
2065 | }
|
2066 |
|
2067 |
|
2068 | if (typeof obj !== 'object') {
|
2069 |
|
2070 | obj = [obj];
|
2071 | }
|
2072 |
|
2073 | if (isArray(obj)) {
|
2074 |
|
2075 | for (var i = 0, l = obj.length; i < l; i++) {
|
2076 | fn.call(null, obj[i], i, obj);
|
2077 | }
|
2078 | } else {
|
2079 |
|
2080 | for (var key in obj) {
|
2081 | if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
2082 | fn.call(null, obj[key], key, obj);
|
2083 | }
|
2084 | }
|
2085 | }
|
2086 | }
|
2087 |
|
2088 |
|
2089 |
|
2090 |
|
2091 |
|
2092 |
|
2093 |
|
2094 |
|
2095 |
|
2096 |
|
2097 |
|
2098 |
|
2099 |
|
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 | function merge(/* obj1, obj2, obj3, ... */) {
|
2106 | var result = {};
|
2107 | function assignValue(val, key) {
|
2108 | if (typeof result[key] === 'object' && typeof val === 'object') {
|
2109 | result[key] = merge(result[key], val);
|
2110 | } else {
|
2111 | result[key] = val;
|
2112 | }
|
2113 | }
|
2114 |
|
2115 | for (var i = 0, l = arguments.length; i < l; i++) {
|
2116 | forEach(arguments[i], assignValue);
|
2117 | }
|
2118 | return result;
|
2119 | }
|
2120 |
|
2121 |
|
2122 |
|
2123 |
|
2124 |
|
2125 |
|
2126 |
|
2127 |
|
2128 |
|
2129 | function deepMerge(/* obj1, obj2, obj3, ... */) {
|
2130 | var result = {};
|
2131 | function assignValue(val, key) {
|
2132 | if (typeof result[key] === 'object' && typeof val === 'object') {
|
2133 | result[key] = deepMerge(result[key], val);
|
2134 | } else if (typeof val === 'object') {
|
2135 | result[key] = deepMerge({}, val);
|
2136 | } else {
|
2137 | result[key] = val;
|
2138 | }
|
2139 | }
|
2140 |
|
2141 | for (var i = 0, l = arguments.length; i < l; i++) {
|
2142 | forEach(arguments[i], assignValue);
|
2143 | }
|
2144 | return result;
|
2145 | }
|
2146 |
|
2147 |
|
2148 |
|
2149 |
|
2150 |
|
2151 |
|
2152 |
|
2153 |
|
2154 |
|
2155 | function extend(a, b, thisArg) {
|
2156 | forEach(b, function assignValue(val, key) {
|
2157 | if (thisArg && typeof val === 'function') {
|
2158 | a[key] = bind(val, thisArg);
|
2159 | } else {
|
2160 | a[key] = val;
|
2161 | }
|
2162 | });
|
2163 | return a;
|
2164 | }
|
2165 |
|
2166 | module.exports = {
|
2167 | isArray: isArray,
|
2168 | isArrayBuffer: isArrayBuffer,
|
2169 | isBuffer: isBuffer,
|
2170 | isFormData: isFormData,
|
2171 | isArrayBufferView: isArrayBufferView,
|
2172 | isString: isString,
|
2173 | isNumber: isNumber,
|
2174 | isObject: isObject,
|
2175 | isUndefined: isUndefined,
|
2176 | isDate: isDate,
|
2177 | isFile: isFile,
|
2178 | isBlob: isBlob,
|
2179 | isFunction: isFunction,
|
2180 | isStream: isStream,
|
2181 | isURLSearchParams: isURLSearchParams,
|
2182 | isStandardBrowserEnv: isStandardBrowserEnv,
|
2183 | forEach: forEach,
|
2184 | merge: merge,
|
2185 | deepMerge: deepMerge,
|
2186 | extend: extend,
|
2187 | trim: trim
|
2188 | };
|
2189 |
|
2190 |
|
2191 | }),
|
2192 |
|
2193 | "../node_modules/axios/package.json":
|
2194 |
|
2195 |
|
2196 |
|
2197 |
|
2198 | (function(module) {
|
2199 |
|
2200 | module.exports = JSON.parse("{\"_from\":\"axios@^0.19.0\",\"_id\":\"axios@0.19.2\",\"_inBundle\":false,\"_integrity\":\"sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==\",\"_location\":\"/axios\",\"_phantomChildren\":{},\"_requested\":{\"type\":\"range\",\"registry\":true,\"raw\":\"axios@^0.19.0\",\"name\":\"axios\",\"escapedName\":\"axios\",\"rawSpec\":\"^0.19.0\",\"saveSpec\":null,\"fetchSpec\":\"^0.19.0\"},\"_requiredBy\":[\"/\",\"/bundlesize\"],\"_resolved\":\"https://registry.npmjs.org/axios/-/axios-0.19.2.tgz\",\"_shasum\":\"3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27\",\"_spec\":\"axios@^0.19.0\",\"_where\":\"/home/circleci/project\",\"author\":{\"name\":\"Matt Zabriskie\"},\"browser\":{\"./lib/adapters/http.js\":\"./lib/adapters/xhr.js\"},\"bugs\":{\"url\":\"https://github.com/axios/axios/issues\"},\"bundleDependencies\":false,\"bundlesize\":[{\"path\":\"./dist/axios.min.js\",\"threshold\":\"5kB\"}],\"dependencies\":{\"follow-redirects\":\"1.5.10\"},\"deprecated\":false,\"description\":\"Promise based HTTP client for the browser and node.js\",\"devDependencies\":{\"bundlesize\":\"^0.17.0\",\"coveralls\":\"^3.0.0\",\"es6-promise\":\"^4.2.4\",\"grunt\":\"^1.0.2\",\"grunt-banner\":\"^0.6.0\",\"grunt-cli\":\"^1.2.0\",\"grunt-contrib-clean\":\"^1.1.0\",\"grunt-contrib-watch\":\"^1.0.0\",\"grunt-eslint\":\"^20.1.0\",\"grunt-karma\":\"^2.0.0\",\"grunt-mocha-test\":\"^0.13.3\",\"grunt-ts\":\"^6.0.0-beta.19\",\"grunt-webpack\":\"^1.0.18\",\"istanbul-instrumenter-loader\":\"^1.0.0\",\"jasmine-core\":\"^2.4.1\",\"karma\":\"^1.3.0\",\"karma-chrome-launcher\":\"^2.2.0\",\"karma-coverage\":\"^1.1.1\",\"karma-firefox-launcher\":\"^1.1.0\",\"karma-jasmine\":\"^1.1.1\",\"karma-jasmine-ajax\":\"^0.1.13\",\"karma-opera-launcher\":\"^1.0.0\",\"karma-safari-launcher\":\"^1.0.0\",\"karma-sauce-launcher\":\"^1.2.0\",\"karma-sinon\":\"^1.0.5\",\"karma-sourcemap-loader\":\"^0.3.7\",\"karma-webpack\":\"^1.7.0\",\"load-grunt-tasks\":\"^3.5.2\",\"minimist\":\"^1.2.0\",\"mocha\":\"^5.2.0\",\"sinon\":\"^4.5.0\",\"typescript\":\"^2.8.1\",\"url-search-params\":\"^0.10.0\",\"webpack\":\"^1.13.1\",\"webpack-dev-server\":\"^1.14.1\"},\"homepage\":\"https://github.com/axios/axios\",\"keywords\":[\"xhr\",\"http\",\"ajax\",\"promise\",\"node\"],\"license\":\"MIT\",\"main\":\"index.js\",\"name\":\"axios\",\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/axios/axios.git\"},\"scripts\":{\"build\":\"NODE_ENV=production grunt build\",\"coveralls\":\"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js\",\"examples\":\"node ./examples/server.js\",\"fix\":\"eslint --fix lib/**/*.js\",\"postversion\":\"git push && git push --tags\",\"preversion\":\"npm test\",\"start\":\"node ./sandbox/server.js\",\"test\":\"grunt test && bundlesize\",\"version\":\"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json\"},\"typings\":\"./index.d.ts\",\"version\":\"0.19.2\"}");
|
2201 |
|
2202 | }),
|
2203 |
|
2204 | "../node_modules/contentful-sdk-core/dist/index.es-modules.js":
|
2205 |
|
2206 |
|
2207 |
|
2208 |
|
2209 | (function(module, __webpack_exports__, __webpack_require__) {
|
2210 |
|
2211 | "use strict";
|
2212 | __webpack_require__.r(__webpack_exports__);
|
2213 | __webpack_require__.d(__webpack_exports__, "createHttpClient", function() { return createHttpClient; });
|
2214 | __webpack_require__.d(__webpack_exports__, "createRequestConfig", function() { return createRequestConfig; });
|
2215 | __webpack_require__.d(__webpack_exports__, "enforceObjPath", function() { return enforceObjPath; });
|
2216 | __webpack_require__.d(__webpack_exports__, "freezeSys", function() { return freezeSys; });
|
2217 | __webpack_require__.d(__webpack_exports__, "getUserAgentHeader", function() { return getUserAgentHeader; });
|
2218 | __webpack_require__.d(__webpack_exports__, "toPlainObject", function() { return toPlainObject; });
|
2219 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
2220 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
2221 | var qs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/qs/lib/index.js");
|
2222 | var qs__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_1__);
|
2223 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "../node_modules/lodash/isPlainObject.js");
|
2224 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2__);
|
2225 | var os__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "os");
|
2226 | var os__WEBPACK_IMPORTED_MODULE_3___default = __webpack_require__.n(os__WEBPACK_IMPORTED_MODULE_3__);
|
2227 |
|
2228 |
|
2229 |
|
2230 |
|
2231 |
|
2232 | function _defineProperty(obj, key, value) {
|
2233 | if (key in obj) {
|
2234 | Object.defineProperty(obj, key, {
|
2235 | value: value,
|
2236 | enumerable: true,
|
2237 | configurable: true,
|
2238 | writable: true
|
2239 | });
|
2240 | } else {
|
2241 | obj[key] = value;
|
2242 | }
|
2243 |
|
2244 | return obj;
|
2245 | }
|
2246 |
|
2247 | function ownKeys(object, enumerableOnly) {
|
2248 | var keys = Object.keys(object);
|
2249 |
|
2250 | if (Object.getOwnPropertySymbols) {
|
2251 | var symbols = Object.getOwnPropertySymbols(object);
|
2252 | if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
2253 | return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
2254 | });
|
2255 | keys.push.apply(keys, symbols);
|
2256 | }
|
2257 |
|
2258 | return keys;
|
2259 | }
|
2260 |
|
2261 | function _objectSpread2(target) {
|
2262 | for (var i = 1; i < arguments.length; i++) {
|
2263 | var source = arguments[i] != null ? arguments[i] : {};
|
2264 |
|
2265 | if (i % 2) {
|
2266 | ownKeys(Object(source), true).forEach(function (key) {
|
2267 | _defineProperty(target, key, source[key]);
|
2268 | });
|
2269 | } else if (Object.getOwnPropertyDescriptors) {
|
2270 | Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
2271 | } else {
|
2272 | ownKeys(Object(source)).forEach(function (key) {
|
2273 | Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
2274 | });
|
2275 | }
|
2276 | }
|
2277 |
|
2278 | return target;
|
2279 | }
|
2280 |
|
2281 | function _slicedToArray(arr, i) {
|
2282 | return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
2283 | }
|
2284 |
|
2285 | function _arrayWithHoles(arr) {
|
2286 | if (Array.isArray(arr)) return arr;
|
2287 | }
|
2288 |
|
2289 | function _iterableToArrayLimit(arr, i) {
|
2290 | if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
2291 | var _arr = [];
|
2292 | var _n = true;
|
2293 | var _d = false;
|
2294 | var _e = undefined;
|
2295 |
|
2296 | try {
|
2297 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
2298 | _arr.push(_s.value);
|
2299 |
|
2300 | if (i && _arr.length === i) break;
|
2301 | }
|
2302 | } catch (err) {
|
2303 | _d = true;
|
2304 | _e = err;
|
2305 | } finally {
|
2306 | try {
|
2307 | if (!_n && _i["return"] != null) _i["return"]();
|
2308 | } finally {
|
2309 | if (_d) throw _e;
|
2310 | }
|
2311 | }
|
2312 |
|
2313 | return _arr;
|
2314 | }
|
2315 |
|
2316 | function _unsupportedIterableToArray(o, minLen) {
|
2317 | if (!o) return;
|
2318 | if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
2319 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
2320 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
2321 | if (n === "Map" || n === "Set") return Array.from(n);
|
2322 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
2323 | }
|
2324 |
|
2325 | function _arrayLikeToArray(arr, len) {
|
2326 | if (len == null || len > arr.length) len = arr.length;
|
2327 |
|
2328 | for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
2329 |
|
2330 | return arr2;
|
2331 | }
|
2332 |
|
2333 | function _nonIterableRest() {
|
2334 | throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
2335 | }
|
2336 |
|
2337 | var attempts = {};
|
2338 | var networkErrorAttempts = 0;
|
2339 | function rateLimit(instance) {
|
2340 | var maxRetry = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
|
2341 | var _instance$defaults = instance.defaults,
|
2342 | _instance$defaults$re = _instance$defaults.responseLogger,
|
2343 | responseLogger = _instance$defaults$re === void 0 ? function () {
|
2344 | return undefined;
|
2345 | } : _instance$defaults$re,
|
2346 | _instance$defaults$re2 = _instance$defaults.requestLogger,
|
2347 | requestLogger = _instance$defaults$re2 === void 0 ? function () {
|
2348 | return undefined;
|
2349 | } : _instance$defaults$re2;
|
2350 | instance.interceptors.request.use(function (config) {
|
2351 | requestLogger(config);
|
2352 | return config;
|
2353 | }, function (error) {
|
2354 | return Promise.reject(error);
|
2355 | });
|
2356 | instance.interceptors.response.use(function (response) {
|
2357 |
|
2358 | responseLogger(response);
|
2359 | return response;
|
2360 | }, function (error) {
|
2361 | var response = error.response,
|
2362 | config = error.config;
|
2363 |
|
2364 | if (!config || !instance.defaults.retryOnError) {
|
2365 | return Promise.reject(error);
|
2366 | }
|
2367 |
|
2368 | var retryErrorType = null;
|
2369 | var wait = 0;
|
2370 |
|
2371 | if (!response) {
|
2372 | retryErrorType = 'Connection';
|
2373 | networkErrorAttempts++;
|
2374 |
|
2375 | if (networkErrorAttempts > maxRetry) {
|
2376 | error.attempts = networkErrorAttempts;
|
2377 | return Promise.reject(error);
|
2378 | }
|
2379 |
|
2380 | wait = Math.pow(Math.SQRT2, networkErrorAttempts);
|
2381 | response = {};
|
2382 | } else {
|
2383 | networkErrorAttempts = 0;
|
2384 | }
|
2385 |
|
2386 | if (response.status >= 500 && response.status < 600) {
|
2387 |
|
2388 | retryErrorType = "Server ".concat(response.status);
|
2389 | var headers = response.headers || {};
|
2390 | var requestId = headers['x-contentful-request-id'] || null;
|
2391 | attempts[requestId] = attempts[requestId] || 0;
|
2392 | attempts[requestId]++;
|
2393 |
|
2394 | if (attempts[requestId] > maxRetry || !requestId) {
|
2395 | error.attempts = attempts[requestId];
|
2396 | return Promise.reject(error);
|
2397 | }
|
2398 |
|
2399 | wait = Math.pow(Math.SQRT2, attempts[requestId]);
|
2400 | } else if (response.status === 429) {
|
2401 |
|
2402 | retryErrorType = 'Rate limit';
|
2403 |
|
2404 | if (response.headers && error.response.headers['x-contentful-ratelimit-reset']) {
|
2405 | wait = response.headers['x-contentful-ratelimit-reset'];
|
2406 | }
|
2407 | }
|
2408 |
|
2409 | var delay = function delay(ms) {
|
2410 | return new Promise(function (resolve) {
|
2411 | setTimeout(resolve, ms);
|
2412 | });
|
2413 | };
|
2414 |
|
2415 | if (retryErrorType) {
|
2416 |
|
2417 | wait = Math.floor(wait * 1000 + Math.random() * 200 + 500);
|
2418 | instance.defaults.logHandler('warning', "".concat(retryErrorType, " error occurred. Waiting for ").concat(wait, " ms before retrying..."));
|
2419 | |
2420 |
|
2421 |
|
2422 |
|
2423 | delete config.httpAgent;
|
2424 | delete config.httpsAgent;
|
2425 | return delay(wait).then(function () {
|
2426 | return instance(config);
|
2427 | });
|
2428 | }
|
2429 |
|
2430 | return Promise.reject(error);
|
2431 | });
|
2432 | }
|
2433 |
|
2434 | function isNode() {
|
2435 | |
2436 |
|
2437 |
|
2438 |
|
2439 |
|
2440 |
|
2441 |
|
2442 | return typeof process !== 'undefined' && !process.browser;
|
2443 | }
|
2444 | function getNodeVersion() {
|
2445 | return process.versions && process.versions.node ? "v".concat(process.versions.node) : process.version;
|
2446 | }
|
2447 |
|
2448 |
|
2449 |
|
2450 | var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
|
2451 |
|
2452 |
|
2453 |
|
2454 |
|
2455 |
|
2456 |
|
2457 |
|
2458 |
|
2459 |
|
2460 |
|
2461 |
|
2462 |
|
2463 |
|
2464 |
|
2465 |
|
2466 |
|
2467 |
|
2468 |
|
2469 |
|
2470 |
|
2471 | function createHttpClient(axios, options) {
|
2472 | var defaultConfig = {
|
2473 | insecure: false,
|
2474 | retryOnError: true,
|
2475 | logHandler: function logHandler(level, data) {
|
2476 | if (level === 'error' && data) {
|
2477 | var title = [data.name, data.message].filter(function (a) {
|
2478 | return a;
|
2479 | }).join(' - ');
|
2480 | console.error("[error] ".concat(title));
|
2481 | console.error(data);
|
2482 | return;
|
2483 | }
|
2484 |
|
2485 | console.log("[".concat(level, "] ").concat(data));
|
2486 | },
|
2487 |
|
2488 | headers: {},
|
2489 | httpAgent: false,
|
2490 | httpsAgent: false,
|
2491 | timeout: 30000,
|
2492 | proxy: false,
|
2493 | basePath: '',
|
2494 | adapter: false,
|
2495 | maxContentLength: 1073741824
|
2496 |
|
2497 | };
|
2498 |
|
2499 | var config = _objectSpread2({}, defaultConfig, {}, options);
|
2500 |
|
2501 | if (!config.accessToken) {
|
2502 | var missingAccessTokenError = new TypeError('Expected parameter accessToken');
|
2503 | config.logHandler('error', missingAccessTokenError);
|
2504 | throw missingAccessTokenError;
|
2505 | }
|
2506 |
|
2507 |
|
2508 | var protocol = config.insecure ? 'http' : 'https';
|
2509 | var space = config.space ? "".concat(config.space, "/") : '';
|
2510 | var hostname = config.defaultHostname;
|
2511 | var port = config.insecure ? 80 : 443;
|
2512 |
|
2513 | if (config.host && HOST_REGEX.test(config.host)) {
|
2514 | var parsed = config.host.split(':');
|
2515 |
|
2516 | if (parsed.length === 2) {
|
2517 | var _parsed = _slicedToArray(parsed, 2);
|
2518 |
|
2519 | hostname = _parsed[0];
|
2520 | port = _parsed[1];
|
2521 | } else {
|
2522 | hostname = parsed[0];
|
2523 | }
|
2524 | }
|
2525 |
|
2526 |
|
2527 | if (config.basePath) {
|
2528 | config.basePath = "/".concat(config.basePath.split('/').filter(Boolean).join('/'));
|
2529 | }
|
2530 |
|
2531 | var baseURL = options.baseURL || "".concat(protocol, "://").concat(hostname, ":").concat(port).concat(config.basePath, "/spaces/").concat(space);
|
2532 |
|
2533 | if (!config.headers['Authorization']) {
|
2534 | config.headers['Authorization'] = 'Bearer ' + config.accessToken;
|
2535 | }
|
2536 |
|
2537 |
|
2538 |
|
2539 |
|
2540 | if (isNode()) {
|
2541 | config.headers['user-agent'] = 'node.js/' + getNodeVersion();
|
2542 | config.headers['Accept-Encoding'] = 'gzip';
|
2543 | }
|
2544 |
|
2545 | var axiosOptions = {
|
2546 |
|
2547 | baseURL: baseURL,
|
2548 | headers: config.headers,
|
2549 | httpAgent: config.httpAgent,
|
2550 | httpsAgent: config.httpsAgent,
|
2551 | paramsSerializer: qs__WEBPACK_IMPORTED_MODULE_1___default.a.stringify,
|
2552 | proxy: config.proxy,
|
2553 | timeout: config.timeout,
|
2554 | adapter: config.adapter,
|
2555 | maxContentLength: config.maxContentLength,
|
2556 |
|
2557 | logHandler: config.logHandler,
|
2558 | responseLogger: config.responseLogger,
|
2559 | requestLogger: config.requestLogger,
|
2560 | retryOnError: config.retryOnError
|
2561 | };
|
2562 | var instance = axios.create(axiosOptions);
|
2563 | instance.httpClientParams = options;
|
2564 | |
2565 |
|
2566 |
|
2567 |
|
2568 |
|
2569 |
|
2570 |
|
2571 |
|
2572 |
|
2573 |
|
2574 |
|
2575 | instance.cloneWithNewParams = function (newParams) {
|
2576 | return createHttpClient(axios, _objectSpread2({}, lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(options), {}, newParams));
|
2577 | };
|
2578 |
|
2579 | rateLimit(instance, config.retryLimit);
|
2580 | return instance;
|
2581 | }
|
2582 |
|
2583 |
|
2584 |
|
2585 |
|
2586 |
|
2587 |
|
2588 |
|
2589 |
|
2590 | function createRequestConfig(_ref) {
|
2591 | var query = _ref.query;
|
2592 | var config = {};
|
2593 | delete query.resolveLinks;
|
2594 | config.params = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(query);
|
2595 | return config;
|
2596 | }
|
2597 |
|
2598 | function enforceObjPath(obj, path) {
|
2599 | if (!(path in obj)) {
|
2600 | var err = new Error();
|
2601 | err.name = 'PropertyMissing';
|
2602 | err.message = "Required property ".concat(path, " missing from:\n\n").concat(JSON.stringify(obj), "\n\n");
|
2603 | throw err;
|
2604 | }
|
2605 |
|
2606 | return true;
|
2607 | }
|
2608 |
|
2609 | function freezeObjectDeep(obj) {
|
2610 | Object.keys(obj).forEach(function (key) {
|
2611 | var value = obj[key];
|
2612 |
|
2613 | if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_2___default()(value)) {
|
2614 | freezeObjectDeep(value);
|
2615 | }
|
2616 | });
|
2617 | return Object.freeze(obj);
|
2618 | }
|
2619 |
|
2620 | function freezeSys(obj) {
|
2621 | freezeObjectDeep(obj.sys || {});
|
2622 | return obj;
|
2623 | }
|
2624 |
|
2625 | function isReactNative() {
|
2626 | return typeof window !== 'undefined' && 'navigator' in window && 'product' in window.navigator && window.navigator.product === 'ReactNative';
|
2627 | }
|
2628 |
|
2629 | function getBrowserOS() {
|
2630 | if (!window) {
|
2631 | return null;
|
2632 | }
|
2633 |
|
2634 | var userAgent = window.navigator.userAgent;
|
2635 | var platform = window.navigator.platform;
|
2636 | var macosPlatforms = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'];
|
2637 | var windowsPlatforms = ['Win32', 'Win64', 'Windows', 'WinCE'];
|
2638 | var iosPlatforms = ['iPhone', 'iPad', 'iPod'];
|
2639 | var os = null;
|
2640 |
|
2641 | if (macosPlatforms.indexOf(platform) !== -1) {
|
2642 | os = 'macOS';
|
2643 | } else if (iosPlatforms.indexOf(platform) !== -1) {
|
2644 | os = 'iOS';
|
2645 | } else if (windowsPlatforms.indexOf(platform) !== -1) {
|
2646 | os = 'Windows';
|
2647 | } else if (/Android/.test(userAgent)) {
|
2648 | os = 'Android';
|
2649 | } else if (/Linux/.test(platform)) {
|
2650 | os = 'Linux';
|
2651 | }
|
2652 |
|
2653 | return os;
|
2654 | }
|
2655 |
|
2656 | function getNodeOS() {
|
2657 | var os = Object(os__WEBPACK_IMPORTED_MODULE_3__["platform"])() || 'linux';
|
2658 | var version = Object(os__WEBPACK_IMPORTED_MODULE_3__["release"])() || '0.0.0';
|
2659 | var osMap = {
|
2660 | android: 'Android',
|
2661 | aix: 'Linux',
|
2662 | darwin: 'macOS',
|
2663 | freebsd: 'Linux',
|
2664 | linux: 'Linux',
|
2665 | openbsd: 'Linux',
|
2666 | sunos: 'Linux',
|
2667 | win32: 'Windows'
|
2668 | };
|
2669 |
|
2670 | if (os in osMap) {
|
2671 | return "".concat(osMap[os] || 'Linux', "/").concat(version);
|
2672 | }
|
2673 |
|
2674 | return null;
|
2675 | }
|
2676 |
|
2677 | function getUserAgentHeader(sdk, application, integration, feature) {
|
2678 | var headerParts = [];
|
2679 |
|
2680 | if (application) {
|
2681 | headerParts.push("app ".concat(application));
|
2682 | }
|
2683 |
|
2684 | if (integration) {
|
2685 | headerParts.push("integration ".concat(integration));
|
2686 | }
|
2687 |
|
2688 | if (feature) {
|
2689 | headerParts.push('feature ' + feature);
|
2690 | }
|
2691 |
|
2692 | headerParts.push("sdk ".concat(sdk));
|
2693 | var os = null;
|
2694 |
|
2695 | try {
|
2696 | if (isReactNative()) {
|
2697 | os = getBrowserOS();
|
2698 | headerParts.push('platform ReactNative');
|
2699 | } else if (isNode()) {
|
2700 | os = getNodeOS();
|
2701 | headerParts.push("platform node.js/".concat(getNodeVersion()));
|
2702 | } else {
|
2703 | os = getBrowserOS();
|
2704 | headerParts.push("platform browser");
|
2705 | }
|
2706 | } catch (e) {
|
2707 | os = null;
|
2708 | }
|
2709 |
|
2710 | if (os) {
|
2711 | headerParts.push("os ".concat(os));
|
2712 | }
|
2713 |
|
2714 | return "".concat(headerParts.filter(function (item) {
|
2715 | return item !== '';
|
2716 | }).join('; '), ";");
|
2717 | }
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 | function toPlainObject(data) {
|
2727 | return Object.defineProperty(data, 'toPlainObject', {
|
2728 | enumerable: false,
|
2729 | configurable: false,
|
2730 | writable: false,
|
2731 | value: function value() {
|
2732 | return lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(this);
|
2733 | }
|
2734 | });
|
2735 | }
|
2736 |
|
2737 |
|
2738 |
|
2739 |
|
2740 | }),
|
2741 |
|
2742 | "../node_modules/debug/src/browser.js":
|
2743 |
|
2744 |
|
2745 |
|
2746 |
|
2747 | (function(module, exports, __webpack_require__) {
|
2748 |
|
2749 |
|
2750 |
|
2751 |
|
2752 |
|
2753 |
|
2754 |
|
2755 | exports = module.exports = __webpack_require__( "../node_modules/debug/src/debug.js");
|
2756 | exports.log = log;
|
2757 | exports.formatArgs = formatArgs;
|
2758 | exports.save = save;
|
2759 | exports.load = load;
|
2760 | exports.useColors = useColors;
|
2761 | exports.storage = 'undefined' != typeof chrome
|
2762 | && 'undefined' != typeof chrome.storage
|
2763 | ? chrome.storage.local
|
2764 | : localstorage();
|
2765 |
|
2766 |
|
2767 |
|
2768 |
|
2769 |
|
2770 | exports.colors = [
|
2771 | '#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC',
|
2772 | '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF',
|
2773 | '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC',
|
2774 | '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF',
|
2775 | '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC',
|
2776 | '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033',
|
2777 | '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366',
|
2778 | '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933',
|
2779 | '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC',
|
2780 | '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF',
|
2781 | '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'
|
2782 | ];
|
2783 |
|
2784 |
|
2785 |
|
2786 |
|
2787 |
|
2788 |
|
2789 |
|
2790 |
|
2791 |
|
2792 | function useColors() {
|
2793 |
|
2794 |
|
2795 |
|
2796 | if (typeof window !== 'undefined' && window.process && window.process.type === 'renderer') {
|
2797 | return true;
|
2798 | }
|
2799 |
|
2800 |
|
2801 | if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
2802 | return false;
|
2803 | }
|
2804 |
|
2805 |
|
2806 |
|
2807 | return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
|
2808 |
|
2809 | (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
|
2810 |
|
2811 |
|
2812 | (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
|
2813 |
|
2814 | (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
|
2815 | }
|
2816 |
|
2817 |
|
2818 |
|
2819 |
|
2820 |
|
2821 | exports.formatters.j = function(v) {
|
2822 | try {
|
2823 | return JSON.stringify(v);
|
2824 | } catch (err) {
|
2825 | return '[UnexpectedJSONParseError]: ' + err.message;
|
2826 | }
|
2827 | };
|
2828 |
|
2829 |
|
2830 |
|
2831 |
|
2832 |
|
2833 |
|
2834 |
|
2835 |
|
2836 | function formatArgs(args) {
|
2837 | var useColors = this.useColors;
|
2838 |
|
2839 | args[0] = (useColors ? '%c' : '')
|
2840 | + this.namespace
|
2841 | + (useColors ? ' %c' : ' ')
|
2842 | + args[0]
|
2843 | + (useColors ? '%c ' : ' ')
|
2844 | + '+' + exports.humanize(this.diff);
|
2845 |
|
2846 | if (!useColors) return;
|
2847 |
|
2848 | var c = 'color: ' + this.color;
|
2849 | args.splice(1, 0, c, 'color: inherit')
|
2850 |
|
2851 |
|
2852 |
|
2853 |
|
2854 | var index = 0;
|
2855 | var lastC = 0;
|
2856 | args[0].replace(/%[a-zA-Z%]/g, function(match) {
|
2857 | if ('%%' === match) return;
|
2858 | index++;
|
2859 | if ('%c' === match) {
|
2860 |
|
2861 |
|
2862 | lastC = index;
|
2863 | }
|
2864 | });
|
2865 |
|
2866 | args.splice(lastC, 0, c);
|
2867 | }
|
2868 |
|
2869 |
|
2870 |
|
2871 |
|
2872 |
|
2873 |
|
2874 |
|
2875 |
|
2876 | function log() {
|
2877 |
|
2878 |
|
2879 | return 'object' === typeof console
|
2880 | && console.log
|
2881 | && Function.prototype.apply.call(console.log, console, arguments);
|
2882 | }
|
2883 |
|
2884 |
|
2885 |
|
2886 |
|
2887 |
|
2888 |
|
2889 |
|
2890 |
|
2891 | function save(namespaces) {
|
2892 | try {
|
2893 | if (null == namespaces) {
|
2894 | exports.storage.removeItem('debug');
|
2895 | } else {
|
2896 | exports.storage.debug = namespaces;
|
2897 | }
|
2898 | } catch(e) {}
|
2899 | }
|
2900 |
|
2901 |
|
2902 |
|
2903 |
|
2904 |
|
2905 |
|
2906 |
|
2907 |
|
2908 | function load() {
|
2909 | var r;
|
2910 | try {
|
2911 | r = exports.storage.debug;
|
2912 | } catch(e) {}
|
2913 |
|
2914 |
|
2915 | if (!r && typeof process !== 'undefined' && 'env' in process) {
|
2916 | r = process.env.DEBUG;
|
2917 | }
|
2918 |
|
2919 | return r;
|
2920 | }
|
2921 |
|
2922 |
|
2923 |
|
2924 |
|
2925 |
|
2926 | exports.enable(load());
|
2927 |
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 |
|
2935 |
|
2936 |
|
2937 |
|
2938 |
|
2939 | function localstorage() {
|
2940 | try {
|
2941 | return window.localStorage;
|
2942 | } catch (e) {}
|
2943 | }
|
2944 |
|
2945 |
|
2946 | }),
|
2947 |
|
2948 | "../node_modules/debug/src/debug.js":
|
2949 |
|
2950 |
|
2951 |
|
2952 |
|
2953 | (function(module, exports, __webpack_require__) {
|
2954 |
|
2955 |
|
2956 |
|
2957 |
|
2958 |
|
2959 |
|
2960 |
|
2961 |
|
2962 |
|
2963 | exports = module.exports = createDebug.debug = createDebug['default'] = createDebug;
|
2964 | exports.coerce = coerce;
|
2965 | exports.disable = disable;
|
2966 | exports.enable = enable;
|
2967 | exports.enabled = enabled;
|
2968 | exports.humanize = __webpack_require__( "../node_modules/ms/index.js");
|
2969 |
|
2970 |
|
2971 |
|
2972 |
|
2973 | exports.instances = [];
|
2974 |
|
2975 |
|
2976 |
|
2977 |
|
2978 |
|
2979 | exports.names = [];
|
2980 | exports.skips = [];
|
2981 |
|
2982 |
|
2983 |
|
2984 |
|
2985 |
|
2986 |
|
2987 |
|
2988 | exports.formatters = {};
|
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 | function selectColor(namespace) {
|
2998 | var hash = 0, i;
|
2999 |
|
3000 | for (i in namespace) {
|
3001 | hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
|
3002 | hash |= 0;
|
3003 | }
|
3004 |
|
3005 | return exports.colors[Math.abs(hash) % exports.colors.length];
|
3006 | }
|
3007 |
|
3008 |
|
3009 |
|
3010 |
|
3011 |
|
3012 |
|
3013 |
|
3014 |
|
3015 |
|
3016 | function createDebug(namespace) {
|
3017 |
|
3018 | var prevTime;
|
3019 |
|
3020 | function debug() {
|
3021 |
|
3022 | if (!debug.enabled) return;
|
3023 |
|
3024 | var self = debug;
|
3025 |
|
3026 |
|
3027 | var curr = +new Date();
|
3028 | var ms = curr - (prevTime || curr);
|
3029 | self.diff = ms;
|
3030 | self.prev = prevTime;
|
3031 | self.curr = curr;
|
3032 | prevTime = curr;
|
3033 |
|
3034 |
|
3035 | var args = new Array(arguments.length);
|
3036 | for (var i = 0; i < args.length; i++) {
|
3037 | args[i] = arguments[i];
|
3038 | }
|
3039 |
|
3040 | args[0] = exports.coerce(args[0]);
|
3041 |
|
3042 | if ('string' !== typeof args[0]) {
|
3043 |
|
3044 | args.unshift('%O');
|
3045 | }
|
3046 |
|
3047 |
|
3048 | var index = 0;
|
3049 | args[0] = args[0].replace(/%([a-zA-Z%])/g, function(match, format) {
|
3050 |
|
3051 | if (match === '%%') return match;
|
3052 | index++;
|
3053 | var formatter = exports.formatters[format];
|
3054 | if ('function' === typeof formatter) {
|
3055 | var val = args[index];
|
3056 | match = formatter.call(self, val);
|
3057 |
|
3058 |
|
3059 | args.splice(index, 1);
|
3060 | index--;
|
3061 | }
|
3062 | return match;
|
3063 | });
|
3064 |
|
3065 |
|
3066 | exports.formatArgs.call(self, args);
|
3067 |
|
3068 | var logFn = debug.log || exports.log || console.log.bind(console);
|
3069 | logFn.apply(self, args);
|
3070 | }
|
3071 |
|
3072 | debug.namespace = namespace;
|
3073 | debug.enabled = exports.enabled(namespace);
|
3074 | debug.useColors = exports.useColors();
|
3075 | debug.color = selectColor(namespace);
|
3076 | debug.destroy = destroy;
|
3077 |
|
3078 |
|
3079 | if ('function' === typeof exports.init) {
|
3080 | exports.init(debug);
|
3081 | }
|
3082 |
|
3083 | exports.instances.push(debug);
|
3084 |
|
3085 | return debug;
|
3086 | }
|
3087 |
|
3088 | function destroy () {
|
3089 | var index = exports.instances.indexOf(this);
|
3090 | if (index !== -1) {
|
3091 | exports.instances.splice(index, 1);
|
3092 | return true;
|
3093 | } else {
|
3094 | return false;
|
3095 | }
|
3096 | }
|
3097 |
|
3098 |
|
3099 |
|
3100 |
|
3101 |
|
3102 |
|
3103 |
|
3104 |
|
3105 |
|
3106 | function enable(namespaces) {
|
3107 | exports.save(namespaces);
|
3108 |
|
3109 | exports.names = [];
|
3110 | exports.skips = [];
|
3111 |
|
3112 | var i;
|
3113 | var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
3114 | var len = split.length;
|
3115 |
|
3116 | for (i = 0; i < len; i++) {
|
3117 | if (!split[i]) continue;
|
3118 | namespaces = split[i].replace(/\*/g, '.*?');
|
3119 | if (namespaces[0] === '-') {
|
3120 | exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
3121 | } else {
|
3122 | exports.names.push(new RegExp('^' + namespaces + '$'));
|
3123 | }
|
3124 | }
|
3125 |
|
3126 | for (i = 0; i < exports.instances.length; i++) {
|
3127 | var instance = exports.instances[i];
|
3128 | instance.enabled = exports.enabled(instance.namespace);
|
3129 | }
|
3130 | }
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 | function disable() {
|
3139 | exports.enable('');
|
3140 | }
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 | function enabled(name) {
|
3151 | if (name[name.length - 1] === '*') {
|
3152 | return true;
|
3153 | }
|
3154 | var i, len;
|
3155 | for (i = 0, len = exports.skips.length; i < len; i++) {
|
3156 | if (exports.skips[i].test(name)) {
|
3157 | return false;
|
3158 | }
|
3159 | }
|
3160 | for (i = 0, len = exports.names.length; i < len; i++) {
|
3161 | if (exports.names[i].test(name)) {
|
3162 | return true;
|
3163 | }
|
3164 | }
|
3165 | return false;
|
3166 | }
|
3167 |
|
3168 |
|
3169 |
|
3170 |
|
3171 |
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 | function coerce(val) {
|
3177 | if (val instanceof Error) return val.stack || val.message;
|
3178 | return val;
|
3179 | }
|
3180 |
|
3181 |
|
3182 | }),
|
3183 |
|
3184 | "../node_modules/debug/src/index.js":
|
3185 |
|
3186 |
|
3187 |
|
3188 |
|
3189 | (function(module, exports, __webpack_require__) {
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 |
|
3196 | if (typeof process === 'undefined' || process.type === 'renderer') {
|
3197 | module.exports = __webpack_require__( "../node_modules/debug/src/browser.js");
|
3198 | } else {
|
3199 | module.exports = __webpack_require__( "../node_modules/debug/src/node.js");
|
3200 | }
|
3201 |
|
3202 |
|
3203 | }),
|
3204 |
|
3205 | "../node_modules/debug/src/node.js":
|
3206 |
|
3207 |
|
3208 |
|
3209 |
|
3210 | (function(module, exports, __webpack_require__) {
|
3211 |
|
3212 |
|
3213 |
|
3214 |
|
3215 |
|
3216 | var tty = __webpack_require__( "tty");
|
3217 | var util = __webpack_require__( "util");
|
3218 |
|
3219 |
|
3220 |
|
3221 |
|
3222 |
|
3223 |
|
3224 |
|
3225 | exports = module.exports = __webpack_require__( "../node_modules/debug/src/debug.js");
|
3226 | exports.init = init;
|
3227 | exports.log = log;
|
3228 | exports.formatArgs = formatArgs;
|
3229 | exports.save = save;
|
3230 | exports.load = load;
|
3231 | exports.useColors = useColors;
|
3232 |
|
3233 |
|
3234 |
|
3235 |
|
3236 |
|
3237 | exports.colors = [ 6, 2, 3, 4, 5, 1 ];
|
3238 |
|
3239 | try {
|
3240 | var supportsColor = __webpack_require__( "../node_modules/supports-color/index.js");
|
3241 | if (supportsColor && supportsColor.level >= 2) {
|
3242 | exports.colors = [
|
3243 | 20, 21, 26, 27, 32, 33, 38, 39, 40, 41, 42, 43, 44, 45, 56, 57, 62, 63, 68,
|
3244 | 69, 74, 75, 76, 77, 78, 79, 80, 81, 92, 93, 98, 99, 112, 113, 128, 129, 134,
|
3245 | 135, 148, 149, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171,
|
3246 | 172, 173, 178, 179, 184, 185, 196, 197, 198, 199, 200, 201, 202, 203, 204,
|
3247 | 205, 206, 207, 208, 209, 214, 215, 220, 221
|
3248 | ];
|
3249 | }
|
3250 | } catch (err) {
|
3251 |
|
3252 | }
|
3253 |
|
3254 |
|
3255 |
|
3256 |
|
3257 |
|
3258 |
|
3259 |
|
3260 | exports.inspectOpts = Object.keys(process.env).filter(function (key) {
|
3261 | return /^debug_/i.test(key);
|
3262 | }).reduce(function (obj, key) {
|
3263 |
|
3264 | var prop = key
|
3265 | .substring(6)
|
3266 | .toLowerCase()
|
3267 | .replace(/_([a-z])/g, function (_, k) { return k.toUpperCase() });
|
3268 |
|
3269 |
|
3270 | var val = process.env[key];
|
3271 | if (/^(yes|on|true|enabled)$/i.test(val)) val = true;
|
3272 | else if (/^(no|off|false|disabled)$/i.test(val)) val = false;
|
3273 | else if (val === 'null') val = null;
|
3274 | else val = Number(val);
|
3275 |
|
3276 | obj[prop] = val;
|
3277 | return obj;
|
3278 | }, {});
|
3279 |
|
3280 |
|
3281 |
|
3282 |
|
3283 |
|
3284 | function useColors() {
|
3285 | return 'colors' in exports.inspectOpts
|
3286 | ? Boolean(exports.inspectOpts.colors)
|
3287 | : tty.isatty(process.stderr.fd);
|
3288 | }
|
3289 |
|
3290 |
|
3291 |
|
3292 |
|
3293 |
|
3294 | exports.formatters.o = function(v) {
|
3295 | this.inspectOpts.colors = this.useColors;
|
3296 | return util.inspect(v, this.inspectOpts)
|
3297 | .split('\n').map(function(str) {
|
3298 | return str.trim()
|
3299 | }).join(' ');
|
3300 | };
|
3301 |
|
3302 |
|
3303 |
|
3304 |
|
3305 |
|
3306 | exports.formatters.O = function(v) {
|
3307 | this.inspectOpts.colors = this.useColors;
|
3308 | return util.inspect(v, this.inspectOpts);
|
3309 | };
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 | function formatArgs(args) {
|
3318 | var name = this.namespace;
|
3319 | var useColors = this.useColors;
|
3320 |
|
3321 | if (useColors) {
|
3322 | var c = this.color;
|
3323 | var colorCode = '\u001b[3' + (c < 8 ? c : '8;5;' + c);
|
3324 | var prefix = ' ' + colorCode + ';1m' + name + ' ' + '\u001b[0m';
|
3325 |
|
3326 | args[0] = prefix + args[0].split('\n').join('\n' + prefix);
|
3327 | args.push(colorCode + 'm+' + exports.humanize(this.diff) + '\u001b[0m');
|
3328 | } else {
|
3329 | args[0] = getDate() + name + ' ' + args[0];
|
3330 | }
|
3331 | }
|
3332 |
|
3333 | function getDate() {
|
3334 | if (exports.inspectOpts.hideDate) {
|
3335 | return '';
|
3336 | } else {
|
3337 | return new Date().toISOString() + ' ';
|
3338 | }
|
3339 | }
|
3340 |
|
3341 |
|
3342 |
|
3343 |
|
3344 |
|
3345 | function log() {
|
3346 | return process.stderr.write(util.format.apply(util, arguments) + '\n');
|
3347 | }
|
3348 |
|
3349 |
|
3350 |
|
3351 |
|
3352 |
|
3353 |
|
3354 |
|
3355 |
|
3356 | function save(namespaces) {
|
3357 | if (null == namespaces) {
|
3358 |
|
3359 |
|
3360 | delete process.env.DEBUG;
|
3361 | } else {
|
3362 | process.env.DEBUG = namespaces;
|
3363 | }
|
3364 | }
|
3365 |
|
3366 |
|
3367 |
|
3368 |
|
3369 |
|
3370 |
|
3371 |
|
3372 |
|
3373 | function load() {
|
3374 | return process.env.DEBUG;
|
3375 | }
|
3376 |
|
3377 |
|
3378 |
|
3379 |
|
3380 |
|
3381 |
|
3382 |
|
3383 |
|
3384 | function init (debug) {
|
3385 | debug.inspectOpts = {};
|
3386 |
|
3387 | var keys = Object.keys(exports.inspectOpts);
|
3388 | for (var i = 0; i < keys.length; i++) {
|
3389 | debug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
3390 | }
|
3391 | }
|
3392 |
|
3393 |
|
3394 |
|
3395 |
|
3396 |
|
3397 | exports.enable(load());
|
3398 |
|
3399 |
|
3400 | }),
|
3401 |
|
3402 | "../node_modules/follow-redirects/index.js":
|
3403 |
|
3404 |
|
3405 |
|
3406 |
|
3407 | (function(module, exports, __webpack_require__) {
|
3408 |
|
3409 | var url = __webpack_require__( "url");
|
3410 | var http = __webpack_require__( "http");
|
3411 | var https = __webpack_require__( "https");
|
3412 | var assert = __webpack_require__( "assert");
|
3413 | var Writable = __webpack_require__( "stream").Writable;
|
3414 | var debug = __webpack_require__( "../node_modules/debug/src/index.js")("follow-redirects");
|
3415 |
|
3416 |
|
3417 |
|
3418 | var SAFE_METHODS = { GET: true, HEAD: true, OPTIONS: true, TRACE: true };
|
3419 |
|
3420 |
|
3421 | var eventHandlers = Object.create(null);
|
3422 | ["abort", "aborted", "error", "socket", "timeout"].forEach(function (event) {
|
3423 | eventHandlers[event] = function (arg) {
|
3424 | this._redirectable.emit(event, arg);
|
3425 | };
|
3426 | });
|
3427 |
|
3428 |
|
3429 | function RedirectableRequest(options, responseCallback) {
|
3430 |
|
3431 | Writable.call(this);
|
3432 | options.headers = options.headers || {};
|
3433 | this._options = options;
|
3434 | this._redirectCount = 0;
|
3435 | this._redirects = [];
|
3436 | this._requestBodyLength = 0;
|
3437 | this._requestBodyBuffers = [];
|
3438 |
|
3439 |
|
3440 |
|
3441 |
|
3442 | if (options.host) {
|
3443 |
|
3444 | if (!options.hostname) {
|
3445 | options.hostname = options.host;
|
3446 | }
|
3447 | delete options.host;
|
3448 | }
|
3449 |
|
3450 |
|
3451 | if (responseCallback) {
|
3452 | this.on("response", responseCallback);
|
3453 | }
|
3454 |
|
3455 |
|
3456 | var self = this;
|
3457 | this._onNativeResponse = function (response) {
|
3458 | self._processResponse(response);
|
3459 | };
|
3460 |
|
3461 |
|
3462 | if (!options.pathname && options.path) {
|
3463 | var searchPos = options.path.indexOf("?");
|
3464 | if (searchPos < 0) {
|
3465 | options.pathname = options.path;
|
3466 | }
|
3467 | else {
|
3468 | options.pathname = options.path.substring(0, searchPos);
|
3469 | options.search = options.path.substring(searchPos);
|
3470 | }
|
3471 | }
|
3472 |
|
3473 |
|
3474 | this._performRequest();
|
3475 | }
|
3476 | RedirectableRequest.prototype = Object.create(Writable.prototype);
|
3477 |
|
3478 |
|
3479 | RedirectableRequest.prototype.write = function (data, encoding, callback) {
|
3480 |
|
3481 | if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
|
3482 | throw new Error("data should be a string, Buffer or Uint8Array");
|
3483 | }
|
3484 | if (typeof encoding === "function") {
|
3485 | callback = encoding;
|
3486 | encoding = null;
|
3487 | }
|
3488 |
|
3489 |
|
3490 |
|
3491 | if (data.length === 0) {
|
3492 | if (callback) {
|
3493 | callback();
|
3494 | }
|
3495 | return;
|
3496 | }
|
3497 |
|
3498 | if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
|
3499 | this._requestBodyLength += data.length;
|
3500 | this._requestBodyBuffers.push({ data: data, encoding: encoding });
|
3501 | this._currentRequest.write(data, encoding, callback);
|
3502 | }
|
3503 |
|
3504 | else {
|
3505 | this.emit("error", new Error("Request body larger than maxBodyLength limit"));
|
3506 | this.abort();
|
3507 | }
|
3508 | };
|
3509 |
|
3510 |
|
3511 | RedirectableRequest.prototype.end = function (data, encoding, callback) {
|
3512 |
|
3513 | if (typeof data === "function") {
|
3514 | callback = data;
|
3515 | data = encoding = null;
|
3516 | }
|
3517 | else if (typeof encoding === "function") {
|
3518 | callback = encoding;
|
3519 | encoding = null;
|
3520 | }
|
3521 |
|
3522 |
|
3523 | var currentRequest = this._currentRequest;
|
3524 | this.write(data || "", encoding, function () {
|
3525 | currentRequest.end(null, null, callback);
|
3526 | });
|
3527 | };
|
3528 |
|
3529 |
|
3530 | RedirectableRequest.prototype.setHeader = function (name, value) {
|
3531 | this._options.headers[name] = value;
|
3532 | this._currentRequest.setHeader(name, value);
|
3533 | };
|
3534 |
|
3535 |
|
3536 | RedirectableRequest.prototype.removeHeader = function (name) {
|
3537 | delete this._options.headers[name];
|
3538 | this._currentRequest.removeHeader(name);
|
3539 | };
|
3540 |
|
3541 |
|
3542 | [
|
3543 | "abort", "flushHeaders", "getHeader",
|
3544 | "setNoDelay", "setSocketKeepAlive", "setTimeout",
|
3545 | ].forEach(function (method) {
|
3546 | RedirectableRequest.prototype[method] = function (a, b) {
|
3547 | return this._currentRequest[method](a, b);
|
3548 | };
|
3549 | });
|
3550 |
|
3551 |
|
3552 | ["aborted", "connection", "socket"].forEach(function (property) {
|
3553 | Object.defineProperty(RedirectableRequest.prototype, property, {
|
3554 | get: function () { return this._currentRequest[property]; },
|
3555 | });
|
3556 | });
|
3557 |
|
3558 |
|
3559 | RedirectableRequest.prototype._performRequest = function () {
|
3560 |
|
3561 | var protocol = this._options.protocol;
|
3562 | var nativeProtocol = this._options.nativeProtocols[protocol];
|
3563 | if (!nativeProtocol) {
|
3564 | this.emit("error", new Error("Unsupported protocol " + protocol));
|
3565 | return;
|
3566 | }
|
3567 |
|
3568 |
|
3569 |
|
3570 | if (this._options.agents) {
|
3571 | var scheme = protocol.substr(0, protocol.length - 1);
|
3572 | this._options.agent = this._options.agents[scheme];
|
3573 | }
|
3574 |
|
3575 |
|
3576 | var request = this._currentRequest =
|
3577 | nativeProtocol.request(this._options, this._onNativeResponse);
|
3578 | this._currentUrl = url.format(this._options);
|
3579 |
|
3580 |
|
3581 | request._redirectable = this;
|
3582 | for (var event in eventHandlers) {
|
3583 |
|
3584 | if (event) {
|
3585 | request.on(event, eventHandlers[event]);
|
3586 | }
|
3587 | }
|
3588 |
|
3589 |
|
3590 |
|
3591 | if (this._isRedirect) {
|
3592 |
|
3593 | var i = 0;
|
3594 | var buffers = this._requestBodyBuffers;
|
3595 | (function writeNext() {
|
3596 | if (i < buffers.length) {
|
3597 | var buffer = buffers[i++];
|
3598 | request.write(buffer.data, buffer.encoding, writeNext);
|
3599 | }
|
3600 | else {
|
3601 | request.end();
|
3602 | }
|
3603 | }());
|
3604 | }
|
3605 | };
|
3606 |
|
3607 |
|
3608 | RedirectableRequest.prototype._processResponse = function (response) {
|
3609 |
|
3610 | if (this._options.trackRedirects) {
|
3611 | this._redirects.push({
|
3612 | url: this._currentUrl,
|
3613 | headers: response.headers,
|
3614 | statusCode: response.statusCode,
|
3615 | });
|
3616 | }
|
3617 |
|
3618 |
|
3619 |
|
3620 |
|
3621 |
|
3622 |
|
3623 |
|
3624 | var location = response.headers.location;
|
3625 | if (location && this._options.followRedirects !== false &&
|
3626 | response.statusCode >= 300 && response.statusCode < 400) {
|
3627 |
|
3628 |
|
3629 | if (++this._redirectCount > this._options.maxRedirects) {
|
3630 | this.emit("error", new Error("Max redirects exceeded."));
|
3631 | return;
|
3632 | }
|
3633 |
|
3634 |
|
3635 |
|
3636 |
|
3637 |
|
3638 |
|
3639 |
|
3640 |
|
3641 | var header;
|
3642 | var headers = this._options.headers;
|
3643 | if (response.statusCode !== 307 && !(this._options.method in SAFE_METHODS)) {
|
3644 | this._options.method = "GET";
|
3645 |
|
3646 | this._requestBodyBuffers = [];
|
3647 | for (header in headers) {
|
3648 | if (/^content-/i.test(header)) {
|
3649 | delete headers[header];
|
3650 | }
|
3651 | }
|
3652 | }
|
3653 |
|
3654 |
|
3655 | if (!this._isRedirect) {
|
3656 | for (header in headers) {
|
3657 | if (/^host$/i.test(header)) {
|
3658 | delete headers[header];
|
3659 | }
|
3660 | }
|
3661 | }
|
3662 |
|
3663 |
|
3664 | var redirectUrl = url.resolve(this._currentUrl, location);
|
3665 | debug("redirecting to", redirectUrl);
|
3666 | Object.assign(this._options, url.parse(redirectUrl));
|
3667 | this._isRedirect = true;
|
3668 | this._performRequest();
|
3669 |
|
3670 |
|
3671 | response.destroy();
|
3672 | }
|
3673 | else {
|
3674 |
|
3675 | response.responseUrl = this._currentUrl;
|
3676 | response.redirects = this._redirects;
|
3677 | this.emit("response", response);
|
3678 |
|
3679 |
|
3680 | this._requestBodyBuffers = [];
|
3681 | }
|
3682 | };
|
3683 |
|
3684 |
|
3685 | function wrap(protocols) {
|
3686 |
|
3687 | var exports = {
|
3688 | maxRedirects: 21,
|
3689 | maxBodyLength: 10 * 1024 * 1024,
|
3690 | };
|
3691 |
|
3692 |
|
3693 | var nativeProtocols = {};
|
3694 | Object.keys(protocols).forEach(function (scheme) {
|
3695 | var protocol = scheme + ":";
|
3696 | var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
|
3697 | var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);
|
3698 |
|
3699 |
|
3700 | wrappedProtocol.request = function (options, callback) {
|
3701 | if (typeof options === "string") {
|
3702 | options = url.parse(options);
|
3703 | options.maxRedirects = exports.maxRedirects;
|
3704 | }
|
3705 | else {
|
3706 | options = Object.assign({
|
3707 | protocol: protocol,
|
3708 | maxRedirects: exports.maxRedirects,
|
3709 | maxBodyLength: exports.maxBodyLength,
|
3710 | }, options);
|
3711 | }
|
3712 | options.nativeProtocols = nativeProtocols;
|
3713 | assert.equal(options.protocol, protocol, "protocol mismatch");
|
3714 | debug("options", options);
|
3715 | return new RedirectableRequest(options, callback);
|
3716 | };
|
3717 |
|
3718 |
|
3719 | wrappedProtocol.get = function (options, callback) {
|
3720 | var request = wrappedProtocol.request(options, callback);
|
3721 | request.end();
|
3722 | return request;
|
3723 | };
|
3724 | });
|
3725 | return exports;
|
3726 | }
|
3727 |
|
3728 |
|
3729 | module.exports = wrap({ http: http, https: https });
|
3730 | module.exports.wrap = wrap;
|
3731 |
|
3732 |
|
3733 | }),
|
3734 |
|
3735 | "../node_modules/has-flag/index.js":
|
3736 |
|
3737 |
|
3738 |
|
3739 |
|
3740 | (function(module, exports, __webpack_require__) {
|
3741 |
|
3742 | "use strict";
|
3743 |
|
3744 | module.exports = (flag, argv) => {
|
3745 | argv = argv || process.argv;
|
3746 | const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
3747 | const pos = argv.indexOf(prefix + flag);
|
3748 | const terminatorPos = argv.indexOf('--');
|
3749 | return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
3750 | };
|
3751 |
|
3752 |
|
3753 | }),
|
3754 |
|
3755 | "../node_modules/lodash/_Hash.js":
|
3756 |
|
3757 |
|
3758 |
|
3759 |
|
3760 | (function(module, exports, __webpack_require__) {
|
3761 |
|
3762 | var hashClear = __webpack_require__( "../node_modules/lodash/_hashClear.js"),
|
3763 | hashDelete = __webpack_require__( "../node_modules/lodash/_hashDelete.js"),
|
3764 | hashGet = __webpack_require__( "../node_modules/lodash/_hashGet.js"),
|
3765 | hashHas = __webpack_require__( "../node_modules/lodash/_hashHas.js"),
|
3766 | hashSet = __webpack_require__( "../node_modules/lodash/_hashSet.js");
|
3767 |
|
3768 |
|
3769 |
|
3770 |
|
3771 |
|
3772 |
|
3773 |
|
3774 |
|
3775 | function Hash(entries) {
|
3776 | var index = -1,
|
3777 | length = entries == null ? 0 : entries.length;
|
3778 |
|
3779 | this.clear();
|
3780 | while (++index < length) {
|
3781 | var entry = entries[index];
|
3782 | this.set(entry[0], entry[1]);
|
3783 | }
|
3784 | }
|
3785 |
|
3786 |
|
3787 | Hash.prototype.clear = hashClear;
|
3788 | Hash.prototype['delete'] = hashDelete;
|
3789 | Hash.prototype.get = hashGet;
|
3790 | Hash.prototype.has = hashHas;
|
3791 | Hash.prototype.set = hashSet;
|
3792 |
|
3793 | module.exports = Hash;
|
3794 |
|
3795 |
|
3796 | }),
|
3797 |
|
3798 | "../node_modules/lodash/_ListCache.js":
|
3799 |
|
3800 |
|
3801 |
|
3802 |
|
3803 | (function(module, exports, __webpack_require__) {
|
3804 |
|
3805 | var listCacheClear = __webpack_require__( "../node_modules/lodash/_listCacheClear.js"),
|
3806 | listCacheDelete = __webpack_require__( "../node_modules/lodash/_listCacheDelete.js"),
|
3807 | listCacheGet = __webpack_require__( "../node_modules/lodash/_listCacheGet.js"),
|
3808 | listCacheHas = __webpack_require__( "../node_modules/lodash/_listCacheHas.js"),
|
3809 | listCacheSet = __webpack_require__( "../node_modules/lodash/_listCacheSet.js");
|
3810 |
|
3811 |
|
3812 |
|
3813 |
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 | function ListCache(entries) {
|
3819 | var index = -1,
|
3820 | length = entries == null ? 0 : entries.length;
|
3821 |
|
3822 | this.clear();
|
3823 | while (++index < length) {
|
3824 | var entry = entries[index];
|
3825 | this.set(entry[0], entry[1]);
|
3826 | }
|
3827 | }
|
3828 |
|
3829 |
|
3830 | ListCache.prototype.clear = listCacheClear;
|
3831 | ListCache.prototype['delete'] = listCacheDelete;
|
3832 | ListCache.prototype.get = listCacheGet;
|
3833 | ListCache.prototype.has = listCacheHas;
|
3834 | ListCache.prototype.set = listCacheSet;
|
3835 |
|
3836 | module.exports = ListCache;
|
3837 |
|
3838 |
|
3839 | }),
|
3840 |
|
3841 | "../node_modules/lodash/_Map.js":
|
3842 |
|
3843 |
|
3844 |
|
3845 |
|
3846 | (function(module, exports, __webpack_require__) {
|
3847 |
|
3848 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js"),
|
3849 | root = __webpack_require__( "../node_modules/lodash/_root.js");
|
3850 |
|
3851 |
|
3852 | var Map = getNative(root, 'Map');
|
3853 |
|
3854 | module.exports = Map;
|
3855 |
|
3856 |
|
3857 | }),
|
3858 |
|
3859 | "../node_modules/lodash/_MapCache.js":
|
3860 |
|
3861 |
|
3862 |
|
3863 |
|
3864 | (function(module, exports, __webpack_require__) {
|
3865 |
|
3866 | var mapCacheClear = __webpack_require__( "../node_modules/lodash/_mapCacheClear.js"),
|
3867 | mapCacheDelete = __webpack_require__( "../node_modules/lodash/_mapCacheDelete.js"),
|
3868 | mapCacheGet = __webpack_require__( "../node_modules/lodash/_mapCacheGet.js"),
|
3869 | mapCacheHas = __webpack_require__( "../node_modules/lodash/_mapCacheHas.js"),
|
3870 | mapCacheSet = __webpack_require__( "../node_modules/lodash/_mapCacheSet.js");
|
3871 |
|
3872 |
|
3873 |
|
3874 |
|
3875 |
|
3876 |
|
3877 |
|
3878 |
|
3879 | function MapCache(entries) {
|
3880 | var index = -1,
|
3881 | length = entries == null ? 0 : entries.length;
|
3882 |
|
3883 | this.clear();
|
3884 | while (++index < length) {
|
3885 | var entry = entries[index];
|
3886 | this.set(entry[0], entry[1]);
|
3887 | }
|
3888 | }
|
3889 |
|
3890 |
|
3891 | MapCache.prototype.clear = mapCacheClear;
|
3892 | MapCache.prototype['delete'] = mapCacheDelete;
|
3893 | MapCache.prototype.get = mapCacheGet;
|
3894 | MapCache.prototype.has = mapCacheHas;
|
3895 | MapCache.prototype.set = mapCacheSet;
|
3896 |
|
3897 | module.exports = MapCache;
|
3898 |
|
3899 |
|
3900 | }),
|
3901 |
|
3902 | "../node_modules/lodash/_Stack.js":
|
3903 |
|
3904 |
|
3905 |
|
3906 |
|
3907 | (function(module, exports, __webpack_require__) {
|
3908 |
|
3909 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
3910 | stackClear = __webpack_require__( "../node_modules/lodash/_stackClear.js"),
|
3911 | stackDelete = __webpack_require__( "../node_modules/lodash/_stackDelete.js"),
|
3912 | stackGet = __webpack_require__( "../node_modules/lodash/_stackGet.js"),
|
3913 | stackHas = __webpack_require__( "../node_modules/lodash/_stackHas.js"),
|
3914 | stackSet = __webpack_require__( "../node_modules/lodash/_stackSet.js");
|
3915 |
|
3916 |
|
3917 |
|
3918 |
|
3919 |
|
3920 |
|
3921 |
|
3922 |
|
3923 | function Stack(entries) {
|
3924 | var data = this.__data__ = new ListCache(entries);
|
3925 | this.size = data.size;
|
3926 | }
|
3927 |
|
3928 |
|
3929 | Stack.prototype.clear = stackClear;
|
3930 | Stack.prototype['delete'] = stackDelete;
|
3931 | Stack.prototype.get = stackGet;
|
3932 | Stack.prototype.has = stackHas;
|
3933 | Stack.prototype.set = stackSet;
|
3934 |
|
3935 | module.exports = Stack;
|
3936 |
|
3937 |
|
3938 | }),
|
3939 |
|
3940 | "../node_modules/lodash/_arrayEach.js":
|
3941 |
|
3942 |
|
3943 |
|
3944 |
|
3945 | (function(module, exports) {
|
3946 |
|
3947 |
|
3948 |
|
3949 |
|
3950 |
|
3951 |
|
3952 |
|
3953 |
|
3954 |
|
3955 |
|
3956 | function arrayEach(array, iteratee) {
|
3957 | var index = -1,
|
3958 | length = array == null ? 0 : array.length;
|
3959 |
|
3960 | while (++index < length) {
|
3961 | if (iteratee(array[index], index, array) === false) {
|
3962 | break;
|
3963 | }
|
3964 | }
|
3965 | return array;
|
3966 | }
|
3967 |
|
3968 | module.exports = arrayEach;
|
3969 |
|
3970 |
|
3971 | }),
|
3972 |
|
3973 | "../node_modules/lodash/_assignValue.js":
|
3974 |
|
3975 |
|
3976 |
|
3977 |
|
3978 | (function(module, exports, __webpack_require__) {
|
3979 |
|
3980 | var baseAssignValue = __webpack_require__( "../node_modules/lodash/_baseAssignValue.js"),
|
3981 | eq = __webpack_require__( "../node_modules/lodash/eq.js");
|
3982 |
|
3983 |
|
3984 | var objectProto = Object.prototype;
|
3985 |
|
3986 |
|
3987 | var hasOwnProperty = objectProto.hasOwnProperty;
|
3988 |
|
3989 |
|
3990 |
|
3991 |
|
3992 |
|
3993 |
|
3994 |
|
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 | function assignValue(object, key, value) {
|
4000 | var objValue = object[key];
|
4001 | if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
|
4002 | (value === undefined && !(key in object))) {
|
4003 | baseAssignValue(object, key, value);
|
4004 | }
|
4005 | }
|
4006 |
|
4007 | module.exports = assignValue;
|
4008 |
|
4009 |
|
4010 | }),
|
4011 |
|
4012 | "../node_modules/lodash/_assocIndexOf.js":
|
4013 |
|
4014 |
|
4015 |
|
4016 |
|
4017 | (function(module, exports, __webpack_require__) {
|
4018 |
|
4019 | var eq = __webpack_require__( "../node_modules/lodash/eq.js");
|
4020 |
|
4021 |
|
4022 |
|
4023 |
|
4024 |
|
4025 |
|
4026 |
|
4027 |
|
4028 |
|
4029 | function assocIndexOf(array, key) {
|
4030 | var length = array.length;
|
4031 | while (length--) {
|
4032 | if (eq(array[length][0], key)) {
|
4033 | return length;
|
4034 | }
|
4035 | }
|
4036 | return -1;
|
4037 | }
|
4038 |
|
4039 | module.exports = assocIndexOf;
|
4040 |
|
4041 |
|
4042 | }),
|
4043 |
|
4044 | "../node_modules/lodash/_baseAssign.js":
|
4045 |
|
4046 |
|
4047 |
|
4048 |
|
4049 | (function(module, exports, __webpack_require__) {
|
4050 |
|
4051 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
4052 | keys = __webpack_require__( "../node_modules/lodash/keys.js");
|
4053 |
|
4054 |
|
4055 |
|
4056 |
|
4057 |
|
4058 |
|
4059 |
|
4060 |
|
4061 |
|
4062 |
|
4063 | function baseAssign(object, source) {
|
4064 | return object && copyObject(source, keys(source), object);
|
4065 | }
|
4066 |
|
4067 | module.exports = baseAssign;
|
4068 |
|
4069 |
|
4070 | }),
|
4071 |
|
4072 | "../node_modules/lodash/_baseAssignIn.js":
|
4073 |
|
4074 |
|
4075 |
|
4076 |
|
4077 | (function(module, exports, __webpack_require__) {
|
4078 |
|
4079 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
4080 | keysIn = __webpack_require__( "../node_modules/lodash/keysIn.js");
|
4081 |
|
4082 |
|
4083 |
|
4084 |
|
4085 |
|
4086 |
|
4087 |
|
4088 |
|
4089 |
|
4090 |
|
4091 | function baseAssignIn(object, source) {
|
4092 | return object && copyObject(source, keysIn(source), object);
|
4093 | }
|
4094 |
|
4095 | module.exports = baseAssignIn;
|
4096 |
|
4097 |
|
4098 | }),
|
4099 |
|
4100 | "../node_modules/lodash/_baseAssignValue.js":
|
4101 |
|
4102 |
|
4103 |
|
4104 |
|
4105 | (function(module, exports, __webpack_require__) {
|
4106 |
|
4107 | var defineProperty = __webpack_require__( "../node_modules/lodash/_defineProperty.js");
|
4108 |
|
4109 |
|
4110 |
|
4111 |
|
4112 |
|
4113 |
|
4114 |
|
4115 |
|
4116 |
|
4117 |
|
4118 | function baseAssignValue(object, key, value) {
|
4119 | if (key == '__proto__' && defineProperty) {
|
4120 | defineProperty(object, key, {
|
4121 | 'configurable': true,
|
4122 | 'enumerable': true,
|
4123 | 'value': value,
|
4124 | 'writable': true
|
4125 | });
|
4126 | } else {
|
4127 | object[key] = value;
|
4128 | }
|
4129 | }
|
4130 |
|
4131 | module.exports = baseAssignValue;
|
4132 |
|
4133 |
|
4134 | }),
|
4135 |
|
4136 | "../node_modules/lodash/_baseClone.js":
|
4137 |
|
4138 |
|
4139 |
|
4140 |
|
4141 | (function(module, exports, __webpack_require__) {
|
4142 |
|
4143 | var Stack = __webpack_require__( "../node_modules/lodash/_Stack.js"),
|
4144 | arrayEach = __webpack_require__( "../node_modules/lodash/_arrayEach.js"),
|
4145 | assignValue = __webpack_require__( "../node_modules/lodash/_assignValue.js"),
|
4146 | baseAssign = __webpack_require__( "../node_modules/lodash/_baseAssign.js"),
|
4147 | baseAssignIn = __webpack_require__( "../node_modules/lodash/_baseAssignIn.js"),
|
4148 | cloneBuffer = __webpack_require__( "../node_modules/lodash/_cloneBuffer.js"),
|
4149 | copyArray = __webpack_require__( "../node_modules/lodash/_copyArray.js"),
|
4150 | copySymbols = __webpack_require__( "../node_modules/lodash/_copySymbols.js"),
|
4151 | copySymbolsIn = __webpack_require__( "../node_modules/lodash/_copySymbolsIn.js"),
|
4152 | getAllKeys = __webpack_require__( "../node_modules/lodash/_getAllKeys.js"),
|
4153 | getAllKeysIn = __webpack_require__( "../node_modules/lodash/_getAllKeysIn.js"),
|
4154 | getTag = __webpack_require__( "../node_modules/lodash/_getTag.js"),
|
4155 | initCloneArray = __webpack_require__( "../node_modules/lodash/_initCloneArray.js"),
|
4156 | initCloneByTag = __webpack_require__( "../node_modules/lodash/_initCloneByTag.js"),
|
4157 | initCloneObject = __webpack_require__( "../node_modules/lodash/_initCloneObject.js"),
|
4158 | isArray = __webpack_require__( "../node_modules/lodash/isArray.js"),
|
4159 | isBuffer = __webpack_require__( "../node_modules/lodash/isBuffer.js"),
|
4160 | isMap = __webpack_require__( "../node_modules/lodash/isMap.js"),
|
4161 | isObject = __webpack_require__( "../node_modules/lodash/isObject.js"),
|
4162 | isSet = __webpack_require__( "../node_modules/lodash/isSet.js"),
|
4163 | keys = __webpack_require__( "../node_modules/lodash/keys.js");
|
4164 |
|
4165 |
|
4166 | var CLONE_DEEP_FLAG = 1,
|
4167 | CLONE_FLAT_FLAG = 2,
|
4168 | CLONE_SYMBOLS_FLAG = 4;
|
4169 |
|
4170 |
|
4171 | var argsTag = '[object Arguments]',
|
4172 | arrayTag = '[object Array]',
|
4173 | boolTag = '[object Boolean]',
|
4174 | dateTag = '[object Date]',
|
4175 | errorTag = '[object Error]',
|
4176 | funcTag = '[object Function]',
|
4177 | genTag = '[object GeneratorFunction]',
|
4178 | mapTag = '[object Map]',
|
4179 | numberTag = '[object Number]',
|
4180 | objectTag = '[object Object]',
|
4181 | regexpTag = '[object RegExp]',
|
4182 | setTag = '[object Set]',
|
4183 | stringTag = '[object String]',
|
4184 | symbolTag = '[object Symbol]',
|
4185 | weakMapTag = '[object WeakMap]';
|
4186 |
|
4187 | var arrayBufferTag = '[object ArrayBuffer]',
|
4188 | dataViewTag = '[object DataView]',
|
4189 | float32Tag = '[object Float32Array]',
|
4190 | float64Tag = '[object Float64Array]',
|
4191 | int8Tag = '[object Int8Array]',
|
4192 | int16Tag = '[object Int16Array]',
|
4193 | int32Tag = '[object Int32Array]',
|
4194 | uint8Tag = '[object Uint8Array]',
|
4195 | uint8ClampedTag = '[object Uint8ClampedArray]',
|
4196 | uint16Tag = '[object Uint16Array]',
|
4197 | uint32Tag = '[object Uint32Array]';
|
4198 |
|
4199 |
|
4200 | var cloneableTags = {};
|
4201 | cloneableTags[argsTag] = cloneableTags[arrayTag] =
|
4202 | cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
|
4203 | cloneableTags[boolTag] = cloneableTags[dateTag] =
|
4204 | cloneableTags[float32Tag] = cloneableTags[float64Tag] =
|
4205 | cloneableTags[int8Tag] = cloneableTags[int16Tag] =
|
4206 | cloneableTags[int32Tag] = cloneableTags[mapTag] =
|
4207 | cloneableTags[numberTag] = cloneableTags[objectTag] =
|
4208 | cloneableTags[regexpTag] = cloneableTags[setTag] =
|
4209 | cloneableTags[stringTag] = cloneableTags[symbolTag] =
|
4210 | cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
|
4211 | cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
|
4212 | cloneableTags[errorTag] = cloneableTags[funcTag] =
|
4213 | cloneableTags[weakMapTag] = false;
|
4214 |
|
4215 |
|
4216 |
|
4217 |
|
4218 |
|
4219 |
|
4220 |
|
4221 |
|
4222 |
|
4223 |
|
4224 |
|
4225 |
|
4226 |
|
4227 |
|
4228 |
|
4229 |
|
4230 |
|
4231 | function baseClone(value, bitmask, customizer, key, object, stack) {
|
4232 | var result,
|
4233 | isDeep = bitmask & CLONE_DEEP_FLAG,
|
4234 | isFlat = bitmask & CLONE_FLAT_FLAG,
|
4235 | isFull = bitmask & CLONE_SYMBOLS_FLAG;
|
4236 |
|
4237 | if (customizer) {
|
4238 | result = object ? customizer(value, key, object, stack) : customizer(value);
|
4239 | }
|
4240 | if (result !== undefined) {
|
4241 | return result;
|
4242 | }
|
4243 | if (!isObject(value)) {
|
4244 | return value;
|
4245 | }
|
4246 | var isArr = isArray(value);
|
4247 | if (isArr) {
|
4248 | result = initCloneArray(value);
|
4249 | if (!isDeep) {
|
4250 | return copyArray(value, result);
|
4251 | }
|
4252 | } else {
|
4253 | var tag = getTag(value),
|
4254 | isFunc = tag == funcTag || tag == genTag;
|
4255 |
|
4256 | if (isBuffer(value)) {
|
4257 | return cloneBuffer(value, isDeep);
|
4258 | }
|
4259 | if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
4260 | result = (isFlat || isFunc) ? {} : initCloneObject(value);
|
4261 | if (!isDeep) {
|
4262 | return isFlat
|
4263 | ? copySymbolsIn(value, baseAssignIn(result, value))
|
4264 | : copySymbols(value, baseAssign(result, value));
|
4265 | }
|
4266 | } else {
|
4267 | if (!cloneableTags[tag]) {
|
4268 | return object ? value : {};
|
4269 | }
|
4270 | result = initCloneByTag(value, tag, isDeep);
|
4271 | }
|
4272 | }
|
4273 |
|
4274 | stack || (stack = new Stack);
|
4275 | var stacked = stack.get(value);
|
4276 | if (stacked) {
|
4277 | return stacked;
|
4278 | }
|
4279 | stack.set(value, result);
|
4280 |
|
4281 | if (isSet(value)) {
|
4282 | value.forEach(function(subValue) {
|
4283 | result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
|
4284 | });
|
4285 | } else if (isMap(value)) {
|
4286 | value.forEach(function(subValue, key) {
|
4287 | result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
4288 | });
|
4289 | }
|
4290 |
|
4291 | var keysFunc = isFull
|
4292 | ? (isFlat ? getAllKeysIn : getAllKeys)
|
4293 | : (isFlat ? keysIn : keys);
|
4294 |
|
4295 | var props = isArr ? undefined : keysFunc(value);
|
4296 | arrayEach(props || value, function(subValue, key) {
|
4297 | if (props) {
|
4298 | key = subValue;
|
4299 | subValue = value[key];
|
4300 | }
|
4301 |
|
4302 | assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
|
4303 | });
|
4304 | return result;
|
4305 | }
|
4306 |
|
4307 | module.exports = baseClone;
|
4308 |
|
4309 |
|
4310 | }),
|
4311 |
|
4312 | "../node_modules/lodash/_baseCreate.js":
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 | (function(module, exports, __webpack_require__) {
|
4318 |
|
4319 | var isObject = __webpack_require__( "../node_modules/lodash/isObject.js");
|
4320 |
|
4321 |
|
4322 | var objectCreate = Object.create;
|
4323 |
|
4324 |
|
4325 |
|
4326 |
|
4327 |
|
4328 |
|
4329 |
|
4330 |
|
4331 |
|
4332 | var baseCreate = (function() {
|
4333 | function object() {}
|
4334 | return function(proto) {
|
4335 | if (!isObject(proto)) {
|
4336 | return {};
|
4337 | }
|
4338 | if (objectCreate) {
|
4339 | return objectCreate(proto);
|
4340 | }
|
4341 | object.prototype = proto;
|
4342 | var result = new object;
|
4343 | object.prototype = undefined;
|
4344 | return result;
|
4345 | };
|
4346 | }());
|
4347 |
|
4348 | module.exports = baseCreate;
|
4349 |
|
4350 |
|
4351 | }),
|
4352 |
|
4353 | "../node_modules/lodash/_baseGet.js":
|
4354 |
|
4355 |
|
4356 |
|
4357 |
|
4358 | (function(module, exports) {
|
4359 |
|
4360 |
|
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 | function getValue(object, key) {
|
4369 | return object == null ? undefined : object[key];
|
4370 | }
|
4371 |
|
4372 | module.exports = getValue;
|
4373 |
|
4374 |
|
4375 | }),
|
4376 |
|
4377 | "../node_modules/lodash/_baseGetTag.js":
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 | (function(module, exports) {
|
4383 |
|
4384 |
|
4385 | var objectProto = Object.prototype;
|
4386 |
|
4387 |
|
4388 |
|
4389 |
|
4390 |
|
4391 |
|
4392 | var nativeObjectToString = objectProto.toString;
|
4393 |
|
4394 |
|
4395 |
|
4396 |
|
4397 |
|
4398 |
|
4399 |
|
4400 |
|
4401 | function objectToString(value) {
|
4402 | return nativeObjectToString.call(value);
|
4403 | }
|
4404 |
|
4405 | module.exports = objectToString;
|
4406 |
|
4407 |
|
4408 | }),
|
4409 |
|
4410 | "../node_modules/lodash/_cloneBuffer.js":
|
4411 |
|
4412 |
|
4413 |
|
4414 |
|
4415 | (function(module, exports, __webpack_require__) {
|
4416 |
|
4417 | (function(module) {var root = __webpack_require__( "../node_modules/lodash/_root.js");
|
4418 |
|
4419 |
|
4420 | var freeExports = true && exports && !exports.nodeType && exports;
|
4421 |
|
4422 |
|
4423 | var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
|
4424 |
|
4425 |
|
4426 | var moduleExports = freeModule && freeModule.exports === freeExports;
|
4427 |
|
4428 |
|
4429 | var Buffer = moduleExports ? root.Buffer : undefined,
|
4430 | allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 | function cloneBuffer(buffer, isDeep) {
|
4441 | if (isDeep) {
|
4442 | return buffer.slice();
|
4443 | }
|
4444 | var length = buffer.length,
|
4445 | result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
4446 |
|
4447 | buffer.copy(result);
|
4448 | return result;
|
4449 | }
|
4450 |
|
4451 | module.exports = cloneBuffer;
|
4452 |
|
4453 | }.call(this, __webpack_require__( "../node_modules/webpack/buildin/module.js")(module)))
|
4454 |
|
4455 | }),
|
4456 |
|
4457 | "../node_modules/lodash/_copyArray.js":
|
4458 |
|
4459 |
|
4460 |
|
4461 |
|
4462 | (function(module, exports) {
|
4463 |
|
4464 |
|
4465 |
|
4466 |
|
4467 |
|
4468 |
|
4469 |
|
4470 |
|
4471 |
|
4472 | function copyArray(source, array) {
|
4473 | var index = -1,
|
4474 | length = source.length;
|
4475 |
|
4476 | array || (array = Array(length));
|
4477 | while (++index < length) {
|
4478 | array[index] = source[index];
|
4479 | }
|
4480 | return array;
|
4481 | }
|
4482 |
|
4483 | module.exports = copyArray;
|
4484 |
|
4485 |
|
4486 | }),
|
4487 |
|
4488 | "../node_modules/lodash/_copyObject.js":
|
4489 |
|
4490 |
|
4491 |
|
4492 |
|
4493 | (function(module, exports, __webpack_require__) {
|
4494 |
|
4495 | var assignValue = __webpack_require__( "../node_modules/lodash/_assignValue.js"),
|
4496 | baseAssignValue = __webpack_require__( "../node_modules/lodash/_baseAssignValue.js");
|
4497 |
|
4498 |
|
4499 |
|
4500 |
|
4501 |
|
4502 |
|
4503 |
|
4504 |
|
4505 |
|
4506 |
|
4507 |
|
4508 | function copyObject(source, props, object, customizer) {
|
4509 | var isNew = !object;
|
4510 | object || (object = {});
|
4511 |
|
4512 | var index = -1,
|
4513 | length = props.length;
|
4514 |
|
4515 | while (++index < length) {
|
4516 | var key = props[index];
|
4517 |
|
4518 | var newValue = customizer
|
4519 | ? customizer(object[key], source[key], key, object, source)
|
4520 | : undefined;
|
4521 |
|
4522 | if (newValue === undefined) {
|
4523 | newValue = source[key];
|
4524 | }
|
4525 | if (isNew) {
|
4526 | baseAssignValue(object, key, newValue);
|
4527 | } else {
|
4528 | assignValue(object, key, newValue);
|
4529 | }
|
4530 | }
|
4531 | return object;
|
4532 | }
|
4533 |
|
4534 | module.exports = copyObject;
|
4535 |
|
4536 |
|
4537 | }),
|
4538 |
|
4539 | "../node_modules/lodash/_copySymbols.js":
|
4540 |
|
4541 |
|
4542 |
|
4543 |
|
4544 | (function(module, exports, __webpack_require__) {
|
4545 |
|
4546 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
4547 | getSymbols = __webpack_require__( "../node_modules/lodash/_getSymbols.js");
|
4548 |
|
4549 |
|
4550 |
|
4551 |
|
4552 |
|
4553 |
|
4554 |
|
4555 |
|
4556 |
|
4557 | function copySymbols(source, object) {
|
4558 | return copyObject(source, getSymbols(source), object);
|
4559 | }
|
4560 |
|
4561 | module.exports = copySymbols;
|
4562 |
|
4563 |
|
4564 | }),
|
4565 |
|
4566 | "../node_modules/lodash/_copySymbolsIn.js":
|
4567 |
|
4568 |
|
4569 |
|
4570 |
|
4571 | (function(module, exports, __webpack_require__) {
|
4572 |
|
4573 | var copyObject = __webpack_require__( "../node_modules/lodash/_copyObject.js"),
|
4574 | getSymbolsIn = __webpack_require__( "../node_modules/lodash/_getSymbolsIn.js");
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 |
|
4582 |
|
4583 |
|
4584 | function copySymbolsIn(source, object) {
|
4585 | return copyObject(source, getSymbolsIn(source), object);
|
4586 | }
|
4587 |
|
4588 | module.exports = copySymbolsIn;
|
4589 |
|
4590 |
|
4591 | }),
|
4592 |
|
4593 | "../node_modules/lodash/_defineProperty.js":
|
4594 |
|
4595 |
|
4596 |
|
4597 |
|
4598 | (function(module, exports, __webpack_require__) {
|
4599 |
|
4600 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js");
|
4601 |
|
4602 | var defineProperty = (function() {
|
4603 | try {
|
4604 | var func = getNative(Object, 'defineProperty');
|
4605 | func({}, '', {});
|
4606 | return func;
|
4607 | } catch (e) {}
|
4608 | }());
|
4609 |
|
4610 | module.exports = defineProperty;
|
4611 |
|
4612 |
|
4613 | }),
|
4614 |
|
4615 | "../node_modules/lodash/_freeGlobal.js":
|
4616 |
|
4617 |
|
4618 |
|
4619 |
|
4620 | (function(module, exports) {
|
4621 |
|
4622 |
|
4623 | var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
|
4624 |
|
4625 | module.exports = freeGlobal;
|
4626 |
|
4627 |
|
4628 | }),
|
4629 |
|
4630 | "../node_modules/lodash/_getAllKeys.js":
|
4631 |
|
4632 |
|
4633 |
|
4634 |
|
4635 | (function(module, exports, __webpack_require__) {
|
4636 |
|
4637 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
4638 |
|
4639 |
|
4640 | var nativeKeys = overArg(Object.keys, Object);
|
4641 |
|
4642 | module.exports = nativeKeys;
|
4643 |
|
4644 |
|
4645 | }),
|
4646 |
|
4647 | "../node_modules/lodash/_getAllKeysIn.js":
|
4648 |
|
4649 |
|
4650 |
|
4651 |
|
4652 | (function(module, exports) {
|
4653 |
|
4654 |
|
4655 |
|
4656 |
|
4657 |
|
4658 |
|
4659 |
|
4660 |
|
4661 |
|
4662 |
|
4663 | function nativeKeysIn(object) {
|
4664 | var result = [];
|
4665 | if (object != null) {
|
4666 | for (var key in Object(object)) {
|
4667 | result.push(key);
|
4668 | }
|
4669 | }
|
4670 | return result;
|
4671 | }
|
4672 |
|
4673 | module.exports = nativeKeysIn;
|
4674 |
|
4675 |
|
4676 | }),
|
4677 |
|
4678 | "../node_modules/lodash/_getMapData.js":
|
4679 |
|
4680 |
|
4681 |
|
4682 |
|
4683 | (function(module, exports, __webpack_require__) {
|
4684 |
|
4685 | var isKeyable = __webpack_require__( "../node_modules/lodash/_isKeyable.js");
|
4686 |
|
4687 |
|
4688 |
|
4689 |
|
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 |
|
4695 | function getMapData(map, key) {
|
4696 | var data = map.__data__;
|
4697 | return isKeyable(key)
|
4698 | ? data[typeof key == 'string' ? 'string' : 'hash']
|
4699 | : data.map;
|
4700 | }
|
4701 |
|
4702 | module.exports = getMapData;
|
4703 |
|
4704 |
|
4705 | }),
|
4706 |
|
4707 | "../node_modules/lodash/_getNative.js":
|
4708 |
|
4709 |
|
4710 |
|
4711 |
|
4712 | (function(module, exports) {
|
4713 |
|
4714 |
|
4715 |
|
4716 |
|
4717 |
|
4718 |
|
4719 |
|
4720 |
|
4721 |
|
4722 | function getValue(object, key) {
|
4723 | return object == null ? undefined : object[key];
|
4724 | }
|
4725 |
|
4726 | module.exports = getValue;
|
4727 |
|
4728 |
|
4729 | }),
|
4730 |
|
4731 | "../node_modules/lodash/_getPrototype.js":
|
4732 |
|
4733 |
|
4734 |
|
4735 |
|
4736 | (function(module, exports, __webpack_require__) {
|
4737 |
|
4738 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
4739 |
|
4740 |
|
4741 | var getPrototype = overArg(Object.getPrototypeOf, Object);
|
4742 |
|
4743 | module.exports = getPrototype;
|
4744 |
|
4745 |
|
4746 | }),
|
4747 |
|
4748 | "../node_modules/lodash/_getSymbols.js":
|
4749 |
|
4750 |
|
4751 |
|
4752 |
|
4753 | (function(module, exports) {
|
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 |
|
4759 |
|
4760 |
|
4761 |
|
4762 |
|
4763 |
|
4764 |
|
4765 |
|
4766 |
|
4767 |
|
4768 |
|
4769 |
|
4770 |
|
4771 |
|
4772 |
|
4773 | function stubArray() {
|
4774 | return [];
|
4775 | }
|
4776 |
|
4777 | module.exports = stubArray;
|
4778 |
|
4779 |
|
4780 | }),
|
4781 |
|
4782 | "../node_modules/lodash/_getSymbolsIn.js":
|
4783 |
|
4784 |
|
4785 |
|
4786 |
|
4787 | (function(module, exports) {
|
4788 |
|
4789 |
|
4790 |
|
4791 |
|
4792 |
|
4793 |
|
4794 |
|
4795 |
|
4796 |
|
4797 |
|
4798 |
|
4799 |
|
4800 |
|
4801 |
|
4802 |
|
4803 |
|
4804 |
|
4805 |
|
4806 |
|
4807 | function stubArray() {
|
4808 | return [];
|
4809 | }
|
4810 |
|
4811 | module.exports = stubArray;
|
4812 |
|
4813 |
|
4814 | }),
|
4815 |
|
4816 | "../node_modules/lodash/_getTag.js":
|
4817 |
|
4818 |
|
4819 |
|
4820 |
|
4821 | (function(module, exports) {
|
4822 |
|
4823 |
|
4824 | var objectProto = Object.prototype;
|
4825 |
|
4826 |
|
4827 |
|
4828 |
|
4829 |
|
4830 |
|
4831 | var nativeObjectToString = objectProto.toString;
|
4832 |
|
4833 |
|
4834 |
|
4835 |
|
4836 |
|
4837 |
|
4838 |
|
4839 |
|
4840 | function objectToString(value) {
|
4841 | return nativeObjectToString.call(value);
|
4842 | }
|
4843 |
|
4844 | module.exports = objectToString;
|
4845 |
|
4846 |
|
4847 | }),
|
4848 |
|
4849 | "../node_modules/lodash/_hashClear.js":
|
4850 |
|
4851 |
|
4852 |
|
4853 |
|
4854 | (function(module, exports, __webpack_require__) {
|
4855 |
|
4856 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
4857 |
|
4858 |
|
4859 |
|
4860 |
|
4861 |
|
4862 |
|
4863 |
|
4864 |
|
4865 | function hashClear() {
|
4866 | this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
4867 | this.size = 0;
|
4868 | }
|
4869 |
|
4870 | module.exports = hashClear;
|
4871 |
|
4872 |
|
4873 | }),
|
4874 |
|
4875 | "../node_modules/lodash/_hashDelete.js":
|
4876 |
|
4877 |
|
4878 |
|
4879 |
|
4880 | (function(module, exports) {
|
4881 |
|
4882 |
|
4883 |
|
4884 |
|
4885 |
|
4886 |
|
4887 |
|
4888 |
|
4889 |
|
4890 |
|
4891 |
|
4892 | function hashDelete(key) {
|
4893 | var result = this.has(key) && delete this.__data__[key];
|
4894 | this.size -= result ? 1 : 0;
|
4895 | return result;
|
4896 | }
|
4897 |
|
4898 | module.exports = hashDelete;
|
4899 |
|
4900 |
|
4901 | }),
|
4902 |
|
4903 | "../node_modules/lodash/_hashGet.js":
|
4904 |
|
4905 |
|
4906 |
|
4907 |
|
4908 | (function(module, exports, __webpack_require__) {
|
4909 |
|
4910 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
4911 |
|
4912 |
|
4913 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
4914 |
|
4915 |
|
4916 | var objectProto = Object.prototype;
|
4917 |
|
4918 |
|
4919 | var hasOwnProperty = objectProto.hasOwnProperty;
|
4920 |
|
4921 |
|
4922 |
|
4923 |
|
4924 |
|
4925 |
|
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 | function hashGet(key) {
|
4931 | var data = this.__data__;
|
4932 | if (nativeCreate) {
|
4933 | var result = data[key];
|
4934 | return result === HASH_UNDEFINED ? undefined : result;
|
4935 | }
|
4936 | return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
4937 | }
|
4938 |
|
4939 | module.exports = hashGet;
|
4940 |
|
4941 |
|
4942 | }),
|
4943 |
|
4944 | "../node_modules/lodash/_hashHas.js":
|
4945 |
|
4946 |
|
4947 |
|
4948 |
|
4949 | (function(module, exports, __webpack_require__) {
|
4950 |
|
4951 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
4952 |
|
4953 |
|
4954 | var objectProto = Object.prototype;
|
4955 |
|
4956 |
|
4957 | var hasOwnProperty = objectProto.hasOwnProperty;
|
4958 |
|
4959 |
|
4960 |
|
4961 |
|
4962 |
|
4963 |
|
4964 |
|
4965 |
|
4966 |
|
4967 |
|
4968 | function hashHas(key) {
|
4969 | var data = this.__data__;
|
4970 | return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
|
4971 | }
|
4972 |
|
4973 | module.exports = hashHas;
|
4974 |
|
4975 |
|
4976 | }),
|
4977 |
|
4978 | "../node_modules/lodash/_hashSet.js":
|
4979 |
|
4980 |
|
4981 |
|
4982 |
|
4983 | (function(module, exports, __webpack_require__) {
|
4984 |
|
4985 | var nativeCreate = __webpack_require__( "../node_modules/lodash/_nativeCreate.js");
|
4986 |
|
4987 |
|
4988 | var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
4989 |
|
4990 |
|
4991 |
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 |
|
4997 |
|
4998 |
|
4999 |
|
5000 | function hashSet(key, value) {
|
5001 | var data = this.__data__;
|
5002 | this.size += this.has(key) ? 0 : 1;
|
5003 | data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
5004 | return this;
|
5005 | }
|
5006 |
|
5007 | module.exports = hashSet;
|
5008 |
|
5009 |
|
5010 | }),
|
5011 |
|
5012 | "../node_modules/lodash/_initCloneArray.js":
|
5013 |
|
5014 |
|
5015 |
|
5016 |
|
5017 | (function(module, exports) {
|
5018 |
|
5019 |
|
5020 | var objectProto = Object.prototype;
|
5021 |
|
5022 |
|
5023 | var hasOwnProperty = objectProto.hasOwnProperty;
|
5024 |
|
5025 |
|
5026 |
|
5027 |
|
5028 |
|
5029 |
|
5030 |
|
5031 |
|
5032 | function initCloneArray(array) {
|
5033 | var length = array.length,
|
5034 | result = new array.constructor(length);
|
5035 |
|
5036 |
|
5037 | if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
5038 | result.index = array.index;
|
5039 | result.input = array.input;
|
5040 | }
|
5041 | return result;
|
5042 | }
|
5043 |
|
5044 | module.exports = initCloneArray;
|
5045 |
|
5046 |
|
5047 | }),
|
5048 |
|
5049 | "../node_modules/lodash/_initCloneByTag.js":
|
5050 |
|
5051 |
|
5052 |
|
5053 |
|
5054 | (function(module, exports) {
|
5055 |
|
5056 |
|
5057 |
|
5058 |
|
5059 |
|
5060 |
|
5061 |
|
5062 |
|
5063 |
|
5064 |
|
5065 |
|
5066 |
|
5067 |
|
5068 |
|
5069 |
|
5070 |
|
5071 |
|
5072 | function identity(value) {
|
5073 | return value;
|
5074 | }
|
5075 |
|
5076 | module.exports = identity;
|
5077 |
|
5078 |
|
5079 | }),
|
5080 |
|
5081 | "../node_modules/lodash/_initCloneObject.js":
|
5082 |
|
5083 |
|
5084 |
|
5085 |
|
5086 | (function(module, exports, __webpack_require__) {
|
5087 |
|
5088 | var baseCreate = __webpack_require__( "../node_modules/lodash/_baseCreate.js"),
|
5089 | getPrototype = __webpack_require__( "../node_modules/lodash/_getPrototype.js"),
|
5090 | isPrototype = __webpack_require__( "../node_modules/lodash/_isPrototype.js");
|
5091 |
|
5092 |
|
5093 |
|
5094 |
|
5095 |
|
5096 |
|
5097 |
|
5098 |
|
5099 | function initCloneObject(object) {
|
5100 | return (typeof object.constructor == 'function' && !isPrototype(object))
|
5101 | ? baseCreate(getPrototype(object))
|
5102 | : {};
|
5103 | }
|
5104 |
|
5105 | module.exports = initCloneObject;
|
5106 |
|
5107 |
|
5108 | }),
|
5109 |
|
5110 | "../node_modules/lodash/_isKeyable.js":
|
5111 |
|
5112 |
|
5113 |
|
5114 |
|
5115 | (function(module, exports) {
|
5116 |
|
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 |
|
5122 |
|
5123 |
|
5124 | function isKeyable(value) {
|
5125 | var type = typeof value;
|
5126 | return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
5127 | ? (value !== '__proto__')
|
5128 | : (value === null);
|
5129 | }
|
5130 |
|
5131 | module.exports = isKeyable;
|
5132 |
|
5133 |
|
5134 | }),
|
5135 |
|
5136 | "../node_modules/lodash/_isPrototype.js":
|
5137 |
|
5138 |
|
5139 |
|
5140 |
|
5141 | (function(module, exports) {
|
5142 |
|
5143 |
|
5144 |
|
5145 |
|
5146 |
|
5147 |
|
5148 |
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 |
|
5154 |
|
5155 |
|
5156 | function stubFalse() {
|
5157 | return false;
|
5158 | }
|
5159 |
|
5160 | module.exports = stubFalse;
|
5161 |
|
5162 |
|
5163 | }),
|
5164 |
|
5165 | "../node_modules/lodash/_listCacheClear.js":
|
5166 |
|
5167 |
|
5168 |
|
5169 |
|
5170 | (function(module, exports) {
|
5171 |
|
5172 |
|
5173 |
|
5174 |
|
5175 |
|
5176 |
|
5177 |
|
5178 |
|
5179 | function listCacheClear() {
|
5180 | this.__data__ = [];
|
5181 | this.size = 0;
|
5182 | }
|
5183 |
|
5184 | module.exports = listCacheClear;
|
5185 |
|
5186 |
|
5187 | }),
|
5188 |
|
5189 | "../node_modules/lodash/_listCacheDelete.js":
|
5190 |
|
5191 |
|
5192 |
|
5193 |
|
5194 | (function(module, exports, __webpack_require__) {
|
5195 |
|
5196 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
5197 |
|
5198 |
|
5199 | var arrayProto = Array.prototype;
|
5200 |
|
5201 |
|
5202 | var splice = arrayProto.splice;
|
5203 |
|
5204 |
|
5205 |
|
5206 |
|
5207 |
|
5208 |
|
5209 |
|
5210 |
|
5211 |
|
5212 |
|
5213 | function listCacheDelete(key) {
|
5214 | var data = this.__data__,
|
5215 | index = assocIndexOf(data, key);
|
5216 |
|
5217 | if (index < 0) {
|
5218 | return false;
|
5219 | }
|
5220 | var lastIndex = data.length - 1;
|
5221 | if (index == lastIndex) {
|
5222 | data.pop();
|
5223 | } else {
|
5224 | splice.call(data, index, 1);
|
5225 | }
|
5226 | --this.size;
|
5227 | return true;
|
5228 | }
|
5229 |
|
5230 | module.exports = listCacheDelete;
|
5231 |
|
5232 |
|
5233 | }),
|
5234 |
|
5235 | "../node_modules/lodash/_listCacheGet.js":
|
5236 |
|
5237 |
|
5238 |
|
5239 |
|
5240 | (function(module, exports, __webpack_require__) {
|
5241 |
|
5242 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
5243 |
|
5244 |
|
5245 |
|
5246 |
|
5247 |
|
5248 |
|
5249 |
|
5250 |
|
5251 |
|
5252 |
|
5253 | function listCacheGet(key) {
|
5254 | var data = this.__data__,
|
5255 | index = assocIndexOf(data, key);
|
5256 |
|
5257 | return index < 0 ? undefined : data[index][1];
|
5258 | }
|
5259 |
|
5260 | module.exports = listCacheGet;
|
5261 |
|
5262 |
|
5263 | }),
|
5264 |
|
5265 | "../node_modules/lodash/_listCacheHas.js":
|
5266 |
|
5267 |
|
5268 |
|
5269 |
|
5270 | (function(module, exports, __webpack_require__) {
|
5271 |
|
5272 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 |
|
5278 |
|
5279 |
|
5280 |
|
5281 |
|
5282 |
|
5283 | function listCacheHas(key) {
|
5284 | return assocIndexOf(this.__data__, key) > -1;
|
5285 | }
|
5286 |
|
5287 | module.exports = listCacheHas;
|
5288 |
|
5289 |
|
5290 | }),
|
5291 |
|
5292 | "../node_modules/lodash/_listCacheSet.js":
|
5293 |
|
5294 |
|
5295 |
|
5296 |
|
5297 | (function(module, exports, __webpack_require__) {
|
5298 |
|
5299 | var assocIndexOf = __webpack_require__( "../node_modules/lodash/_assocIndexOf.js");
|
5300 |
|
5301 |
|
5302 |
|
5303 |
|
5304 |
|
5305 |
|
5306 |
|
5307 |
|
5308 |
|
5309 |
|
5310 |
|
5311 | function listCacheSet(key, value) {
|
5312 | var data = this.__data__,
|
5313 | index = assocIndexOf(data, key);
|
5314 |
|
5315 | if (index < 0) {
|
5316 | ++this.size;
|
5317 | data.push([key, value]);
|
5318 | } else {
|
5319 | data[index][1] = value;
|
5320 | }
|
5321 | return this;
|
5322 | }
|
5323 |
|
5324 | module.exports = listCacheSet;
|
5325 |
|
5326 |
|
5327 | }),
|
5328 |
|
5329 | "../node_modules/lodash/_mapCacheClear.js":
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 | (function(module, exports, __webpack_require__) {
|
5335 |
|
5336 | var Hash = __webpack_require__( "../node_modules/lodash/_Hash.js"),
|
5337 | ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
5338 | Map = __webpack_require__( "../node_modules/lodash/_Map.js");
|
5339 |
|
5340 |
|
5341 |
|
5342 |
|
5343 |
|
5344 |
|
5345 |
|
5346 |
|
5347 | function mapCacheClear() {
|
5348 | this.size = 0;
|
5349 | this.__data__ = {
|
5350 | 'hash': new Hash,
|
5351 | 'map': new (Map || ListCache),
|
5352 | 'string': new Hash
|
5353 | };
|
5354 | }
|
5355 |
|
5356 | module.exports = mapCacheClear;
|
5357 |
|
5358 |
|
5359 | }),
|
5360 |
|
5361 | "../node_modules/lodash/_mapCacheDelete.js":
|
5362 |
|
5363 |
|
5364 |
|
5365 |
|
5366 | (function(module, exports, __webpack_require__) {
|
5367 |
|
5368 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
5369 |
|
5370 |
|
5371 |
|
5372 |
|
5373 |
|
5374 |
|
5375 |
|
5376 |
|
5377 |
|
5378 |
|
5379 | function mapCacheDelete(key) {
|
5380 | var result = getMapData(this, key)['delete'](key);
|
5381 | this.size -= result ? 1 : 0;
|
5382 | return result;
|
5383 | }
|
5384 |
|
5385 | module.exports = mapCacheDelete;
|
5386 |
|
5387 |
|
5388 | }),
|
5389 |
|
5390 | "../node_modules/lodash/_mapCacheGet.js":
|
5391 |
|
5392 |
|
5393 |
|
5394 |
|
5395 | (function(module, exports, __webpack_require__) {
|
5396 |
|
5397 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
5398 |
|
5399 |
|
5400 |
|
5401 |
|
5402 |
|
5403 |
|
5404 |
|
5405 |
|
5406 |
|
5407 |
|
5408 | function mapCacheGet(key) {
|
5409 | return getMapData(this, key).get(key);
|
5410 | }
|
5411 |
|
5412 | module.exports = mapCacheGet;
|
5413 |
|
5414 |
|
5415 | }),
|
5416 |
|
5417 | "../node_modules/lodash/_mapCacheHas.js":
|
5418 |
|
5419 |
|
5420 |
|
5421 |
|
5422 | (function(module, exports, __webpack_require__) {
|
5423 |
|
5424 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
5425 |
|
5426 |
|
5427 |
|
5428 |
|
5429 |
|
5430 |
|
5431 |
|
5432 |
|
5433 |
|
5434 |
|
5435 | function mapCacheHas(key) {
|
5436 | return getMapData(this, key).has(key);
|
5437 | }
|
5438 |
|
5439 | module.exports = mapCacheHas;
|
5440 |
|
5441 |
|
5442 | }),
|
5443 |
|
5444 | "../node_modules/lodash/_mapCacheSet.js":
|
5445 |
|
5446 |
|
5447 |
|
5448 |
|
5449 | (function(module, exports, __webpack_require__) {
|
5450 |
|
5451 | var getMapData = __webpack_require__( "../node_modules/lodash/_getMapData.js");
|
5452 |
|
5453 |
|
5454 |
|
5455 |
|
5456 |
|
5457 |
|
5458 |
|
5459 |
|
5460 |
|
5461 |
|
5462 |
|
5463 | function mapCacheSet(key, value) {
|
5464 | var data = getMapData(this, key),
|
5465 | size = data.size;
|
5466 |
|
5467 | data.set(key, value);
|
5468 | this.size += data.size == size ? 0 : 1;
|
5469 | return this;
|
5470 | }
|
5471 |
|
5472 | module.exports = mapCacheSet;
|
5473 |
|
5474 |
|
5475 | }),
|
5476 |
|
5477 | "../node_modules/lodash/_nativeCreate.js":
|
5478 |
|
5479 |
|
5480 |
|
5481 |
|
5482 | (function(module, exports, __webpack_require__) {
|
5483 |
|
5484 | var getNative = __webpack_require__( "../node_modules/lodash/_getNative.js");
|
5485 |
|
5486 |
|
5487 | var nativeCreate = getNative(Object, 'create');
|
5488 |
|
5489 | module.exports = nativeCreate;
|
5490 |
|
5491 |
|
5492 | }),
|
5493 |
|
5494 | "../node_modules/lodash/_overArg.js":
|
5495 |
|
5496 |
|
5497 |
|
5498 |
|
5499 | (function(module, exports) {
|
5500 |
|
5501 |
|
5502 |
|
5503 |
|
5504 |
|
5505 |
|
5506 |
|
5507 |
|
5508 |
|
5509 | function overArg(func, transform) {
|
5510 | return function(arg) {
|
5511 | return func(transform(arg));
|
5512 | };
|
5513 | }
|
5514 |
|
5515 | module.exports = overArg;
|
5516 |
|
5517 |
|
5518 | }),
|
5519 |
|
5520 | "../node_modules/lodash/_root.js":
|
5521 |
|
5522 |
|
5523 |
|
5524 |
|
5525 | (function(module, exports, __webpack_require__) {
|
5526 |
|
5527 | var freeGlobal = __webpack_require__( "../node_modules/lodash/_freeGlobal.js");
|
5528 |
|
5529 |
|
5530 | var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
5531 |
|
5532 |
|
5533 | var root = freeGlobal || freeSelf || Function('return this')();
|
5534 |
|
5535 | module.exports = root;
|
5536 |
|
5537 |
|
5538 | }),
|
5539 |
|
5540 | "../node_modules/lodash/_stackClear.js":
|
5541 |
|
5542 |
|
5543 |
|
5544 |
|
5545 | (function(module, exports, __webpack_require__) {
|
5546 |
|
5547 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js");
|
5548 |
|
5549 |
|
5550 |
|
5551 |
|
5552 |
|
5553 |
|
5554 |
|
5555 |
|
5556 | function stackClear() {
|
5557 | this.__data__ = new ListCache;
|
5558 | this.size = 0;
|
5559 | }
|
5560 |
|
5561 | module.exports = stackClear;
|
5562 |
|
5563 |
|
5564 | }),
|
5565 |
|
5566 | "../node_modules/lodash/_stackDelete.js":
|
5567 |
|
5568 |
|
5569 |
|
5570 |
|
5571 | (function(module, exports) {
|
5572 |
|
5573 |
|
5574 |
|
5575 |
|
5576 |
|
5577 |
|
5578 |
|
5579 |
|
5580 |
|
5581 |
|
5582 | function stackDelete(key) {
|
5583 | var data = this.__data__,
|
5584 | result = data['delete'](key);
|
5585 |
|
5586 | this.size = data.size;
|
5587 | return result;
|
5588 | }
|
5589 |
|
5590 | module.exports = stackDelete;
|
5591 |
|
5592 |
|
5593 | }),
|
5594 |
|
5595 | "../node_modules/lodash/_stackGet.js":
|
5596 |
|
5597 |
|
5598 |
|
5599 |
|
5600 | (function(module, exports) {
|
5601 |
|
5602 |
|
5603 |
|
5604 |
|
5605 |
|
5606 |
|
5607 |
|
5608 |
|
5609 |
|
5610 |
|
5611 | function stackGet(key) {
|
5612 | return this.__data__.get(key);
|
5613 | }
|
5614 |
|
5615 | module.exports = stackGet;
|
5616 |
|
5617 |
|
5618 | }),
|
5619 |
|
5620 | "../node_modules/lodash/_stackHas.js":
|
5621 |
|
5622 |
|
5623 |
|
5624 |
|
5625 | (function(module, exports) {
|
5626 |
|
5627 |
|
5628 |
|
5629 |
|
5630 |
|
5631 |
|
5632 |
|
5633 |
|
5634 |
|
5635 |
|
5636 | function stackHas(key) {
|
5637 | return this.__data__.has(key);
|
5638 | }
|
5639 |
|
5640 | module.exports = stackHas;
|
5641 |
|
5642 |
|
5643 | }),
|
5644 |
|
5645 | "../node_modules/lodash/_stackSet.js":
|
5646 |
|
5647 |
|
5648 |
|
5649 |
|
5650 | (function(module, exports, __webpack_require__) {
|
5651 |
|
5652 | var ListCache = __webpack_require__( "../node_modules/lodash/_ListCache.js"),
|
5653 | Map = __webpack_require__( "../node_modules/lodash/_Map.js"),
|
5654 | MapCache = __webpack_require__( "../node_modules/lodash/_MapCache.js");
|
5655 |
|
5656 |
|
5657 | var LARGE_ARRAY_SIZE = 200;
|
5658 |
|
5659 |
|
5660 |
|
5661 |
|
5662 |
|
5663 |
|
5664 |
|
5665 |
|
5666 |
|
5667 |
|
5668 |
|
5669 | function stackSet(key, value) {
|
5670 | var data = this.__data__;
|
5671 | if (data instanceof ListCache) {
|
5672 | var pairs = data.__data__;
|
5673 | if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
5674 | pairs.push([key, value]);
|
5675 | this.size = ++data.size;
|
5676 | return this;
|
5677 | }
|
5678 | data = this.__data__ = new MapCache(pairs);
|
5679 | }
|
5680 | data.set(key, value);
|
5681 | this.size = data.size;
|
5682 | return this;
|
5683 | }
|
5684 |
|
5685 | module.exports = stackSet;
|
5686 |
|
5687 |
|
5688 | }),
|
5689 |
|
5690 | "../node_modules/lodash/cloneDeep.js":
|
5691 |
|
5692 |
|
5693 |
|
5694 |
|
5695 | (function(module, exports, __webpack_require__) {
|
5696 |
|
5697 | var baseClone = __webpack_require__( "../node_modules/lodash/_baseClone.js");
|
5698 |
|
5699 |
|
5700 | var CLONE_DEEP_FLAG = 1,
|
5701 | CLONE_SYMBOLS_FLAG = 4;
|
5702 |
|
5703 |
|
5704 |
|
5705 |
|
5706 |
|
5707 |
|
5708 |
|
5709 |
|
5710 |
|
5711 |
|
5712 |
|
5713 |
|
5714 |
|
5715 |
|
5716 |
|
5717 |
|
5718 |
|
5719 |
|
5720 |
|
5721 | function cloneDeep(value) {
|
5722 | return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
|
5723 | }
|
5724 |
|
5725 | module.exports = cloneDeep;
|
5726 |
|
5727 |
|
5728 | }),
|
5729 |
|
5730 | "../node_modules/lodash/eq.js":
|
5731 |
|
5732 |
|
5733 |
|
5734 |
|
5735 | (function(module, exports) {
|
5736 |
|
5737 |
|
5738 |
|
5739 |
|
5740 |
|
5741 |
|
5742 |
|
5743 |
|
5744 |
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 |
|
5751 |
|
5752 |
|
5753 |
|
5754 |
|
5755 |
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 |
|
5764 |
|
5765 |
|
5766 |
|
5767 |
|
5768 |
|
5769 | function eq(value, other) {
|
5770 | return value === other || (value !== value && other !== other);
|
5771 | }
|
5772 |
|
5773 | module.exports = eq;
|
5774 |
|
5775 |
|
5776 | }),
|
5777 |
|
5778 | "../node_modules/lodash/get.js":
|
5779 |
|
5780 |
|
5781 |
|
5782 |
|
5783 | (function(module, exports, __webpack_require__) {
|
5784 |
|
5785 | var baseGet = __webpack_require__( "../node_modules/lodash/_baseGet.js");
|
5786 |
|
5787 |
|
5788 |
|
5789 |
|
5790 |
|
5791 |
|
5792 |
|
5793 |
|
5794 |
|
5795 |
|
5796 |
|
5797 |
|
5798 |
|
5799 |
|
5800 |
|
5801 |
|
5802 |
|
5803 |
|
5804 |
|
5805 |
|
5806 |
|
5807 |
|
5808 |
|
5809 |
|
5810 |
|
5811 |
|
5812 | function get(object, path, defaultValue) {
|
5813 | var result = object == null ? undefined : baseGet(object, path);
|
5814 | return result === undefined ? defaultValue : result;
|
5815 | }
|
5816 |
|
5817 | module.exports = get;
|
5818 |
|
5819 |
|
5820 | /***/ }),
|
5821 |
|
5822 | /***/ "../node_modules/lodash/isArray.js":
|
5823 | /*!*****************************************!*\
|
5824 | !*** ../node_modules/lodash/isArray.js ***!
|
5825 | \*****************************************/
|
5826 | /*! no static exports found */
|
5827 | /***/ (function(module, exports) {
|
5828 |
|
5829 |
|
5830 |
|
5831 |
|
5832 |
|
5833 |
|
5834 |
|
5835 |
|
5836 |
|
5837 |
|
5838 |
|
5839 |
|
5840 |
|
5841 |
|
5842 |
|
5843 |
|
5844 |
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 | var isArray = Array.isArray;
|
5853 |
|
5854 | module.exports = isArray;
|
5855 |
|
5856 |
|
5857 | }),
|
5858 |
|
5859 | "../node_modules/lodash/isBuffer.js":
|
5860 |
|
5861 |
|
5862 |
|
5863 |
|
5864 | (function(module, exports) {
|
5865 |
|
5866 |
|
5867 |
|
5868 |
|
5869 |
|
5870 |
|
5871 |
|
5872 |
|
5873 |
|
5874 |
|
5875 |
|
5876 |
|
5877 |
|
5878 |
|
5879 | function stubFalse() {
|
5880 | return false;
|
5881 | }
|
5882 |
|
5883 | module.exports = stubFalse;
|
5884 |
|
5885 |
|
5886 | }),
|
5887 |
|
5888 | "../node_modules/lodash/isMap.js":
|
5889 |
|
5890 |
|
5891 |
|
5892 |
|
5893 | (function(module, exports) {
|
5894 |
|
5895 |
|
5896 |
|
5897 |
|
5898 |
|
5899 |
|
5900 |
|
5901 |
|
5902 |
|
5903 |
|
5904 |
|
5905 |
|
5906 |
|
5907 |
|
5908 | function stubFalse() {
|
5909 | return false;
|
5910 | }
|
5911 |
|
5912 | module.exports = stubFalse;
|
5913 |
|
5914 |
|
5915 | }),
|
5916 |
|
5917 | "../node_modules/lodash/isObject.js":
|
5918 |
|
5919 |
|
5920 |
|
5921 |
|
5922 | (function(module, exports) {
|
5923 |
|
5924 |
|
5925 |
|
5926 |
|
5927 |
|
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 | function isObject(value) {
|
5950 | var type = typeof value;
|
5951 | return value != null && (type == 'object' || type == 'function');
|
5952 | }
|
5953 |
|
5954 | module.exports = isObject;
|
5955 |
|
5956 |
|
5957 | }),
|
5958 |
|
5959 | "../node_modules/lodash/isObjectLike.js":
|
5960 |
|
5961 |
|
5962 |
|
5963 |
|
5964 | (function(module, exports) {
|
5965 |
|
5966 |
|
5967 |
|
5968 |
|
5969 |
|
5970 |
|
5971 |
|
5972 |
|
5973 |
|
5974 |
|
5975 |
|
5976 |
|
5977 |
|
5978 |
|
5979 |
|
5980 |
|
5981 |
|
5982 |
|
5983 |
|
5984 |
|
5985 |
|
5986 |
|
5987 |
|
5988 |
|
5989 |
|
5990 | function isObjectLike(value) {
|
5991 | return value != null && typeof value == 'object';
|
5992 | }
|
5993 |
|
5994 | module.exports = isObjectLike;
|
5995 |
|
5996 |
|
5997 | }),
|
5998 |
|
5999 | "../node_modules/lodash/isPlainObject.js":
|
6000 |
|
6001 |
|
6002 |
|
6003 |
|
6004 | (function(module, exports, __webpack_require__) {
|
6005 |
|
6006 | var baseGetTag = __webpack_require__( "../node_modules/lodash/_baseGetTag.js"),
|
6007 | getPrototype = __webpack_require__( "../node_modules/lodash/_getPrototype.js"),
|
6008 | isObjectLike = __webpack_require__( "../node_modules/lodash/isObjectLike.js");
|
6009 |
|
6010 |
|
6011 | var objectTag = '[object Object]';
|
6012 |
|
6013 |
|
6014 | var funcProto = Function.prototype,
|
6015 | objectProto = Object.prototype;
|
6016 |
|
6017 |
|
6018 | var funcToString = funcProto.toString;
|
6019 |
|
6020 |
|
6021 | var hasOwnProperty = objectProto.hasOwnProperty;
|
6022 |
|
6023 |
|
6024 | var objectCtorString = funcToString.call(Object);
|
6025 |
|
6026 |
|
6027 |
|
6028 |
|
6029 |
|
6030 |
|
6031 |
|
6032 |
|
6033 |
|
6034 |
|
6035 |
|
6036 |
|
6037 |
|
6038 |
|
6039 |
|
6040 |
|
6041 |
|
6042 |
|
6043 |
|
6044 |
|
6045 |
|
6046 |
|
6047 |
|
6048 |
|
6049 |
|
6050 |
|
6051 |
|
6052 |
|
6053 |
|
6054 | function isPlainObject(value) {
|
6055 | if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
|
6056 | return false;
|
6057 | }
|
6058 | var proto = getPrototype(value);
|
6059 | if (proto === null) {
|
6060 | return true;
|
6061 | }
|
6062 | var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
6063 | return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
6064 | funcToString.call(Ctor) == objectCtorString;
|
6065 | }
|
6066 |
|
6067 | module.exports = isPlainObject;
|
6068 |
|
6069 |
|
6070 | }),
|
6071 |
|
6072 | "../node_modules/lodash/isSet.js":
|
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 | (function(module, exports) {
|
6078 |
|
6079 |
|
6080 |
|
6081 |
|
6082 |
|
6083 |
|
6084 |
|
6085 |
|
6086 |
|
6087 |
|
6088 |
|
6089 |
|
6090 |
|
6091 |
|
6092 | function stubFalse() {
|
6093 | return false;
|
6094 | }
|
6095 |
|
6096 | module.exports = stubFalse;
|
6097 |
|
6098 |
|
6099 | }),
|
6100 |
|
6101 | "../node_modules/lodash/keys.js":
|
6102 |
|
6103 |
|
6104 |
|
6105 |
|
6106 | (function(module, exports, __webpack_require__) {
|
6107 |
|
6108 | var overArg = __webpack_require__( "../node_modules/lodash/_overArg.js");
|
6109 |
|
6110 |
|
6111 | var nativeKeys = overArg(Object.keys, Object);
|
6112 |
|
6113 | module.exports = nativeKeys;
|
6114 |
|
6115 |
|
6116 | }),
|
6117 |
|
6118 | "../node_modules/lodash/keysIn.js":
|
6119 |
|
6120 |
|
6121 |
|
6122 |
|
6123 | (function(module, exports) {
|
6124 |
|
6125 |
|
6126 |
|
6127 |
|
6128 |
|
6129 |
|
6130 |
|
6131 |
|
6132 |
|
6133 |
|
6134 | function nativeKeysIn(object) {
|
6135 | var result = [];
|
6136 | if (object != null) {
|
6137 | for (var key in Object(object)) {
|
6138 | result.push(key);
|
6139 | }
|
6140 | }
|
6141 | return result;
|
6142 | }
|
6143 |
|
6144 | module.exports = nativeKeysIn;
|
6145 |
|
6146 |
|
6147 | }),
|
6148 |
|
6149 | "../node_modules/ms/index.js":
|
6150 |
|
6151 |
|
6152 |
|
6153 |
|
6154 | (function(module, exports) {
|
6155 |
|
6156 |
|
6157 |
|
6158 |
|
6159 |
|
6160 | var s = 1000;
|
6161 | var m = s * 60;
|
6162 | var h = m * 60;
|
6163 | var d = h * 24;
|
6164 | var y = d * 365.25;
|
6165 |
|
6166 |
|
6167 |
|
6168 |
|
6169 |
|
6170 |
|
6171 |
|
6172 |
|
6173 |
|
6174 |
|
6175 |
|
6176 |
|
6177 |
|
6178 |
|
6179 |
|
6180 | module.exports = function(val, options) {
|
6181 | options = options || {};
|
6182 | var type = typeof val;
|
6183 | if (type === 'string' && val.length > 0) {
|
6184 | return parse(val);
|
6185 | } else if (type === 'number' && isNaN(val) === false) {
|
6186 | return options.long ? fmtLong(val) : fmtShort(val);
|
6187 | }
|
6188 | throw new Error(
|
6189 | 'val is not a non-empty string or a valid number. val=' +
|
6190 | JSON.stringify(val)
|
6191 | );
|
6192 | };
|
6193 |
|
6194 |
|
6195 |
|
6196 |
|
6197 |
|
6198 |
|
6199 |
|
6200 |
|
6201 |
|
6202 | function parse(str) {
|
6203 | str = String(str);
|
6204 | if (str.length > 100) {
|
6205 | return;
|
6206 | }
|
6207 | var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
|
6208 | str
|
6209 | );
|
6210 | if (!match) {
|
6211 | return;
|
6212 | }
|
6213 | var n = parseFloat(match[1]);
|
6214 | var type = (match[2] || 'ms').toLowerCase();
|
6215 | switch (type) {
|
6216 | case 'years':
|
6217 | case 'year':
|
6218 | case 'yrs':
|
6219 | case 'yr':
|
6220 | case 'y':
|
6221 | return n * y;
|
6222 | case 'days':
|
6223 | case 'day':
|
6224 | case 'd':
|
6225 | return n * d;
|
6226 | case 'hours':
|
6227 | case 'hour':
|
6228 | case 'hrs':
|
6229 | case 'hr':
|
6230 | case 'h':
|
6231 | return n * h;
|
6232 | case 'minutes':
|
6233 | case 'minute':
|
6234 | case 'mins':
|
6235 | case 'min':
|
6236 | case 'm':
|
6237 | return n * m;
|
6238 | case 'seconds':
|
6239 | case 'second':
|
6240 | case 'secs':
|
6241 | case 'sec':
|
6242 | case 's':
|
6243 | return n * s;
|
6244 | case 'milliseconds':
|
6245 | case 'millisecond':
|
6246 | case 'msecs':
|
6247 | case 'msec':
|
6248 | case 'ms':
|
6249 | return n;
|
6250 | default:
|
6251 | return undefined;
|
6252 | }
|
6253 | }
|
6254 |
|
6255 |
|
6256 |
|
6257 |
|
6258 |
|
6259 |
|
6260 |
|
6261 |
|
6262 |
|
6263 | function fmtShort(ms) {
|
6264 | if (ms >= d) {
|
6265 | return Math.round(ms / d) + 'd';
|
6266 | }
|
6267 | if (ms >= h) {
|
6268 | return Math.round(ms / h) + 'h';
|
6269 | }
|
6270 | if (ms >= m) {
|
6271 | return Math.round(ms / m) + 'm';
|
6272 | }
|
6273 | if (ms >= s) {
|
6274 | return Math.round(ms / s) + 's';
|
6275 | }
|
6276 | return ms + 'ms';
|
6277 | }
|
6278 |
|
6279 |
|
6280 |
|
6281 |
|
6282 |
|
6283 |
|
6284 |
|
6285 |
|
6286 |
|
6287 | function fmtLong(ms) {
|
6288 | return plural(ms, d, 'day') ||
|
6289 | plural(ms, h, 'hour') ||
|
6290 | plural(ms, m, 'minute') ||
|
6291 | plural(ms, s, 'second') ||
|
6292 | ms + ' ms';
|
6293 | }
|
6294 |
|
6295 |
|
6296 |
|
6297 |
|
6298 |
|
6299 | function plural(ms, n, name) {
|
6300 | if (ms < n) {
|
6301 | return;
|
6302 | }
|
6303 | if (ms < n * 1.5) {
|
6304 | return Math.floor(ms / n) + ' ' + name;
|
6305 | }
|
6306 | return Math.ceil(ms / n) + ' ' + name + 's';
|
6307 | }
|
6308 |
|
6309 |
|
6310 | }),
|
6311 |
|
6312 | "../node_modules/qs/lib/formats.js":
|
6313 |
|
6314 |
|
6315 |
|
6316 |
|
6317 | (function(module, exports, __webpack_require__) {
|
6318 |
|
6319 | "use strict";
|
6320 |
|
6321 |
|
6322 | var replace = String.prototype.replace;
|
6323 | var percentTwenties = /%20/g;
|
6324 |
|
6325 | var util = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
6326 |
|
6327 | var Format = {
|
6328 | RFC1738: 'RFC1738',
|
6329 | RFC3986: 'RFC3986'
|
6330 | };
|
6331 |
|
6332 | module.exports = util.assign(
|
6333 | {
|
6334 | 'default': Format.RFC3986,
|
6335 | formatters: {
|
6336 | RFC1738: function (value) {
|
6337 | return replace.call(value, percentTwenties, '+');
|
6338 | },
|
6339 | RFC3986: function (value) {
|
6340 | return String(value);
|
6341 | }
|
6342 | }
|
6343 | },
|
6344 | Format
|
6345 | );
|
6346 |
|
6347 |
|
6348 | }),
|
6349 |
|
6350 | "../node_modules/qs/lib/index.js":
|
6351 |
|
6352 |
|
6353 |
|
6354 |
|
6355 | (function(module, exports, __webpack_require__) {
|
6356 |
|
6357 | "use strict";
|
6358 |
|
6359 |
|
6360 | var stringify = __webpack_require__( "../node_modules/qs/lib/stringify.js");
|
6361 | var parse = __webpack_require__( "../node_modules/qs/lib/parse.js");
|
6362 | var formats = __webpack_require__( "../node_modules/qs/lib/formats.js");
|
6363 |
|
6364 | module.exports = {
|
6365 | formats: formats,
|
6366 | parse: parse,
|
6367 | stringify: stringify
|
6368 | };
|
6369 |
|
6370 |
|
6371 | }),
|
6372 |
|
6373 | "../node_modules/qs/lib/parse.js":
|
6374 |
|
6375 |
|
6376 |
|
6377 |
|
6378 | (function(module, exports, __webpack_require__) {
|
6379 |
|
6380 | "use strict";
|
6381 |
|
6382 |
|
6383 | var utils = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
6384 |
|
6385 | var has = Object.prototype.hasOwnProperty;
|
6386 | var isArray = Array.isArray;
|
6387 |
|
6388 | var defaults = {
|
6389 | allowDots: false,
|
6390 | allowPrototypes: false,
|
6391 | arrayLimit: 20,
|
6392 | charset: 'utf-8',
|
6393 | charsetSentinel: false,
|
6394 | comma: false,
|
6395 | decoder: utils.decode,
|
6396 | delimiter: '&',
|
6397 | depth: 5,
|
6398 | ignoreQueryPrefix: false,
|
6399 | interpretNumericEntities: false,
|
6400 | parameterLimit: 1000,
|
6401 | parseArrays: true,
|
6402 | plainObjects: false,
|
6403 | strictNullHandling: false
|
6404 | };
|
6405 |
|
6406 | var interpretNumericEntities = function (str) {
|
6407 | return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
6408 | return String.fromCharCode(parseInt(numberStr, 10));
|
6409 | });
|
6410 | };
|
6411 |
|
6412 | var parseArrayValue = function (val, options) {
|
6413 | if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
6414 | return val.split(',');
|
6415 | }
|
6416 |
|
6417 | return val;
|
6418 | };
|
6419 |
|
6420 |
|
6421 |
|
6422 |
|
6423 |
|
6424 |
|
6425 | var isoSentinel = 'utf8=%26%2310003%3B';
|
6426 |
|
6427 |
|
6428 | var charsetSentinel = 'utf8=%E2%9C%93';
|
6429 |
|
6430 | var parseValues = function parseQueryStringValues(str, options) {
|
6431 | var obj = {};
|
6432 | var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
6433 | var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
6434 | var parts = cleanStr.split(options.delimiter, limit);
|
6435 | var skipIndex = -1;
|
6436 | var i;
|
6437 |
|
6438 | var charset = options.charset;
|
6439 | if (options.charsetSentinel) {
|
6440 | for (i = 0; i < parts.length; ++i) {
|
6441 | if (parts[i].indexOf('utf8=') === 0) {
|
6442 | if (parts[i] === charsetSentinel) {
|
6443 | charset = 'utf-8';
|
6444 | } else if (parts[i] === isoSentinel) {
|
6445 | charset = 'iso-8859-1';
|
6446 | }
|
6447 | skipIndex = i;
|
6448 | i = parts.length;
|
6449 | }
|
6450 | }
|
6451 | }
|
6452 |
|
6453 | for (i = 0; i < parts.length; ++i) {
|
6454 | if (i === skipIndex) {
|
6455 | continue;
|
6456 | }
|
6457 | var part = parts[i];
|
6458 |
|
6459 | var bracketEqualsPos = part.indexOf(']=');
|
6460 | var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
6461 |
|
6462 | var key, val;
|
6463 | if (pos === -1) {
|
6464 | key = options.decoder(part, defaults.decoder, charset, 'key');
|
6465 | val = options.strictNullHandling ? null : '';
|
6466 | } else {
|
6467 | key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
6468 | val = utils.maybeMap(
|
6469 | parseArrayValue(part.slice(pos + 1), options),
|
6470 | function (encodedVal) {
|
6471 | return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
6472 | }
|
6473 | );
|
6474 | }
|
6475 |
|
6476 | if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
6477 | val = interpretNumericEntities(val);
|
6478 | }
|
6479 |
|
6480 | if (part.indexOf('[]=') > -1) {
|
6481 | val = isArray(val) ? [val] : val;
|
6482 | }
|
6483 |
|
6484 | if (has.call(obj, key)) {
|
6485 | obj[key] = utils.combine(obj[key], val);
|
6486 | } else {
|
6487 | obj[key] = val;
|
6488 | }
|
6489 | }
|
6490 |
|
6491 | return obj;
|
6492 | };
|
6493 |
|
6494 | var parseObject = function (chain, val, options, valuesParsed) {
|
6495 | var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
6496 |
|
6497 | for (var i = chain.length - 1; i >= 0; --i) {
|
6498 | var obj;
|
6499 | var root = chain[i];
|
6500 |
|
6501 | if (root === '[]' && options.parseArrays) {
|
6502 | obj = [].concat(leaf);
|
6503 | } else {
|
6504 | obj = options.plainObjects ? Object.create(null) : {};
|
6505 | var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
6506 | var index = parseInt(cleanRoot, 10);
|
6507 | if (!options.parseArrays && cleanRoot === '') {
|
6508 | obj = { 0: leaf };
|
6509 | } else if (
|
6510 | !isNaN(index)
|
6511 | && root !== cleanRoot
|
6512 | && String(index) === cleanRoot
|
6513 | && index >= 0
|
6514 | && (options.parseArrays && index <= options.arrayLimit)
|
6515 | ) {
|
6516 | obj = [];
|
6517 | obj[index] = leaf;
|
6518 | } else {
|
6519 | obj[cleanRoot] = leaf;
|
6520 | }
|
6521 | }
|
6522 |
|
6523 | leaf = obj;
|
6524 | }
|
6525 |
|
6526 | return leaf;
|
6527 | };
|
6528 |
|
6529 | var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
6530 | if (!givenKey) {
|
6531 | return;
|
6532 | }
|
6533 |
|
6534 |
|
6535 | var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
6536 |
|
6537 |
|
6538 |
|
6539 | var brackets = /(\[[^[\]]*])/;
|
6540 | var child = /(\[[^[\]]*])/g;
|
6541 |
|
6542 |
|
6543 |
|
6544 | var segment = options.depth > 0 && brackets.exec(key);
|
6545 | var parent = segment ? key.slice(0, segment.index) : key;
|
6546 |
|
6547 |
|
6548 |
|
6549 | var keys = [];
|
6550 | if (parent) {
|
6551 |
|
6552 | if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
6553 | if (!options.allowPrototypes) {
|
6554 | return;
|
6555 | }
|
6556 | }
|
6557 |
|
6558 | keys.push(parent);
|
6559 | }
|
6560 |
|
6561 |
|
6562 |
|
6563 | var i = 0;
|
6564 | while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
6565 | i += 1;
|
6566 | if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
6567 | if (!options.allowPrototypes) {
|
6568 | return;
|
6569 | }
|
6570 | }
|
6571 | keys.push(segment[1]);
|
6572 | }
|
6573 |
|
6574 |
|
6575 |
|
6576 | if (segment) {
|
6577 | keys.push('[' + key.slice(segment.index) + ']');
|
6578 | }
|
6579 |
|
6580 | return parseObject(keys, val, options, valuesParsed);
|
6581 | };
|
6582 |
|
6583 | var normalizeParseOptions = function normalizeParseOptions(opts) {
|
6584 | if (!opts) {
|
6585 | return defaults;
|
6586 | }
|
6587 |
|
6588 | if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
6589 | throw new TypeError('Decoder has to be a function.');
|
6590 | }
|
6591 |
|
6592 | if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
6593 | throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
6594 | }
|
6595 | var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
6596 |
|
6597 | return {
|
6598 | allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
6599 | allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
6600 | arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
6601 | charset: charset,
|
6602 | charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
6603 | comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
6604 | decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
6605 | delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
6606 |
|
6607 | depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
6608 | ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
6609 | interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
6610 | parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
6611 | parseArrays: opts.parseArrays !== false,
|
6612 | plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
6613 | strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
6614 | };
|
6615 | };
|
6616 |
|
6617 | module.exports = function (str, opts) {
|
6618 | var options = normalizeParseOptions(opts);
|
6619 |
|
6620 | if (str === '' || str === null || typeof str === 'undefined') {
|
6621 | return options.plainObjects ? Object.create(null) : {};
|
6622 | }
|
6623 |
|
6624 | var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
6625 | var obj = options.plainObjects ? Object.create(null) : {};
|
6626 |
|
6627 |
|
6628 |
|
6629 | var keys = Object.keys(tempObj);
|
6630 | for (var i = 0; i < keys.length; ++i) {
|
6631 | var key = keys[i];
|
6632 | var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
6633 | obj = utils.merge(obj, newObj, options);
|
6634 | }
|
6635 |
|
6636 | return utils.compact(obj);
|
6637 | };
|
6638 |
|
6639 |
|
6640 | }),
|
6641 |
|
6642 | "../node_modules/qs/lib/stringify.js":
|
6643 |
|
6644 |
|
6645 |
|
6646 |
|
6647 | (function(module, exports, __webpack_require__) {
|
6648 |
|
6649 | "use strict";
|
6650 |
|
6651 |
|
6652 | var utils = __webpack_require__( "../node_modules/qs/lib/utils.js");
|
6653 | var formats = __webpack_require__( "../node_modules/qs/lib/formats.js");
|
6654 | var has = Object.prototype.hasOwnProperty;
|
6655 |
|
6656 | var arrayPrefixGenerators = {
|
6657 | brackets: function brackets(prefix) {
|
6658 | return prefix + '[]';
|
6659 | },
|
6660 | comma: 'comma',
|
6661 | indices: function indices(prefix, key) {
|
6662 | return prefix + '[' + key + ']';
|
6663 | },
|
6664 | repeat: function repeat(prefix) {
|
6665 | return prefix;
|
6666 | }
|
6667 | };
|
6668 |
|
6669 | var isArray = Array.isArray;
|
6670 | var push = Array.prototype.push;
|
6671 | var pushToArray = function (arr, valueOrArray) {
|
6672 | push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
|
6673 | };
|
6674 |
|
6675 | var toISO = Date.prototype.toISOString;
|
6676 |
|
6677 | var defaultFormat = formats['default'];
|
6678 | var defaults = {
|
6679 | addQueryPrefix: false,
|
6680 | allowDots: false,
|
6681 | charset: 'utf-8',
|
6682 | charsetSentinel: false,
|
6683 | delimiter: '&',
|
6684 | encode: true,
|
6685 | encoder: utils.encode,
|
6686 | encodeValuesOnly: false,
|
6687 | format: defaultFormat,
|
6688 | formatter: formats.formatters[defaultFormat],
|
6689 |
|
6690 | indices: false,
|
6691 | serializeDate: function serializeDate(date) {
|
6692 | return toISO.call(date);
|
6693 | },
|
6694 | skipNulls: false,
|
6695 | strictNullHandling: false
|
6696 | };
|
6697 |
|
6698 | var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
6699 | return typeof v === 'string'
|
6700 | || typeof v === 'number'
|
6701 | || typeof v === 'boolean'
|
6702 | || typeof v === 'symbol'
|
6703 | || typeof v === 'bigint';
|
6704 | };
|
6705 |
|
6706 | var stringify = function stringify(
|
6707 | object,
|
6708 | prefix,
|
6709 | generateArrayPrefix,
|
6710 | strictNullHandling,
|
6711 | skipNulls,
|
6712 | encoder,
|
6713 | filter,
|
6714 | sort,
|
6715 | allowDots,
|
6716 | serializeDate,
|
6717 | formatter,
|
6718 | encodeValuesOnly,
|
6719 | charset
|
6720 | ) {
|
6721 | var obj = object;
|
6722 | if (typeof filter === 'function') {
|
6723 | obj = filter(prefix, obj);
|
6724 | } else if (obj instanceof Date) {
|
6725 | obj = serializeDate(obj);
|
6726 | } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
6727 | obj = utils.maybeMap(obj, function (value) {
|
6728 | if (value instanceof Date) {
|
6729 | return serializeDate(value);
|
6730 | }
|
6731 | return value;
|
6732 | }).join(',');
|
6733 | }
|
6734 |
|
6735 | if (obj === null) {
|
6736 | if (strictNullHandling) {
|
6737 | return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key') : prefix;
|
6738 | }
|
6739 |
|
6740 | obj = '';
|
6741 | }
|
6742 |
|
6743 | if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
|
6744 | if (encoder) {
|
6745 | var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key');
|
6746 | return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value'))];
|
6747 | }
|
6748 | return [formatter(prefix) + '=' + formatter(String(obj))];
|
6749 | }
|
6750 |
|
6751 | var values = [];
|
6752 |
|
6753 | if (typeof obj === 'undefined') {
|
6754 | return values;
|
6755 | }
|
6756 |
|
6757 | var objKeys;
|
6758 | if (isArray(filter)) {
|
6759 | objKeys = filter;
|
6760 | } else {
|
6761 | var keys = Object.keys(obj);
|
6762 | objKeys = sort ? keys.sort(sort) : keys;
|
6763 | }
|
6764 |
|
6765 | for (var i = 0; i < objKeys.length; ++i) {
|
6766 | var key = objKeys[i];
|
6767 | var value = obj[key];
|
6768 |
|
6769 | if (skipNulls && value === null) {
|
6770 | continue;
|
6771 | }
|
6772 |
|
6773 | var keyPrefix = isArray(obj)
|
6774 | ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
|
6775 | : prefix + (allowDots ? '.' + key : '[' + key + ']');
|
6776 |
|
6777 | pushToArray(values, stringify(
|
6778 | value,
|
6779 | keyPrefix,
|
6780 | generateArrayPrefix,
|
6781 | strictNullHandling,
|
6782 | skipNulls,
|
6783 | encoder,
|
6784 | filter,
|
6785 | sort,
|
6786 | allowDots,
|
6787 | serializeDate,
|
6788 | formatter,
|
6789 | encodeValuesOnly,
|
6790 | charset
|
6791 | ));
|
6792 | }
|
6793 |
|
6794 | return values;
|
6795 | };
|
6796 |
|
6797 | var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
6798 | if (!opts) {
|
6799 | return defaults;
|
6800 | }
|
6801 |
|
6802 | if (opts.encoder !== null && opts.encoder !== undefined && typeof opts.encoder !== 'function') {
|
6803 | throw new TypeError('Encoder has to be a function.');
|
6804 | }
|
6805 |
|
6806 | var charset = opts.charset || defaults.charset;
|
6807 | if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
6808 | throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
6809 | }
|
6810 |
|
6811 | var format = formats['default'];
|
6812 | if (typeof opts.format !== 'undefined') {
|
6813 | if (!has.call(formats.formatters, opts.format)) {
|
6814 | throw new TypeError('Unknown format option provided.');
|
6815 | }
|
6816 | format = opts.format;
|
6817 | }
|
6818 | var formatter = formats.formatters[format];
|
6819 |
|
6820 | var filter = defaults.filter;
|
6821 | if (typeof opts.filter === 'function' || isArray(opts.filter)) {
|
6822 | filter = opts.filter;
|
6823 | }
|
6824 |
|
6825 | return {
|
6826 | addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
|
6827 | allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
6828 | charset: charset,
|
6829 | charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
6830 | delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
|
6831 | encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
|
6832 | encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
|
6833 | encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
|
6834 | filter: filter,
|
6835 | formatter: formatter,
|
6836 | serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
|
6837 | skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
|
6838 | sort: typeof opts.sort === 'function' ? opts.sort : null,
|
6839 | strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
6840 | };
|
6841 | };
|
6842 |
|
6843 | module.exports = function (object, opts) {
|
6844 | var obj = object;
|
6845 | var options = normalizeStringifyOptions(opts);
|
6846 |
|
6847 | var objKeys;
|
6848 | var filter;
|
6849 |
|
6850 | if (typeof options.filter === 'function') {
|
6851 | filter = options.filter;
|
6852 | obj = filter('', obj);
|
6853 | } else if (isArray(options.filter)) {
|
6854 | filter = options.filter;
|
6855 | objKeys = filter;
|
6856 | }
|
6857 |
|
6858 | var keys = [];
|
6859 |
|
6860 | if (typeof obj !== 'object' || obj === null) {
|
6861 | return '';
|
6862 | }
|
6863 |
|
6864 | var arrayFormat;
|
6865 | if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
6866 | arrayFormat = opts.arrayFormat;
|
6867 | } else if (opts && 'indices' in opts) {
|
6868 | arrayFormat = opts.indices ? 'indices' : 'repeat';
|
6869 | } else {
|
6870 | arrayFormat = 'indices';
|
6871 | }
|
6872 |
|
6873 | var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
6874 |
|
6875 | if (!objKeys) {
|
6876 | objKeys = Object.keys(obj);
|
6877 | }
|
6878 |
|
6879 | if (options.sort) {
|
6880 | objKeys.sort(options.sort);
|
6881 | }
|
6882 |
|
6883 | for (var i = 0; i < objKeys.length; ++i) {
|
6884 | var key = objKeys[i];
|
6885 |
|
6886 | if (options.skipNulls && obj[key] === null) {
|
6887 | continue;
|
6888 | }
|
6889 | pushToArray(keys, stringify(
|
6890 | obj[key],
|
6891 | key,
|
6892 | generateArrayPrefix,
|
6893 | options.strictNullHandling,
|
6894 | options.skipNulls,
|
6895 | options.encode ? options.encoder : null,
|
6896 | options.filter,
|
6897 | options.sort,
|
6898 | options.allowDots,
|
6899 | options.serializeDate,
|
6900 | options.formatter,
|
6901 | options.encodeValuesOnly,
|
6902 | options.charset
|
6903 | ));
|
6904 | }
|
6905 |
|
6906 | var joined = keys.join(options.delimiter);
|
6907 | var prefix = options.addQueryPrefix === true ? '?' : '';
|
6908 |
|
6909 | if (options.charsetSentinel) {
|
6910 | if (options.charset === 'iso-8859-1') {
|
6911 |
|
6912 | prefix += 'utf8=%26%2310003%3B&';
|
6913 | } else {
|
6914 |
|
6915 | prefix += 'utf8=%E2%9C%93&';
|
6916 | }
|
6917 | }
|
6918 |
|
6919 | return joined.length > 0 ? prefix + joined : '';
|
6920 | };
|
6921 |
|
6922 |
|
6923 | }),
|
6924 |
|
6925 | "../node_modules/qs/lib/utils.js":
|
6926 |
|
6927 |
|
6928 |
|
6929 |
|
6930 | (function(module, exports, __webpack_require__) {
|
6931 |
|
6932 | "use strict";
|
6933 |
|
6934 |
|
6935 | var has = Object.prototype.hasOwnProperty;
|
6936 | var isArray = Array.isArray;
|
6937 |
|
6938 | var hexTable = (function () {
|
6939 | var array = [];
|
6940 | for (var i = 0; i < 256; ++i) {
|
6941 | array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
6942 | }
|
6943 |
|
6944 | return array;
|
6945 | }());
|
6946 |
|
6947 | var compactQueue = function compactQueue(queue) {
|
6948 | while (queue.length > 1) {
|
6949 | var item = queue.pop();
|
6950 | var obj = item.obj[item.prop];
|
6951 |
|
6952 | if (isArray(obj)) {
|
6953 | var compacted = [];
|
6954 |
|
6955 | for (var j = 0; j < obj.length; ++j) {
|
6956 | if (typeof obj[j] !== 'undefined') {
|
6957 | compacted.push(obj[j]);
|
6958 | }
|
6959 | }
|
6960 |
|
6961 | item.obj[item.prop] = compacted;
|
6962 | }
|
6963 | }
|
6964 | };
|
6965 |
|
6966 | var arrayToObject = function arrayToObject(source, options) {
|
6967 | var obj = options && options.plainObjects ? Object.create(null) : {};
|
6968 | for (var i = 0; i < source.length; ++i) {
|
6969 | if (typeof source[i] !== 'undefined') {
|
6970 | obj[i] = source[i];
|
6971 | }
|
6972 | }
|
6973 |
|
6974 | return obj;
|
6975 | };
|
6976 |
|
6977 | var merge = function merge(target, source, options) {
|
6978 |
|
6979 | if (!source) {
|
6980 | return target;
|
6981 | }
|
6982 |
|
6983 | if (typeof source !== 'object') {
|
6984 | if (isArray(target)) {
|
6985 | target.push(source);
|
6986 | } else if (target && typeof target === 'object') {
|
6987 | if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
|
6988 | target[source] = true;
|
6989 | }
|
6990 | } else {
|
6991 | return [target, source];
|
6992 | }
|
6993 |
|
6994 | return target;
|
6995 | }
|
6996 |
|
6997 | if (!target || typeof target !== 'object') {
|
6998 | return [target].concat(source);
|
6999 | }
|
7000 |
|
7001 | var mergeTarget = target;
|
7002 | if (isArray(target) && !isArray(source)) {
|
7003 | mergeTarget = arrayToObject(target, options);
|
7004 | }
|
7005 |
|
7006 | if (isArray(target) && isArray(source)) {
|
7007 | source.forEach(function (item, i) {
|
7008 | if (has.call(target, i)) {
|
7009 | var targetItem = target[i];
|
7010 | if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
7011 | target[i] = merge(targetItem, item, options);
|
7012 | } else {
|
7013 | target.push(item);
|
7014 | }
|
7015 | } else {
|
7016 | target[i] = item;
|
7017 | }
|
7018 | });
|
7019 | return target;
|
7020 | }
|
7021 |
|
7022 | return Object.keys(source).reduce(function (acc, key) {
|
7023 | var value = source[key];
|
7024 |
|
7025 | if (has.call(acc, key)) {
|
7026 | acc[key] = merge(acc[key], value, options);
|
7027 | } else {
|
7028 | acc[key] = value;
|
7029 | }
|
7030 | return acc;
|
7031 | }, mergeTarget);
|
7032 | };
|
7033 |
|
7034 | var assign = function assignSingleSource(target, source) {
|
7035 | return Object.keys(source).reduce(function (acc, key) {
|
7036 | acc[key] = source[key];
|
7037 | return acc;
|
7038 | }, target);
|
7039 | };
|
7040 |
|
7041 | var decode = function (str, decoder, charset) {
|
7042 | var strWithoutPlus = str.replace(/\+/g, ' ');
|
7043 | if (charset === 'iso-8859-1') {
|
7044 |
|
7045 | return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
7046 | }
|
7047 |
|
7048 | try {
|
7049 | return decodeURIComponent(strWithoutPlus);
|
7050 | } catch (e) {
|
7051 | return strWithoutPlus;
|
7052 | }
|
7053 | };
|
7054 |
|
7055 | var encode = function encode(str, defaultEncoder, charset) {
|
7056 |
|
7057 |
|
7058 | if (str.length === 0) {
|
7059 | return str;
|
7060 | }
|
7061 |
|
7062 | var string = str;
|
7063 | if (typeof str === 'symbol') {
|
7064 | string = Symbol.prototype.toString.call(str);
|
7065 | } else if (typeof str !== 'string') {
|
7066 | string = String(str);
|
7067 | }
|
7068 |
|
7069 | if (charset === 'iso-8859-1') {
|
7070 | return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
7071 | return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
7072 | });
|
7073 | }
|
7074 |
|
7075 | var out = '';
|
7076 | for (var i = 0; i < string.length; ++i) {
|
7077 | var c = string.charCodeAt(i);
|
7078 |
|
7079 | if (
|
7080 | c === 0x2D
|
7081 | || c === 0x2E
|
7082 | || c === 0x5F
|
7083 | || c === 0x7E
|
7084 | || (c >= 0x30 && c <= 0x39)
|
7085 | || (c >= 0x41 && c <= 0x5A)
|
7086 | || (c >= 0x61 && c <= 0x7A)
|
7087 | ) {
|
7088 | out += string.charAt(i);
|
7089 | continue;
|
7090 | }
|
7091 |
|
7092 | if (c < 0x80) {
|
7093 | out = out + hexTable[c];
|
7094 | continue;
|
7095 | }
|
7096 |
|
7097 | if (c < 0x800) {
|
7098 | out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
7099 | continue;
|
7100 | }
|
7101 |
|
7102 | if (c < 0xD800 || c >= 0xE000) {
|
7103 | out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
7104 | continue;
|
7105 | }
|
7106 |
|
7107 | i += 1;
|
7108 | c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
7109 | out += hexTable[0xF0 | (c >> 18)]
|
7110 | + hexTable[0x80 | ((c >> 12) & 0x3F)]
|
7111 | + hexTable[0x80 | ((c >> 6) & 0x3F)]
|
7112 | + hexTable[0x80 | (c & 0x3F)];
|
7113 | }
|
7114 |
|
7115 | return out;
|
7116 | };
|
7117 |
|
7118 | var compact = function compact(value) {
|
7119 | var queue = [{ obj: { o: value }, prop: 'o' }];
|
7120 | var refs = [];
|
7121 |
|
7122 | for (var i = 0; i < queue.length; ++i) {
|
7123 | var item = queue[i];
|
7124 | var obj = item.obj[item.prop];
|
7125 |
|
7126 | var keys = Object.keys(obj);
|
7127 | for (var j = 0; j < keys.length; ++j) {
|
7128 | var key = keys[j];
|
7129 | var val = obj[key];
|
7130 | if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
7131 | queue.push({ obj: obj, prop: key });
|
7132 | refs.push(val);
|
7133 | }
|
7134 | }
|
7135 | }
|
7136 |
|
7137 | compactQueue(queue);
|
7138 |
|
7139 | return value;
|
7140 | };
|
7141 |
|
7142 | var isRegExp = function isRegExp(obj) {
|
7143 | return Object.prototype.toString.call(obj) === '[object RegExp]';
|
7144 | };
|
7145 |
|
7146 | var isBuffer = function isBuffer(obj) {
|
7147 | if (!obj || typeof obj !== 'object') {
|
7148 | return false;
|
7149 | }
|
7150 |
|
7151 | return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
7152 | };
|
7153 |
|
7154 | var combine = function combine(a, b) {
|
7155 | return [].concat(a, b);
|
7156 | };
|
7157 |
|
7158 | var maybeMap = function maybeMap(val, fn) {
|
7159 | if (isArray(val)) {
|
7160 | var mapped = [];
|
7161 | for (var i = 0; i < val.length; i += 1) {
|
7162 | mapped.push(fn(val[i]));
|
7163 | }
|
7164 | return mapped;
|
7165 | }
|
7166 | return fn(val);
|
7167 | };
|
7168 |
|
7169 | module.exports = {
|
7170 | arrayToObject: arrayToObject,
|
7171 | assign: assign,
|
7172 | combine: combine,
|
7173 | compact: compact,
|
7174 | decode: decode,
|
7175 | encode: encode,
|
7176 | isBuffer: isBuffer,
|
7177 | isRegExp: isRegExp,
|
7178 | maybeMap: maybeMap,
|
7179 | merge: merge
|
7180 | };
|
7181 |
|
7182 |
|
7183 | }),
|
7184 |
|
7185 | "../node_modules/supports-color/index.js":
|
7186 |
|
7187 |
|
7188 |
|
7189 |
|
7190 | (function(module, exports, __webpack_require__) {
|
7191 |
|
7192 | "use strict";
|
7193 |
|
7194 | const os = __webpack_require__( "os");
|
7195 | const hasFlag = __webpack_require__( "../node_modules/has-flag/index.js");
|
7196 |
|
7197 | const env = process.env;
|
7198 |
|
7199 | let forceColor;
|
7200 | if (hasFlag('no-color') ||
|
7201 | hasFlag('no-colors') ||
|
7202 | hasFlag('color=false')) {
|
7203 | forceColor = false;
|
7204 | } else if (hasFlag('color') ||
|
7205 | hasFlag('colors') ||
|
7206 | hasFlag('color=true') ||
|
7207 | hasFlag('color=always')) {
|
7208 | forceColor = true;
|
7209 | }
|
7210 | if ('FORCE_COLOR' in env) {
|
7211 | forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
7212 | }
|
7213 |
|
7214 | function translateLevel(level) {
|
7215 | if (level === 0) {
|
7216 | return false;
|
7217 | }
|
7218 |
|
7219 | return {
|
7220 | level,
|
7221 | hasBasic: true,
|
7222 | has256: level >= 2,
|
7223 | has16m: level >= 3
|
7224 | };
|
7225 | }
|
7226 |
|
7227 | function supportsColor(stream) {
|
7228 | if (forceColor === false) {
|
7229 | return 0;
|
7230 | }
|
7231 |
|
7232 | if (hasFlag('color=16m') ||
|
7233 | hasFlag('color=full') ||
|
7234 | hasFlag('color=truecolor')) {
|
7235 | return 3;
|
7236 | }
|
7237 |
|
7238 | if (hasFlag('color=256')) {
|
7239 | return 2;
|
7240 | }
|
7241 |
|
7242 | if (stream && !stream.isTTY && forceColor !== true) {
|
7243 | return 0;
|
7244 | }
|
7245 |
|
7246 | const min = forceColor ? 1 : 0;
|
7247 |
|
7248 | if (process.platform === 'win32') {
|
7249 |
|
7250 |
|
7251 |
|
7252 |
|
7253 |
|
7254 |
|
7255 | const osRelease = os.release().split('.');
|
7256 | if (
|
7257 | Number(process.versions.node.split('.')[0]) >= 8 &&
|
7258 | Number(osRelease[0]) >= 10 &&
|
7259 | Number(osRelease[2]) >= 10586
|
7260 | ) {
|
7261 | return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
7262 | }
|
7263 |
|
7264 | return 1;
|
7265 | }
|
7266 |
|
7267 | if ('CI' in env) {
|
7268 | if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
7269 | return 1;
|
7270 | }
|
7271 |
|
7272 | return min;
|
7273 | }
|
7274 |
|
7275 | if ('TEAMCITY_VERSION' in env) {
|
7276 | return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
7277 | }
|
7278 |
|
7279 | if (env.COLORTERM === 'truecolor') {
|
7280 | return 3;
|
7281 | }
|
7282 |
|
7283 | if ('TERM_PROGRAM' in env) {
|
7284 | const version = parseInt((env.TERM_PROGRAM_VERSION || '').split('.')[0], 10);
|
7285 |
|
7286 | switch (env.TERM_PROGRAM) {
|
7287 | case 'iTerm.app':
|
7288 | return version >= 3 ? 3 : 2;
|
7289 | case 'Apple_Terminal':
|
7290 | return 2;
|
7291 |
|
7292 | }
|
7293 | }
|
7294 |
|
7295 | if (/-256(color)?$/i.test(env.TERM)) {
|
7296 | return 2;
|
7297 | }
|
7298 |
|
7299 | if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
7300 | return 1;
|
7301 | }
|
7302 |
|
7303 | if ('COLORTERM' in env) {
|
7304 | return 1;
|
7305 | }
|
7306 |
|
7307 | if (env.TERM === 'dumb') {
|
7308 | return min;
|
7309 | }
|
7310 |
|
7311 | return min;
|
7312 | }
|
7313 |
|
7314 | function getSupportLevel(stream) {
|
7315 | const level = supportsColor(stream);
|
7316 | return translateLevel(level);
|
7317 | }
|
7318 |
|
7319 | module.exports = {
|
7320 | supportsColor: getSupportLevel,
|
7321 | stdout: getSupportLevel(process.stdout),
|
7322 | stderr: getSupportLevel(process.stderr)
|
7323 | };
|
7324 |
|
7325 |
|
7326 | }),
|
7327 |
|
7328 | "../node_modules/webpack/buildin/module.js":
|
7329 |
|
7330 |
|
7331 |
|
7332 |
|
7333 | (function(module, exports) {
|
7334 |
|
7335 | module.exports = function(module) {
|
7336 | if (!module.webpackPolyfill) {
|
7337 | module.deprecate = function() {};
|
7338 | module.paths = [];
|
7339 |
|
7340 | if (!module.children) module.children = [];
|
7341 | Object.defineProperty(module, "loaded", {
|
7342 | enumerable: true,
|
7343 | get: function() {
|
7344 | return module.l;
|
7345 | }
|
7346 | });
|
7347 | Object.defineProperty(module, "id", {
|
7348 | enumerable: true,
|
7349 | get: function() {
|
7350 | return module.i;
|
7351 | }
|
7352 | });
|
7353 | module.webpackPolyfill = 1;
|
7354 | }
|
7355 | return module;
|
7356 | };
|
7357 |
|
7358 |
|
7359 | }),
|
7360 |
|
7361 | "./common-utils.ts":
|
7362 |
|
7363 |
|
7364 |
|
7365 |
|
7366 | (function(module, __webpack_exports__, __webpack_require__) {
|
7367 |
|
7368 | "use strict";
|
7369 | __webpack_require__.r(__webpack_exports__);
|
7370 | __webpack_require__.d(__webpack_exports__, "wrapCollection", function() { return wrapCollection; });
|
7371 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
7372 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
7373 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
7374 |
|
7375 |
|
7376 |
|
7377 | const wrapCollection = fn => (http, data) => {
|
7378 | const collectionData = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
7379 |
|
7380 | collectionData.items = collectionData.items.map(entity => fn(http, entity));
|
7381 |
|
7382 | return collectionData;
|
7383 | };
|
7384 |
|
7385 | }),
|
7386 |
|
7387 | "./contentful-management.ts":
|
7388 |
|
7389 |
|
7390 |
|
7391 |
|
7392 | (function(module, __webpack_exports__, __webpack_require__) {
|
7393 |
|
7394 | "use strict";
|
7395 | __webpack_require__.r(__webpack_exports__);
|
7396 | __webpack_require__.d(__webpack_exports__, "createClient", function() { return createClient; });
|
7397 | var _create_contentful_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./create-contentful-api.ts");
|
7398 | var _create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./create-cma-http-client.ts");
|
7399 |
|
7400 |
|
7401 |
|
7402 |
|
7403 |
|
7404 |
|
7405 |
|
7406 |
|
7407 |
|
7408 |
|
7409 |
|
7410 |
|
7411 |
|
7412 |
|
7413 |
|
7414 |
|
7415 |
|
7416 |
|
7417 | function createClient(params) {
|
7418 | const http = Object(_create_cma_http_client__WEBPACK_IMPORTED_MODULE_1__["createCMAHttpClient"])(params);
|
7419 | const api = Object(_create_contentful_api__WEBPACK_IMPORTED_MODULE_0__["default"])({
|
7420 | http: http
|
7421 | });
|
7422 | return api;
|
7423 | }
|
7424 |
|
7425 | }),
|
7426 |
|
7427 | "./create-cma-http-client.ts":
|
7428 |
|
7429 |
|
7430 |
|
7431 |
|
7432 | (function(module, __webpack_exports__, __webpack_require__) {
|
7433 |
|
7434 | "use strict";
|
7435 | __webpack_require__.r(__webpack_exports__);
|
7436 | __webpack_require__.d(__webpack_exports__, "createCMAHttpClient", function() { return createCMAHttpClient; });
|
7437 | var axios__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/axios/index.js");
|
7438 | var axios__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_0__);
|
7439 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
7440 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
7441 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2__);
|
7442 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
7443 |
|
7444 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
7445 |
|
7446 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7447 |
|
7448 |
|
7449 |
|
7450 |
|
7451 |
|
7452 |
|
7453 |
|
7454 |
|
7455 |
|
7456 |
|
7457 |
|
7458 |
|
7459 | function createCMAHttpClient(params) {
|
7460 | const defaultParameters = {
|
7461 | defaultHostname: 'api.contentful.com',
|
7462 | defaultHostnameUpload: 'upload.contentful.com'
|
7463 | };
|
7464 | const userAgentHeader = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["getUserAgentHeader"])(
|
7465 | `contentful-management.js/${"5.27.1"}`, params.application, params.integration, params.feature);
|
7466 | const requiredHeaders = {
|
7467 | 'Content-Type': 'application/vnd.contentful.management.v1+json',
|
7468 | 'X-Contentful-User-Agent': userAgentHeader
|
7469 | };
|
7470 | params = _objectSpread(_objectSpread({}, defaultParameters), lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_2___default()(params));
|
7471 |
|
7472 | if (!params.accessToken) {
|
7473 | throw new TypeError('Expected parameter accessToken');
|
7474 | }
|
7475 |
|
7476 | params.headers = _objectSpread(_objectSpread({}, params.headers), requiredHeaders);
|
7477 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createHttpClient"])(axios__WEBPACK_IMPORTED_MODULE_0___default.a, params);
|
7478 | }
|
7479 |
|
7480 | }),
|
7481 |
|
7482 | "./create-contentful-api.ts":
|
7483 |
|
7484 |
|
7485 |
|
7486 |
|
7487 | (function(module, __webpack_exports__, __webpack_require__) {
|
7488 |
|
7489 | "use strict";
|
7490 | __webpack_require__.r(__webpack_exports__);
|
7491 | __webpack_require__.d(__webpack_exports__, "default", function() { return createClientApi; });
|
7492 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
7493 | var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./error-handler.ts");
|
7494 | var _entities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./entities/index.ts");
|
7495 |
|
7496 |
|
7497 |
|
7498 | function createClientApi({
|
7499 | http
|
7500 | }) {
|
7501 | const _entities$space = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].space,
|
7502 | wrapSpace = _entities$space.wrapSpace,
|
7503 | wrapSpaceCollection = _entities$space.wrapSpaceCollection;
|
7504 | const wrapUser = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].user.wrapUser;
|
7505 | const _entities$personalAcc = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].personalAccessToken,
|
7506 | wrapPersonalAccessToken = _entities$personalAcc.wrapPersonalAccessToken,
|
7507 | wrapPersonalAccessTokenCollection = _entities$personalAcc.wrapPersonalAccessTokenCollection;
|
7508 | const _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].organization,
|
7509 | wrapOrganization = _entities$organizatio.wrapOrganization,
|
7510 | wrapOrganizationCollection = _entities$organizatio.wrapOrganizationCollection;
|
7511 | const wrapUsageCollection = _entities__WEBPACK_IMPORTED_MODULE_2__["default"].usage.wrapUsageCollection;
|
7512 | return {
|
7513 | |
7514 |
|
7515 |
|
7516 |
|
7517 |
|
7518 |
|
7519 |
|
7520 |
|
7521 |
|
7522 |
|
7523 |
|
7524 |
|
7525 |
|
7526 |
|
7527 |
|
7528 | getSpaces: function getSpaces(query = {}) {
|
7529 | return http.get('', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["createRequestConfig"])({
|
7530 | query: query
|
7531 | })).then(response => wrapSpaceCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7532 | },
|
7533 |
|
7534 | |
7535 |
|
7536 |
|
7537 |
|
7538 |
|
7539 |
|
7540 |
|
7541 |
|
7542 |
|
7543 |
|
7544 |
|
7545 |
|
7546 |
|
7547 |
|
7548 |
|
7549 |
|
7550 | getSpace: function getSpace(id) {
|
7551 | return http.get(id).then(response => wrapSpace(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7552 | },
|
7553 |
|
7554 | |
7555 |
|
7556 |
|
7557 |
|
7558 |
|
7559 |
|
7560 |
|
7561 |
|
7562 |
|
7563 |
|
7564 |
|
7565 |
|
7566 |
|
7567 |
|
7568 |
|
7569 |
|
7570 |
|
7571 |
|
7572 |
|
7573 | createSpace: function createSpace(data, organizationId) {
|
7574 | return http.post('', data, {
|
7575 | headers: organizationId ? {
|
7576 | 'X-Contentful-Organization': organizationId
|
7577 | } : {}
|
7578 | }).then(response => wrapSpace(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7579 | },
|
7580 |
|
7581 | |
7582 |
|
7583 |
|
7584 |
|
7585 |
|
7586 |
|
7587 |
|
7588 |
|
7589 |
|
7590 |
|
7591 |
|
7592 |
|
7593 |
|
7594 |
|
7595 |
|
7596 |
|
7597 | getOrganization: function getOrganization(id) {
|
7598 | var _http$defaults, _http$defaults$baseUR;
|
7599 |
|
7600 | const baseURL = (_http$defaults = http.defaults) === null || _http$defaults === void 0 ? void 0 : (_http$defaults$baseUR = _http$defaults.baseURL) === null || _http$defaults$baseUR === void 0 ? void 0 : _http$defaults$baseUR.replace('/spaces/', '/organizations/');
|
7601 | return http.get('', {
|
7602 | baseURL
|
7603 | }).then(response => {
|
7604 | const org = response.data.items.find(org => org.sys.id === id);
|
7605 |
|
7606 | if (!org) {
|
7607 | const error = new Error(`No organization was found with the ID ${id} instead got ${JSON.stringify(response)}`);
|
7608 |
|
7609 |
|
7610 | error.status = 404;
|
7611 |
|
7612 |
|
7613 | error.statusText = 'Not Found';
|
7614 | return Promise.reject(error);
|
7615 | }
|
7616 |
|
7617 | return wrapOrganization(http, org);
|
7618 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7619 | },
|
7620 |
|
7621 | |
7622 |
|
7623 |
|
7624 |
|
7625 |
|
7626 |
|
7627 |
|
7628 |
|
7629 |
|
7630 |
|
7631 |
|
7632 |
|
7633 |
|
7634 |
|
7635 |
|
7636 | getOrganizations: function getOrganizations() {
|
7637 | var _http$defaults2, _http$defaults2$baseU;
|
7638 |
|
7639 | const baseURL = (_http$defaults2 = http.defaults) === null || _http$defaults2 === void 0 ? void 0 : (_http$defaults2$baseU = _http$defaults2.baseURL) === null || _http$defaults2$baseU === void 0 ? void 0 : _http$defaults2$baseU.replace('/spaces/', '/organizations/');
|
7640 | return http.get('', {
|
7641 | baseURL
|
7642 | }).then(response => wrapOrganizationCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7643 | },
|
7644 |
|
7645 | |
7646 |
|
7647 |
|
7648 |
|
7649 |
|
7650 |
|
7651 |
|
7652 |
|
7653 |
|
7654 |
|
7655 |
|
7656 |
|
7657 |
|
7658 |
|
7659 |
|
7660 | getCurrentUser: function getCurrentUser() {
|
7661 | var _http$defaults3, _http$defaults3$baseU;
|
7662 |
|
7663 | const baseURL = (_http$defaults3 = http.defaults) === null || _http$defaults3 === void 0 ? void 0 : (_http$defaults3$baseU = _http$defaults3.baseURL) === null || _http$defaults3$baseU === void 0 ? void 0 : _http$defaults3$baseU.replace('/spaces/', '/users/me/');
|
7664 | return http.get('', {
|
7665 | baseURL
|
7666 | }).then(response => wrapUser(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7667 | },
|
7668 |
|
7669 | |
7670 |
|
7671 |
|
7672 |
|
7673 |
|
7674 |
|
7675 |
|
7676 |
|
7677 |
|
7678 |
|
7679 |
|
7680 |
|
7681 |
|
7682 |
|
7683 |
|
7684 |
|
7685 |
|
7686 |
|
7687 |
|
7688 |
|
7689 |
|
7690 |
|
7691 |
|
7692 | createPersonalAccessToken: function createPersonalAccessToken(data) {
|
7693 | var _http$defaults4, _http$defaults4$baseU;
|
7694 |
|
7695 | const baseURL = (_http$defaults4 = http.defaults) === null || _http$defaults4 === void 0 ? void 0 : (_http$defaults4$baseU = _http$defaults4.baseURL) === null || _http$defaults4$baseU === void 0 ? void 0 : _http$defaults4$baseU.replace('/spaces/', '/users/me/access_tokens');
|
7696 | return http.post('', data, {
|
7697 | baseURL
|
7698 | }).then(response => wrapPersonalAccessToken(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7699 | },
|
7700 |
|
7701 | |
7702 |
|
7703 |
|
7704 |
|
7705 |
|
7706 |
|
7707 |
|
7708 |
|
7709 |
|
7710 |
|
7711 |
|
7712 |
|
7713 |
|
7714 |
|
7715 |
|
7716 |
|
7717 | getPersonalAccessToken: function getPersonalAccessToken(tokenId) {
|
7718 | var _http$defaults5, _http$defaults5$baseU;
|
7719 |
|
7720 | const baseURL = (_http$defaults5 = http.defaults) === null || _http$defaults5 === void 0 ? void 0 : (_http$defaults5$baseU = _http$defaults5.baseURL) === null || _http$defaults5$baseU === void 0 ? void 0 : _http$defaults5$baseU.replace('/spaces/', '/users/me/access_tokens');
|
7721 | return http.get(tokenId, {
|
7722 | baseURL
|
7723 | }).then(response => wrapPersonalAccessToken(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7724 | },
|
7725 |
|
7726 | |
7727 |
|
7728 |
|
7729 |
|
7730 |
|
7731 |
|
7732 |
|
7733 |
|
7734 |
|
7735 |
|
7736 |
|
7737 |
|
7738 |
|
7739 |
|
7740 |
|
7741 | getPersonalAccessTokens: function getPersonalAccessTokens() {
|
7742 | var _http$defaults6, _http$defaults6$baseU;
|
7743 |
|
7744 | const baseURL = (_http$defaults6 = http.defaults) === null || _http$defaults6 === void 0 ? void 0 : (_http$defaults6$baseU = _http$defaults6.baseURL) === null || _http$defaults6$baseU === void 0 ? void 0 : _http$defaults6$baseU.replace('/spaces/', '/users/me/access_tokens');
|
7745 | return http.get('', {
|
7746 | baseURL
|
7747 | }).then(response => wrapPersonalAccessTokenCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7748 | },
|
7749 |
|
7750 | |
7751 |
|
7752 |
|
7753 |
|
7754 |
|
7755 |
|
7756 |
|
7757 |
|
7758 |
|
7759 |
|
7760 |
|
7761 |
|
7762 |
|
7763 |
|
7764 |
|
7765 |
|
7766 |
|
7767 |
|
7768 |
|
7769 |
|
7770 |
|
7771 |
|
7772 |
|
7773 |
|
7774 | getOrganizationUsage: function getOrganizationUsage(organizationId, query = {}) {
|
7775 | var _http$defaults7, _http$defaults7$baseU;
|
7776 |
|
7777 | const baseURL = (_http$defaults7 = http.defaults) === null || _http$defaults7 === void 0 ? void 0 : (_http$defaults7$baseU = _http$defaults7.baseURL) === null || _http$defaults7$baseU === void 0 ? void 0 : _http$defaults7$baseU.replace('/spaces/', `/organizations/${organizationId}/organization_periodic_usages`);
|
7778 | return http.get('', {
|
7779 | baseURL,
|
7780 | params: query
|
7781 | }).then(response => wrapUsageCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7782 | },
|
7783 |
|
7784 | |
7785 |
|
7786 |
|
7787 |
|
7788 |
|
7789 |
|
7790 |
|
7791 |
|
7792 |
|
7793 |
|
7794 |
|
7795 |
|
7796 |
|
7797 |
|
7798 |
|
7799 |
|
7800 |
|
7801 |
|
7802 |
|
7803 |
|
7804 |
|
7805 |
|
7806 |
|
7807 |
|
7808 |
|
7809 | getSpaceUsage: function getSpaceUsage(organizationId, query = {}) {
|
7810 | var _http$defaults8, _http$defaults8$baseU;
|
7811 |
|
7812 | const baseURL = (_http$defaults8 = http.defaults) === null || _http$defaults8 === void 0 ? void 0 : (_http$defaults8$baseU = _http$defaults8.baseURL) === null || _http$defaults8$baseU === void 0 ? void 0 : _http$defaults8$baseU.replace('/spaces/', `/organizations/${organizationId}/space_periodic_usages`);
|
7813 | return http.get('', {
|
7814 | baseURL,
|
7815 | params: query
|
7816 | }).then(response => wrapUsageCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7817 | },
|
7818 |
|
7819 | |
7820 |
|
7821 |
|
7822 |
|
7823 |
|
7824 |
|
7825 |
|
7826 |
|
7827 |
|
7828 |
|
7829 |
|
7830 |
|
7831 |
|
7832 |
|
7833 |
|
7834 |
|
7835 |
|
7836 |
|
7837 |
|
7838 | rawRequest: function rawRequest(opts) {
|
7839 | return http(opts).then(response => response.data, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
7840 | }
|
7841 | };
|
7842 | }
|
7843 |
|
7844 | }),
|
7845 |
|
7846 | "./create-environment-api.ts":
|
7847 |
|
7848 |
|
7849 |
|
7850 |
|
7851 | (function(module, __webpack_exports__, __webpack_require__) {
|
7852 |
|
7853 | "use strict";
|
7854 | __webpack_require__.r(__webpack_exports__);
|
7855 | __webpack_require__.d(__webpack_exports__, "default", function() { return createEnvironmentApi; });
|
7856 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
7857 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
7858 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
7859 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
7860 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
7861 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
7862 |
|
7863 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
7864 |
|
7865 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
7866 |
|
7867 |
|
7868 |
|
7869 |
|
7870 |
|
7871 |
|
7872 |
|
7873 |
|
7874 |
|
7875 | function createEnvironmentApi({
|
7876 | http,
|
7877 | httpUpload
|
7878 | }) {
|
7879 | const wrapEnvironment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment.wrapEnvironment;
|
7880 | const _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
|
7881 | wrapContentType = _entities$contentType.wrapContentType,
|
7882 | wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
|
7883 | const _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
|
7884 | wrapEntry = _entities$entry.wrapEntry,
|
7885 | wrapEntryCollection = _entities$entry.wrapEntryCollection;
|
7886 | const _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
|
7887 | wrapAsset = _entities$asset.wrapAsset,
|
7888 | wrapAssetCollection = _entities$asset.wrapAssetCollection;
|
7889 | const _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
|
7890 | wrapLocale = _entities$locale.wrapLocale,
|
7891 | wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
|
7892 | const wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
|
7893 | const wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
|
7894 | const wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
|
7895 | const _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
|
7896 | wrapUiExtension = _entities$uiExtension.wrapUiExtension,
|
7897 | wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
|
7898 | const _entities$appInstalla = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appInstallation,
|
7899 | wrapAppInstallation = _entities$appInstalla.wrapAppInstallation,
|
7900 | wrapAppInstallationCollection = _entities$appInstalla.wrapAppInstallationCollection;
|
7901 |
|
7902 | function createAsset(data) {
|
7903 | return http.post('assets', data).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7904 | }
|
7905 |
|
7906 | function createUpload(data) {
|
7907 | const file = data.file;
|
7908 |
|
7909 | if (!file) {
|
7910 | return Promise.reject(new Error('Unable to locate a file to upload.'));
|
7911 | }
|
7912 |
|
7913 | return httpUpload.post('uploads', file, {
|
7914 | headers: {
|
7915 | 'Content-Type': 'application/octet-stream'
|
7916 | }
|
7917 | }).then(uploadResponse => {
|
7918 | return wrapUpload(httpUpload, uploadResponse.data);
|
7919 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7920 | }
|
7921 | |
7922 |
|
7923 |
|
7924 |
|
7925 |
|
7926 |
|
7927 |
|
7928 | function normalizeSelect(query) {
|
7929 | if (query.select && !/sys/i.test(query.select)) {
|
7930 | query.select += ',sys';
|
7931 | }
|
7932 | }
|
7933 |
|
7934 | return {
|
7935 | |
7936 |
|
7937 |
|
7938 |
|
7939 |
|
7940 |
|
7941 |
|
7942 |
|
7943 |
|
7944 |
|
7945 |
|
7946 |
|
7947 |
|
7948 |
|
7949 |
|
7950 |
|
7951 |
|
7952 | delete: function deleteEnvironment() {
|
7953 | return http.delete('').then(() => {
|
7954 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7955 | },
|
7956 |
|
7957 | |
7958 |
|
7959 |
|
7960 |
|
7961 |
|
7962 |
|
7963 |
|
7964 |
|
7965 |
|
7966 |
|
7967 |
|
7968 |
|
7969 |
|
7970 |
|
7971 |
|
7972 |
|
7973 |
|
7974 |
|
7975 |
|
7976 |
|
7977 | update: function updateEnvironment() {
|
7978 | const raw = this.toPlainObject();
|
7979 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
7980 | delete data.sys;
|
7981 | return http.put('', data, {
|
7982 | headers: {
|
7983 | 'X-Contentful-Version': raw.sys.version
|
7984 | }
|
7985 | }).then(response => wrapEnvironment(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
7986 | },
|
7987 |
|
7988 | |
7989 |
|
7990 |
|
7991 |
|
7992 |
|
7993 |
|
7994 |
|
7995 |
|
7996 |
|
7997 |
|
7998 |
|
7999 |
|
8000 |
|
8001 |
|
8002 |
|
8003 |
|
8004 |
|
8005 |
|
8006 |
|
8007 |
|
8008 |
|
8009 |
|
8010 |
|
8011 |
|
8012 |
|
8013 |
|
8014 |
|
8015 |
|
8016 |
|
8017 |
|
8018 | getEntryFromData(entryData) {
|
8019 | return wrapEntry(http, entryData);
|
8020 | },
|
8021 |
|
8022 | |
8023 |
|
8024 |
|
8025 |
|
8026 |
|
8027 |
|
8028 |
|
8029 |
|
8030 |
|
8031 |
|
8032 |
|
8033 |
|
8034 |
|
8035 |
|
8036 |
|
8037 |
|
8038 |
|
8039 |
|
8040 |
|
8041 |
|
8042 |
|
8043 |
|
8044 |
|
8045 |
|
8046 |
|
8047 |
|
8048 |
|
8049 |
|
8050 |
|
8051 |
|
8052 | getAssetFromData(assetData) {
|
8053 | return wrapAsset(http, assetData);
|
8054 | },
|
8055 |
|
8056 | |
8057 |
|
8058 |
|
8059 |
|
8060 |
|
8061 |
|
8062 |
|
8063 |
|
8064 |
|
8065 |
|
8066 |
|
8067 |
|
8068 |
|
8069 |
|
8070 |
|
8071 |
|
8072 |
|
8073 |
|
8074 | getContentType(id) {
|
8075 | return http.get('content_types/' + id).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8076 | },
|
8077 |
|
8078 | |
8079 |
|
8080 |
|
8081 |
|
8082 |
|
8083 |
|
8084 |
|
8085 |
|
8086 |
|
8087 |
|
8088 |
|
8089 |
|
8090 |
|
8091 |
|
8092 |
|
8093 |
|
8094 |
|
8095 |
|
8096 | getContentTypes(query = {}) {
|
8097 | return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8098 | query: query
|
8099 | })).then(response => wrapContentTypeCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8100 | },
|
8101 |
|
8102 | |
8103 |
|
8104 |
|
8105 |
|
8106 |
|
8107 |
|
8108 |
|
8109 |
|
8110 |
|
8111 |
|
8112 |
|
8113 |
|
8114 |
|
8115 |
|
8116 |
|
8117 |
|
8118 |
|
8119 |
|
8120 |
|
8121 |
|
8122 |
|
8123 |
|
8124 |
|
8125 |
|
8126 |
|
8127 |
|
8128 |
|
8129 |
|
8130 |
|
8131 | createContentType(data) {
|
8132 | return http.post('content_types', data).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8133 | },
|
8134 |
|
8135 | |
8136 |
|
8137 |
|
8138 |
|
8139 |
|
8140 |
|
8141 |
|
8142 |
|
8143 |
|
8144 |
|
8145 |
|
8146 |
|
8147 |
|
8148 |
|
8149 |
|
8150 |
|
8151 |
|
8152 |
|
8153 |
|
8154 |
|
8155 |
|
8156 |
|
8157 |
|
8158 |
|
8159 |
|
8160 |
|
8161 |
|
8162 |
|
8163 |
|
8164 |
|
8165 | createContentTypeWithId(id, data) {
|
8166 | return http.put('content_types/' + id, data).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8167 | },
|
8168 |
|
8169 | |
8170 |
|
8171 |
|
8172 |
|
8173 |
|
8174 |
|
8175 |
|
8176 |
|
8177 |
|
8178 |
|
8179 |
|
8180 |
|
8181 |
|
8182 |
|
8183 |
|
8184 |
|
8185 |
|
8186 |
|
8187 | getEditorInterfaceForContentType(contentTypeId) {
|
8188 | return http.get('content_types/' + contentTypeId + '/editor_interface').then(response => wrapEditorInterface(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8189 | },
|
8190 |
|
8191 | |
8192 |
|
8193 |
|
8194 |
|
8195 |
|
8196 |
|
8197 |
|
8198 |
|
8199 |
|
8200 |
|
8201 |
|
8202 |
|
8203 |
|
8204 |
|
8205 |
|
8206 |
|
8207 |
|
8208 |
|
8209 |
|
8210 |
|
8211 |
|
8212 | getEntry(id, query = {}) {
|
8213 | normalizeSelect(query);
|
8214 | return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8215 | query: query
|
8216 | })).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8217 | },
|
8218 |
|
8219 | |
8220 |
|
8221 |
|
8222 |
|
8223 |
|
8224 |
|
8225 |
|
8226 |
|
8227 |
|
8228 |
|
8229 |
|
8230 |
|
8231 |
|
8232 |
|
8233 |
|
8234 |
|
8235 |
|
8236 |
|
8237 |
|
8238 |
|
8239 | getEntries(query = {}) {
|
8240 | normalizeSelect(query);
|
8241 | return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8242 | query: query
|
8243 | })).then(response => wrapEntryCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8244 | },
|
8245 |
|
8246 | |
8247 |
|
8248 |
|
8249 |
|
8250 |
|
8251 |
|
8252 |
|
8253 |
|
8254 |
|
8255 |
|
8256 |
|
8257 |
|
8258 |
|
8259 |
|
8260 |
|
8261 |
|
8262 |
|
8263 |
|
8264 |
|
8265 |
|
8266 |
|
8267 |
|
8268 |
|
8269 |
|
8270 |
|
8271 | createEntry(contentTypeId, data) {
|
8272 | return http.post('entries', data, {
|
8273 | headers: {
|
8274 | 'X-Contentful-Content-Type': contentTypeId
|
8275 | }
|
8276 | }).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8277 | },
|
8278 |
|
8279 | |
8280 |
|
8281 |
|
8282 |
|
8283 |
|
8284 |
|
8285 |
|
8286 |
|
8287 |
|
8288 |
|
8289 |
|
8290 |
|
8291 |
|
8292 |
|
8293 |
|
8294 |
|
8295 |
|
8296 |
|
8297 |
|
8298 |
|
8299 |
|
8300 |
|
8301 |
|
8302 |
|
8303 |
|
8304 |
|
8305 |
|
8306 | createEntryWithId(contentTypeId, id, data) {
|
8307 | return http.put('entries/' + id, data, {
|
8308 | headers: {
|
8309 | 'X-Contentful-Content-Type': contentTypeId
|
8310 | }
|
8311 | }).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8312 | },
|
8313 |
|
8314 | |
8315 |
|
8316 |
|
8317 |
|
8318 |
|
8319 |
|
8320 |
|
8321 |
|
8322 |
|
8323 |
|
8324 |
|
8325 |
|
8326 |
|
8327 |
|
8328 |
|
8329 |
|
8330 |
|
8331 |
|
8332 |
|
8333 |
|
8334 |
|
8335 | getAsset(id, query = {}) {
|
8336 | normalizeSelect(query);
|
8337 | return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8338 | query: query
|
8339 | })).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8340 | },
|
8341 |
|
8342 | |
8343 |
|
8344 |
|
8345 |
|
8346 |
|
8347 |
|
8348 |
|
8349 |
|
8350 |
|
8351 |
|
8352 |
|
8353 |
|
8354 |
|
8355 |
|
8356 |
|
8357 |
|
8358 |
|
8359 |
|
8360 |
|
8361 |
|
8362 | getAssets(query = {}) {
|
8363 | normalizeSelect(query);
|
8364 | return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8365 | query: query
|
8366 | })).then(response => wrapAssetCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8367 | },
|
8368 |
|
8369 | |
8370 |
|
8371 |
|
8372 |
|
8373 |
|
8374 |
|
8375 |
|
8376 |
|
8377 |
|
8378 |
|
8379 |
|
8380 |
|
8381 |
|
8382 |
|
8383 |
|
8384 |
|
8385 |
|
8386 |
|
8387 |
|
8388 |
|
8389 |
|
8390 |
|
8391 |
|
8392 |
|
8393 |
|
8394 |
|
8395 |
|
8396 |
|
8397 |
|
8398 |
|
8399 |
|
8400 | createAsset: createAsset,
|
8401 |
|
8402 | |
8403 |
|
8404 |
|
8405 |
|
8406 |
|
8407 |
|
8408 |
|
8409 |
|
8410 |
|
8411 |
|
8412 |
|
8413 |
|
8414 |
|
8415 |
|
8416 |
|
8417 |
|
8418 |
|
8419 |
|
8420 |
|
8421 |
|
8422 |
|
8423 |
|
8424 |
|
8425 |
|
8426 |
|
8427 |
|
8428 |
|
8429 |
|
8430 |
|
8431 |
|
8432 | createAssetWithId(id, data) {
|
8433 | return http.put('assets/' + id, data).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8434 | },
|
8435 |
|
8436 | |
8437 |
|
8438 |
|
8439 |
|
8440 |
|
8441 |
|
8442 |
|
8443 |
|
8444 |
|
8445 |
|
8446 |
|
8447 |
|
8448 |
|
8449 |
|
8450 |
|
8451 |
|
8452 |
|
8453 |
|
8454 |
|
8455 |
|
8456 |
|
8457 |
|
8458 |
|
8459 |
|
8460 |
|
8461 |
|
8462 |
|
8463 |
|
8464 |
|
8465 |
|
8466 |
|
8467 |
|
8468 | createAssetFromFiles(data) {
|
8469 | const file = data.fields.file;
|
8470 | return Promise.all(Object.keys(file).map(locale => {
|
8471 | const _file$locale = file[locale],
|
8472 | contentType = _file$locale.contentType,
|
8473 | fileName = _file$locale.fileName;
|
8474 | return createUpload(file[locale]).then(upload => {
|
8475 | return {
|
8476 | [locale]: {
|
8477 | contentType,
|
8478 | fileName,
|
8479 | uploadFrom: {
|
8480 | sys: {
|
8481 | type: 'Link',
|
8482 | linkType: 'Upload',
|
8483 | id: upload.sys.id
|
8484 | }
|
8485 | }
|
8486 | }
|
8487 | };
|
8488 | });
|
8489 | })).then(uploads => {
|
8490 | const file = uploads.reduce((fieldsData, upload) => _objectSpread(_objectSpread({}, fieldsData), upload), {});
|
8491 |
|
8492 | const asset = _objectSpread(_objectSpread({}, data), {}, {
|
8493 | fields: _objectSpread(_objectSpread({}, data.fields), {}, {
|
8494 | file
|
8495 | })
|
8496 | });
|
8497 |
|
8498 | return createAsset(asset);
|
8499 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8500 | },
|
8501 |
|
8502 | |
8503 |
|
8504 |
|
8505 |
|
8506 |
|
8507 |
|
8508 |
|
8509 |
|
8510 |
|
8511 |
|
8512 |
|
8513 |
|
8514 |
|
8515 |
|
8516 |
|
8517 |
|
8518 | getUpload(id) {
|
8519 | return httpUpload.get('uploads/' + id).then(response => wrapUpload(http, response.data)).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8520 | },
|
8521 |
|
8522 | |
8523 |
|
8524 |
|
8525 |
|
8526 |
|
8527 |
|
8528 |
|
8529 |
|
8530 |
|
8531 |
|
8532 |
|
8533 |
|
8534 |
|
8535 |
|
8536 |
|
8537 |
|
8538 |
|
8539 |
|
8540 | createUpload: createUpload,
|
8541 |
|
8542 | |
8543 |
|
8544 |
|
8545 |
|
8546 |
|
8547 |
|
8548 |
|
8549 |
|
8550 |
|
8551 |
|
8552 |
|
8553 |
|
8554 |
|
8555 |
|
8556 |
|
8557 |
|
8558 |
|
8559 |
|
8560 | getLocale(id) {
|
8561 | return http.get('locales/' + id).then(response => wrapLocale(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8562 | },
|
8563 |
|
8564 | |
8565 |
|
8566 |
|
8567 |
|
8568 |
|
8569 |
|
8570 |
|
8571 |
|
8572 |
|
8573 |
|
8574 |
|
8575 |
|
8576 |
|
8577 |
|
8578 |
|
8579 |
|
8580 |
|
8581 | getLocales() {
|
8582 | return http.get('locales').then(response => wrapLocaleCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8583 | },
|
8584 |
|
8585 | |
8586 |
|
8587 |
|
8588 |
|
8589 |
|
8590 |
|
8591 |
|
8592 |
|
8593 |
|
8594 |
|
8595 |
|
8596 |
|
8597 |
|
8598 |
|
8599 |
|
8600 |
|
8601 |
|
8602 |
|
8603 |
|
8604 |
|
8605 |
|
8606 |
|
8607 |
|
8608 |
|
8609 | createLocale(data) {
|
8610 | return http.post('locales', data).then(response => wrapLocale(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8611 | },
|
8612 |
|
8613 | |
8614 |
|
8615 |
|
8616 |
|
8617 |
|
8618 |
|
8619 |
|
8620 |
|
8621 |
|
8622 |
|
8623 |
|
8624 |
|
8625 |
|
8626 |
|
8627 |
|
8628 |
|
8629 |
|
8630 |
|
8631 | getUiExtension(id) {
|
8632 | return http.get('extensions/' + id).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8633 | },
|
8634 |
|
8635 | |
8636 |
|
8637 |
|
8638 |
|
8639 |
|
8640 |
|
8641 |
|
8642 |
|
8643 |
|
8644 |
|
8645 |
|
8646 |
|
8647 |
|
8648 |
|
8649 |
|
8650 |
|
8651 |
|
8652 | getUiExtensions() {
|
8653 | return http.get('extensions').then(response => wrapUiExtensionCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8654 | },
|
8655 |
|
8656 | |
8657 |
|
8658 |
|
8659 |
|
8660 |
|
8661 |
|
8662 |
|
8663 |
|
8664 |
|
8665 |
|
8666 |
|
8667 |
|
8668 |
|
8669 |
|
8670 |
|
8671 |
|
8672 |
|
8673 |
|
8674 |
|
8675 |
|
8676 |
|
8677 |
|
8678 |
|
8679 |
|
8680 |
|
8681 |
|
8682 |
|
8683 |
|
8684 |
|
8685 |
|
8686 |
|
8687 |
|
8688 | createUiExtension(data) {
|
8689 | return http.post('extensions', data).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8690 | },
|
8691 |
|
8692 | |
8693 |
|
8694 |
|
8695 |
|
8696 |
|
8697 |
|
8698 |
|
8699 |
|
8700 |
|
8701 |
|
8702 |
|
8703 |
|
8704 |
|
8705 |
|
8706 |
|
8707 |
|
8708 |
|
8709 |
|
8710 |
|
8711 |
|
8712 |
|
8713 |
|
8714 |
|
8715 |
|
8716 |
|
8717 |
|
8718 |
|
8719 |
|
8720 |
|
8721 |
|
8722 |
|
8723 |
|
8724 |
|
8725 | createUiExtensionWithId(id, data) {
|
8726 | return http.put('extensions/' + id, data).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8727 | },
|
8728 |
|
8729 | |
8730 |
|
8731 |
|
8732 |
|
8733 |
|
8734 |
|
8735 |
|
8736 |
|
8737 |
|
8738 |
|
8739 |
|
8740 |
|
8741 |
|
8742 |
|
8743 |
|
8744 |
|
8745 |
|
8746 |
|
8747 |
|
8748 |
|
8749 |
|
8750 |
|
8751 |
|
8752 | createAppInstallation(appDefinitionId, data) {
|
8753 | return http.put('app_installations/' + appDefinitionId, data).then(response => wrapAppInstallation(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8754 | },
|
8755 |
|
8756 | |
8757 |
|
8758 |
|
8759 |
|
8760 |
|
8761 |
|
8762 |
|
8763 |
|
8764 |
|
8765 |
|
8766 |
|
8767 |
|
8768 |
|
8769 |
|
8770 |
|
8771 |
|
8772 |
|
8773 |
|
8774 | getAppInstallation(id) {
|
8775 | return http.get('app_installations/' + id).then(response => wrapAppInstallation(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8776 | },
|
8777 |
|
8778 | |
8779 |
|
8780 |
|
8781 |
|
8782 |
|
8783 |
|
8784 |
|
8785 |
|
8786 |
|
8787 |
|
8788 |
|
8789 |
|
8790 |
|
8791 |
|
8792 |
|
8793 |
|
8794 |
|
8795 | getAppInstallations() {
|
8796 | return http.get('app_installations').then(response => wrapAppInstallationCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8797 | },
|
8798 |
|
8799 | |
8800 |
|
8801 |
|
8802 |
|
8803 |
|
8804 |
|
8805 |
|
8806 |
|
8807 |
|
8808 |
|
8809 |
|
8810 |
|
8811 |
|
8812 |
|
8813 |
|
8814 |
|
8815 |
|
8816 |
|
8817 |
|
8818 |
|
8819 | getEntrySnapshots(entryId, query = {}) {
|
8820 | return http.get(`entries/${entryId}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8821 | query: query
|
8822 | })).then(response => wrapSnapshotCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8823 | },
|
8824 |
|
8825 | |
8826 |
|
8827 |
|
8828 |
|
8829 |
|
8830 |
|
8831 |
|
8832 |
|
8833 |
|
8834 |
|
8835 |
|
8836 |
|
8837 |
|
8838 |
|
8839 |
|
8840 |
|
8841 |
|
8842 |
|
8843 |
|
8844 |
|
8845 | getContentTypeSnapshots(contentTypeId, query = {}) {
|
8846 | return http.get(`content_types/${contentTypeId}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8847 | query: query
|
8848 | })).then(response => wrapSnapshotCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8849 | }
|
8850 |
|
8851 | };
|
8852 | }
|
8853 |
|
8854 | }),
|
8855 |
|
8856 | "./create-organization-api.ts":
|
8857 |
|
8858 |
|
8859 |
|
8860 |
|
8861 | (function(module, __webpack_exports__, __webpack_require__) {
|
8862 |
|
8863 | "use strict";
|
8864 | __webpack_require__.r(__webpack_exports__);
|
8865 | __webpack_require__.d(__webpack_exports__, "default", function() { return createOrganizationApi; });
|
8866 | var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/get.js");
|
8867 | var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__);
|
8868 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
8869 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
8870 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
8871 |
|
8872 |
|
8873 |
|
8874 |
|
8875 |
|
8876 |
|
8877 |
|
8878 |
|
8879 | function createOrganizationApi({
|
8880 | http
|
8881 | }) {
|
8882 | const _entities$appDefiniti = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].appDefinition,
|
8883 | wrapAppDefinition = _entities$appDefiniti.wrapAppDefinition,
|
8884 | wrapAppDefinitionCollection = _entities$appDefiniti.wrapAppDefinitionCollection;
|
8885 | const _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
|
8886 | wrapUser = _entities$user.wrapUser,
|
8887 | wrapUserCollection = _entities$user.wrapUserCollection;
|
8888 | const _entities$organizatio = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationMembership,
|
8889 | wrapOrganizationMembership = _entities$organizatio.wrapOrganizationMembership,
|
8890 | wrapOrganizationMembershipCollection = _entities$organizatio.wrapOrganizationMembershipCollection;
|
8891 | const _entities$teamMembers = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamMembership,
|
8892 | wrapTeamMembership = _entities$teamMembers.wrapTeamMembership,
|
8893 | wrapTeamMembershipCollection = _entities$teamMembers.wrapTeamMembershipCollection;
|
8894 | const _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
|
8895 | wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
|
8896 | wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
|
8897 | const _entities$team = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].team,
|
8898 | wrapTeam = _entities$team.wrapTeam,
|
8899 | wrapTeamCollection = _entities$team.wrapTeamCollection;
|
8900 | const _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
|
8901 | wrapSpaceMembership = _entities$spaceMember.wrapSpaceMembership,
|
8902 | wrapSpaceMembershipCollection = _entities$spaceMember.wrapSpaceMembershipCollection;
|
8903 | const wrapOrganizationInvitation = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].organizationInvitation.wrapOrganizationInvitation;
|
8904 | const headers = {
|
8905 | 'x-contentful-enable-alpha-feature': 'organization-user-management-api'
|
8906 | };
|
8907 | return {
|
8908 | |
8909 |
|
8910 |
|
8911 |
|
8912 |
|
8913 |
|
8914 |
|
8915 |
|
8916 |
|
8917 |
|
8918 |
|
8919 |
|
8920 |
|
8921 |
|
8922 |
|
8923 | getUser(id) {
|
8924 | return http.get('users/' + id).then(response => wrapUser(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8925 | },
|
8926 |
|
8927 | |
8928 |
|
8929 |
|
8930 |
|
8931 |
|
8932 |
|
8933 |
|
8934 |
|
8935 |
|
8936 |
|
8937 |
|
8938 |
|
8939 |
|
8940 |
|
8941 |
|
8942 |
|
8943 | getUsers(query = {}) {
|
8944 | return http.get('users', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8945 | query
|
8946 | })).then(response => wrapUserCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8947 | },
|
8948 |
|
8949 | |
8950 |
|
8951 |
|
8952 |
|
8953 |
|
8954 |
|
8955 |
|
8956 |
|
8957 |
|
8958 |
|
8959 |
|
8960 |
|
8961 |
|
8962 |
|
8963 |
|
8964 |
|
8965 | getOrganizationMembership(id) {
|
8966 | return http.get('organization_memberships/' + id).then(response => wrapOrganizationMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8967 | },
|
8968 |
|
8969 | |
8970 |
|
8971 |
|
8972 |
|
8973 |
|
8974 |
|
8975 |
|
8976 |
|
8977 |
|
8978 |
|
8979 |
|
8980 |
|
8981 |
|
8982 |
|
8983 |
|
8984 |
|
8985 | getOrganizationMemberships(query = {}) {
|
8986 | return http.get('organization_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
8987 | query
|
8988 | })).then(response => wrapOrganizationMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
8989 | },
|
8990 |
|
8991 | |
8992 |
|
8993 |
|
8994 |
|
8995 |
|
8996 |
|
8997 |
|
8998 |
|
8999 |
|
9000 |
|
9001 |
|
9002 |
|
9003 |
|
9004 |
|
9005 |
|
9006 |
|
9007 |
|
9008 |
|
9009 | createTeam(data) {
|
9010 | return http.post('teams', data).then(response => wrapTeam(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9011 | },
|
9012 |
|
9013 | |
9014 |
|
9015 |
|
9016 |
|
9017 |
|
9018 |
|
9019 |
|
9020 |
|
9021 |
|
9022 |
|
9023 |
|
9024 |
|
9025 |
|
9026 |
|
9027 | getTeam(teamId) {
|
9028 | return http.get('teams/' + teamId).then(response => wrapTeam(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9029 | },
|
9030 |
|
9031 | |
9032 |
|
9033 |
|
9034 |
|
9035 |
|
9036 |
|
9037 |
|
9038 |
|
9039 |
|
9040 |
|
9041 |
|
9042 |
|
9043 |
|
9044 |
|
9045 | getTeams(query = {}) {
|
9046 | return http.get('teams', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9047 | query
|
9048 | })).then(response => wrapTeamCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9049 | },
|
9050 |
|
9051 | |
9052 |
|
9053 |
|
9054 |
|
9055 |
|
9056 |
|
9057 |
|
9058 |
|
9059 |
|
9060 |
|
9061 |
|
9062 |
|
9063 |
|
9064 |
|
9065 |
|
9066 |
|
9067 |
|
9068 |
|
9069 |
|
9070 | createTeamMembership(teamId, data) {
|
9071 | return http.post('teams/' + teamId + '/team_memberships', data).then(response => wrapTeamMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9072 | },
|
9073 |
|
9074 | |
9075 |
|
9076 |
|
9077 |
|
9078 |
|
9079 |
|
9080 |
|
9081 |
|
9082 |
|
9083 |
|
9084 |
|
9085 |
|
9086 |
|
9087 |
|
9088 |
|
9089 | getTeamMembership(teamId, teamMembershipId) {
|
9090 | return http.get('teams/' + teamId + '/team_memberships/' + teamMembershipId).then(response => wrapTeamMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9091 | },
|
9092 |
|
9093 | |
9094 |
|
9095 |
|
9096 |
|
9097 |
|
9098 |
|
9099 |
|
9100 |
|
9101 |
|
9102 |
|
9103 |
|
9104 |
|
9105 |
|
9106 |
|
9107 |
|
9108 | getTeamMemberships(opts = {}) {
|
9109 | const query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
|
9110 |
|
9111 | if (opts.teamId) {
|
9112 | return http.get('teams/' + opts.teamId + '/team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9113 | query
|
9114 | })).then(response => wrapTeamMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9115 | }
|
9116 |
|
9117 | return http.get('team_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9118 | query
|
9119 | })).then(response => wrapTeamMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9120 | },
|
9121 |
|
9122 | |
9123 |
|
9124 |
|
9125 |
|
9126 |
|
9127 |
|
9128 |
|
9129 |
|
9130 |
|
9131 |
|
9132 |
|
9133 |
|
9134 |
|
9135 |
|
9136 |
|
9137 | getTeamSpaceMemberships(opts = {}) {
|
9138 | const query = lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(opts, 'query', {});
|
9139 |
|
9140 | if (opts.teamId) {
|
9141 |
|
9142 |
|
9143 | query['sys.team.sys.id'] = opts.teamId;
|
9144 | }
|
9145 |
|
9146 | return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9147 | query
|
9148 | })).then(response => wrapTeamSpaceMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9149 | },
|
9150 |
|
9151 | |
9152 |
|
9153 |
|
9154 |
|
9155 |
|
9156 |
|
9157 |
|
9158 |
|
9159 |
|
9160 |
|
9161 |
|
9162 |
|
9163 |
|
9164 |
|
9165 |
|
9166 | getTeamSpaceMembership(teamSpaceMembershipId) {
|
9167 | return http.get('team_space_memberships/' + teamSpaceMembershipId).then(response => wrapTeamSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9168 | },
|
9169 |
|
9170 | |
9171 |
|
9172 |
|
9173 |
|
9174 |
|
9175 |
|
9176 |
|
9177 |
|
9178 |
|
9179 |
|
9180 |
|
9181 |
|
9182 |
|
9183 |
|
9184 |
|
9185 |
|
9186 | getOrganizationSpaceMembership(id) {
|
9187 | return http.get('space_memberships/' + id).then(response => wrapSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9188 | },
|
9189 |
|
9190 | |
9191 |
|
9192 |
|
9193 |
|
9194 |
|
9195 |
|
9196 |
|
9197 |
|
9198 |
|
9199 |
|
9200 |
|
9201 |
|
9202 |
|
9203 |
|
9204 |
|
9205 |
|
9206 | getOrganizationSpaceMemberships(query = {}) {
|
9207 | return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9208 | query
|
9209 | })).then(response => wrapSpaceMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9210 | },
|
9211 |
|
9212 | |
9213 |
|
9214 |
|
9215 |
|
9216 |
|
9217 |
|
9218 |
|
9219 |
|
9220 |
|
9221 |
|
9222 |
|
9223 |
|
9224 |
|
9225 |
|
9226 |
|
9227 | getOrganizationInvitation(invitationId) {
|
9228 | return http.get('invitations/' + invitationId, {
|
9229 | headers
|
9230 | }).then(response => wrapOrganizationInvitation(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9231 | },
|
9232 |
|
9233 | |
9234 |
|
9235 |
|
9236 |
|
9237 |
|
9238 |
|
9239 |
|
9240 |
|
9241 |
|
9242 |
|
9243 |
|
9244 |
|
9245 |
|
9246 |
|
9247 |
|
9248 |
|
9249 |
|
9250 |
|
9251 |
|
9252 | createOrganizationInvitation(data) {
|
9253 | const invitationAlphaHeaders = {
|
9254 | 'x-contentful-enable-alpha-feature': 'pending-org-membership'
|
9255 | };
|
9256 | return http.post('invitations', data, {
|
9257 | headers: invitationAlphaHeaders
|
9258 | }).then(response => wrapOrganizationInvitation(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9259 | },
|
9260 |
|
9261 | |
9262 |
|
9263 |
|
9264 |
|
9265 |
|
9266 |
|
9267 |
|
9268 |
|
9269 |
|
9270 |
|
9271 |
|
9272 |
|
9273 |
|
9274 |
|
9275 |
|
9276 |
|
9277 |
|
9278 |
|
9279 |
|
9280 |
|
9281 | createAppDefinition(data) {
|
9282 | return http.post('app_definitions', data).then(response => wrapAppDefinition(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9283 | },
|
9284 |
|
9285 | |
9286 |
|
9287 |
|
9288 |
|
9289 |
|
9290 |
|
9291 |
|
9292 |
|
9293 |
|
9294 |
|
9295 |
|
9296 |
|
9297 |
|
9298 |
|
9299 |
|
9300 | getAppDefinitions(query = {}) {
|
9301 | return http.get('app_definitions', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9302 | query
|
9303 | })).then(response => wrapAppDefinitionCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9304 | },
|
9305 |
|
9306 | |
9307 |
|
9308 |
|
9309 |
|
9310 |
|
9311 |
|
9312 |
|
9313 |
|
9314 |
|
9315 |
|
9316 |
|
9317 |
|
9318 |
|
9319 |
|
9320 |
|
9321 | getAppDefinition(id) {
|
9322 | return http.get('app_definitions/' + id).then(response => wrapAppDefinition(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9323 | }
|
9324 |
|
9325 | };
|
9326 | }
|
9327 |
|
9328 | }),
|
9329 |
|
9330 | "./create-space-api.ts":
|
9331 |
|
9332 |
|
9333 |
|
9334 |
|
9335 | (function(module, __webpack_exports__, __webpack_require__) {
|
9336 |
|
9337 | "use strict";
|
9338 | __webpack_require__.r(__webpack_exports__);
|
9339 | __webpack_require__.d(__webpack_exports__, "default", function() { return createSpaceApi; });
|
9340 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
9341 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
9342 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
9343 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
9344 | var _entities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/index.ts");
|
9345 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
9346 |
|
9347 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
9348 |
|
9349 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
9350 |
|
9351 |
|
9352 |
|
9353 |
|
9354 |
|
9355 |
|
9356 |
|
9357 |
|
9358 |
|
9359 |
|
9360 | function raiseDeprecationWarning(method) {
|
9361 | console.warn([`Deprecated: Space.${method}() will be removed in future major versions.`, null, `Please migrate your code to use Environment.${method}():`, `https://contentful.github.io/contentful-management.js/contentful-management/latest/ContentfulEnvironmentAPI.html#.${method}`, null].join('\n'));
|
9362 | }
|
9363 |
|
9364 | function spaceMembershipDeprecationWarning() {
|
9365 | console.warn('The user attribute in the space membership root is deprecated. The attribute has been moved inside the sys object (i.e. sys.user)');
|
9366 | }
|
9367 |
|
9368 |
|
9369 |
|
9370 |
|
9371 |
|
9372 |
|
9373 |
|
9374 |
|
9375 | function createSpaceApi({
|
9376 | http,
|
9377 | httpUpload
|
9378 | }) {
|
9379 | const wrapSpace = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].space.wrapSpace;
|
9380 | const _entities$environment = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environment,
|
9381 | wrapEnvironment = _entities$environment.wrapEnvironment,
|
9382 | wrapEnvironmentCollection = _entities$environment.wrapEnvironmentCollection;
|
9383 | const _entities$contentType = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].contentType,
|
9384 | wrapContentType = _entities$contentType.wrapContentType,
|
9385 | wrapContentTypeCollection = _entities$contentType.wrapContentTypeCollection;
|
9386 | const _entities$entry = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].entry,
|
9387 | wrapEntry = _entities$entry.wrapEntry,
|
9388 | wrapEntryCollection = _entities$entry.wrapEntryCollection;
|
9389 | const _entities$asset = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].asset,
|
9390 | wrapAsset = _entities$asset.wrapAsset,
|
9391 | wrapAssetCollection = _entities$asset.wrapAssetCollection;
|
9392 | const _entities$locale = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].locale,
|
9393 | wrapLocale = _entities$locale.wrapLocale,
|
9394 | wrapLocaleCollection = _entities$locale.wrapLocaleCollection;
|
9395 | const _entities$webhook = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].webhook,
|
9396 | wrapWebhook = _entities$webhook.wrapWebhook,
|
9397 | wrapWebhookCollection = _entities$webhook.wrapWebhookCollection;
|
9398 | const _entities$role = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].role,
|
9399 | wrapRole = _entities$role.wrapRole,
|
9400 | wrapRoleCollection = _entities$role.wrapRoleCollection;
|
9401 | const _entities$user = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].user,
|
9402 | wrapUser = _entities$user.wrapUser,
|
9403 | wrapUserCollection = _entities$user.wrapUserCollection;
|
9404 | const _entities$spaceMember = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMember,
|
9405 | wrapSpaceMember = _entities$spaceMember.wrapSpaceMember,
|
9406 | wrapSpaceMemberCollection = _entities$spaceMember.wrapSpaceMemberCollection;
|
9407 | const _entities$spaceMember2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].spaceMembership,
|
9408 | wrapSpaceMembership = _entities$spaceMember2.wrapSpaceMembership,
|
9409 | wrapSpaceMembershipCollection = _entities$spaceMember2.wrapSpaceMembershipCollection;
|
9410 | const _entities$teamSpaceMe = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].teamSpaceMembership,
|
9411 | wrapTeamSpaceMembership = _entities$teamSpaceMe.wrapTeamSpaceMembership,
|
9412 | wrapTeamSpaceMembershipCollection = _entities$teamSpaceMe.wrapTeamSpaceMembershipCollection;
|
9413 | const _entities$apiKey = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].apiKey,
|
9414 | wrapApiKey = _entities$apiKey.wrapApiKey,
|
9415 | wrapApiKeyCollection = _entities$apiKey.wrapApiKeyCollection;
|
9416 | const _entities$previewApiK = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].previewApiKey,
|
9417 | wrapPreviewApiKey = _entities$previewApiK.wrapPreviewApiKey,
|
9418 | wrapPreviewApiKeyCollection = _entities$previewApiK.wrapPreviewApiKeyCollection;
|
9419 | const wrapSnapshotCollection = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].snapshot.wrapSnapshotCollection;
|
9420 | const wrapEditorInterface = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].editorInterface.wrapEditorInterface;
|
9421 | const wrapUpload = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].upload.wrapUpload;
|
9422 | const _entities$uiExtension = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].uiExtension,
|
9423 | wrapUiExtension = _entities$uiExtension.wrapUiExtension,
|
9424 | wrapUiExtensionCollection = _entities$uiExtension.wrapUiExtensionCollection;
|
9425 | const _entities$environment2 = _entities__WEBPACK_IMPORTED_MODULE_3__["default"].environmentAlias,
|
9426 | wrapEnvironmentAlias = _entities$environment2.wrapEnvironmentAlias,
|
9427 | wrapEnvironmentAliasCollection = _entities$environment2.wrapEnvironmentAliasCollection;
|
9428 |
|
9429 | function createAsset(data) {
|
9430 | return http.post('assets', data).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9431 | }
|
9432 |
|
9433 | function createUpload(data) {
|
9434 | raiseDeprecationWarning('createUpload');
|
9435 | const file = data.file;
|
9436 |
|
9437 | if (!file) {
|
9438 | return Promise.reject(new Error('Unable to locate a file to upload.'));
|
9439 | }
|
9440 |
|
9441 | return httpUpload.post('uploads', file, {
|
9442 | headers: {
|
9443 | 'Content-Type': 'application/octet-stream'
|
9444 | }
|
9445 | }).then(uploadResponse => {
|
9446 | return wrapUpload(httpUpload, uploadResponse.data);
|
9447 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9448 | }
|
9449 | |
9450 |
|
9451 |
|
9452 |
|
9453 |
|
9454 |
|
9455 |
|
9456 |
|
9457 | function normalizeSelect(query) {
|
9458 | if (query.select && !/sys/i.test(query.select)) {
|
9459 | query.select += ',sys';
|
9460 | }
|
9461 | }
|
9462 |
|
9463 | return {
|
9464 | |
9465 |
|
9466 |
|
9467 |
|
9468 |
|
9469 |
|
9470 |
|
9471 |
|
9472 |
|
9473 |
|
9474 |
|
9475 |
|
9476 |
|
9477 |
|
9478 |
|
9479 |
|
9480 | delete: function deleteSpace() {
|
9481 | return http.delete('').then(() => {
|
9482 | }, _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9483 | },
|
9484 |
|
9485 | |
9486 |
|
9487 |
|
9488 |
|
9489 |
|
9490 |
|
9491 |
|
9492 |
|
9493 |
|
9494 |
|
9495 |
|
9496 |
|
9497 |
|
9498 |
|
9499 |
|
9500 |
|
9501 |
|
9502 |
|
9503 |
|
9504 | update: function updateSpace() {
|
9505 | const raw = this.toPlainObject();
|
9506 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
9507 | delete data.sys;
|
9508 | return http.put('', data, {
|
9509 | headers: {
|
9510 | 'X-Contentful-Version': raw.sys.version
|
9511 | }
|
9512 | }).then(response => wrapSpace(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9513 | },
|
9514 |
|
9515 | |
9516 |
|
9517 |
|
9518 |
|
9519 |
|
9520 |
|
9521 |
|
9522 |
|
9523 |
|
9524 |
|
9525 |
|
9526 |
|
9527 |
|
9528 |
|
9529 |
|
9530 |
|
9531 |
|
9532 | getEnvironment(id) {
|
9533 | return http.get('environments/' + id).then(response => wrapEnvironment(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9534 | },
|
9535 |
|
9536 | |
9537 |
|
9538 |
|
9539 |
|
9540 |
|
9541 |
|
9542 |
|
9543 |
|
9544 |
|
9545 |
|
9546 |
|
9547 |
|
9548 |
|
9549 |
|
9550 |
|
9551 |
|
9552 | getEnvironments() {
|
9553 | return http.get('environments').then(response => wrapEnvironmentCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9554 | },
|
9555 |
|
9556 | |
9557 |
|
9558 |
|
9559 |
|
9560 |
|
9561 |
|
9562 |
|
9563 |
|
9564 |
|
9565 |
|
9566 |
|
9567 |
|
9568 |
|
9569 |
|
9570 |
|
9571 |
|
9572 |
|
9573 | createEnvironment(data = {}) {
|
9574 | return http.post('environments', data).then(response => wrapEnvironment(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9575 | },
|
9576 |
|
9577 | |
9578 |
|
9579 |
|
9580 |
|
9581 |
|
9582 |
|
9583 |
|
9584 |
|
9585 |
|
9586 |
|
9587 |
|
9588 |
|
9589 |
|
9590 |
|
9591 |
|
9592 |
|
9593 |
|
9594 |
|
9595 |
|
9596 | createEnvironmentWithId(id, data, sourceEnvironmentId) {
|
9597 | return http.put('environments/' + id, data, {
|
9598 | headers: sourceEnvironmentId ? {
|
9599 | 'X-Contentful-Source-Environment': sourceEnvironmentId
|
9600 | } : {}
|
9601 | }).then(response => wrapEnvironment(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9602 | },
|
9603 |
|
9604 | |
9605 |
|
9606 |
|
9607 |
|
9608 |
|
9609 |
|
9610 |
|
9611 |
|
9612 |
|
9613 |
|
9614 |
|
9615 |
|
9616 |
|
9617 |
|
9618 |
|
9619 |
|
9620 |
|
9621 |
|
9622 | getContentType(id) {
|
9623 | raiseDeprecationWarning('getContentType');
|
9624 | return http.get('content_types/' + id).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9625 | },
|
9626 |
|
9627 | |
9628 |
|
9629 |
|
9630 |
|
9631 |
|
9632 |
|
9633 |
|
9634 |
|
9635 |
|
9636 |
|
9637 |
|
9638 |
|
9639 |
|
9640 |
|
9641 |
|
9642 |
|
9643 |
|
9644 |
|
9645 | getContentTypes(query = {}) {
|
9646 | raiseDeprecationWarning('getContentTypes');
|
9647 | return http.get('content_types', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9648 | query: query
|
9649 | })).then(response => wrapContentTypeCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9650 | },
|
9651 |
|
9652 | |
9653 |
|
9654 |
|
9655 |
|
9656 |
|
9657 |
|
9658 |
|
9659 |
|
9660 |
|
9661 |
|
9662 |
|
9663 |
|
9664 |
|
9665 |
|
9666 |
|
9667 |
|
9668 |
|
9669 |
|
9670 |
|
9671 |
|
9672 |
|
9673 |
|
9674 |
|
9675 |
|
9676 |
|
9677 |
|
9678 |
|
9679 |
|
9680 |
|
9681 | createContentType(data) {
|
9682 | raiseDeprecationWarning('createContentType');
|
9683 | return http.post('content_types', data).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9684 | },
|
9685 |
|
9686 | |
9687 |
|
9688 |
|
9689 |
|
9690 |
|
9691 |
|
9692 |
|
9693 |
|
9694 |
|
9695 |
|
9696 |
|
9697 |
|
9698 |
|
9699 |
|
9700 |
|
9701 |
|
9702 |
|
9703 |
|
9704 |
|
9705 |
|
9706 |
|
9707 |
|
9708 |
|
9709 |
|
9710 |
|
9711 |
|
9712 |
|
9713 |
|
9714 |
|
9715 |
|
9716 | createContentTypeWithId(id, data) {
|
9717 | raiseDeprecationWarning('createContentTypeWithId');
|
9718 | return http.put('content_types/' + id, data).then(response => wrapContentType(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9719 | },
|
9720 |
|
9721 | |
9722 |
|
9723 |
|
9724 |
|
9725 |
|
9726 |
|
9727 |
|
9728 |
|
9729 |
|
9730 |
|
9731 |
|
9732 |
|
9733 |
|
9734 |
|
9735 |
|
9736 |
|
9737 |
|
9738 |
|
9739 | getEditorInterfaceForContentType(contentTypeId) {
|
9740 | raiseDeprecationWarning('getEditorInterfaceForContentType');
|
9741 | return http.get('content_types/' + contentTypeId + '/editor_interface').then(response => wrapEditorInterface(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9742 | },
|
9743 |
|
9744 | |
9745 |
|
9746 |
|
9747 |
|
9748 |
|
9749 |
|
9750 |
|
9751 |
|
9752 |
|
9753 |
|
9754 |
|
9755 |
|
9756 |
|
9757 |
|
9758 |
|
9759 |
|
9760 |
|
9761 |
|
9762 |
|
9763 |
|
9764 |
|
9765 | getEntry(id, query = {}) {
|
9766 | raiseDeprecationWarning('getEntry');
|
9767 | normalizeSelect(query);
|
9768 | return http.get('entries/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9769 | query: query
|
9770 | })).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9771 | },
|
9772 |
|
9773 | |
9774 |
|
9775 |
|
9776 |
|
9777 |
|
9778 |
|
9779 |
|
9780 |
|
9781 |
|
9782 |
|
9783 |
|
9784 |
|
9785 |
|
9786 |
|
9787 |
|
9788 |
|
9789 |
|
9790 |
|
9791 |
|
9792 |
|
9793 | getEntries(query = {}) {
|
9794 | raiseDeprecationWarning('getEntries');
|
9795 | normalizeSelect(query);
|
9796 | return http.get('entries', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9797 | query: query
|
9798 | })).then(response => wrapEntryCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9799 | },
|
9800 |
|
9801 | |
9802 |
|
9803 |
|
9804 |
|
9805 |
|
9806 |
|
9807 |
|
9808 |
|
9809 |
|
9810 |
|
9811 |
|
9812 |
|
9813 |
|
9814 |
|
9815 |
|
9816 |
|
9817 |
|
9818 |
|
9819 |
|
9820 |
|
9821 |
|
9822 |
|
9823 |
|
9824 |
|
9825 |
|
9826 | createEntry(contentTypeId, data) {
|
9827 | raiseDeprecationWarning('createEntry');
|
9828 | return http.post('entries', data, {
|
9829 | headers: {
|
9830 | 'X-Contentful-Content-Type': contentTypeId
|
9831 | }
|
9832 | }).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9833 | },
|
9834 |
|
9835 | |
9836 |
|
9837 |
|
9838 |
|
9839 |
|
9840 |
|
9841 |
|
9842 |
|
9843 |
|
9844 |
|
9845 |
|
9846 |
|
9847 |
|
9848 |
|
9849 |
|
9850 |
|
9851 |
|
9852 |
|
9853 |
|
9854 |
|
9855 |
|
9856 |
|
9857 |
|
9858 |
|
9859 |
|
9860 |
|
9861 |
|
9862 | createEntryWithId(contentTypeId, id, data) {
|
9863 | raiseDeprecationWarning('createEntryWithId');
|
9864 | return http.put('entries/' + id, data, {
|
9865 | headers: {
|
9866 | 'X-Contentful-Content-Type': contentTypeId
|
9867 | }
|
9868 | }).then(response => wrapEntry(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9869 | },
|
9870 |
|
9871 | |
9872 |
|
9873 |
|
9874 |
|
9875 |
|
9876 |
|
9877 |
|
9878 |
|
9879 |
|
9880 |
|
9881 |
|
9882 |
|
9883 |
|
9884 |
|
9885 |
|
9886 |
|
9887 |
|
9888 | createUpload,
|
9889 |
|
9890 | |
9891 |
|
9892 |
|
9893 |
|
9894 |
|
9895 |
|
9896 |
|
9897 |
|
9898 |
|
9899 |
|
9900 |
|
9901 |
|
9902 |
|
9903 |
|
9904 |
|
9905 |
|
9906 |
|
9907 |
|
9908 |
|
9909 |
|
9910 |
|
9911 |
|
9912 |
|
9913 |
|
9914 |
|
9915 |
|
9916 |
|
9917 |
|
9918 |
|
9919 |
|
9920 |
|
9921 | createAsset,
|
9922 |
|
9923 | |
9924 |
|
9925 |
|
9926 |
|
9927 |
|
9928 |
|
9929 |
|
9930 |
|
9931 |
|
9932 |
|
9933 |
|
9934 |
|
9935 |
|
9936 |
|
9937 |
|
9938 |
|
9939 |
|
9940 |
|
9941 |
|
9942 |
|
9943 |
|
9944 | getAsset(id, query = {}) {
|
9945 | raiseDeprecationWarning('getAsset');
|
9946 | normalizeSelect(query);
|
9947 | return http.get('assets/' + id, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9948 | query: query
|
9949 | })).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9950 | },
|
9951 |
|
9952 | |
9953 |
|
9954 |
|
9955 |
|
9956 |
|
9957 |
|
9958 |
|
9959 |
|
9960 |
|
9961 |
|
9962 |
|
9963 |
|
9964 |
|
9965 |
|
9966 |
|
9967 |
|
9968 |
|
9969 |
|
9970 |
|
9971 |
|
9972 | getAssets(query = {}) {
|
9973 | raiseDeprecationWarning('getAssets');
|
9974 | normalizeSelect(query);
|
9975 | return http.get('assets', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
9976 | query: query
|
9977 | })).then(response => wrapAssetCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
9978 | },
|
9979 |
|
9980 | |
9981 |
|
9982 |
|
9983 |
|
9984 |
|
9985 |
|
9986 |
|
9987 |
|
9988 |
|
9989 |
|
9990 |
|
9991 |
|
9992 |
|
9993 |
|
9994 |
|
9995 |
|
9996 |
|
9997 |
|
9998 |
|
9999 |
|
10000 |
|
10001 |
|
10002 |
|
10003 |
|
10004 |
|
10005 |
|
10006 |
|
10007 |
|
10008 |
|
10009 |
|
10010 | createAssetWithId(id, data) {
|
10011 | raiseDeprecationWarning('createAssetWithId');
|
10012 | return http.put('assets/' + id, data).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10013 | },
|
10014 |
|
10015 | |
10016 |
|
10017 |
|
10018 |
|
10019 |
|
10020 |
|
10021 |
|
10022 |
|
10023 |
|
10024 |
|
10025 |
|
10026 |
|
10027 |
|
10028 |
|
10029 |
|
10030 |
|
10031 |
|
10032 |
|
10033 |
|
10034 |
|
10035 |
|
10036 |
|
10037 |
|
10038 |
|
10039 |
|
10040 |
|
10041 |
|
10042 |
|
10043 |
|
10044 |
|
10045 |
|
10046 | createAssetFromFiles(data) {
|
10047 | raiseDeprecationWarning('createAssetFromFiles');
|
10048 | const file = data.fields.file;
|
10049 | return Promise.all(Object.keys(file).map(locale => {
|
10050 | const _file$locale = file[locale],
|
10051 | contentType = _file$locale.contentType,
|
10052 | fileName = _file$locale.fileName;
|
10053 | return createUpload(file[locale]).then(upload => {
|
10054 | return {
|
10055 | [locale]: {
|
10056 | contentType,
|
10057 | fileName,
|
10058 | uploadFrom: {
|
10059 | sys: {
|
10060 | type: 'Link',
|
10061 | linkType: 'Upload',
|
10062 | id: upload.sys.id
|
10063 | }
|
10064 | }
|
10065 | }
|
10066 | };
|
10067 | });
|
10068 | })).then(uploads => {
|
10069 |
|
10070 | data.fields.file = uploads.reduce((fieldsData, upload) => {
|
10071 | return _objectSpread(_objectSpread({}, fieldsData), upload);
|
10072 | }, {});
|
10073 | return createAsset(data);
|
10074 | }).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10075 | },
|
10076 |
|
10077 | |
10078 |
|
10079 |
|
10080 |
|
10081 |
|
10082 |
|
10083 |
|
10084 |
|
10085 |
|
10086 |
|
10087 |
|
10088 |
|
10089 |
|
10090 |
|
10091 |
|
10092 |
|
10093 | getUpload(id) {
|
10094 | raiseDeprecationWarning('getUpload');
|
10095 | return httpUpload.get('uploads/' + id).then(response => wrapUpload(http, response.data)).catch(_error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10096 | },
|
10097 |
|
10098 | |
10099 |
|
10100 |
|
10101 |
|
10102 |
|
10103 |
|
10104 |
|
10105 |
|
10106 |
|
10107 |
|
10108 |
|
10109 |
|
10110 |
|
10111 |
|
10112 |
|
10113 |
|
10114 |
|
10115 |
|
10116 | getLocale(id) {
|
10117 | raiseDeprecationWarning('getLocale');
|
10118 | return http.get('locales/' + id).then(response => wrapLocale(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10119 | },
|
10120 |
|
10121 | |
10122 |
|
10123 |
|
10124 |
|
10125 |
|
10126 |
|
10127 |
|
10128 |
|
10129 |
|
10130 |
|
10131 |
|
10132 |
|
10133 |
|
10134 |
|
10135 |
|
10136 |
|
10137 |
|
10138 | getLocales() {
|
10139 | raiseDeprecationWarning('getLocales');
|
10140 | return http.get('locales').then(response => wrapLocaleCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10141 | },
|
10142 |
|
10143 | |
10144 |
|
10145 |
|
10146 |
|
10147 |
|
10148 |
|
10149 |
|
10150 |
|
10151 |
|
10152 |
|
10153 |
|
10154 |
|
10155 |
|
10156 |
|
10157 |
|
10158 |
|
10159 |
|
10160 |
|
10161 |
|
10162 |
|
10163 |
|
10164 |
|
10165 |
|
10166 |
|
10167 | createLocale(data) {
|
10168 | raiseDeprecationWarning('createLocale');
|
10169 | return http.post('locales', data).then(response => wrapLocale(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10170 | },
|
10171 |
|
10172 | |
10173 |
|
10174 |
|
10175 |
|
10176 |
|
10177 |
|
10178 |
|
10179 |
|
10180 |
|
10181 |
|
10182 |
|
10183 |
|
10184 |
|
10185 |
|
10186 |
|
10187 |
|
10188 |
|
10189 | getWebhook(id) {
|
10190 | return http.get('webhook_definitions/' + id).then(response => wrapWebhook(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10191 | },
|
10192 |
|
10193 | |
10194 |
|
10195 |
|
10196 |
|
10197 |
|
10198 |
|
10199 |
|
10200 |
|
10201 |
|
10202 |
|
10203 |
|
10204 |
|
10205 |
|
10206 |
|
10207 |
|
10208 |
|
10209 | getWebhooks() {
|
10210 | return http.get('webhook_definitions').then(response => wrapWebhookCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10211 | },
|
10212 |
|
10213 | |
10214 |
|
10215 |
|
10216 |
|
10217 |
|
10218 |
|
10219 |
|
10220 |
|
10221 |
|
10222 |
|
10223 |
|
10224 |
|
10225 |
|
10226 |
|
10227 |
|
10228 |
|
10229 |
|
10230 |
|
10231 |
|
10232 |
|
10233 |
|
10234 |
|
10235 | createWebhook(data) {
|
10236 | return http.post('webhook_definitions', data).then(response => wrapWebhook(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10237 | },
|
10238 |
|
10239 | |
10240 |
|
10241 |
|
10242 |
|
10243 |
|
10244 |
|
10245 |
|
10246 |
|
10247 |
|
10248 |
|
10249 |
|
10250 |
|
10251 |
|
10252 |
|
10253 |
|
10254 |
|
10255 |
|
10256 |
|
10257 |
|
10258 |
|
10259 |
|
10260 |
|
10261 |
|
10262 | createWebhookWithId(id, data) {
|
10263 | return http.put('webhook_definitions/' + id, data).then(response => wrapWebhook(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10264 | },
|
10265 |
|
10266 | |
10267 |
|
10268 |
|
10269 |
|
10270 |
|
10271 |
|
10272 |
|
10273 |
|
10274 |
|
10275 |
|
10276 |
|
10277 |
|
10278 |
|
10279 |
|
10280 |
|
10281 |
|
10282 |
|
10283 |
|
10284 |
|
10285 |
|
10286 |
|
10287 |
|
10288 |
|
10289 | getRole(id) {
|
10290 | return http.get('roles/' + id).then(response => wrapRole(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10291 | },
|
10292 |
|
10293 | |
10294 |
|
10295 |
|
10296 |
|
10297 |
|
10298 |
|
10299 |
|
10300 |
|
10301 |
|
10302 |
|
10303 |
|
10304 |
|
10305 |
|
10306 |
|
10307 |
|
10308 |
|
10309 | getRoles() {
|
10310 | return http.get('roles').then(response => wrapRoleCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10311 | },
|
10312 |
|
10313 | |
10314 |
|
10315 |
|
10316 |
|
10317 |
|
10318 |
|
10319 |
|
10320 |
|
10321 |
|
10322 |
|
10323 |
|
10324 |
|
10325 |
|
10326 |
|
10327 |
|
10328 |
|
10329 |
|
10330 |
|
10331 |
|
10332 |
|
10333 |
|
10334 |
|
10335 |
|
10336 |
|
10337 |
|
10338 |
|
10339 |
|
10340 |
|
10341 |
|
10342 |
|
10343 |
|
10344 |
|
10345 |
|
10346 |
|
10347 |
|
10348 |
|
10349 |
|
10350 |
|
10351 |
|
10352 |
|
10353 |
|
10354 |
|
10355 |
|
10356 |
|
10357 |
|
10358 |
|
10359 | createRole(data) {
|
10360 | return http.post('roles', data).then(response => wrapRole(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10361 | },
|
10362 |
|
10363 | |
10364 |
|
10365 |
|
10366 |
|
10367 |
|
10368 |
|
10369 |
|
10370 |
|
10371 |
|
10372 |
|
10373 |
|
10374 |
|
10375 |
|
10376 |
|
10377 |
|
10378 |
|
10379 |
|
10380 |
|
10381 |
|
10382 |
|
10383 |
|
10384 |
|
10385 |
|
10386 |
|
10387 |
|
10388 |
|
10389 |
|
10390 |
|
10391 |
|
10392 |
|
10393 |
|
10394 |
|
10395 |
|
10396 |
|
10397 |
|
10398 |
|
10399 |
|
10400 |
|
10401 |
|
10402 |
|
10403 |
|
10404 |
|
10405 |
|
10406 |
|
10407 |
|
10408 |
|
10409 |
|
10410 | createRoleWithId(id, data) {
|
10411 | return http.put('roles/' + id, data).then(response => wrapRole(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10412 | },
|
10413 |
|
10414 | |
10415 |
|
10416 |
|
10417 |
|
10418 |
|
10419 |
|
10420 |
|
10421 |
|
10422 |
|
10423 |
|
10424 |
|
10425 |
|
10426 |
|
10427 | getSpaceUser(id) {
|
10428 | return http.get('users/' + id).then(response => wrapUser(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10429 | },
|
10430 |
|
10431 | |
10432 |
|
10433 |
|
10434 |
|
10435 |
|
10436 |
|
10437 |
|
10438 |
|
10439 |
|
10440 |
|
10441 |
|
10442 |
|
10443 |
|
10444 | getSpaceUsers(query = {}) {
|
10445 | return http.get('users/', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10446 | query: query
|
10447 | })).then(response => wrapUserCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10448 | },
|
10449 |
|
10450 | |
10451 |
|
10452 |
|
10453 |
|
10454 |
|
10455 |
|
10456 |
|
10457 |
|
10458 |
|
10459 |
|
10460 |
|
10461 |
|
10462 |
|
10463 | getSpaceMember(id) {
|
10464 | return http.get('space_members/' + id).then(response => wrapSpaceMember(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10465 | },
|
10466 |
|
10467 | |
10468 |
|
10469 |
|
10470 |
|
10471 |
|
10472 |
|
10473 |
|
10474 |
|
10475 |
|
10476 |
|
10477 |
|
10478 |
|
10479 |
|
10480 | getSpaceMembers(query = {}) {
|
10481 | return http.get('space_members', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10482 | query: query
|
10483 | })).then(response => wrapSpaceMemberCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10484 | },
|
10485 |
|
10486 | |
10487 |
|
10488 |
|
10489 |
|
10490 |
|
10491 |
|
10492 |
|
10493 |
|
10494 |
|
10495 |
|
10496 |
|
10497 |
|
10498 |
|
10499 |
|
10500 | getSpaceMembership(id) {
|
10501 | spaceMembershipDeprecationWarning();
|
10502 | return http.get('space_memberships/' + id).then(response => wrapSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10503 | },
|
10504 |
|
10505 | |
10506 |
|
10507 |
|
10508 |
|
10509 |
|
10510 |
|
10511 |
|
10512 |
|
10513 |
|
10514 |
|
10515 |
|
10516 |
|
10517 |
|
10518 |
|
10519 | getSpaceMemberships(query = {}) {
|
10520 | spaceMembershipDeprecationWarning();
|
10521 | return http.get('space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10522 | query: query
|
10523 | })).then(response => wrapSpaceMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10524 | },
|
10525 |
|
10526 | |
10527 |
|
10528 |
|
10529 |
|
10530 |
|
10531 |
|
10532 |
|
10533 |
|
10534 |
|
10535 |
|
10536 |
|
10537 |
|
10538 |
|
10539 |
|
10540 |
|
10541 |
|
10542 |
|
10543 |
|
10544 |
|
10545 |
|
10546 |
|
10547 |
|
10548 |
|
10549 |
|
10550 |
|
10551 |
|
10552 |
|
10553 |
|
10554 | createSpaceMembership(data) {
|
10555 | spaceMembershipDeprecationWarning();
|
10556 | return http.post('space_memberships', data).then(response => wrapSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10557 | },
|
10558 |
|
10559 | |
10560 |
|
10561 |
|
10562 |
|
10563 |
|
10564 |
|
10565 |
|
10566 |
|
10567 |
|
10568 |
|
10569 |
|
10570 |
|
10571 |
|
10572 |
|
10573 |
|
10574 |
|
10575 |
|
10576 |
|
10577 |
|
10578 |
|
10579 |
|
10580 |
|
10581 |
|
10582 |
|
10583 |
|
10584 |
|
10585 |
|
10586 |
|
10587 |
|
10588 | createSpaceMembershipWithId(id, data) {
|
10589 | spaceMembershipDeprecationWarning();
|
10590 | return http.put('space_memberships/' + id, data).then(response => wrapSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10591 | },
|
10592 |
|
10593 | |
10594 |
|
10595 |
|
10596 |
|
10597 |
|
10598 |
|
10599 |
|
10600 |
|
10601 |
|
10602 |
|
10603 |
|
10604 |
|
10605 |
|
10606 | getTeamSpaceMembership(teamSpaceMembershipId) {
|
10607 | return http.get('team_space_memberships/' + teamSpaceMembershipId).then(response => wrapTeamSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10608 | },
|
10609 |
|
10610 | |
10611 |
|
10612 |
|
10613 |
|
10614 |
|
10615 |
|
10616 |
|
10617 |
|
10618 |
|
10619 |
|
10620 |
|
10621 |
|
10622 |
|
10623 | getTeamSpaceMemberships(query = {}) {
|
10624 | return http.get('team_space_memberships', Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10625 | query: query
|
10626 | })).then(response => wrapTeamSpaceMembershipCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10627 | },
|
10628 |
|
10629 | |
10630 |
|
10631 |
|
10632 |
|
10633 |
|
10634 |
|
10635 |
|
10636 |
|
10637 |
|
10638 |
|
10639 |
|
10640 |
|
10641 |
|
10642 |
|
10643 |
|
10644 |
|
10645 |
|
10646 |
|
10647 |
|
10648 |
|
10649 |
|
10650 |
|
10651 |
|
10652 |
|
10653 |
|
10654 |
|
10655 |
|
10656 |
|
10657 |
|
10658 | createTeamSpaceMembership(teamId, data) {
|
10659 | return http.post('team_space_memberships', data, {
|
10660 | headers: {
|
10661 | 'x-contentful-team': teamId
|
10662 | }
|
10663 | }).then(response => wrapTeamSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10664 | },
|
10665 |
|
10666 | |
10667 |
|
10668 |
|
10669 |
|
10670 |
|
10671 |
|
10672 |
|
10673 |
|
10674 |
|
10675 |
|
10676 |
|
10677 |
|
10678 |
|
10679 |
|
10680 |
|
10681 |
|
10682 |
|
10683 | getApiKey(id) {
|
10684 | return http.get('api_keys/' + id).then(response => wrapApiKey(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10685 | },
|
10686 |
|
10687 | |
10688 |
|
10689 |
|
10690 |
|
10691 |
|
10692 |
|
10693 |
|
10694 |
|
10695 |
|
10696 |
|
10697 |
|
10698 |
|
10699 |
|
10700 |
|
10701 |
|
10702 |
|
10703 | getApiKeys() {
|
10704 | return http.get('api_keys').then(response => wrapApiKeyCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10705 | },
|
10706 |
|
10707 | |
10708 |
|
10709 |
|
10710 |
|
10711 |
|
10712 |
|
10713 |
|
10714 |
|
10715 |
|
10716 |
|
10717 |
|
10718 |
|
10719 |
|
10720 |
|
10721 |
|
10722 |
|
10723 | getPreviewApiKeys() {
|
10724 | return http.get('preview_api_keys').then(response => wrapPreviewApiKeyCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10725 | },
|
10726 |
|
10727 | |
10728 |
|
10729 |
|
10730 |
|
10731 |
|
10732 |
|
10733 |
|
10734 |
|
10735 |
|
10736 |
|
10737 |
|
10738 |
|
10739 |
|
10740 |
|
10741 |
|
10742 |
|
10743 |
|
10744 | getPreviewApiKey(id) {
|
10745 | return http.get('preview_api_keys/' + id).then(response => wrapPreviewApiKey(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10746 | },
|
10747 |
|
10748 | |
10749 |
|
10750 |
|
10751 |
|
10752 |
|
10753 |
|
10754 |
|
10755 |
|
10756 |
|
10757 |
|
10758 |
|
10759 |
|
10760 |
|
10761 |
|
10762 |
|
10763 |
|
10764 |
|
10765 |
|
10766 |
|
10767 |
|
10768 |
|
10769 |
|
10770 |
|
10771 |
|
10772 |
|
10773 |
|
10774 |
|
10775 |
|
10776 |
|
10777 | createApiKey: function createApiKey(data) {
|
10778 | return http.post('api_keys', data).then(response => wrapApiKey(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10779 | },
|
10780 |
|
10781 | |
10782 |
|
10783 |
|
10784 |
|
10785 |
|
10786 |
|
10787 |
|
10788 |
|
10789 |
|
10790 |
|
10791 |
|
10792 |
|
10793 |
|
10794 |
|
10795 |
|
10796 |
|
10797 |
|
10798 |
|
10799 |
|
10800 |
|
10801 |
|
10802 |
|
10803 |
|
10804 |
|
10805 |
|
10806 |
|
10807 |
|
10808 |
|
10809 |
|
10810 |
|
10811 | createApiKeyWithId(id, data) {
|
10812 | return http.put('api_keys/' + id, data).then(response => wrapApiKey(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10813 | },
|
10814 |
|
10815 | |
10816 |
|
10817 |
|
10818 |
|
10819 |
|
10820 |
|
10821 |
|
10822 |
|
10823 |
|
10824 |
|
10825 |
|
10826 |
|
10827 |
|
10828 |
|
10829 |
|
10830 |
|
10831 |
|
10832 |
|
10833 | getUiExtension(id) {
|
10834 | raiseDeprecationWarning('getUiExtension');
|
10835 | return http.get('extensions/' + id).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10836 | },
|
10837 |
|
10838 | |
10839 |
|
10840 |
|
10841 |
|
10842 |
|
10843 |
|
10844 |
|
10845 |
|
10846 |
|
10847 |
|
10848 |
|
10849 |
|
10850 |
|
10851 |
|
10852 |
|
10853 |
|
10854 |
|
10855 | getUiExtensions() {
|
10856 | raiseDeprecationWarning('getUiExtensions');
|
10857 | return http.get('extensions').then(response => wrapUiExtensionCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10858 | },
|
10859 |
|
10860 | |
10861 |
|
10862 |
|
10863 |
|
10864 |
|
10865 |
|
10866 |
|
10867 |
|
10868 |
|
10869 |
|
10870 |
|
10871 |
|
10872 |
|
10873 |
|
10874 |
|
10875 |
|
10876 |
|
10877 |
|
10878 |
|
10879 |
|
10880 |
|
10881 |
|
10882 |
|
10883 |
|
10884 |
|
10885 |
|
10886 |
|
10887 |
|
10888 |
|
10889 |
|
10890 |
|
10891 |
|
10892 | createUiExtension(data) {
|
10893 | raiseDeprecationWarning('createUiExtension');
|
10894 | return http.post('extensions', data).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10895 | },
|
10896 |
|
10897 | |
10898 |
|
10899 |
|
10900 |
|
10901 |
|
10902 |
|
10903 |
|
10904 |
|
10905 |
|
10906 |
|
10907 |
|
10908 |
|
10909 |
|
10910 |
|
10911 |
|
10912 |
|
10913 |
|
10914 |
|
10915 |
|
10916 |
|
10917 |
|
10918 |
|
10919 |
|
10920 |
|
10921 |
|
10922 |
|
10923 |
|
10924 |
|
10925 |
|
10926 |
|
10927 |
|
10928 |
|
10929 |
|
10930 | createUiExtensionWithId(id, data) {
|
10931 | raiseDeprecationWarning('createUiExtensionWithId');
|
10932 | return http.put('extensions/' + id, data).then(response => wrapUiExtension(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10933 | },
|
10934 |
|
10935 | |
10936 |
|
10937 |
|
10938 |
|
10939 |
|
10940 |
|
10941 |
|
10942 |
|
10943 |
|
10944 |
|
10945 |
|
10946 |
|
10947 |
|
10948 |
|
10949 |
|
10950 |
|
10951 |
|
10952 |
|
10953 |
|
10954 | getEntrySnapshots(entryId, query = {}) {
|
10955 | raiseDeprecationWarning('getEntrySnapshots');
|
10956 | return http.get(`entries/${entryId}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10957 | query: query
|
10958 | })).then(response => wrapSnapshotCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10959 | },
|
10960 |
|
10961 | |
10962 |
|
10963 |
|
10964 |
|
10965 |
|
10966 |
|
10967 |
|
10968 |
|
10969 |
|
10970 |
|
10971 |
|
10972 |
|
10973 |
|
10974 |
|
10975 |
|
10976 |
|
10977 |
|
10978 |
|
10979 |
|
10980 | getContentTypeSnapshots(contentTypeId, query = {}) {
|
10981 | raiseDeprecationWarning('getContentTypeSnapshots');
|
10982 | return http.get(`content_types/${contentTypeId}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
10983 | query: query
|
10984 | })).then(response => wrapSnapshotCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
10985 | },
|
10986 |
|
10987 | |
10988 |
|
10989 |
|
10990 |
|
10991 |
|
10992 |
|
10993 |
|
10994 |
|
10995 |
|
10996 |
|
10997 |
|
10998 |
|
10999 |
|
11000 |
|
11001 |
|
11002 |
|
11003 |
|
11004 | getEnvironmentAlias(id) {
|
11005 | return http.get('environment_aliases/' + id).then(response => wrapEnvironmentAlias(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
11006 | },
|
11007 |
|
11008 | |
11009 |
|
11010 |
|
11011 |
|
11012 |
|
11013 |
|
11014 |
|
11015 |
|
11016 |
|
11017 |
|
11018 |
|
11019 |
|
11020 |
|
11021 |
|
11022 |
|
11023 |
|
11024 | getEnvironmentAliases() {
|
11025 | return http.get('environment_aliases').then(response => wrapEnvironmentAliasCollection(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
11026 | }
|
11027 |
|
11028 | };
|
11029 | }
|
11030 |
|
11031 | }),
|
11032 |
|
11033 | "./enhance-with-methods.ts":
|
11034 |
|
11035 |
|
11036 |
|
11037 |
|
11038 | (function(module, __webpack_exports__, __webpack_require__) {
|
11039 |
|
11040 | "use strict";
|
11041 | __webpack_require__.r(__webpack_exports__);
|
11042 | __webpack_require__.d(__webpack_exports__, "default", function() { return enhanceWithMethods; });
|
11043 |
|
11044 |
|
11045 |
|
11046 |
|
11047 |
|
11048 |
|
11049 |
|
11050 |
|
11051 |
|
11052 |
|
11053 |
|
11054 | function enhanceWithMethods(baseObject, methodsObject) {
|
11055 |
|
11056 | return Object.keys(methodsObject).reduce((enhancedObject, methodName) => {
|
11057 | Object.defineProperty(enhancedObject, methodName, {
|
11058 | enumerable: false,
|
11059 | configurable: true,
|
11060 | writable: false,
|
11061 | value: methodsObject[methodName]
|
11062 | });
|
11063 | return enhancedObject;
|
11064 | }, baseObject);
|
11065 | }
|
11066 |
|
11067 | }),
|
11068 |
|
11069 | "./entities/api-key.ts":
|
11070 |
|
11071 |
|
11072 |
|
11073 |
|
11074 | (function(module, __webpack_exports__, __webpack_require__) {
|
11075 |
|
11076 | "use strict";
|
11077 | __webpack_require__.r(__webpack_exports__);
|
11078 | __webpack_require__.d(__webpack_exports__, "wrapApiKey", function() { return wrapApiKey; });
|
11079 | __webpack_require__.d(__webpack_exports__, "wrapApiKeyCollection", function() { return wrapApiKeyCollection; });
|
11080 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11081 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11082 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11083 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11084 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11085 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11086 |
|
11087 |
|
11088 |
|
11089 |
|
11090 |
|
11091 |
|
11092 | function createApiKeyApi(http) {
|
11093 | return {
|
11094 | update: function update() {
|
11095 | const self = this;
|
11096 |
|
11097 | if ('accessToken' in self) {
|
11098 | delete self.accessToken;
|
11099 | }
|
11100 |
|
11101 | if ('preview_api_key' in self) {
|
11102 | delete self.preview_api_key;
|
11103 | }
|
11104 |
|
11105 | if ('policies' in self) {
|
11106 | delete self.policies;
|
11107 | }
|
11108 |
|
11109 | const update = Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
11110 | http: http,
|
11111 | entityPath: 'api_keys',
|
11112 | wrapperMethod: wrapApiKey
|
11113 | });
|
11114 | return update.call(self);
|
11115 | },
|
11116 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
11117 | http: http,
|
11118 | entityPath: 'api_keys'
|
11119 | })
|
11120 | };
|
11121 | }
|
11122 |
|
11123 |
|
11124 |
|
11125 |
|
11126 |
|
11127 |
|
11128 |
|
11129 | function wrapApiKey(http, data) {
|
11130 | const apiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11131 | const apiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(apiKey, createApiKeyApi(http));
|
11132 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(apiKeyWithMethods);
|
11133 | }
|
11134 |
|
11135 |
|
11136 |
|
11137 |
|
11138 |
|
11139 |
|
11140 |
|
11141 | const wrapApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapApiKey);
|
11142 |
|
11143 | }),
|
11144 |
|
11145 | "./entities/app-definition.ts":
|
11146 |
|
11147 |
|
11148 |
|
11149 |
|
11150 | (function(module, __webpack_exports__, __webpack_require__) {
|
11151 |
|
11152 | "use strict";
|
11153 | __webpack_require__.r(__webpack_exports__);
|
11154 | __webpack_require__.d(__webpack_exports__, "wrapAppDefinition", function() { return wrapAppDefinition; });
|
11155 | __webpack_require__.d(__webpack_exports__, "wrapAppDefinitionCollection", function() { return wrapAppDefinitionCollection; });
|
11156 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11157 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11158 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11159 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11160 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11161 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11162 |
|
11163 |
|
11164 |
|
11165 |
|
11166 |
|
11167 | const entityPath = 'app_definitions';
|
11168 |
|
11169 | function createAppDefinitionApi(http) {
|
11170 | return {
|
11171 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
11172 | http,
|
11173 | entityPath,
|
11174 | wrapperMethod: wrapAppDefinition
|
11175 | }),
|
11176 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
11177 | http,
|
11178 | entityPath
|
11179 | })
|
11180 | };
|
11181 | }
|
11182 |
|
11183 |
|
11184 |
|
11185 |
|
11186 |
|
11187 |
|
11188 |
|
11189 |
|
11190 | function wrapAppDefinition(http, data) {
|
11191 | const appDefinition = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11192 | const appDefinitionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(appDefinition, createAppDefinitionApi(http));
|
11193 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(appDefinitionWithMethods);
|
11194 | }
|
11195 |
|
11196 |
|
11197 |
|
11198 |
|
11199 |
|
11200 |
|
11201 |
|
11202 | const wrapAppDefinitionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAppDefinition);
|
11203 |
|
11204 | }),
|
11205 |
|
11206 | "./entities/app-installation.ts":
|
11207 |
|
11208 |
|
11209 |
|
11210 |
|
11211 | (function(module, __webpack_exports__, __webpack_require__) {
|
11212 |
|
11213 | "use strict";
|
11214 | __webpack_require__.r(__webpack_exports__);
|
11215 | __webpack_require__.d(__webpack_exports__, "wrapAppInstallation", function() { return wrapAppInstallation; });
|
11216 | __webpack_require__.d(__webpack_exports__, "wrapAppInstallationCollection", function() { return wrapAppInstallationCollection; });
|
11217 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11218 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11219 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
|
11220 | var _error_handler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./error-handler.ts");
|
11221 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./enhance-with-methods.ts");
|
11222 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11223 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
11224 |
|
11225 |
|
11226 |
|
11227 |
|
11228 |
|
11229 |
|
11230 |
|
11231 | function createAppInstallationApi(http) {
|
11232 | return {
|
11233 | update: function update() {
|
11234 | const self = this;
|
11235 | const raw = self.toPlainObject();
|
11236 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(raw);
|
11237 | delete data.sys;
|
11238 | return http.put(`app_installations/${self.sys.appDefinition.sys.id}`, data).then(response => wrapAppInstallation(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
11239 | },
|
11240 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11241 | http: http,
|
11242 | entityPath: 'app_installations'
|
11243 | })
|
11244 | };
|
11245 | }
|
11246 |
|
11247 |
|
11248 |
|
11249 |
|
11250 |
|
11251 |
|
11252 |
|
11253 |
|
11254 | function wrapAppInstallation(http, data) {
|
11255 | const appInstallation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
|
11256 | const appInstallationWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_3__["default"])(appInstallation, createAppInstallationApi(http));
|
11257 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(appInstallationWithMethods);
|
11258 | }
|
11259 |
|
11260 |
|
11261 |
|
11262 |
|
11263 | const wrapAppInstallationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapAppInstallation);
|
11264 |
|
11265 | }),
|
11266 |
|
11267 | "./entities/asset.ts":
|
11268 |
|
11269 |
|
11270 |
|
11271 |
|
11272 | (function(module, __webpack_exports__, __webpack_require__) {
|
11273 |
|
11274 | "use strict";
|
11275 | __webpack_require__.r(__webpack_exports__);
|
11276 | __webpack_require__.d(__webpack_exports__, "wrapAsset", function() { return wrapAsset; });
|
11277 | __webpack_require__.d(__webpack_exports__, "wrapAssetCollection", function() { return wrapAssetCollection; });
|
11278 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11279 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11280 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11281 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11282 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
11283 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11284 | var _instance_actions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./instance-actions.ts");
|
11285 |
|
11286 |
|
11287 |
|
11288 |
|
11289 |
|
11290 |
|
11291 | const ASSET_PROCESSING_CHECK_WAIT = 3000;
|
11292 | const ASSET_PROCESSING_CHECK_RETRIES = 10;
|
11293 |
|
11294 | function createAssetApi(http) {
|
11295 | function checkIfAssetHasUrl({
|
11296 | resolve,
|
11297 | reject,
|
11298 | id,
|
11299 | locale,
|
11300 | processingCheckWait = ASSET_PROCESSING_CHECK_WAIT,
|
11301 | processingCheckRetries = ASSET_PROCESSING_CHECK_RETRIES,
|
11302 | checkCount = 0
|
11303 | }) {
|
11304 | http.get('assets/' + id).then(response => wrapAsset(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]).then(asset => {
|
11305 | if (asset.fields.file[locale].url) {
|
11306 | resolve(asset);
|
11307 | } else if (checkCount === processingCheckRetries) {
|
11308 | const error = new Error();
|
11309 | error.name = 'AssetProcessingTimeout';
|
11310 | error.message = 'Asset is taking longer then expected to process.';
|
11311 | reject(error);
|
11312 | } else {
|
11313 | checkCount++;
|
11314 | setTimeout(() => checkIfAssetHasUrl({
|
11315 | resolve: resolve,
|
11316 | reject: reject,
|
11317 | id: id,
|
11318 | locale: locale,
|
11319 | checkCount: checkCount,
|
11320 | processingCheckWait,
|
11321 | processingCheckRetries
|
11322 | }), processingCheckWait);
|
11323 | }
|
11324 | });
|
11325 | }
|
11326 |
|
11327 | function processForLocale(locale, {
|
11328 | processingCheckWait,
|
11329 | processingCheckRetries
|
11330 | } = {}) {
|
11331 | const assetId = this.sys.id;
|
11332 | return http.put('assets/' + this.sys.id + '/files/' + locale + '/process', null, {
|
11333 | headers: {
|
11334 | 'X-Contentful-Version': this.sys.version
|
11335 | }
|
11336 | }).then(() => {
|
11337 | return new Promise((resolve, reject) => checkIfAssetHasUrl({
|
11338 | resolve: resolve,
|
11339 | reject: reject,
|
11340 | id: assetId,
|
11341 | locale: locale,
|
11342 | processingCheckWait: processingCheckWait,
|
11343 | processingCheckRetries: processingCheckRetries
|
11344 | }));
|
11345 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11346 | }
|
11347 |
|
11348 | function processForAllLocales(options = {}) {
|
11349 | const self = this;
|
11350 | const locales = Object.keys(this.fields.file || {});
|
11351 | let mostUpToDateAssetVersion = undefined;
|
11352 |
|
11353 |
|
11354 |
|
11355 |
|
11356 | const allProcessingLocales = locales.map(locale => processForLocale.call(self, locale, options).then(result => {
|
11357 |
|
11358 |
|
11359 |
|
11360 | mostUpToDateAssetVersion = result;
|
11361 | }));
|
11362 | return Promise.all(allProcessingLocales).then(() => mostUpToDateAssetVersion);
|
11363 | }
|
11364 |
|
11365 | return {
|
11366 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdateEntity"])({
|
11367 | http: http,
|
11368 | entityPath: 'assets',
|
11369 | wrapperMethod: wrapAsset
|
11370 | }),
|
11371 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDeleteEntity"])({
|
11372 | http: http,
|
11373 | entityPath: 'assets'
|
11374 | }),
|
11375 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishEntity"])({
|
11376 | http: http,
|
11377 | entityPath: 'assets',
|
11378 | wrapperMethod: wrapAsset
|
11379 | }),
|
11380 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnpublishEntity"])({
|
11381 | http: http,
|
11382 | entityPath: 'assets',
|
11383 | wrapperMethod: wrapAsset
|
11384 | }),
|
11385 | archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchiveEntity"])({
|
11386 | http: http,
|
11387 | entityPath: 'assets',
|
11388 | wrapperMethod: wrapAsset
|
11389 | }),
|
11390 | unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUnarchiveEntity"])({
|
11391 | http: http,
|
11392 | entityPath: 'assets',
|
11393 | wrapperMethod: wrapAsset
|
11394 | }),
|
11395 | processForLocale: processForLocale,
|
11396 | processForAllLocales: processForAllLocales,
|
11397 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createPublishedChecker"])(),
|
11398 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createUpdatedChecker"])(),
|
11399 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createDraftChecker"])(),
|
11400 | isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_5__["createArchivedChecker"])()
|
11401 | };
|
11402 | }
|
11403 |
|
11404 |
|
11405 |
|
11406 |
|
11407 |
|
11408 |
|
11409 |
|
11410 |
|
11411 | function wrapAsset(http, data) {
|
11412 | const asset = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11413 | const assetWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(asset, createAssetApi(http));
|
11414 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(assetWithMethods);
|
11415 | }
|
11416 |
|
11417 |
|
11418 |
|
11419 |
|
11420 | const wrapAssetCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapAsset);
|
11421 |
|
11422 | }),
|
11423 |
|
11424 | "./entities/content-type.ts":
|
11425 |
|
11426 |
|
11427 |
|
11428 |
|
11429 | (function(module, __webpack_exports__, __webpack_require__) {
|
11430 |
|
11431 | "use strict";
|
11432 | __webpack_require__.r(__webpack_exports__);
|
11433 | __webpack_require__.d(__webpack_exports__, "wrapContentType", function() { return wrapContentType; });
|
11434 | __webpack_require__.d(__webpack_exports__, "wrapContentTypeCollection", function() { return wrapContentTypeCollection; });
|
11435 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11436 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11437 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11438 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11439 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11440 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11441 | var _editor_interface__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./entities/editor-interface.ts");
|
11442 | var _error_handler__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./error-handler.ts");
|
11443 | var _snapshot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./entities/snapshot.ts");
|
11444 |
|
11445 |
|
11446 |
|
11447 |
|
11448 |
|
11449 |
|
11450 |
|
11451 |
|
11452 |
|
11453 | function createContentTypeApi(http) {
|
11454 | return {
|
11455 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11456 | http: http,
|
11457 | entityPath: 'content_types',
|
11458 | wrapperMethod: wrapContentType
|
11459 | }),
|
11460 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11461 | http: http,
|
11462 | entityPath: 'content_types'
|
11463 | }),
|
11464 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
|
11465 | http: http,
|
11466 | entityPath: 'content_types',
|
11467 | wrapperMethod: wrapContentType
|
11468 | }),
|
11469 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
|
11470 | http: http,
|
11471 | entityPath: 'content_types',
|
11472 | wrapperMethod: wrapContentType
|
11473 | }),
|
11474 | getEditorInterface: function getEditorInterface() {
|
11475 | return http.get('content_types/' + this.sys.id + '/editor_interface').then(response => Object(_editor_interface__WEBPACK_IMPORTED_MODULE_5__["wrapEditorInterface"])(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
11476 | },
|
11477 | getSnapshots: function getSnapshots(query = {}) {
|
11478 | return http.get(`content_types/${this.sys.id}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
11479 | query: query
|
11480 | })).then(response => Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshotCollection"])(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
11481 | },
|
11482 | getSnapshot: function getSnapshot(snapshotId) {
|
11483 | return http.get(`content_types/${this.sys.id}/snapshots/${snapshotId}`).then(response => Object(_snapshot__WEBPACK_IMPORTED_MODULE_7__["wrapSnapshot"])(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
11484 | },
|
11485 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
|
11486 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
|
11487 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
|
11488 | omitAndDeleteField: function omitAndDeleteField(id) {
|
11489 | return findAndUpdateField(this, id, 'omitted', true).then(newContentType => findAndUpdateField(newContentType, id, 'deleted', true)).catch(_error_handler__WEBPACK_IMPORTED_MODULE_6__["default"]);
|
11490 | }
|
11491 | };
|
11492 | }
|
11493 |
|
11494 |
|
11495 |
|
11496 |
|
11497 |
|
11498 |
|
11499 |
|
11500 |
|
11501 | const findAndUpdateField = function findAndUpdateField(contentType, id, key, value) {
|
11502 | const field = contentType.fields.find(field => field.id === id);
|
11503 |
|
11504 | if (!field) {
|
11505 | return Promise.reject(new Error(`Tried to omitAndDeleteField on a nonexistent field, ${id}, on the content type ${contentType.name}.`));
|
11506 | }
|
11507 |
|
11508 |
|
11509 | field[key] = value;
|
11510 | return contentType.update();
|
11511 | };
|
11512 |
|
11513 |
|
11514 |
|
11515 |
|
11516 |
|
11517 |
|
11518 |
|
11519 |
|
11520 | function wrapContentType(http, data) {
|
11521 | const contentType = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11522 | const contentTypeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(contentType, createContentTypeApi(http));
|
11523 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(contentTypeWithMethods);
|
11524 | }
|
11525 |
|
11526 |
|
11527 |
|
11528 |
|
11529 | const wrapContentTypeCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapContentType);
|
11530 |
|
11531 | }),
|
11532 |
|
11533 | "./entities/editor-interface.ts":
|
11534 |
|
11535 |
|
11536 |
|
11537 |
|
11538 | (function(module, __webpack_exports__, __webpack_require__) {
|
11539 |
|
11540 | "use strict";
|
11541 | __webpack_require__.r(__webpack_exports__);
|
11542 | __webpack_require__.d(__webpack_exports__, "wrapEditorInterface", function() { return wrapEditorInterface; });
|
11543 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11544 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11545 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11546 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11547 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
11548 |
|
11549 |
|
11550 |
|
11551 |
|
11552 |
|
11553 | function createEditorInterfaceApi(http) {
|
11554 | return {
|
11555 | update: function update() {
|
11556 | const self = this;
|
11557 | const raw = self.toPlainObject();
|
11558 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
11559 | delete data.sys;
|
11560 | return http.put(`content_types/${self.sys.contentType.sys.id}/editor_interface`, data, {
|
11561 | headers: {
|
11562 | 'X-Contentful-Version': self.sys.version
|
11563 | }
|
11564 | }).then(response => wrapEditorInterface(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
11565 | },
|
11566 | getControlForField: function getControlForField(fieldId) {
|
11567 | const self = this;
|
11568 | const result = self.controls.filter(control => {
|
11569 | return control.fieldId === fieldId;
|
11570 | });
|
11571 | return result && result.length > 0 ? result[0] : null;
|
11572 | }
|
11573 | };
|
11574 | }
|
11575 |
|
11576 |
|
11577 |
|
11578 |
|
11579 |
|
11580 | function wrapEditorInterface(http, data) {
|
11581 | const editorInterface = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11582 | const editorInterfaceWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(editorInterface, createEditorInterfaceApi(http));
|
11583 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(editorInterfaceWithMethods);
|
11584 | }
|
11585 |
|
11586 | }),
|
11587 |
|
11588 | "./entities/entry.ts":
|
11589 |
|
11590 |
|
11591 |
|
11592 |
|
11593 | (function(module, __webpack_exports__, __webpack_require__) {
|
11594 |
|
11595 | "use strict";
|
11596 | __webpack_require__.r(__webpack_exports__);
|
11597 | __webpack_require__.d(__webpack_exports__, "wrapEntry", function() { return wrapEntry; });
|
11598 | __webpack_require__.d(__webpack_exports__, "wrapEntryCollection", function() { return wrapEntryCollection; });
|
11599 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11600 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11601 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11602 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11603 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11604 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11605 | var _error_handler__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./error-handler.ts");
|
11606 | var _snapshot__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./entities/snapshot.ts");
|
11607 |
|
11608 |
|
11609 |
|
11610 |
|
11611 |
|
11612 |
|
11613 |
|
11614 |
|
11615 | function createEntryApi(http) {
|
11616 | return {
|
11617 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11618 | http: http,
|
11619 | entityPath: 'entries',
|
11620 | wrapperMethod: wrapEntry
|
11621 | }),
|
11622 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11623 | http: http,
|
11624 | entityPath: 'entries'
|
11625 | }),
|
11626 | publish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishEntity"])({
|
11627 | http: http,
|
11628 | entityPath: 'entries',
|
11629 | wrapperMethod: wrapEntry
|
11630 | }),
|
11631 | unpublish: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnpublishEntity"])({
|
11632 | http: http,
|
11633 | entityPath: 'entries',
|
11634 | wrapperMethod: wrapEntry
|
11635 | }),
|
11636 | archive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchiveEntity"])({
|
11637 | http: http,
|
11638 | entityPath: 'entries',
|
11639 | wrapperMethod: wrapEntry
|
11640 | }),
|
11641 | unarchive: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUnarchiveEntity"])({
|
11642 | http: http,
|
11643 | entityPath: 'entries',
|
11644 | wrapperMethod: wrapEntry
|
11645 | }),
|
11646 | getSnapshots: function getSnapshots(query = {}) {
|
11647 | return http.get(`entries/${this.sys.id}/snapshots`, Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["createRequestConfig"])({
|
11648 | query: query
|
11649 | })).then(response => Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshotCollection"])(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
11650 | },
|
11651 | getSnapshot: function getSnapshot(snapshotId) {
|
11652 | return http.get(`entries/${this.sys.id}/snapshots/${snapshotId}`).then(response => Object(_snapshot__WEBPACK_IMPORTED_MODULE_6__["wrapSnapshot"])(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_5__["default"]);
|
11653 | },
|
11654 | isPublished: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createPublishedChecker"])(),
|
11655 | isUpdated: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdatedChecker"])(),
|
11656 | isDraft: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDraftChecker"])(),
|
11657 | isArchived: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createArchivedChecker"])()
|
11658 | };
|
11659 | }
|
11660 |
|
11661 |
|
11662 |
|
11663 |
|
11664 |
|
11665 |
|
11666 |
|
11667 |
|
11668 | function wrapEntry(http, data) {
|
11669 | const entry = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11670 | const entryWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(entry, createEntryApi(http));
|
11671 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(entryWithMethods);
|
11672 | }
|
11673 |
|
11674 |
|
11675 |
|
11676 |
|
11677 |
|
11678 | const wrapEntryCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapEntry);
|
11679 |
|
11680 | }),
|
11681 |
|
11682 | "./entities/environment-alias.ts":
|
11683 |
|
11684 |
|
11685 |
|
11686 |
|
11687 | (function(module, __webpack_exports__, __webpack_require__) {
|
11688 |
|
11689 | "use strict";
|
11690 | __webpack_require__.r(__webpack_exports__);
|
11691 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAlias", function() { return wrapEnvironmentAlias; });
|
11692 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentAliasCollection", function() { return wrapEnvironmentAliasCollection; });
|
11693 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11694 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11695 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11696 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11697 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
11698 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11699 |
|
11700 |
|
11701 |
|
11702 |
|
11703 |
|
11704 |
|
11705 | function createEnvironmentAliasApi(http) {
|
11706 | return {
|
11707 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
11708 | http: http,
|
11709 | entityPath: 'environment_aliases',
|
11710 | wrapperMethod: wrapEnvironmentAlias
|
11711 | })
|
11712 | };
|
11713 | }
|
11714 |
|
11715 |
|
11716 |
|
11717 |
|
11718 |
|
11719 |
|
11720 |
|
11721 |
|
11722 | function wrapEnvironmentAlias(http, data) {
|
11723 | const alias = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11724 | const enhancedAlias = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(alias, createEnvironmentAliasApi(http));
|
11725 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedAlias);
|
11726 | }
|
11727 |
|
11728 |
|
11729 |
|
11730 |
|
11731 |
|
11732 |
|
11733 |
|
11734 | const wrapEnvironmentAliasCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironmentAlias);
|
11735 |
|
11736 | }),
|
11737 |
|
11738 | "./entities/environment.ts":
|
11739 |
|
11740 |
|
11741 |
|
11742 |
|
11743 | (function(module, __webpack_exports__, __webpack_require__) {
|
11744 |
|
11745 | "use strict";
|
11746 | __webpack_require__.r(__webpack_exports__);
|
11747 | __webpack_require__.d(__webpack_exports__, "wrapEnvironment", function() { return wrapEnvironment; });
|
11748 | __webpack_require__.d(__webpack_exports__, "wrapEnvironmentCollection", function() { return wrapEnvironmentCollection; });
|
11749 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11750 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11751 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11752 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11753 | var _create_environment_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./create-environment-api.ts");
|
11754 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
11755 |
|
11756 |
|
11757 |
|
11758 |
|
11759 |
|
11760 |
|
11761 |
|
11762 |
|
11763 |
|
11764 |
|
11765 |
|
11766 |
|
11767 |
|
11768 |
|
11769 |
|
11770 |
|
11771 | function wrapEnvironment(http, data) {
|
11772 |
|
11773 | const sdkHttp = http;
|
11774 | const environment = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11775 | const _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
|
11776 | hostUpload = _sdkHttp$httpClientPa.hostUpload,
|
11777 | defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
|
11778 | const environmentScopedHttpClient = sdkHttp.cloneWithNewParams({
|
11779 | baseURL: http.defaults.baseURL + 'environments/' + environment.sys.id
|
11780 | });
|
11781 | const environmentScopedUploadClient = sdkHttp.cloneWithNewParams({
|
11782 | space: environment.sys.space.sys.id,
|
11783 | host: hostUpload || defaultHostnameUpload
|
11784 | });
|
11785 | const environmentApi = Object(_create_environment_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
11786 | http: environmentScopedHttpClient,
|
11787 | httpUpload: environmentScopedUploadClient
|
11788 | });
|
11789 | const enhancedEnvironment = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(environment, environmentApi);
|
11790 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedEnvironment);
|
11791 | }
|
11792 |
|
11793 |
|
11794 |
|
11795 |
|
11796 |
|
11797 |
|
11798 | const wrapEnvironmentCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapEnvironment);
|
11799 |
|
11800 | }),
|
11801 |
|
11802 | "./entities/index.ts":
|
11803 |
|
11804 |
|
11805 |
|
11806 |
|
11807 | (function(module, __webpack_exports__, __webpack_require__) {
|
11808 |
|
11809 | "use strict";
|
11810 | __webpack_require__.r(__webpack_exports__);
|
11811 | var _app_definition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "./entities/app-definition.ts");
|
11812 | var _space__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./entities/space.ts");
|
11813 | var _environment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./entities/environment.ts");
|
11814 | var _entry__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./entities/entry.ts");
|
11815 | var _asset__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./entities/asset.ts");
|
11816 | var _content_type__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./entities/content-type.ts");
|
11817 | var _editor_interface__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__( "./entities/editor-interface.ts");
|
11818 | var _locale__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__( "./entities/locale.ts");
|
11819 | var _webhook__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__( "./entities/webhook.ts");
|
11820 | var _space_member__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__( "./entities/space-member.ts");
|
11821 | var _space_membership__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__( "./entities/space-membership.ts");
|
11822 | var _team_space_membership__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__( "./entities/team-space-membership.ts");
|
11823 | var _organization_membership__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__( "./entities/organization-membership.ts");
|
11824 | var _organization_invitation__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__( "./entities/organization-invitation.ts");
|
11825 | var _role__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__( "./entities/role.ts");
|
11826 | var _api_key__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__( "./entities/api-key.ts");
|
11827 | var _preview_api_key__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__( "./entities/preview-api-key.ts");
|
11828 | var _upload__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__( "./entities/upload.ts");
|
11829 | var _organization__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__( "./entities/organization.ts");
|
11830 | var _ui_extension__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__( "./entities/ui-extension.ts");
|
11831 | var _app_installation__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__( "./entities/app-installation.ts");
|
11832 | var _snapshot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__( "./entities/snapshot.ts");
|
11833 | var _user__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__( "./entities/user.ts");
|
11834 | var _personal_access_token__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__( "./entities/personal-access-token.ts");
|
11835 | var _usage__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__( "./entities/usage.ts");
|
11836 | var _environment_alias__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__( "./entities/environment-alias.ts");
|
11837 | var _team__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__( "./entities/team.ts");
|
11838 | var _team_membership__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__( "./entities/team-membership.ts");
|
11839 |
|
11840 |
|
11841 |
|
11842 |
|
11843 |
|
11844 |
|
11845 |
|
11846 |
|
11847 |
|
11848 |
|
11849 |
|
11850 |
|
11851 |
|
11852 |
|
11853 |
|
11854 |
|
11855 |
|
11856 |
|
11857 |
|
11858 |
|
11859 |
|
11860 |
|
11861 |
|
11862 |
|
11863 |
|
11864 |
|
11865 |
|
11866 |
|
11867 | __webpack_exports__["default"] = ({
|
11868 | appDefinition: _app_definition__WEBPACK_IMPORTED_MODULE_0__,
|
11869 | space: _space__WEBPACK_IMPORTED_MODULE_1__,
|
11870 | environment: _environment__WEBPACK_IMPORTED_MODULE_2__,
|
11871 | entry: _entry__WEBPACK_IMPORTED_MODULE_3__,
|
11872 | asset: _asset__WEBPACK_IMPORTED_MODULE_4__,
|
11873 | contentType: _content_type__WEBPACK_IMPORTED_MODULE_5__,
|
11874 | editorInterface: _editor_interface__WEBPACK_IMPORTED_MODULE_6__,
|
11875 | locale: _locale__WEBPACK_IMPORTED_MODULE_7__,
|
11876 | webhook: _webhook__WEBPACK_IMPORTED_MODULE_8__,
|
11877 | spaceMember: _space_member__WEBPACK_IMPORTED_MODULE_9__,
|
11878 | spaceMembership: _space_membership__WEBPACK_IMPORTED_MODULE_10__,
|
11879 | teamSpaceMembership: _team_space_membership__WEBPACK_IMPORTED_MODULE_11__,
|
11880 | organizationMembership: _organization_membership__WEBPACK_IMPORTED_MODULE_12__,
|
11881 | organizationInvitation: _organization_invitation__WEBPACK_IMPORTED_MODULE_13__,
|
11882 | role: _role__WEBPACK_IMPORTED_MODULE_14__,
|
11883 | apiKey: _api_key__WEBPACK_IMPORTED_MODULE_15__,
|
11884 | previewApiKey: _preview_api_key__WEBPACK_IMPORTED_MODULE_16__,
|
11885 | upload: _upload__WEBPACK_IMPORTED_MODULE_17__,
|
11886 | organization: _organization__WEBPACK_IMPORTED_MODULE_18__,
|
11887 | uiExtension: _ui_extension__WEBPACK_IMPORTED_MODULE_19__,
|
11888 | appInstallation: _app_installation__WEBPACK_IMPORTED_MODULE_20__,
|
11889 | snapshot: _snapshot__WEBPACK_IMPORTED_MODULE_21__,
|
11890 | user: _user__WEBPACK_IMPORTED_MODULE_22__,
|
11891 | personalAccessToken: _personal_access_token__WEBPACK_IMPORTED_MODULE_23__,
|
11892 | usage: _usage__WEBPACK_IMPORTED_MODULE_24__,
|
11893 | environmentAlias: _environment_alias__WEBPACK_IMPORTED_MODULE_25__,
|
11894 | team: _team__WEBPACK_IMPORTED_MODULE_26__,
|
11895 | teamMembership: _team_membership__WEBPACK_IMPORTED_MODULE_27__
|
11896 | });
|
11897 |
|
11898 | }),
|
11899 |
|
11900 | "./entities/locale.ts":
|
11901 |
|
11902 |
|
11903 |
|
11904 |
|
11905 | (function(module, __webpack_exports__, __webpack_require__) {
|
11906 |
|
11907 | "use strict";
|
11908 | __webpack_require__.r(__webpack_exports__);
|
11909 | __webpack_require__.d(__webpack_exports__, "wrapLocale", function() { return wrapLocale; });
|
11910 | __webpack_require__.d(__webpack_exports__, "wrapLocaleCollection", function() { return wrapLocaleCollection; });
|
11911 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11912 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11913 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11914 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
11915 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
11916 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
11917 |
|
11918 |
|
11919 |
|
11920 |
|
11921 |
|
11922 |
|
11923 | function createLocaleApi(http) {
|
11924 | return {
|
11925 | update: function update() {
|
11926 | const self = this;
|
11927 | delete self.default;
|
11928 |
|
11929 | return Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
11930 | http: http,
|
11931 | entityPath: 'locales',
|
11932 | wrapperMethod: wrapLocale
|
11933 | }).call(self);
|
11934 | },
|
11935 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
11936 | http: http,
|
11937 | entityPath: 'locales'
|
11938 | })
|
11939 | };
|
11940 | }
|
11941 |
|
11942 |
|
11943 |
|
11944 |
|
11945 |
|
11946 |
|
11947 |
|
11948 |
|
11949 | function wrapLocale(http, data) {
|
11950 |
|
11951 |
|
11952 | delete data.internal_code;
|
11953 | const locale = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11954 | const localeWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(locale, createLocaleApi(http));
|
11955 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(localeWithMethods);
|
11956 | }
|
11957 |
|
11958 |
|
11959 |
|
11960 |
|
11961 | const wrapLocaleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapLocale);
|
11962 |
|
11963 | }),
|
11964 |
|
11965 | "./entities/organization-invitation.ts":
|
11966 |
|
11967 |
|
11968 |
|
11969 |
|
11970 | (function(module, __webpack_exports__, __webpack_require__) {
|
11971 |
|
11972 | "use strict";
|
11973 | __webpack_require__.r(__webpack_exports__);
|
11974 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationInvitation", function() { return wrapOrganizationInvitation; });
|
11975 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
11976 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
11977 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
11978 |
|
11979 |
|
11980 |
|
11981 |
|
11982 |
|
11983 |
|
11984 |
|
11985 |
|
11986 |
|
11987 | function wrapOrganizationInvitation(http, data) {
|
11988 | const invitation = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
11989 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(invitation);
|
11990 | }
|
11991 |
|
11992 | }),
|
11993 |
|
11994 | "./entities/organization-membership.ts":
|
11995 |
|
11996 |
|
11997 |
|
11998 |
|
11999 | (function(module, __webpack_exports__, __webpack_require__) {
|
12000 |
|
12001 | "use strict";
|
12002 | __webpack_require__.r(__webpack_exports__);
|
12003 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembership", function() { return wrapOrganizationMembership; });
|
12004 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationMembershipCollection", function() { return wrapOrganizationMembershipCollection; });
|
12005 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12006 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12007 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12008 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12009 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
12010 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
12011 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
12012 |
|
12013 |
|
12014 |
|
12015 |
|
12016 |
|
12017 |
|
12018 |
|
12019 | function createOrganizationMembershipApi(http) {
|
12020 | return {
|
12021 | update: function update() {
|
12022 | const self = this;
|
12023 | const raw = self.toPlainObject();
|
12024 | const role = raw.role;
|
12025 | return http.put('organization_memberships' + '/' + self.sys.id, {
|
12026 | role
|
12027 | }, {
|
12028 | headers: {
|
12029 | 'X-Contentful-Version': self.sys.version || 0
|
12030 | }
|
12031 | }).then(response => wrapOrganizationMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12032 | },
|
12033 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
12034 | http: http,
|
12035 | entityPath: 'organization_memberships'
|
12036 | })
|
12037 | };
|
12038 | }
|
12039 |
|
12040 |
|
12041 |
|
12042 |
|
12043 |
|
12044 |
|
12045 |
|
12046 |
|
12047 | function wrapOrganizationMembership(http, data) {
|
12048 | const organizationMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12049 | const organizationMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(organizationMembership, createOrganizationMembershipApi(http));
|
12050 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(organizationMembershipWithMethods);
|
12051 | }
|
12052 |
|
12053 |
|
12054 |
|
12055 |
|
12056 | const wrapOrganizationMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapOrganizationMembership);
|
12057 |
|
12058 | }),
|
12059 |
|
12060 | "./entities/organization.ts":
|
12061 |
|
12062 |
|
12063 |
|
12064 |
|
12065 | (function(module, __webpack_exports__, __webpack_require__) {
|
12066 |
|
12067 | "use strict";
|
12068 | __webpack_require__.r(__webpack_exports__);
|
12069 | __webpack_require__.d(__webpack_exports__, "wrapOrganization", function() { return wrapOrganization; });
|
12070 | __webpack_require__.d(__webpack_exports__, "wrapOrganizationCollection", function() { return wrapOrganizationCollection; });
|
12071 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12072 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12073 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12074 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12075 | var _create_organization_api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./create-organization-api.ts");
|
12076 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
12077 |
|
12078 |
|
12079 |
|
12080 |
|
12081 |
|
12082 |
|
12083 |
|
12084 |
|
12085 |
|
12086 |
|
12087 |
|
12088 |
|
12089 |
|
12090 |
|
12091 |
|
12092 |
|
12093 | function wrapOrganization(http, data) {
|
12094 | const org = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12095 | const baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/organizations/') + org.sys.id + '/';
|
12096 |
|
12097 | const orgScopedHttpClient = http.cloneWithNewParams({
|
12098 | baseURL
|
12099 | });
|
12100 | const orgApi = Object(_create_organization_api__WEBPACK_IMPORTED_MODULE_3__["default"])({
|
12101 | http: orgScopedHttpClient
|
12102 | });
|
12103 | const enhancedOrganization = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(org, orgApi);
|
12104 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedOrganization);
|
12105 | }
|
12106 |
|
12107 |
|
12108 |
|
12109 |
|
12110 |
|
12111 | const wrapOrganizationCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapOrganization);
|
12112 |
|
12113 | }),
|
12114 |
|
12115 | "./entities/personal-access-token.ts":
|
12116 |
|
12117 |
|
12118 |
|
12119 |
|
12120 | (function(module, __webpack_exports__, __webpack_require__) {
|
12121 |
|
12122 | "use strict";
|
12123 | __webpack_require__.r(__webpack_exports__);
|
12124 | __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessToken", function() { return wrapPersonalAccessToken; });
|
12125 | __webpack_require__.d(__webpack_exports__, "wrapPersonalAccessTokenCollection", function() { return wrapPersonalAccessTokenCollection; });
|
12126 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12127 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12128 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12129 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12130 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
12131 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
12132 |
|
12133 |
|
12134 |
|
12135 |
|
12136 |
|
12137 |
|
12138 | function createPersonalAccessToken(http) {
|
12139 | return {
|
12140 | revoke: function revoke() {
|
12141 | const baseURL = (http.defaults.baseURL || '').replace('/spaces/', '/users/me/access_tokens');
|
12142 | return http.put(`${this.sys.id}/revoked`, null, {
|
12143 | baseURL
|
12144 | }).then(response => response.data, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12145 | }
|
12146 | };
|
12147 | }
|
12148 |
|
12149 |
|
12150 |
|
12151 |
|
12152 |
|
12153 |
|
12154 |
|
12155 |
|
12156 | function wrapPersonalAccessToken(http, data) {
|
12157 | const personalAccessToken = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12158 | const personalAccessTokenWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(personalAccessToken, createPersonalAccessToken(http));
|
12159 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(personalAccessTokenWithMethods);
|
12160 | }
|
12161 |
|
12162 |
|
12163 |
|
12164 |
|
12165 |
|
12166 |
|
12167 |
|
12168 | const wrapPersonalAccessTokenCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapPersonalAccessToken);
|
12169 |
|
12170 | }),
|
12171 |
|
12172 | "./entities/preview-api-key.ts":
|
12173 |
|
12174 |
|
12175 |
|
12176 |
|
12177 | (function(module, __webpack_exports__, __webpack_require__) {
|
12178 |
|
12179 | "use strict";
|
12180 | __webpack_require__.r(__webpack_exports__);
|
12181 | __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKey", function() { return wrapPreviewApiKey; });
|
12182 | __webpack_require__.d(__webpack_exports__, "wrapPreviewApiKeyCollection", function() { return wrapPreviewApiKeyCollection; });
|
12183 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12184 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12185 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12186 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12187 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12188 |
|
12189 |
|
12190 |
|
12191 |
|
12192 |
|
12193 | function createPreviewApiKeyApi() {
|
12194 | return {};
|
12195 | }
|
12196 |
|
12197 |
|
12198 |
|
12199 |
|
12200 |
|
12201 |
|
12202 |
|
12203 |
|
12204 | function wrapPreviewApiKey(_http, data) {
|
12205 | const previewApiKey = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12206 | const previewApiKeyWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(previewApiKey, createPreviewApiKeyApi());
|
12207 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(previewApiKeyWithMethods);
|
12208 | }
|
12209 |
|
12210 |
|
12211 |
|
12212 |
|
12213 | const wrapPreviewApiKeyCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapPreviewApiKey);
|
12214 |
|
12215 | }),
|
12216 |
|
12217 | "./entities/role.ts":
|
12218 |
|
12219 |
|
12220 |
|
12221 |
|
12222 | (function(module, __webpack_exports__, __webpack_require__) {
|
12223 |
|
12224 | "use strict";
|
12225 | __webpack_require__.r(__webpack_exports__);
|
12226 | __webpack_require__.d(__webpack_exports__, "wrapRole", function() { return wrapRole; });
|
12227 | __webpack_require__.d(__webpack_exports__, "wrapRoleCollection", function() { return wrapRoleCollection; });
|
12228 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12229 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12230 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12231 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12232 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12233 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
12234 |
|
12235 |
|
12236 |
|
12237 |
|
12238 |
|
12239 |
|
12240 | function createRoleApi(http) {
|
12241 | return {
|
12242 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
12243 | http: http,
|
12244 | entityPath: 'roles',
|
12245 | wrapperMethod: wrapRole
|
12246 | }),
|
12247 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
12248 | http: http,
|
12249 | entityPath: 'roles'
|
12250 | })
|
12251 | };
|
12252 | }
|
12253 |
|
12254 |
|
12255 |
|
12256 |
|
12257 |
|
12258 |
|
12259 |
|
12260 |
|
12261 | function wrapRole(http, data) {
|
12262 | const role = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12263 | const roleWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(role, createRoleApi(http));
|
12264 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(roleWithMethods);
|
12265 | }
|
12266 |
|
12267 |
|
12268 |
|
12269 |
|
12270 | const wrapRoleCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapRole);
|
12271 |
|
12272 | }),
|
12273 |
|
12274 | "./entities/snapshot.ts":
|
12275 |
|
12276 |
|
12277 |
|
12278 |
|
12279 | (function(module, __webpack_exports__, __webpack_require__) {
|
12280 |
|
12281 | "use strict";
|
12282 | __webpack_require__.r(__webpack_exports__);
|
12283 | __webpack_require__.d(__webpack_exports__, "wrapSnapshot", function() { return wrapSnapshot; });
|
12284 | __webpack_require__.d(__webpack_exports__, "wrapSnapshotCollection", function() { return wrapSnapshotCollection; });
|
12285 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12286 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12287 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12288 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12289 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12290 |
|
12291 |
|
12292 |
|
12293 |
|
12294 |
|
12295 | function createSnapshotApi() {
|
12296 | return {
|
12297 |
|
12298 | };
|
12299 | }
|
12300 |
|
12301 |
|
12302 |
|
12303 |
|
12304 |
|
12305 |
|
12306 |
|
12307 |
|
12308 | function wrapSnapshot(_http, data) {
|
12309 | const snapshot = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12310 | const snapshotWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(snapshot, createSnapshotApi());
|
12311 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(snapshotWithMethods);
|
12312 | }
|
12313 |
|
12314 |
|
12315 |
|
12316 |
|
12317 |
|
12318 |
|
12319 |
|
12320 | const wrapSnapshotCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSnapshot);
|
12321 |
|
12322 | }),
|
12323 |
|
12324 | "./entities/space-member.ts":
|
12325 |
|
12326 |
|
12327 |
|
12328 |
|
12329 | (function(module, __webpack_exports__, __webpack_require__) {
|
12330 |
|
12331 | "use strict";
|
12332 | __webpack_require__.r(__webpack_exports__);
|
12333 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMember", function() { return wrapSpaceMember; });
|
12334 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMemberCollection", function() { return wrapSpaceMemberCollection; });
|
12335 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12336 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12337 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12338 | var _common_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./common-utils.ts");
|
12339 |
|
12340 |
|
12341 |
|
12342 |
|
12343 |
|
12344 |
|
12345 |
|
12346 |
|
12347 |
|
12348 |
|
12349 | function wrapSpaceMember(http, data) {
|
12350 | const spaceMember = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12351 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMember);
|
12352 | }
|
12353 |
|
12354 |
|
12355 |
|
12356 |
|
12357 | const wrapSpaceMemberCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_2__["wrapCollection"])(wrapSpaceMember);
|
12358 |
|
12359 | }),
|
12360 |
|
12361 | "./entities/space-membership.ts":
|
12362 |
|
12363 |
|
12364 |
|
12365 |
|
12366 | (function(module, __webpack_exports__, __webpack_require__) {
|
12367 |
|
12368 | "use strict";
|
12369 | __webpack_require__.r(__webpack_exports__);
|
12370 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMembership", function() { return wrapSpaceMembership; });
|
12371 | __webpack_require__.d(__webpack_exports__, "wrapSpaceMembershipCollection", function() { return wrapSpaceMembershipCollection; });
|
12372 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12373 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12374 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12375 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12376 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12377 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
12378 |
|
12379 |
|
12380 |
|
12381 |
|
12382 |
|
12383 |
|
12384 | function createSpaceMembershipApi(http) {
|
12385 | return {
|
12386 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
12387 | http: http,
|
12388 | entityPath: 'space_memberships',
|
12389 | wrapperMethod: wrapSpaceMembership
|
12390 | }),
|
12391 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
12392 | http: http,
|
12393 | entityPath: 'space_memberships'
|
12394 | })
|
12395 | };
|
12396 | }
|
12397 |
|
12398 |
|
12399 |
|
12400 |
|
12401 |
|
12402 |
|
12403 |
|
12404 |
|
12405 | function wrapSpaceMembership(http, data) {
|
12406 | const spaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12407 | const spaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(spaceMembership, createSpaceMembershipApi(http));
|
12408 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(spaceMembershipWithMethods);
|
12409 | }
|
12410 |
|
12411 |
|
12412 |
|
12413 |
|
12414 | const wrapSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpaceMembership);
|
12415 |
|
12416 | }),
|
12417 |
|
12418 | "./entities/space.ts":
|
12419 |
|
12420 |
|
12421 |
|
12422 |
|
12423 | (function(module, __webpack_exports__, __webpack_require__) {
|
12424 |
|
12425 | "use strict";
|
12426 | __webpack_require__.r(__webpack_exports__);
|
12427 | __webpack_require__.d(__webpack_exports__, "wrapSpace", function() { return wrapSpace; });
|
12428 | __webpack_require__.d(__webpack_exports__, "wrapSpaceCollection", function() { return wrapSpaceCollection; });
|
12429 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12430 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12431 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12432 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12433 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12434 | var _create_space_api__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./create-space-api.ts");
|
12435 |
|
12436 |
|
12437 |
|
12438 |
|
12439 |
|
12440 |
|
12441 |
|
12442 |
|
12443 |
|
12444 |
|
12445 |
|
12446 |
|
12447 |
|
12448 |
|
12449 |
|
12450 |
|
12451 | function wrapSpace(http, data) {
|
12452 | const sdkHttp = http;
|
12453 | const space = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12454 | const _sdkHttp$httpClientPa = sdkHttp.httpClientParams,
|
12455 | hostUpload = _sdkHttp$httpClientPa.hostUpload,
|
12456 | defaultHostnameUpload = _sdkHttp$httpClientPa.defaultHostnameUpload;
|
12457 | const spaceScopedHttpClient = sdkHttp.cloneWithNewParams({
|
12458 | space: space.sys.id
|
12459 | });
|
12460 | const spaceScopedUploadClient = sdkHttp.cloneWithNewParams({
|
12461 | space: space.sys.id,
|
12462 | host: hostUpload || defaultHostnameUpload
|
12463 | });
|
12464 | const spaceApi = Object(_create_space_api__WEBPACK_IMPORTED_MODULE_4__["default"])({
|
12465 | http: spaceScopedHttpClient,
|
12466 | httpUpload: spaceScopedUploadClient
|
12467 | });
|
12468 | const enhancedSpace = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(space, spaceApi);
|
12469 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(enhancedSpace);
|
12470 | }
|
12471 |
|
12472 |
|
12473 |
|
12474 |
|
12475 |
|
12476 |
|
12477 | const wrapSpaceCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapSpace);
|
12478 |
|
12479 | }),
|
12480 |
|
12481 | "./entities/team-membership.ts":
|
12482 |
|
12483 |
|
12484 |
|
12485 |
|
12486 | (function(module, __webpack_exports__, __webpack_require__) {
|
12487 |
|
12488 | "use strict";
|
12489 | __webpack_require__.r(__webpack_exports__);
|
12490 | __webpack_require__.d(__webpack_exports__, "wrapTeamMembership", function() { return wrapTeamMembership; });
|
12491 | __webpack_require__.d(__webpack_exports__, "wrapTeamMembershipCollection", function() { return wrapTeamMembershipCollection; });
|
12492 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12493 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12494 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12495 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12496 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
12497 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
12498 |
|
12499 |
|
12500 |
|
12501 |
|
12502 |
|
12503 |
|
12504 | function createTeamMembershipApi(http) {
|
12505 | return {
|
12506 | update: function update() {
|
12507 | const raw = this.toPlainObject();
|
12508 | const teamId = raw.sys.team.sys.id;
|
12509 | return http.put('teams/' + teamId + '/team_memberships/' + this.sys.id, raw, {
|
12510 | headers: {
|
12511 | 'X-Contentful-Version': this.sys.version || 0
|
12512 | }
|
12513 | }).then(response => wrapTeamMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12514 | },
|
12515 | delete: function _delete() {
|
12516 | const raw = this.toPlainObject();
|
12517 | const teamId = raw.sys.team.sys.id;
|
12518 | return http.delete('teams/' + teamId + '/team_memberships/' + this.sys.id).then(() => {
|
12519 | }, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12520 | }
|
12521 | };
|
12522 | }
|
12523 |
|
12524 |
|
12525 |
|
12526 |
|
12527 |
|
12528 |
|
12529 |
|
12530 |
|
12531 | function wrapTeamMembership(http, data) {
|
12532 | const teamMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12533 | const teamMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamMembership, createTeamMembershipApi(http));
|
12534 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamMembershipWithMethods);
|
12535 | }
|
12536 |
|
12537 |
|
12538 |
|
12539 |
|
12540 | const wrapTeamMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapTeamMembership);
|
12541 |
|
12542 | }),
|
12543 |
|
12544 | "./entities/team-space-membership.ts":
|
12545 |
|
12546 |
|
12547 |
|
12548 |
|
12549 | (function(module, __webpack_exports__, __webpack_require__) {
|
12550 |
|
12551 | "use strict";
|
12552 | __webpack_require__.r(__webpack_exports__);
|
12553 | __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembership", function() { return wrapTeamSpaceMembership; });
|
12554 | __webpack_require__.d(__webpack_exports__, "wrapTeamSpaceMembershipCollection", function() { return wrapTeamSpaceMembershipCollection; });
|
12555 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12556 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12557 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12558 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12559 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
12560 | var _error_handler__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./error-handler.ts");
|
12561 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
12562 |
|
12563 |
|
12564 |
|
12565 |
|
12566 |
|
12567 |
|
12568 |
|
12569 | function createTeamSpaceMembershipApi(http) {
|
12570 | return {
|
12571 | update: function update() {
|
12572 | const raw = this.toPlainObject();
|
12573 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
12574 | delete data.sys;
|
12575 | return http.put('team_space_memberships/' + this.sys.id, data, {
|
12576 | headers: {
|
12577 | 'X-Contentful-Version': this.sys.version || 0,
|
12578 | 'x-contentful-team': this.sys.team.sys.id
|
12579 | }
|
12580 | }).then(response => wrapTeamSpaceMembership(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
12581 | },
|
12582 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
12583 | http: http,
|
12584 | entityPath: 'team_space_memberships'
|
12585 | })
|
12586 | };
|
12587 | }
|
12588 |
|
12589 |
|
12590 |
|
12591 |
|
12592 |
|
12593 |
|
12594 |
|
12595 |
|
12596 | function wrapTeamSpaceMembership(http, data) {
|
12597 | const teamSpaceMembership = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12598 | const teamSpaceMembershipWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(teamSpaceMembership, createTeamSpaceMembershipApi(http));
|
12599 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamSpaceMembershipWithMethods);
|
12600 | }
|
12601 |
|
12602 |
|
12603 |
|
12604 |
|
12605 | const wrapTeamSpaceMembershipCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapTeamSpaceMembership);
|
12606 |
|
12607 | }),
|
12608 |
|
12609 | "./entities/team.ts":
|
12610 |
|
12611 |
|
12612 |
|
12613 |
|
12614 | (function(module, __webpack_exports__, __webpack_require__) {
|
12615 |
|
12616 | "use strict";
|
12617 | __webpack_require__.r(__webpack_exports__);
|
12618 | __webpack_require__.d(__webpack_exports__, "wrapTeam", function() { return wrapTeam; });
|
12619 | __webpack_require__.d(__webpack_exports__, "wrapTeamCollection", function() { return wrapTeamCollection; });
|
12620 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12621 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12622 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12623 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12624 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12625 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
12626 |
|
12627 |
|
12628 |
|
12629 |
|
12630 |
|
12631 | const entityPath = 'teams';
|
12632 |
|
12633 |
|
12634 |
|
12635 |
|
12636 | function createTeamApi(http) {
|
12637 | return {
|
12638 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
12639 | http,
|
12640 | entityPath,
|
12641 | wrapperMethod: wrapTeam
|
12642 | }),
|
12643 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
12644 | http,
|
12645 | entityPath
|
12646 | })
|
12647 | };
|
12648 | }
|
12649 |
|
12650 |
|
12651 |
|
12652 |
|
12653 |
|
12654 |
|
12655 |
|
12656 |
|
12657 | function wrapTeam(http, data) {
|
12658 | const team = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12659 | const teamWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(team, createTeamApi(http));
|
12660 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(teamWithMethods);
|
12661 | }
|
12662 |
|
12663 |
|
12664 |
|
12665 |
|
12666 | const wrapTeamCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapTeam);
|
12667 |
|
12668 | }),
|
12669 |
|
12670 | "./entities/ui-extension.ts":
|
12671 |
|
12672 |
|
12673 |
|
12674 |
|
12675 | (function(module, __webpack_exports__, __webpack_require__) {
|
12676 |
|
12677 | "use strict";
|
12678 | __webpack_require__.r(__webpack_exports__);
|
12679 | __webpack_require__.d(__webpack_exports__, "wrapUiExtension", function() { return wrapUiExtension; });
|
12680 | __webpack_require__.d(__webpack_exports__, "wrapUiExtensionCollection", function() { return wrapUiExtensionCollection; });
|
12681 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12682 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12683 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12684 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12685 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
12686 | var _common_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./common-utils.ts");
|
12687 |
|
12688 |
|
12689 |
|
12690 |
|
12691 |
|
12692 |
|
12693 | function createUiExtensionApi(http) {
|
12694 | return {
|
12695 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createUpdateEntity"])({
|
12696 | http: http,
|
12697 | entityPath: 'extensions',
|
12698 | wrapperMethod: wrapUiExtension
|
12699 | }),
|
12700 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
12701 | http: http,
|
12702 | entityPath: 'extensions'
|
12703 | })
|
12704 | };
|
12705 | }
|
12706 |
|
12707 |
|
12708 |
|
12709 |
|
12710 |
|
12711 |
|
12712 |
|
12713 |
|
12714 | function wrapUiExtension(http, data) {
|
12715 | const uiExtension = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12716 | const uiExtensionWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(uiExtension, createUiExtensionApi(http));
|
12717 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uiExtensionWithMethods);
|
12718 | }
|
12719 |
|
12720 |
|
12721 |
|
12722 |
|
12723 | const wrapUiExtensionCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_4__["wrapCollection"])(wrapUiExtension);
|
12724 |
|
12725 | }),
|
12726 |
|
12727 | "./entities/upload.ts":
|
12728 |
|
12729 |
|
12730 |
|
12731 |
|
12732 | (function(module, __webpack_exports__, __webpack_require__) {
|
12733 |
|
12734 | "use strict";
|
12735 | __webpack_require__.r(__webpack_exports__);
|
12736 | __webpack_require__.d(__webpack_exports__, "wrapUpload", function() { return wrapUpload; });
|
12737 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12738 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12739 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12740 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12741 | var _instance_actions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./instance-actions.ts");
|
12742 |
|
12743 |
|
12744 |
|
12745 |
|
12746 |
|
12747 | function createUploadApi(http) {
|
12748 | return {
|
12749 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_3__["createDeleteEntity"])({
|
12750 | http: http,
|
12751 | entityPath: 'uploads'
|
12752 | })
|
12753 | };
|
12754 | }
|
12755 |
|
12756 |
|
12757 |
|
12758 |
|
12759 |
|
12760 |
|
12761 |
|
12762 |
|
12763 | function wrapUpload(http, data) {
|
12764 | const upload = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12765 | const uploadWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(upload, createUploadApi(http));
|
12766 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(uploadWithMethods);
|
12767 | }
|
12768 |
|
12769 | }),
|
12770 |
|
12771 | "./entities/usage.ts":
|
12772 |
|
12773 |
|
12774 |
|
12775 |
|
12776 | (function(module, __webpack_exports__, __webpack_require__) {
|
12777 |
|
12778 | "use strict";
|
12779 | __webpack_require__.r(__webpack_exports__);
|
12780 | __webpack_require__.d(__webpack_exports__, "wrapUsage", function() { return wrapUsage; });
|
12781 | __webpack_require__.d(__webpack_exports__, "wrapUsageCollection", function() { return wrapUsageCollection; });
|
12782 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12783 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12784 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12785 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12786 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12787 |
|
12788 |
|
12789 |
|
12790 |
|
12791 |
|
12792 |
|
12793 |
|
12794 |
|
12795 |
|
12796 |
|
12797 |
|
12798 | function wrapUsage(http, data) {
|
12799 | const usage = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12800 | const usageWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(usage, {});
|
12801 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(usageWithMethods);
|
12802 | }
|
12803 |
|
12804 |
|
12805 |
|
12806 |
|
12807 | const wrapUsageCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUsage);
|
12808 |
|
12809 | }),
|
12810 |
|
12811 | "./entities/user.ts":
|
12812 |
|
12813 |
|
12814 |
|
12815 |
|
12816 | (function(module, __webpack_exports__, __webpack_require__) {
|
12817 |
|
12818 | "use strict";
|
12819 | __webpack_require__.r(__webpack_exports__);
|
12820 | __webpack_require__.d(__webpack_exports__, "wrapUser", function() { return wrapUser; });
|
12821 | __webpack_require__.d(__webpack_exports__, "wrapUserCollection", function() { return wrapUserCollection; });
|
12822 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12823 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12824 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1__);
|
12825 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12826 | var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./common-utils.ts");
|
12827 |
|
12828 |
|
12829 |
|
12830 |
|
12831 |
|
12832 |
|
12833 |
|
12834 |
|
12835 |
|
12836 |
|
12837 |
|
12838 | function wrapUser(http, data) {
|
12839 | const user = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_1___default()(data));
|
12840 | const userWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(user, {});
|
12841 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_0__["freezeSys"])(userWithMethods);
|
12842 | }
|
12843 |
|
12844 |
|
12845 |
|
12846 |
|
12847 |
|
12848 |
|
12849 |
|
12850 | const wrapUserCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["wrapCollection"])(wrapUser);
|
12851 |
|
12852 | }),
|
12853 |
|
12854 | "./entities/webhook.ts":
|
12855 |
|
12856 |
|
12857 |
|
12858 |
|
12859 | (function(module, __webpack_exports__, __webpack_require__) {
|
12860 |
|
12861 | "use strict";
|
12862 | __webpack_require__.r(__webpack_exports__);
|
12863 | __webpack_require__.d(__webpack_exports__, "wrapWebhook", function() { return wrapWebhook; });
|
12864 | __webpack_require__.d(__webpack_exports__, "wrapWebhookCollection", function() { return wrapWebhookCollection; });
|
12865 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
12866 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
12867 | var contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "../node_modules/contentful-sdk-core/dist/index.es-modules.js");
|
12868 | var _enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__( "./enhance-with-methods.ts");
|
12869 | var _error_handler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__( "./error-handler.ts");
|
12870 | var _instance_actions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__( "./instance-actions.ts");
|
12871 | var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__( "./common-utils.ts");
|
12872 |
|
12873 |
|
12874 |
|
12875 |
|
12876 |
|
12877 |
|
12878 | const entityPath = 'webhook_definitions';
|
12879 |
|
12880 | function createWebhookApi(http) {
|
12881 | return {
|
12882 | update: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createUpdateEntity"])({
|
12883 | http,
|
12884 | entityPath,
|
12885 | wrapperMethod: wrapWebhook
|
12886 | }),
|
12887 | delete: Object(_instance_actions__WEBPACK_IMPORTED_MODULE_4__["createDeleteEntity"])({
|
12888 | http,
|
12889 | entityPath
|
12890 | }),
|
12891 | getCalls: function getCalls() {
|
12892 | return http.get('webhooks/' + this.sys.id + '/calls').then(response => response.data, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12893 | },
|
12894 | getCall: function getCall(id) {
|
12895 | return http.get('webhooks/' + this.sys.id + '/calls/' + id).then(response => response.data, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12896 | },
|
12897 | getHealth: function getHealth() {
|
12898 | return http.get('webhooks/' + this.sys.id + '/health').then(response => response.data, _error_handler__WEBPACK_IMPORTED_MODULE_3__["default"]);
|
12899 | }
|
12900 | };
|
12901 | }
|
12902 |
|
12903 |
|
12904 |
|
12905 |
|
12906 |
|
12907 |
|
12908 |
|
12909 |
|
12910 | function wrapWebhook(http, data) {
|
12911 | const webhook = Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["toPlainObject"])(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(data));
|
12912 | const webhookWithMethods = Object(_enhance_with_methods__WEBPACK_IMPORTED_MODULE_2__["default"])(webhook, createWebhookApi(http));
|
12913 | return Object(contentful_sdk_core__WEBPACK_IMPORTED_MODULE_1__["freezeSys"])(webhookWithMethods);
|
12914 | }
|
12915 |
|
12916 |
|
12917 |
|
12918 |
|
12919 | const wrapWebhookCollection = Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["wrapCollection"])(wrapWebhook);
|
12920 |
|
12921 | }),
|
12922 |
|
12923 | "./error-handler.ts":
|
12924 |
|
12925 |
|
12926 |
|
12927 |
|
12928 | (function(module, __webpack_exports__, __webpack_require__) {
|
12929 |
|
12930 | "use strict";
|
12931 | __webpack_require__.r(__webpack_exports__);
|
12932 | __webpack_require__.d(__webpack_exports__, "default", function() { return errorHandler; });
|
12933 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/isPlainObject.js");
|
12934 | var lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0__);
|
12935 |
|
12936 |
|
12937 |
|
12938 |
|
12939 |
|
12940 |
|
12941 |
|
12942 |
|
12943 |
|
12944 |
|
12945 | function errorHandler(errorResponse) {
|
12946 | const config = errorResponse.config,
|
12947 | response = errorResponse.response;
|
12948 | let errorName;
|
12949 |
|
12950 | if (config.headers && config.headers['Authorization']) {
|
12951 | const token = `...${config.headers['Authorization'].substr(-5)}`;
|
12952 | config.headers['Authorization'] = `Bearer ${token}`;
|
12953 | }
|
12954 |
|
12955 | if (!lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(response) || !lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
|
12956 | throw errorResponse;
|
12957 | }
|
12958 |
|
12959 | const data = response === null || response === void 0 ? void 0 : response.data;
|
12960 | const errorData = {
|
12961 | status: response === null || response === void 0 ? void 0 : response.status,
|
12962 | statusText: response === null || response === void 0 ? void 0 : response.statusText,
|
12963 | message: '',
|
12964 | details: {}
|
12965 | };
|
12966 |
|
12967 | if (lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(config)) {
|
12968 | errorData.request = {
|
12969 | url: config.url,
|
12970 | headers: config.headers,
|
12971 | method: config.method,
|
12972 | payloadData: config.data
|
12973 | };
|
12974 | }
|
12975 |
|
12976 | if (data && lodash_isPlainObject__WEBPACK_IMPORTED_MODULE_0___default()(data)) {
|
12977 | if ('requestId' in data) {
|
12978 | errorData.requestId = data.requestId || 'UNKNOWN';
|
12979 | }
|
12980 |
|
12981 | if ('message' in data) {
|
12982 | errorData.message = data.message || '';
|
12983 | }
|
12984 |
|
12985 | if ('details' in data) {
|
12986 | errorData.details = data.details || {};
|
12987 | }
|
12988 |
|
12989 | if ('sys' in data) {
|
12990 | if ('id' in data.sys) {
|
12991 | errorName = data.sys.id;
|
12992 | }
|
12993 | }
|
12994 | }
|
12995 |
|
12996 | const error = new Error();
|
12997 | error.name = errorName && errorName !== 'Unknown' ? errorName : `${response === null || response === void 0 ? void 0 : response.status} ${response === null || response === void 0 ? void 0 : response.statusText}`;
|
12998 | error.message = JSON.stringify(errorData, null, ' ');
|
12999 | throw error;
|
13000 | }
|
13001 |
|
13002 | }),
|
13003 |
|
13004 | "./instance-actions.ts":
|
13005 |
|
13006 |
|
13007 |
|
13008 |
|
13009 | (function(module, __webpack_exports__, __webpack_require__) {
|
13010 |
|
13011 | "use strict";
|
13012 | __webpack_require__.r(__webpack_exports__);
|
13013 | __webpack_require__.d(__webpack_exports__, "createUpdateEntity", function() { return createUpdateEntity; });
|
13014 | __webpack_require__.d(__webpack_exports__, "createDeleteEntity", function() { return createDeleteEntity; });
|
13015 | __webpack_require__.d(__webpack_exports__, "createPublishEntity", function() { return createPublishEntity; });
|
13016 | __webpack_require__.d(__webpack_exports__, "createUnpublishEntity", function() { return createUnpublishEntity; });
|
13017 | __webpack_require__.d(__webpack_exports__, "createArchiveEntity", function() { return createArchiveEntity; });
|
13018 | __webpack_require__.d(__webpack_exports__, "createUnarchiveEntity", function() { return createUnarchiveEntity; });
|
13019 | __webpack_require__.d(__webpack_exports__, "createPublishedChecker", function() { return createPublishedChecker; });
|
13020 | __webpack_require__.d(__webpack_exports__, "createUpdatedChecker", function() { return createUpdatedChecker; });
|
13021 | __webpack_require__.d(__webpack_exports__, "createDraftChecker", function() { return createDraftChecker; });
|
13022 | __webpack_require__.d(__webpack_exports__, "createArchivedChecker", function() { return createArchivedChecker; });
|
13023 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__( "../node_modules/lodash/cloneDeep.js");
|
13024 | var lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default = __webpack_require__.n(lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0__);
|
13025 | var _error_handler__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__( "./error-handler.ts");
|
13026 | function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
13027 |
|
13028 | function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
13029 |
|
13030 | function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
13031 |
|
13032 |
|
13033 |
|
13034 |
|
13035 |
|
13036 |
|
13037 |
|
13038 | function createUpdateEntity({
|
13039 | http,
|
13040 | entityPath,
|
13041 | wrapperMethod,
|
13042 | headers
|
13043 | }) {
|
13044 | return function () {
|
13045 | const self = this;
|
13046 | const raw = self.toPlainObject();
|
13047 | const data = lodash_cloneDeep__WEBPACK_IMPORTED_MODULE_0___default()(raw);
|
13048 | delete data.sys;
|
13049 | return http.put(entityPath + '/' + self.sys.id, data, {
|
13050 | headers: _objectSpread({
|
13051 | 'X-Contentful-Version': self.sys.version || 0
|
13052 | }, headers)
|
13053 | }).then(response => wrapperMethod(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13054 | };
|
13055 | }
|
13056 |
|
13057 |
|
13058 |
|
13059 |
|
13060 | function createDeleteEntity({
|
13061 | http,
|
13062 | entityPath
|
13063 | }) {
|
13064 | return function () {
|
13065 | const self = this;
|
13066 | return http.delete(entityPath + '/' + self.sys.id).then(() => {
|
13067 | }, _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13068 | };
|
13069 | }
|
13070 |
|
13071 |
|
13072 |
|
13073 |
|
13074 | function createPublishEntity({
|
13075 | http,
|
13076 | entityPath,
|
13077 | wrapperMethod
|
13078 | }) {
|
13079 | return function () {
|
13080 | const self = this;
|
13081 | return http.put(entityPath + '/' + self.sys.id + '/published', null, {
|
13082 | headers: {
|
13083 | 'X-Contentful-Version': self.sys.version
|
13084 | }
|
13085 | }).then(response => wrapperMethod(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13086 | };
|
13087 | }
|
13088 |
|
13089 |
|
13090 |
|
13091 |
|
13092 | function createUnpublishEntity({
|
13093 | http,
|
13094 | entityPath,
|
13095 | wrapperMethod
|
13096 | }) {
|
13097 | return function () {
|
13098 | const self = this;
|
13099 | return http.delete(entityPath + '/' + self.sys.id + '/published').then(response => wrapperMethod(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13100 | };
|
13101 | }
|
13102 |
|
13103 |
|
13104 |
|
13105 |
|
13106 | function createArchiveEntity({
|
13107 | http,
|
13108 | entityPath,
|
13109 | wrapperMethod
|
13110 | }) {
|
13111 | return function () {
|
13112 | const self = this;
|
13113 | return http.put(entityPath + '/' + self.sys.id + '/archived').then(response => wrapperMethod(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13114 | };
|
13115 | }
|
13116 |
|
13117 |
|
13118 |
|
13119 |
|
13120 | function createUnarchiveEntity({
|
13121 | http,
|
13122 | entityPath,
|
13123 | wrapperMethod
|
13124 | }) {
|
13125 | return function () {
|
13126 | const self = this;
|
13127 | return http.delete(entityPath + '/' + self.sys.id + '/archived').then(response => wrapperMethod(http, response.data), _error_handler__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
13128 | };
|
13129 | }
|
13130 |
|
13131 |
|
13132 |
|
13133 |
|
13134 | function createPublishedChecker() {
|
13135 | return function () {
|
13136 | const self = this;
|
13137 | return !!self.sys.publishedVersion;
|
13138 | };
|
13139 | }
|
13140 |
|
13141 |
|
13142 |
|
13143 |
|
13144 | function createUpdatedChecker() {
|
13145 | return function () {
|
13146 | const self = this;
|
13147 |
|
13148 |
|
13149 | return !!(self.sys.publishedVersion && self.sys.version > self.sys.publishedVersion + 1);
|
13150 | };
|
13151 | }
|
13152 |
|
13153 |
|
13154 |
|
13155 |
|
13156 | function createDraftChecker() {
|
13157 | return function () {
|
13158 | const self = this;
|
13159 | return !self.sys.publishedVersion;
|
13160 | };
|
13161 | }
|
13162 |
|
13163 |
|
13164 |
|
13165 |
|
13166 | function createArchivedChecker() {
|
13167 | return function () {
|
13168 | const self = this;
|
13169 | return !!self.sys.archivedVersion;
|
13170 | };
|
13171 | }
|
13172 |
|
13173 | }),
|
13174 |
|
13175 | 0:
|
13176 |
|
13177 |
|
13178 |
|
13179 |
|
13180 | (function(module, exports, __webpack_require__) {
|
13181 |
|
13182 | module.exports = __webpack_require__("./contentful-management.ts");
|
13183 |
|
13184 |
|
13185 | }),
|
13186 |
|
13187 | "assert":
|
13188 |
|
13189 |
|
13190 |
|
13191 |
|
13192 | (function(module, exports) {
|
13193 |
|
13194 | module.exports = require("assert");
|
13195 |
|
13196 | }),
|
13197 |
|
13198 | "http":
|
13199 |
|
13200 |
|
13201 |
|
13202 |
|
13203 | (function(module, exports) {
|
13204 |
|
13205 | module.exports = require("http");
|
13206 |
|
13207 | }),
|
13208 |
|
13209 | "https":
|
13210 |
|
13211 |
|
13212 |
|
13213 |
|
13214 | (function(module, exports) {
|
13215 |
|
13216 | module.exports = require("https");
|
13217 |
|
13218 | }),
|
13219 |
|
13220 | "os":
|
13221 |
|
13222 |
|
13223 |
|
13224 |
|
13225 | (function(module, exports) {
|
13226 |
|
13227 | module.exports = require("os");
|
13228 |
|
13229 | }),
|
13230 |
|
13231 | "stream":
|
13232 |
|
13233 |
|
13234 |
|
13235 |
|
13236 | (function(module, exports) {
|
13237 |
|
13238 | module.exports = require("stream");
|
13239 |
|
13240 | }),
|
13241 |
|
13242 | "tty":
|
13243 |
|
13244 |
|
13245 |
|
13246 |
|
13247 | (function(module, exports) {
|
13248 |
|
13249 | module.exports = require("tty");
|
13250 |
|
13251 | }),
|
13252 |
|
13253 | "url":
|
13254 |
|
13255 |
|
13256 |
|
13257 |
|
13258 | (function(module, exports) {
|
13259 |
|
13260 | module.exports = require("url");
|
13261 |
|
13262 | }),
|
13263 |
|
13264 | "util":
|
13265 |
|
13266 |
|
13267 |
|
13268 |
|
13269 | (function(module, exports) {
|
13270 |
|
13271 | module.exports = require("util");
|
13272 |
|
13273 | }),
|
13274 |
|
13275 | "zlib":
|
13276 |
|
13277 |
|
13278 |
|
13279 |
|
13280 | (function(module, exports) {
|
13281 |
|
13282 | module.exports = require("zlib");
|
13283 |
|
13284 | })
|
13285 |
|
13286 | });
|
13287 |
|
\ | No newline at end of file |