bgm-wiki-rev-diff

show diff between bgm.tv wiki versions

目前為 2021-05-23 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name bgm-wiki-rev-diff
  3. // @namespace https://trim21.me/
  4. // @version 0.0.18
  5. // @author Trim21 <i@trim21.me>
  6. // @source https://github.com/Trim21/bgm-wiki-rev-diff
  7. // @supportURL https://github.com/Trim21/bgm-wiki-rev-diff/issues
  8. // @license MIT
  9. // @match https://bgm.tv/subject/*/edit*
  10. // @match https://bangumi.tv/subject/*/edit*
  11. // @require https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js
  12. // @require https://cdn.jsdelivr.net/npm/diff2html@3.4.4/bundles/js/diff2html.min.js
  13. // @require https://cdn.jsdelivr.net/npm/axios@0.21.1/dist/axios.min.js
  14. // @require https://cdn.jsdelivr.net/npm/diff@5.0.0/dist/diff.min.js
  15. // @connect bgm.tv
  16. // @connect bangumi.tv
  17. // @run-at document-end
  18. // @description show diff between bgm.tv wiki versions
  19. // ==/UserScript==
  20.  
  21.  
  22. /******/ (function() { // webpackBootstrap
  23. /******/ var __webpack_modules__ = ({
  24.  
  25. /***/ "./node_modules/axios/index.js":
  26. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  27.  
  28. module.exports = __webpack_require__("./node_modules/axios/lib/axios.js");
  29.  
  30. /***/ }),
  31.  
  32. /***/ "./node_modules/axios/lib/adapters/xhr.js":
  33. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  34.  
  35. "use strict";
  36.  
  37.  
  38. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  39. var settle = __webpack_require__("./node_modules/axios/lib/core/settle.js");
  40. var cookies = __webpack_require__("./node_modules/axios/lib/helpers/cookies.js");
  41. var buildURL = __webpack_require__("./node_modules/axios/lib/helpers/buildURL.js");
  42. var buildFullPath = __webpack_require__("./node_modules/axios/lib/core/buildFullPath.js");
  43. var parseHeaders = __webpack_require__("./node_modules/axios/lib/helpers/parseHeaders.js");
  44. var isURLSameOrigin = __webpack_require__("./node_modules/axios/lib/helpers/isURLSameOrigin.js");
  45. var createError = __webpack_require__("./node_modules/axios/lib/core/createError.js");
  46.  
  47. module.exports = function xhrAdapter(config) {
  48. return new Promise(function dispatchXhrRequest(resolve, reject) {
  49. var requestData = config.data;
  50. var requestHeaders = config.headers;
  51.  
  52. if (utils.isFormData(requestData)) {
  53. delete requestHeaders['Content-Type']; // Let the browser set it
  54. }
  55.  
  56. var request = new XMLHttpRequest();
  57.  
  58. // HTTP basic authentication
  59. if (config.auth) {
  60. var username = config.auth.username || '';
  61. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  62. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  63. }
  64.  
  65. var fullPath = buildFullPath(config.baseURL, config.url);
  66. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  67.  
  68. // Set the request timeout in MS
  69. request.timeout = config.timeout;
  70.  
  71. // Listen for ready state
  72. request.onreadystatechange = function handleLoad() {
  73. if (!request || request.readyState !== 4) {
  74. return;
  75. }
  76.  
  77. // The request errored out and we didn't get a response, this will be
  78. // handled by onerror instead
  79. // With one exception: request that using file: protocol, most browsers
  80. // will return status as 0 even though it's a successful request
  81. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  82. return;
  83. }
  84.  
  85. // Prepare the response
  86. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  87. var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
  88. var response = {
  89. data: responseData,
  90. status: request.status,
  91. statusText: request.statusText,
  92. headers: responseHeaders,
  93. config: config,
  94. request: request
  95. };
  96.  
  97. settle(resolve, reject, response);
  98.  
  99. // Clean up request
  100. request = null;
  101. };
  102.  
  103. // Handle browser request cancellation (as opposed to a manual cancellation)
  104. request.onabort = function handleAbort() {
  105. if (!request) {
  106. return;
  107. }
  108.  
  109. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  110.  
  111. // Clean up request
  112. request = null;
  113. };
  114.  
  115. // Handle low level network errors
  116. request.onerror = function handleError() {
  117. // Real errors are hidden from us by the browser
  118. // onerror should only fire if it's a network error
  119. reject(createError('Network Error', config, null, request));
  120.  
  121. // Clean up request
  122. request = null;
  123. };
  124.  
  125. // Handle timeout
  126. request.ontimeout = function handleTimeout() {
  127. var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
  128. if (config.timeoutErrorMessage) {
  129. timeoutErrorMessage = config.timeoutErrorMessage;
  130. }
  131. reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
  132. request));
  133.  
  134. // Clean up request
  135. request = null;
  136. };
  137.  
  138. // Add xsrf header
  139. // This is only done if running in a standard browser environment.
  140. // Specifically not if we're in a web worker, or react-native.
  141. if (utils.isStandardBrowserEnv()) {
  142. // Add xsrf header
  143. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  144. cookies.read(config.xsrfCookieName) :
  145. undefined;
  146.  
  147. if (xsrfValue) {
  148. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  149. }
  150. }
  151.  
  152. // Add headers to the request
  153. if ('setRequestHeader' in request) {
  154. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  155. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  156. // Remove Content-Type if data is undefined
  157. delete requestHeaders[key];
  158. } else {
  159. // Otherwise add header to the request
  160. request.setRequestHeader(key, val);
  161. }
  162. });
  163. }
  164.  
  165. // Add withCredentials to request if needed
  166. if (!utils.isUndefined(config.withCredentials)) {
  167. request.withCredentials = !!config.withCredentials;
  168. }
  169.  
  170. // Add responseType to request if needed
  171. if (config.responseType) {
  172. try {
  173. request.responseType = config.responseType;
  174. } catch (e) {
  175. // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.
  176. // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.
  177. if (config.responseType !== 'json') {
  178. throw e;
  179. }
  180. }
  181. }
  182.  
  183. // Handle progress if needed
  184. if (typeof config.onDownloadProgress === 'function') {
  185. request.addEventListener('progress', config.onDownloadProgress);
  186. }
  187.  
  188. // Not all browsers support upload events
  189. if (typeof config.onUploadProgress === 'function' && request.upload) {
  190. request.upload.addEventListener('progress', config.onUploadProgress);
  191. }
  192.  
  193. if (config.cancelToken) {
  194. // Handle cancellation
  195. config.cancelToken.promise.then(function onCanceled(cancel) {
  196. if (!request) {
  197. return;
  198. }
  199.  
  200. request.abort();
  201. reject(cancel);
  202. // Clean up request
  203. request = null;
  204. });
  205. }
  206.  
  207. if (!requestData) {
  208. requestData = null;
  209. }
  210.  
  211. // Send the request
  212. request.send(requestData);
  213. });
  214. };
  215.  
  216.  
  217. /***/ }),
  218.  
  219. /***/ "./node_modules/axios/lib/axios.js":
  220. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  221.  
  222. "use strict";
  223.  
  224.  
  225. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  226. var bind = __webpack_require__("./node_modules/axios/lib/helpers/bind.js");
  227. var Axios = __webpack_require__("./node_modules/axios/lib/core/Axios.js");
  228. var mergeConfig = __webpack_require__("./node_modules/axios/lib/core/mergeConfig.js");
  229. var defaults = __webpack_require__("./node_modules/axios/lib/defaults.js");
  230.  
  231. /**
  232. * Create an instance of Axios
  233. *
  234. * @param {Object} defaultConfig The default config for the instance
  235. * @return {Axios} A new instance of Axios
  236. */
  237. function createInstance(defaultConfig) {
  238. var context = new Axios(defaultConfig);
  239. var instance = bind(Axios.prototype.request, context);
  240.  
  241. // Copy axios.prototype to instance
  242. utils.extend(instance, Axios.prototype, context);
  243.  
  244. // Copy context to instance
  245. utils.extend(instance, context);
  246.  
  247. return instance;
  248. }
  249.  
  250. // Create the default instance to be exported
  251. var axios = createInstance(defaults);
  252.  
  253. // Expose Axios class to allow class inheritance
  254. axios.Axios = Axios;
  255.  
  256. // Factory for creating new instances
  257. axios.create = function create(instanceConfig) {
  258. return createInstance(mergeConfig(axios.defaults, instanceConfig));
  259. };
  260.  
  261. // Expose Cancel & CancelToken
  262. axios.Cancel = __webpack_require__("./node_modules/axios/lib/cancel/Cancel.js");
  263. axios.CancelToken = __webpack_require__("./node_modules/axios/lib/cancel/CancelToken.js");
  264. axios.isCancel = __webpack_require__("./node_modules/axios/lib/cancel/isCancel.js");
  265.  
  266. // Expose all/spread
  267. axios.all = function all(promises) {
  268. return Promise.all(promises);
  269. };
  270. axios.spread = __webpack_require__("./node_modules/axios/lib/helpers/spread.js");
  271.  
  272. // Expose isAxiosError
  273. axios.isAxiosError = __webpack_require__("./node_modules/axios/lib/helpers/isAxiosError.js");
  274.  
  275. module.exports = axios;
  276.  
  277. // Allow use of default import syntax in TypeScript
  278. module.exports.default = axios;
  279.  
  280.  
  281. /***/ }),
  282.  
  283. /***/ "./node_modules/axios/lib/cancel/Cancel.js":
  284. /***/ (function(module) {
  285.  
  286. "use strict";
  287.  
  288.  
  289. /**
  290. * A `Cancel` is an object that is thrown when an operation is canceled.
  291. *
  292. * @class
  293. * @param {string=} message The message.
  294. */
  295. function Cancel(message) {
  296. this.message = message;
  297. }
  298.  
  299. Cancel.prototype.toString = function toString() {
  300. return 'Cancel' + (this.message ? ': ' + this.message : '');
  301. };
  302.  
  303. Cancel.prototype.__CANCEL__ = true;
  304.  
  305. module.exports = Cancel;
  306.  
  307.  
  308. /***/ }),
  309.  
  310. /***/ "./node_modules/axios/lib/cancel/CancelToken.js":
  311. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  312.  
  313. "use strict";
  314.  
  315.  
  316. var Cancel = __webpack_require__("./node_modules/axios/lib/cancel/Cancel.js");
  317.  
  318. /**
  319. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  320. *
  321. * @class
  322. * @param {Function} executor The executor function.
  323. */
  324. function CancelToken(executor) {
  325. if (typeof executor !== 'function') {
  326. throw new TypeError('executor must be a function.');
  327. }
  328.  
  329. var resolvePromise;
  330. this.promise = new Promise(function promiseExecutor(resolve) {
  331. resolvePromise = resolve;
  332. });
  333.  
  334. var token = this;
  335. executor(function cancel(message) {
  336. if (token.reason) {
  337. // Cancellation has already been requested
  338. return;
  339. }
  340.  
  341. token.reason = new Cancel(message);
  342. resolvePromise(token.reason);
  343. });
  344. }
  345.  
  346. /**
  347. * Throws a `Cancel` if cancellation has been requested.
  348. */
  349. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  350. if (this.reason) {
  351. throw this.reason;
  352. }
  353. };
  354.  
  355. /**
  356. * Returns an object that contains a new `CancelToken` and a function that, when called,
  357. * cancels the `CancelToken`.
  358. */
  359. CancelToken.source = function source() {
  360. var cancel;
  361. var token = new CancelToken(function executor(c) {
  362. cancel = c;
  363. });
  364. return {
  365. token: token,
  366. cancel: cancel
  367. };
  368. };
  369.  
  370. module.exports = CancelToken;
  371.  
  372.  
  373. /***/ }),
  374.  
  375. /***/ "./node_modules/axios/lib/cancel/isCancel.js":
  376. /***/ (function(module) {
  377.  
  378. "use strict";
  379.  
  380.  
  381. module.exports = function isCancel(value) {
  382. return !!(value && value.__CANCEL__);
  383. };
  384.  
  385.  
  386. /***/ }),
  387.  
  388. /***/ "./node_modules/axios/lib/core/Axios.js":
  389. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  390.  
  391. "use strict";
  392.  
  393.  
  394. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  395. var buildURL = __webpack_require__("./node_modules/axios/lib/helpers/buildURL.js");
  396. var InterceptorManager = __webpack_require__("./node_modules/axios/lib/core/InterceptorManager.js");
  397. var dispatchRequest = __webpack_require__("./node_modules/axios/lib/core/dispatchRequest.js");
  398. var mergeConfig = __webpack_require__("./node_modules/axios/lib/core/mergeConfig.js");
  399.  
  400. /**
  401. * Create a new instance of Axios
  402. *
  403. * @param {Object} instanceConfig The default config for the instance
  404. */
  405. function Axios(instanceConfig) {
  406. this.defaults = instanceConfig;
  407. this.interceptors = {
  408. request: new InterceptorManager(),
  409. response: new InterceptorManager()
  410. };
  411. }
  412.  
  413. /**
  414. * Dispatch a request
  415. *
  416. * @param {Object} config The config specific for this request (merged with this.defaults)
  417. */
  418. Axios.prototype.request = function request(config) {
  419. /*eslint no-param-reassign:0*/
  420. // Allow for axios('example/url'[, config]) a la fetch API
  421. if (typeof config === 'string') {
  422. config = arguments[1] || {};
  423. config.url = arguments[0];
  424. } else {
  425. config = config || {};
  426. }
  427.  
  428. config = mergeConfig(this.defaults, config);
  429.  
  430. // Set config.method
  431. if (config.method) {
  432. config.method = config.method.toLowerCase();
  433. } else if (this.defaults.method) {
  434. config.method = this.defaults.method.toLowerCase();
  435. } else {
  436. config.method = 'get';
  437. }
  438.  
  439. // Hook up interceptors middleware
  440. var chain = [dispatchRequest, undefined];
  441. var promise = Promise.resolve(config);
  442.  
  443. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  444. chain.unshift(interceptor.fulfilled, interceptor.rejected);
  445. });
  446.  
  447. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  448. chain.push(interceptor.fulfilled, interceptor.rejected);
  449. });
  450.  
  451. while (chain.length) {
  452. promise = promise.then(chain.shift(), chain.shift());
  453. }
  454.  
  455. return promise;
  456. };
  457.  
  458. Axios.prototype.getUri = function getUri(config) {
  459. config = mergeConfig(this.defaults, config);
  460. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  461. };
  462.  
  463. // Provide aliases for supported request methods
  464. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  465. /*eslint func-names:0*/
  466. Axios.prototype[method] = function(url, config) {
  467. return this.request(mergeConfig(config || {}, {
  468. method: method,
  469. url: url,
  470. data: (config || {}).data
  471. }));
  472. };
  473. });
  474.  
  475. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  476. /*eslint func-names:0*/
  477. Axios.prototype[method] = function(url, data, config) {
  478. return this.request(mergeConfig(config || {}, {
  479. method: method,
  480. url: url,
  481. data: data
  482. }));
  483. };
  484. });
  485.  
  486. module.exports = Axios;
  487.  
  488.  
  489. /***/ }),
  490.  
  491. /***/ "./node_modules/axios/lib/core/InterceptorManager.js":
  492. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  493.  
  494. "use strict";
  495.  
  496.  
  497. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  498.  
  499. function InterceptorManager() {
  500. this.handlers = [];
  501. }
  502.  
  503. /**
  504. * Add a new interceptor to the stack
  505. *
  506. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  507. * @param {Function} rejected The function to handle `reject` for a `Promise`
  508. *
  509. * @return {Number} An ID used to remove interceptor later
  510. */
  511. InterceptorManager.prototype.use = function use(fulfilled, rejected) {
  512. this.handlers.push({
  513. fulfilled: fulfilled,
  514. rejected: rejected
  515. });
  516. return this.handlers.length - 1;
  517. };
  518.  
  519. /**
  520. * Remove an interceptor from the stack
  521. *
  522. * @param {Number} id The ID that was returned by `use`
  523. */
  524. InterceptorManager.prototype.eject = function eject(id) {
  525. if (this.handlers[id]) {
  526. this.handlers[id] = null;
  527. }
  528. };
  529.  
  530. /**
  531. * Iterate over all the registered interceptors
  532. *
  533. * This method is particularly useful for skipping over any
  534. * interceptors that may have become `null` calling `eject`.
  535. *
  536. * @param {Function} fn The function to call for each interceptor
  537. */
  538. InterceptorManager.prototype.forEach = function forEach(fn) {
  539. utils.forEach(this.handlers, function forEachHandler(h) {
  540. if (h !== null) {
  541. fn(h);
  542. }
  543. });
  544. };
  545.  
  546. module.exports = InterceptorManager;
  547.  
  548.  
  549. /***/ }),
  550.  
  551. /***/ "./node_modules/axios/lib/core/buildFullPath.js":
  552. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  553.  
  554. "use strict";
  555.  
  556.  
  557. var isAbsoluteURL = __webpack_require__("./node_modules/axios/lib/helpers/isAbsoluteURL.js");
  558. var combineURLs = __webpack_require__("./node_modules/axios/lib/helpers/combineURLs.js");
  559.  
  560. /**
  561. * Creates a new URL by combining the baseURL with the requestedURL,
  562. * only when the requestedURL is not already an absolute URL.
  563. * If the requestURL is absolute, this function returns the requestedURL untouched.
  564. *
  565. * @param {string} baseURL The base URL
  566. * @param {string} requestedURL Absolute or relative URL to combine
  567. * @returns {string} The combined full path
  568. */
  569. module.exports = function buildFullPath(baseURL, requestedURL) {
  570. if (baseURL && !isAbsoluteURL(requestedURL)) {
  571. return combineURLs(baseURL, requestedURL);
  572. }
  573. return requestedURL;
  574. };
  575.  
  576.  
  577. /***/ }),
  578.  
  579. /***/ "./node_modules/axios/lib/core/createError.js":
  580. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  581.  
  582. "use strict";
  583.  
  584.  
  585. var enhanceError = __webpack_require__("./node_modules/axios/lib/core/enhanceError.js");
  586.  
  587. /**
  588. * Create an Error with the specified message, config, error code, request and response.
  589. *
  590. * @param {string} message The error message.
  591. * @param {Object} config The config.
  592. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  593. * @param {Object} [request] The request.
  594. * @param {Object} [response] The response.
  595. * @returns {Error} The created error.
  596. */
  597. module.exports = function createError(message, config, code, request, response) {
  598. var error = new Error(message);
  599. return enhanceError(error, config, code, request, response);
  600. };
  601.  
  602.  
  603. /***/ }),
  604.  
  605. /***/ "./node_modules/axios/lib/core/dispatchRequest.js":
  606. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  607.  
  608. "use strict";
  609.  
  610.  
  611. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  612. var transformData = __webpack_require__("./node_modules/axios/lib/core/transformData.js");
  613. var isCancel = __webpack_require__("./node_modules/axios/lib/cancel/isCancel.js");
  614. var defaults = __webpack_require__("./node_modules/axios/lib/defaults.js");
  615.  
  616. /**
  617. * Throws a `Cancel` if cancellation has been requested.
  618. */
  619. function throwIfCancellationRequested(config) {
  620. if (config.cancelToken) {
  621. config.cancelToken.throwIfRequested();
  622. }
  623. }
  624.  
  625. /**
  626. * Dispatch a request to the server using the configured adapter.
  627. *
  628. * @param {object} config The config that is to be used for the request
  629. * @returns {Promise} The Promise to be fulfilled
  630. */
  631. module.exports = function dispatchRequest(config) {
  632. throwIfCancellationRequested(config);
  633.  
  634. // Ensure headers exist
  635. config.headers = config.headers || {};
  636.  
  637. // Transform request data
  638. config.data = transformData(
  639. config.data,
  640. config.headers,
  641. config.transformRequest
  642. );
  643.  
  644. // Flatten headers
  645. config.headers = utils.merge(
  646. config.headers.common || {},
  647. config.headers[config.method] || {},
  648. config.headers
  649. );
  650.  
  651. utils.forEach(
  652. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  653. function cleanHeaderConfig(method) {
  654. delete config.headers[method];
  655. }
  656. );
  657.  
  658. var adapter = config.adapter || defaults.adapter;
  659.  
  660. return adapter(config).then(function onAdapterResolution(response) {
  661. throwIfCancellationRequested(config);
  662.  
  663. // Transform response data
  664. response.data = transformData(
  665. response.data,
  666. response.headers,
  667. config.transformResponse
  668. );
  669.  
  670. return response;
  671. }, function onAdapterRejection(reason) {
  672. if (!isCancel(reason)) {
  673. throwIfCancellationRequested(config);
  674.  
  675. // Transform response data
  676. if (reason && reason.response) {
  677. reason.response.data = transformData(
  678. reason.response.data,
  679. reason.response.headers,
  680. config.transformResponse
  681. );
  682. }
  683. }
  684.  
  685. return Promise.reject(reason);
  686. });
  687. };
  688.  
  689.  
  690. /***/ }),
  691.  
  692. /***/ "./node_modules/axios/lib/core/enhanceError.js":
  693. /***/ (function(module) {
  694.  
  695. "use strict";
  696.  
  697.  
  698. /**
  699. * Update an Error with the specified config, error code, and response.
  700. *
  701. * @param {Error} error The error to update.
  702. * @param {Object} config The config.
  703. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  704. * @param {Object} [request] The request.
  705. * @param {Object} [response] The response.
  706. * @returns {Error} The error.
  707. */
  708. module.exports = function enhanceError(error, config, code, request, response) {
  709. error.config = config;
  710. if (code) {
  711. error.code = code;
  712. }
  713.  
  714. error.request = request;
  715. error.response = response;
  716. error.isAxiosError = true;
  717.  
  718. error.toJSON = function toJSON() {
  719. return {
  720. // Standard
  721. message: this.message,
  722. name: this.name,
  723. // Microsoft
  724. description: this.description,
  725. number: this.number,
  726. // Mozilla
  727. fileName: this.fileName,
  728. lineNumber: this.lineNumber,
  729. columnNumber: this.columnNumber,
  730. stack: this.stack,
  731. // Axios
  732. config: this.config,
  733. code: this.code
  734. };
  735. };
  736. return error;
  737. };
  738.  
  739.  
  740. /***/ }),
  741.  
  742. /***/ "./node_modules/axios/lib/core/mergeConfig.js":
  743. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  744.  
  745. "use strict";
  746.  
  747.  
  748. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  749.  
  750. /**
  751. * Config-specific merge-function which creates a new config-object
  752. * by merging two configuration objects together.
  753. *
  754. * @param {Object} config1
  755. * @param {Object} config2
  756. * @returns {Object} New object resulting from merging config2 to config1
  757. */
  758. module.exports = function mergeConfig(config1, config2) {
  759. // eslint-disable-next-line no-param-reassign
  760. config2 = config2 || {};
  761. var config = {};
  762.  
  763. var valueFromConfig2Keys = ['url', 'method', 'data'];
  764. var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  765. var defaultToConfig2Keys = [
  766. 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
  767. 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
  768. 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
  769. 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
  770. 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  771. ];
  772. var directMergeKeys = ['validateStatus'];
  773.  
  774. function getMergedValue(target, source) {
  775. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  776. return utils.merge(target, source);
  777. } else if (utils.isPlainObject(source)) {
  778. return utils.merge({}, source);
  779. } else if (utils.isArray(source)) {
  780. return source.slice();
  781. }
  782. return source;
  783. }
  784.  
  785. function mergeDeepProperties(prop) {
  786. if (!utils.isUndefined(config2[prop])) {
  787. config[prop] = getMergedValue(config1[prop], config2[prop]);
  788. } else if (!utils.isUndefined(config1[prop])) {
  789. config[prop] = getMergedValue(undefined, config1[prop]);
  790. }
  791. }
  792.  
  793. utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
  794. if (!utils.isUndefined(config2[prop])) {
  795. config[prop] = getMergedValue(undefined, config2[prop]);
  796. }
  797. });
  798.  
  799. utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
  800.  
  801. utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
  802. if (!utils.isUndefined(config2[prop])) {
  803. config[prop] = getMergedValue(undefined, config2[prop]);
  804. } else if (!utils.isUndefined(config1[prop])) {
  805. config[prop] = getMergedValue(undefined, config1[prop]);
  806. }
  807. });
  808.  
  809. utils.forEach(directMergeKeys, function merge(prop) {
  810. if (prop in config2) {
  811. config[prop] = getMergedValue(config1[prop], config2[prop]);
  812. } else if (prop in config1) {
  813. config[prop] = getMergedValue(undefined, config1[prop]);
  814. }
  815. });
  816.  
  817. var axiosKeys = valueFromConfig2Keys
  818. .concat(mergeDeepPropertiesKeys)
  819. .concat(defaultToConfig2Keys)
  820. .concat(directMergeKeys);
  821.  
  822. var otherKeys = Object
  823. .keys(config1)
  824. .concat(Object.keys(config2))
  825. .filter(function filterAxiosKeys(key) {
  826. return axiosKeys.indexOf(key) === -1;
  827. });
  828.  
  829. utils.forEach(otherKeys, mergeDeepProperties);
  830.  
  831. return config;
  832. };
  833.  
  834.  
  835. /***/ }),
  836.  
  837. /***/ "./node_modules/axios/lib/core/settle.js":
  838. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  839.  
  840. "use strict";
  841.  
  842.  
  843. var createError = __webpack_require__("./node_modules/axios/lib/core/createError.js");
  844.  
  845. /**
  846. * Resolve or reject a Promise based on response status.
  847. *
  848. * @param {Function} resolve A function that resolves the promise.
  849. * @param {Function} reject A function that rejects the promise.
  850. * @param {object} response The response.
  851. */
  852. module.exports = function settle(resolve, reject, response) {
  853. var validateStatus = response.config.validateStatus;
  854. if (!response.status || !validateStatus || validateStatus(response.status)) {
  855. resolve(response);
  856. } else {
  857. reject(createError(
  858. 'Request failed with status code ' + response.status,
  859. response.config,
  860. null,
  861. response.request,
  862. response
  863. ));
  864. }
  865. };
  866.  
  867.  
  868. /***/ }),
  869.  
  870. /***/ "./node_modules/axios/lib/core/transformData.js":
  871. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  872.  
  873. "use strict";
  874.  
  875.  
  876. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  877.  
  878. /**
  879. * Transform the data for a request or a response
  880. *
  881. * @param {Object|String} data The data to be transformed
  882. * @param {Array} headers The headers for the request or response
  883. * @param {Array|Function} fns A single function or Array of functions
  884. * @returns {*} The resulting transformed data
  885. */
  886. module.exports = function transformData(data, headers, fns) {
  887. /*eslint no-param-reassign:0*/
  888. utils.forEach(fns, function transform(fn) {
  889. data = fn(data, headers);
  890. });
  891.  
  892. return data;
  893. };
  894.  
  895.  
  896. /***/ }),
  897.  
  898. /***/ "./node_modules/axios/lib/defaults.js":
  899. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  900.  
  901. "use strict";
  902.  
  903.  
  904. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  905. var normalizeHeaderName = __webpack_require__("./node_modules/axios/lib/helpers/normalizeHeaderName.js");
  906.  
  907. var DEFAULT_CONTENT_TYPE = {
  908. 'Content-Type': 'application/x-www-form-urlencoded'
  909. };
  910.  
  911. function setContentTypeIfUnset(headers, value) {
  912. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  913. headers['Content-Type'] = value;
  914. }
  915. }
  916.  
  917. function getDefaultAdapter() {
  918. var adapter;
  919. if (typeof XMLHttpRequest !== 'undefined') {
  920. // For browsers use XHR adapter
  921. adapter = __webpack_require__("./node_modules/axios/lib/adapters/xhr.js");
  922. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  923. // For node use HTTP adapter
  924. adapter = __webpack_require__("./node_modules/axios/lib/adapters/xhr.js");
  925. }
  926. return adapter;
  927. }
  928.  
  929. var defaults = {
  930. adapter: getDefaultAdapter(),
  931.  
  932. transformRequest: [function transformRequest(data, headers) {
  933. normalizeHeaderName(headers, 'Accept');
  934. normalizeHeaderName(headers, 'Content-Type');
  935. if (utils.isFormData(data) ||
  936. utils.isArrayBuffer(data) ||
  937. utils.isBuffer(data) ||
  938. utils.isStream(data) ||
  939. utils.isFile(data) ||
  940. utils.isBlob(data)
  941. ) {
  942. return data;
  943. }
  944. if (utils.isArrayBufferView(data)) {
  945. return data.buffer;
  946. }
  947. if (utils.isURLSearchParams(data)) {
  948. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  949. return data.toString();
  950. }
  951. if (utils.isObject(data)) {
  952. setContentTypeIfUnset(headers, 'application/json;charset=utf-8');
  953. return JSON.stringify(data);
  954. }
  955. return data;
  956. }],
  957.  
  958. transformResponse: [function transformResponse(data) {
  959. /*eslint no-param-reassign:0*/
  960. if (typeof data === 'string') {
  961. try {
  962. data = JSON.parse(data);
  963. } catch (e) { /* Ignore */ }
  964. }
  965. return data;
  966. }],
  967.  
  968. /**
  969. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  970. * timeout is not created.
  971. */
  972. timeout: 0,
  973.  
  974. xsrfCookieName: 'XSRF-TOKEN',
  975. xsrfHeaderName: 'X-XSRF-TOKEN',
  976.  
  977. maxContentLength: -1,
  978. maxBodyLength: -1,
  979.  
  980. validateStatus: function validateStatus(status) {
  981. return status >= 200 && status < 300;
  982. }
  983. };
  984.  
  985. defaults.headers = {
  986. common: {
  987. 'Accept': 'application/json, text/plain, */*'
  988. }
  989. };
  990.  
  991. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  992. defaults.headers[method] = {};
  993. });
  994.  
  995. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  996. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  997. });
  998.  
  999. module.exports = defaults;
  1000.  
  1001.  
  1002. /***/ }),
  1003.  
  1004. /***/ "./node_modules/axios/lib/helpers/bind.js":
  1005. /***/ (function(module) {
  1006.  
  1007. "use strict";
  1008.  
  1009.  
  1010. module.exports = function bind(fn, thisArg) {
  1011. return function wrap() {
  1012. var args = new Array(arguments.length);
  1013. for (var i = 0; i < args.length; i++) {
  1014. args[i] = arguments[i];
  1015. }
  1016. return fn.apply(thisArg, args);
  1017. };
  1018. };
  1019.  
  1020.  
  1021. /***/ }),
  1022.  
  1023. /***/ "./node_modules/axios/lib/helpers/buildURL.js":
  1024. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1025.  
  1026. "use strict";
  1027.  
  1028.  
  1029. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  1030.  
  1031. function encode(val) {
  1032. return encodeURIComponent(val).
  1033. replace(/%3A/gi, ':').
  1034. replace(/%24/g, '$').
  1035. replace(/%2C/gi, ',').
  1036. replace(/%20/g, '+').
  1037. replace(/%5B/gi, '[').
  1038. replace(/%5D/gi, ']');
  1039. }
  1040.  
  1041. /**
  1042. * Build a URL by appending params to the end
  1043. *
  1044. * @param {string} url The base of the url (e.g., http://www.google.com)
  1045. * @param {object} [params] The params to be appended
  1046. * @returns {string} The formatted url
  1047. */
  1048. module.exports = function buildURL(url, params, paramsSerializer) {
  1049. /*eslint no-param-reassign:0*/
  1050. if (!params) {
  1051. return url;
  1052. }
  1053.  
  1054. var serializedParams;
  1055. if (paramsSerializer) {
  1056. serializedParams = paramsSerializer(params);
  1057. } else if (utils.isURLSearchParams(params)) {
  1058. serializedParams = params.toString();
  1059. } else {
  1060. var parts = [];
  1061.  
  1062. utils.forEach(params, function serialize(val, key) {
  1063. if (val === null || typeof val === 'undefined') {
  1064. return;
  1065. }
  1066.  
  1067. if (utils.isArray(val)) {
  1068. key = key + '[]';
  1069. } else {
  1070. val = [val];
  1071. }
  1072.  
  1073. utils.forEach(val, function parseValue(v) {
  1074. if (utils.isDate(v)) {
  1075. v = v.toISOString();
  1076. } else if (utils.isObject(v)) {
  1077. v = JSON.stringify(v);
  1078. }
  1079. parts.push(encode(key) + '=' + encode(v));
  1080. });
  1081. });
  1082.  
  1083. serializedParams = parts.join('&');
  1084. }
  1085.  
  1086. if (serializedParams) {
  1087. var hashmarkIndex = url.indexOf('#');
  1088. if (hashmarkIndex !== -1) {
  1089. url = url.slice(0, hashmarkIndex);
  1090. }
  1091.  
  1092. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  1093. }
  1094.  
  1095. return url;
  1096. };
  1097.  
  1098.  
  1099. /***/ }),
  1100.  
  1101. /***/ "./node_modules/axios/lib/helpers/combineURLs.js":
  1102. /***/ (function(module) {
  1103.  
  1104. "use strict";
  1105.  
  1106.  
  1107. /**
  1108. * Creates a new URL by combining the specified URLs
  1109. *
  1110. * @param {string} baseURL The base URL
  1111. * @param {string} relativeURL The relative URL
  1112. * @returns {string} The combined URL
  1113. */
  1114. module.exports = function combineURLs(baseURL, relativeURL) {
  1115. return relativeURL
  1116. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  1117. : baseURL;
  1118. };
  1119.  
  1120.  
  1121. /***/ }),
  1122.  
  1123. /***/ "./node_modules/axios/lib/helpers/cookies.js":
  1124. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1125.  
  1126. "use strict";
  1127.  
  1128.  
  1129. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  1130.  
  1131. module.exports = (
  1132. utils.isStandardBrowserEnv() ?
  1133.  
  1134. // Standard browser envs support document.cookie
  1135. (function standardBrowserEnv() {
  1136. return {
  1137. write: function write(name, value, expires, path, domain, secure) {
  1138. var cookie = [];
  1139. cookie.push(name + '=' + encodeURIComponent(value));
  1140.  
  1141. if (utils.isNumber(expires)) {
  1142. cookie.push('expires=' + new Date(expires).toGMTString());
  1143. }
  1144.  
  1145. if (utils.isString(path)) {
  1146. cookie.push('path=' + path);
  1147. }
  1148.  
  1149. if (utils.isString(domain)) {
  1150. cookie.push('domain=' + domain);
  1151. }
  1152.  
  1153. if (secure === true) {
  1154. cookie.push('secure');
  1155. }
  1156.  
  1157. document.cookie = cookie.join('; ');
  1158. },
  1159.  
  1160. read: function read(name) {
  1161. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  1162. return (match ? decodeURIComponent(match[3]) : null);
  1163. },
  1164.  
  1165. remove: function remove(name) {
  1166. this.write(name, '', Date.now() - 86400000);
  1167. }
  1168. };
  1169. })() :
  1170.  
  1171. // Non standard browser env (web workers, react-native) lack needed support.
  1172. (function nonStandardBrowserEnv() {
  1173. return {
  1174. write: function write() {},
  1175. read: function read() { return null; },
  1176. remove: function remove() {}
  1177. };
  1178. })()
  1179. );
  1180.  
  1181.  
  1182. /***/ }),
  1183.  
  1184. /***/ "./node_modules/axios/lib/helpers/isAbsoluteURL.js":
  1185. /***/ (function(module) {
  1186.  
  1187. "use strict";
  1188.  
  1189.  
  1190. /**
  1191. * Determines whether the specified URL is absolute
  1192. *
  1193. * @param {string} url The URL to test
  1194. * @returns {boolean} True if the specified URL is absolute, otherwise false
  1195. */
  1196. module.exports = function isAbsoluteURL(url) {
  1197. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  1198. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  1199. // by any combination of letters, digits, plus, period, or hyphen.
  1200. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  1201. };
  1202.  
  1203.  
  1204. /***/ }),
  1205.  
  1206. /***/ "./node_modules/axios/lib/helpers/isAxiosError.js":
  1207. /***/ (function(module) {
  1208.  
  1209. "use strict";
  1210.  
  1211.  
  1212. /**
  1213. * Determines whether the payload is an error thrown by Axios
  1214. *
  1215. * @param {*} payload The value to test
  1216. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  1217. */
  1218. module.exports = function isAxiosError(payload) {
  1219. return (typeof payload === 'object') && (payload.isAxiosError === true);
  1220. };
  1221.  
  1222.  
  1223. /***/ }),
  1224.  
  1225. /***/ "./node_modules/axios/lib/helpers/isURLSameOrigin.js":
  1226. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1227.  
  1228. "use strict";
  1229.  
  1230.  
  1231. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  1232.  
  1233. module.exports = (
  1234. utils.isStandardBrowserEnv() ?
  1235.  
  1236. // Standard browser envs have full support of the APIs needed to test
  1237. // whether the request URL is of the same origin as current location.
  1238. (function standardBrowserEnv() {
  1239. var msie = /(msie|trident)/i.test(navigator.userAgent);
  1240. var urlParsingNode = document.createElement('a');
  1241. var originURL;
  1242.  
  1243. /**
  1244. * Parse a URL to discover it's components
  1245. *
  1246. * @param {String} url The URL to be parsed
  1247. * @returns {Object}
  1248. */
  1249. function resolveURL(url) {
  1250. var href = url;
  1251.  
  1252. if (msie) {
  1253. // IE needs attribute set twice to normalize properties
  1254. urlParsingNode.setAttribute('href', href);
  1255. href = urlParsingNode.href;
  1256. }
  1257.  
  1258. urlParsingNode.setAttribute('href', href);
  1259.  
  1260. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  1261. return {
  1262. href: urlParsingNode.href,
  1263. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  1264. host: urlParsingNode.host,
  1265. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  1266. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  1267. hostname: urlParsingNode.hostname,
  1268. port: urlParsingNode.port,
  1269. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  1270. urlParsingNode.pathname :
  1271. '/' + urlParsingNode.pathname
  1272. };
  1273. }
  1274.  
  1275. originURL = resolveURL(window.location.href);
  1276.  
  1277. /**
  1278. * Determine if a URL shares the same origin as the current location
  1279. *
  1280. * @param {String} requestURL The URL to test
  1281. * @returns {boolean} True if URL shares the same origin, otherwise false
  1282. */
  1283. return function isURLSameOrigin(requestURL) {
  1284. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  1285. return (parsed.protocol === originURL.protocol &&
  1286. parsed.host === originURL.host);
  1287. };
  1288. })() :
  1289.  
  1290. // Non standard browser envs (web workers, react-native) lack needed support.
  1291. (function nonStandardBrowserEnv() {
  1292. return function isURLSameOrigin() {
  1293. return true;
  1294. };
  1295. })()
  1296. );
  1297.  
  1298.  
  1299. /***/ }),
  1300.  
  1301. /***/ "./node_modules/axios/lib/helpers/normalizeHeaderName.js":
  1302. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1303.  
  1304. "use strict";
  1305.  
  1306.  
  1307. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  1308.  
  1309. module.exports = function normalizeHeaderName(headers, normalizedName) {
  1310. utils.forEach(headers, function processHeader(value, name) {
  1311. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  1312. headers[normalizedName] = value;
  1313. delete headers[name];
  1314. }
  1315. });
  1316. };
  1317.  
  1318.  
  1319. /***/ }),
  1320.  
  1321. /***/ "./node_modules/axios/lib/helpers/parseHeaders.js":
  1322. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1323.  
  1324. "use strict";
  1325.  
  1326.  
  1327. var utils = __webpack_require__("./node_modules/axios/lib/utils.js");
  1328.  
  1329. // Headers whose duplicates are ignored by node
  1330. // c.f. https://nodejs.org/api/http.html#http_message_headers
  1331. var ignoreDuplicateOf = [
  1332. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  1333. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  1334. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  1335. 'referer', 'retry-after', 'user-agent'
  1336. ];
  1337.  
  1338. /**
  1339. * Parse headers into an object
  1340. *
  1341. * ```
  1342. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  1343. * Content-Type: application/json
  1344. * Connection: keep-alive
  1345. * Transfer-Encoding: chunked
  1346. * ```
  1347. *
  1348. * @param {String} headers Headers needing to be parsed
  1349. * @returns {Object} Headers parsed into an object
  1350. */
  1351. module.exports = function parseHeaders(headers) {
  1352. var parsed = {};
  1353. var key;
  1354. var val;
  1355. var i;
  1356.  
  1357. if (!headers) { return parsed; }
  1358.  
  1359. utils.forEach(headers.split('\n'), function parser(line) {
  1360. i = line.indexOf(':');
  1361. key = utils.trim(line.substr(0, i)).toLowerCase();
  1362. val = utils.trim(line.substr(i + 1));
  1363.  
  1364. if (key) {
  1365. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  1366. return;
  1367. }
  1368. if (key === 'set-cookie') {
  1369. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  1370. } else {
  1371. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  1372. }
  1373. }
  1374. });
  1375.  
  1376. return parsed;
  1377. };
  1378.  
  1379.  
  1380. /***/ }),
  1381.  
  1382. /***/ "./node_modules/axios/lib/helpers/spread.js":
  1383. /***/ (function(module) {
  1384.  
  1385. "use strict";
  1386.  
  1387.  
  1388. /**
  1389. * Syntactic sugar for invoking a function and expanding an array for arguments.
  1390. *
  1391. * Common use case would be to use `Function.prototype.apply`.
  1392. *
  1393. * ```js
  1394. * function f(x, y, z) {}
  1395. * var args = [1, 2, 3];
  1396. * f.apply(null, args);
  1397. * ```
  1398. *
  1399. * With `spread` this example can be re-written.
  1400. *
  1401. * ```js
  1402. * spread(function(x, y, z) {})([1, 2, 3]);
  1403. * ```
  1404. *
  1405. * @param {Function} callback
  1406. * @returns {Function}
  1407. */
  1408. module.exports = function spread(callback) {
  1409. return function wrap(arr) {
  1410. return callback.apply(null, arr);
  1411. };
  1412. };
  1413.  
  1414.  
  1415. /***/ }),
  1416.  
  1417. /***/ "./node_modules/axios/lib/utils.js":
  1418. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1419.  
  1420. "use strict";
  1421.  
  1422.  
  1423. var bind = __webpack_require__("./node_modules/axios/lib/helpers/bind.js");
  1424.  
  1425. /*global toString:true*/
  1426.  
  1427. // utils is a library of generic helper functions non-specific to axios
  1428.  
  1429. var toString = Object.prototype.toString;
  1430.  
  1431. /**
  1432. * Determine if a value is an Array
  1433. *
  1434. * @param {Object} val The value to test
  1435. * @returns {boolean} True if value is an Array, otherwise false
  1436. */
  1437. function isArray(val) {
  1438. return toString.call(val) === '[object Array]';
  1439. }
  1440.  
  1441. /**
  1442. * Determine if a value is undefined
  1443. *
  1444. * @param {Object} val The value to test
  1445. * @returns {boolean} True if the value is undefined, otherwise false
  1446. */
  1447. function isUndefined(val) {
  1448. return typeof val === 'undefined';
  1449. }
  1450.  
  1451. /**
  1452. * Determine if a value is a Buffer
  1453. *
  1454. * @param {Object} val The value to test
  1455. * @returns {boolean} True if value is a Buffer, otherwise false
  1456. */
  1457. function isBuffer(val) {
  1458. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  1459. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  1460. }
  1461.  
  1462. /**
  1463. * Determine if a value is an ArrayBuffer
  1464. *
  1465. * @param {Object} val The value to test
  1466. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  1467. */
  1468. function isArrayBuffer(val) {
  1469. return toString.call(val) === '[object ArrayBuffer]';
  1470. }
  1471.  
  1472. /**
  1473. * Determine if a value is a FormData
  1474. *
  1475. * @param {Object} val The value to test
  1476. * @returns {boolean} True if value is an FormData, otherwise false
  1477. */
  1478. function isFormData(val) {
  1479. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  1480. }
  1481.  
  1482. /**
  1483. * Determine if a value is a view on an ArrayBuffer
  1484. *
  1485. * @param {Object} val The value to test
  1486. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  1487. */
  1488. function isArrayBufferView(val) {
  1489. var result;
  1490. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  1491. result = ArrayBuffer.isView(val);
  1492. } else {
  1493. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  1494. }
  1495. return result;
  1496. }
  1497.  
  1498. /**
  1499. * Determine if a value is a String
  1500. *
  1501. * @param {Object} val The value to test
  1502. * @returns {boolean} True if value is a String, otherwise false
  1503. */
  1504. function isString(val) {
  1505. return typeof val === 'string';
  1506. }
  1507.  
  1508. /**
  1509. * Determine if a value is a Number
  1510. *
  1511. * @param {Object} val The value to test
  1512. * @returns {boolean} True if value is a Number, otherwise false
  1513. */
  1514. function isNumber(val) {
  1515. return typeof val === 'number';
  1516. }
  1517.  
  1518. /**
  1519. * Determine if a value is an Object
  1520. *
  1521. * @param {Object} val The value to test
  1522. * @returns {boolean} True if value is an Object, otherwise false
  1523. */
  1524. function isObject(val) {
  1525. return val !== null && typeof val === 'object';
  1526. }
  1527.  
  1528. /**
  1529. * Determine if a value is a plain Object
  1530. *
  1531. * @param {Object} val The value to test
  1532. * @return {boolean} True if value is a plain Object, otherwise false
  1533. */
  1534. function isPlainObject(val) {
  1535. if (toString.call(val) !== '[object Object]') {
  1536. return false;
  1537. }
  1538.  
  1539. var prototype = Object.getPrototypeOf(val);
  1540. return prototype === null || prototype === Object.prototype;
  1541. }
  1542.  
  1543. /**
  1544. * Determine if a value is a Date
  1545. *
  1546. * @param {Object} val The value to test
  1547. * @returns {boolean} True if value is a Date, otherwise false
  1548. */
  1549. function isDate(val) {
  1550. return toString.call(val) === '[object Date]';
  1551. }
  1552.  
  1553. /**
  1554. * Determine if a value is a File
  1555. *
  1556. * @param {Object} val The value to test
  1557. * @returns {boolean} True if value is a File, otherwise false
  1558. */
  1559. function isFile(val) {
  1560. return toString.call(val) === '[object File]';
  1561. }
  1562.  
  1563. /**
  1564. * Determine if a value is a Blob
  1565. *
  1566. * @param {Object} val The value to test
  1567. * @returns {boolean} True if value is a Blob, otherwise false
  1568. */
  1569. function isBlob(val) {
  1570. return toString.call(val) === '[object Blob]';
  1571. }
  1572.  
  1573. /**
  1574. * Determine if a value is a Function
  1575. *
  1576. * @param {Object} val The value to test
  1577. * @returns {boolean} True if value is a Function, otherwise false
  1578. */
  1579. function isFunction(val) {
  1580. return toString.call(val) === '[object Function]';
  1581. }
  1582.  
  1583. /**
  1584. * Determine if a value is a Stream
  1585. *
  1586. * @param {Object} val The value to test
  1587. * @returns {boolean} True if value is a Stream, otherwise false
  1588. */
  1589. function isStream(val) {
  1590. return isObject(val) && isFunction(val.pipe);
  1591. }
  1592.  
  1593. /**
  1594. * Determine if a value is a URLSearchParams object
  1595. *
  1596. * @param {Object} val The value to test
  1597. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  1598. */
  1599. function isURLSearchParams(val) {
  1600. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  1601. }
  1602.  
  1603. /**
  1604. * Trim excess whitespace off the beginning and end of a string
  1605. *
  1606. * @param {String} str The String to trim
  1607. * @returns {String} The String freed of excess whitespace
  1608. */
  1609. function trim(str) {
  1610. return str.replace(/^\s*/, '').replace(/\s*$/, '');
  1611. }
  1612.  
  1613. /**
  1614. * Determine if we're running in a standard browser environment
  1615. *
  1616. * This allows axios to run in a web worker, and react-native.
  1617. * Both environments support XMLHttpRequest, but not fully standard globals.
  1618. *
  1619. * web workers:
  1620. * typeof window -> undefined
  1621. * typeof document -> undefined
  1622. *
  1623. * react-native:
  1624. * navigator.product -> 'ReactNative'
  1625. * nativescript
  1626. * navigator.product -> 'NativeScript' or 'NS'
  1627. */
  1628. function isStandardBrowserEnv() {
  1629. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  1630. navigator.product === 'NativeScript' ||
  1631. navigator.product === 'NS')) {
  1632. return false;
  1633. }
  1634. return (
  1635. typeof window !== 'undefined' &&
  1636. typeof document !== 'undefined'
  1637. );
  1638. }
  1639.  
  1640. /**
  1641. * Iterate over an Array or an Object invoking a function for each item.
  1642. *
  1643. * If `obj` is an Array callback will be called passing
  1644. * the value, index, and complete array for each item.
  1645. *
  1646. * If 'obj' is an Object callback will be called passing
  1647. * the value, key, and complete object for each property.
  1648. *
  1649. * @param {Object|Array} obj The object to iterate
  1650. * @param {Function} fn The callback to invoke for each item
  1651. */
  1652. function forEach(obj, fn) {
  1653. // Don't bother if no value provided
  1654. if (obj === null || typeof obj === 'undefined') {
  1655. return;
  1656. }
  1657.  
  1658. // Force an array if not already something iterable
  1659. if (typeof obj !== 'object') {
  1660. /*eslint no-param-reassign:0*/
  1661. obj = [obj];
  1662. }
  1663.  
  1664. if (isArray(obj)) {
  1665. // Iterate over array values
  1666. for (var i = 0, l = obj.length; i < l; i++) {
  1667. fn.call(null, obj[i], i, obj);
  1668. }
  1669. } else {
  1670. // Iterate over object keys
  1671. for (var key in obj) {
  1672. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  1673. fn.call(null, obj[key], key, obj);
  1674. }
  1675. }
  1676. }
  1677. }
  1678.  
  1679. /**
  1680. * Accepts varargs expecting each argument to be an object, then
  1681. * immutably merges the properties of each object and returns result.
  1682. *
  1683. * When multiple objects contain the same key the later object in
  1684. * the arguments list will take precedence.
  1685. *
  1686. * Example:
  1687. *
  1688. * ```js
  1689. * var result = merge({foo: 123}, {foo: 456});
  1690. * console.log(result.foo); // outputs 456
  1691. * ```
  1692. *
  1693. * @param {Object} obj1 Object to merge
  1694. * @returns {Object} Result of all merge properties
  1695. */
  1696. function merge(/* obj1, obj2, obj3, ... */) {
  1697. var result = {};
  1698. function assignValue(val, key) {
  1699. if (isPlainObject(result[key]) && isPlainObject(val)) {
  1700. result[key] = merge(result[key], val);
  1701. } else if (isPlainObject(val)) {
  1702. result[key] = merge({}, val);
  1703. } else if (isArray(val)) {
  1704. result[key] = val.slice();
  1705. } else {
  1706. result[key] = val;
  1707. }
  1708. }
  1709.  
  1710. for (var i = 0, l = arguments.length; i < l; i++) {
  1711. forEach(arguments[i], assignValue);
  1712. }
  1713. return result;
  1714. }
  1715.  
  1716. /**
  1717. * Extends object a by mutably adding to it the properties of object b.
  1718. *
  1719. * @param {Object} a The object to be extended
  1720. * @param {Object} b The object to copy properties from
  1721. * @param {Object} thisArg The object to bind function to
  1722. * @return {Object} The resulting value of object a
  1723. */
  1724. function extend(a, b, thisArg) {
  1725. forEach(b, function assignValue(val, key) {
  1726. if (thisArg && typeof val === 'function') {
  1727. a[key] = bind(val, thisArg);
  1728. } else {
  1729. a[key] = val;
  1730. }
  1731. });
  1732. return a;
  1733. }
  1734.  
  1735. /**
  1736. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  1737. *
  1738. * @param {string} content with BOM
  1739. * @return {string} content value without BOM
  1740. */
  1741. function stripBOM(content) {
  1742. if (content.charCodeAt(0) === 0xFEFF) {
  1743. content = content.slice(1);
  1744. }
  1745. return content;
  1746. }
  1747.  
  1748. module.exports = {
  1749. isArray: isArray,
  1750. isArrayBuffer: isArrayBuffer,
  1751. isBuffer: isBuffer,
  1752. isFormData: isFormData,
  1753. isArrayBufferView: isArrayBufferView,
  1754. isString: isString,
  1755. isNumber: isNumber,
  1756. isObject: isObject,
  1757. isPlainObject: isPlainObject,
  1758. isUndefined: isUndefined,
  1759. isDate: isDate,
  1760. isFile: isFile,
  1761. isBlob: isBlob,
  1762. isFunction: isFunction,
  1763. isStream: isStream,
  1764. isURLSearchParams: isURLSearchParams,
  1765. isStandardBrowserEnv: isStandardBrowserEnv,
  1766. forEach: forEach,
  1767. merge: merge,
  1768. extend: extend,
  1769. trim: trim,
  1770. stripBOM: stripBOM
  1771. };
  1772.  
  1773.  
  1774. /***/ }),
  1775.  
  1776. /***/ "./src/compare.ts":
  1777. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1778.  
  1779. "use strict";
  1780.  
  1781. Object.defineProperty(exports, "__esModule", ({ value: true }));
  1782. exports.compare = void 0;
  1783. const parser_1 = __webpack_require__("./src/parser.ts");
  1784. const utils_1 = __webpack_require__("./src/utils.ts");
  1785. const differ_1 = __webpack_require__("./src/differ.ts");
  1786. const ui_1 = __webpack_require__("./src/ui.ts");
  1787. const model_1 = __webpack_require__("./src/model.ts");
  1788. function compare(revID1, revID2) {
  1789. ui_1.clear();
  1790. ui_1.show('<h2>loading versions...</h2>');
  1791. const rev1 = parser_1.getRevInfo(revID1);
  1792. const rev2 = parser_1.getRevInfo(revID2);
  1793. if (!(rev1 && rev2)) {
  1794. throw new Error(`error finding ${revID1}, ${revID2}`);
  1795. }
  1796. const p1 = utils_1.request(rev1.url);
  1797. const p2 = utils_1.request(rev2.url);
  1798. Promise.all([p1, p2])
  1799. .then((values) => {
  1800. const contents = [];
  1801. for (const page of values) {
  1802. contents.push(parser_1.parseRevDetails(page));
  1803. }
  1804. const c1 = new model_1.Comment(rev1, contents[0]);
  1805. const c2 = new model_1.Comment(rev2, contents[1]);
  1806. const d = differ_1.diff(c1, c2);
  1807. const rendered = ui_1.render(d);
  1808. return ui_1.show(rendered);
  1809. })
  1810. .catch(() => {
  1811. ui_1.show('<h2 style="color:red">loading versions error</h2>');
  1812. });
  1813. }
  1814. exports.compare = compare;
  1815.  
  1816.  
  1817. /***/ }),
  1818.  
  1819. /***/ "./src/differ.ts":
  1820. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1821.  
  1822. "use strict";
  1823.  
  1824. Object.defineProperty(exports, "__esModule", ({ value: true }));
  1825. exports.diff = void 0;
  1826. const Diff = __webpack_require__("diff");
  1827. function diff(rev1, rev2) {
  1828. return `${titleDiff(rev1, rev2)}\n${infoDiff(rev1, rev2)}\n${descriptionDiff(rev1, rev2)}`;
  1829. }
  1830. exports.diff = diff;
  1831. function titleDiff(rev1, rev2) {
  1832. if (rev1.details.title === rev2.details.title) {
  1833. return '';
  1834. }
  1835. return Diff.createTwoFilesPatch('title', 'title', rev1.details.title, rev2.details.title, rev1.rev.date, rev2.rev.date);
  1836. }
  1837. function infoDiff(rev1, rev2) {
  1838. if (rev1.details.rawInfo === rev2.details.rawInfo) {
  1839. return '';
  1840. }
  1841. return Diff.createTwoFilesPatch('info', 'info', rev1.details.rawInfo, rev2.details.rawInfo, rev1.rev.date, rev2.rev.date);
  1842. }
  1843. function descriptionDiff(rev1, rev2) {
  1844. if (rev1.details.description === rev2.details.description) {
  1845. return '';
  1846. }
  1847. return Diff.createTwoFilesPatch('description', 'description', rev1.details.description, rev2.details.description, rev1.rev.date, rev2.rev.date);
  1848. }
  1849.  
  1850.  
  1851. /***/ }),
  1852.  
  1853. /***/ "./src/index.ts":
  1854. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1855.  
  1856. "use strict";
  1857.  
  1858. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  1859. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  1860. return new (P || (P = Promise))(function (resolve, reject) {
  1861. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  1862. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  1863. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  1864. step((generator = generator.apply(thisArg, _arguments || [])).next());
  1865. });
  1866. };
  1867. Object.defineProperty(exports, "__esModule", ({ value: true }));
  1868. const $ = __webpack_require__("jquery");
  1869. const parser_1 = __webpack_require__("./src/parser.ts");
  1870. const compare_1 = __webpack_require__("./src/compare.ts");
  1871. function main() {
  1872. return __awaiter(this, void 0, void 0, function* () {
  1873. console.log('start bgm wiki rev differ UserScript');
  1874. yield initUI();
  1875. });
  1876. }
  1877. function initUI() {
  1878. return __awaiter(this, void 0, void 0, function* () {
  1879. $('#columnInSubjectA').prepend('<div id=show-trim21-cn></dev>');
  1880. $('#pagehistory li').each(function () {
  1881. const el = $(this);
  1882. try {
  1883. const rev = parser_1.parseRevEl(el);
  1884. el.prepend(`<input type="checkbox" class="rev-trim21-cn" name="rev" label="select to compare" value="${rev.id}">`);
  1885. }
  1886. catch (e) { }
  1887. });
  1888. $('#columnInSubjectA span.text').append('<a href="#;" id="compare-trim21-cn" tar class="l"> > 比较选中的版本</a>');
  1889. $('#compare-trim21-cn').on('click', function () {
  1890. const selectedRevs = getSelectedVersion();
  1891. compare_1.compare(selectedRevs[0], selectedRevs[1]);
  1892. });
  1893. $('head').append('<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/diff2html/bundles/css/diff2html.min.css" />');
  1894. });
  1895. }
  1896. function getSelectedVersion() {
  1897. const selectedVersion = [];
  1898. const selectedRev = $('.rev-trim21-cn:checked');
  1899. if (selectedRev.length < 2) {
  1900. window.alert('请选中两个版本进行比较');
  1901. }
  1902. if (selectedRev.length > 2) {
  1903. window.alert('只能比较两个版本');
  1904. }
  1905. selectedRev.each(function () {
  1906. const val = $(this).val();
  1907. selectedVersion.push(val);
  1908. });
  1909. selectedVersion.reverse();
  1910. return selectedVersion;
  1911. }
  1912. main().catch(console.error);
  1913.  
  1914.  
  1915. /***/ }),
  1916.  
  1917. /***/ "./src/model.ts":
  1918. /***/ (function(__unused_webpack_module, exports) {
  1919.  
  1920. "use strict";
  1921.  
  1922. Object.defineProperty(exports, "__esModule", ({ value: true }));
  1923. exports.Comment = void 0;
  1924. class Comment {
  1925. constructor(rev, detail) {
  1926. this.rev = rev;
  1927. this.details = detail;
  1928. }
  1929. }
  1930. exports.Comment = Comment;
  1931.  
  1932.  
  1933. /***/ }),
  1934.  
  1935. /***/ "./src/parser.ts":
  1936. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1937.  
  1938. "use strict";
  1939.  
  1940. Object.defineProperty(exports, "__esModule", ({ value: true }));
  1941. exports.getRevInfo = exports.parseRevEl = exports.parseRevDetails = void 0;
  1942. const $ = __webpack_require__("jquery");
  1943. function parseRevDetails(html) {
  1944. var _a, _b, _c, _d, _e, _f;
  1945. const jq = $(html);
  1946. const rawInfo = (_b = (_a = jq.find('#subject_infobox').val()) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : '';
  1947. const title = (_d = (_c = jq.find('input[name="subject_title"]').val()) === null || _c === void 0 ? void 0 : _c.toString()) !== null && _d !== void 0 ? _d : '';
  1948. const description = (_f = (_e = jq.find('textarea#subject_summary').val()) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : '';
  1949. return { title, rawInfo, description };
  1950. }
  1951. exports.parseRevDetails = parseRevDetails;
  1952. function parseRevEl(el) {
  1953. const date = el.find('a').first().html();
  1954. const revEL = el.find('a.l:contains("恢复")');
  1955. const revCommentEl = el.find('span.comment');
  1956. let comment = '';
  1957. if (revCommentEl.length > 0) {
  1958. comment = revCommentEl.html();
  1959. comment = comment.substring(1, comment.length - 1);
  1960. }
  1961. const revHref = revEL.attr('href');
  1962. if (!revHref) {
  1963. throw new Error();
  1964. }
  1965. const revID = revHref.split('/').pop();
  1966. if (!revID) {
  1967. throw new Error(`can't parse rev id from ${revHref}`);
  1968. }
  1969. return {
  1970. id: revID,
  1971. comment,
  1972. date,
  1973. url: revHref,
  1974. };
  1975. }
  1976. exports.parseRevEl = parseRevEl;
  1977. function getRevs() {
  1978. const revs = [];
  1979. $('#pagehistory li').each(function () {
  1980. const el = $(this);
  1981. try {
  1982. revs.push(parseRevEl(el));
  1983. }
  1984. catch (e) { }
  1985. });
  1986. return revs;
  1987. }
  1988. function getRevInfo(revID) {
  1989. for (const rev of getRevs()) {
  1990. if (rev.id === revID) {
  1991. return rev;
  1992. }
  1993. }
  1994. }
  1995. exports.getRevInfo = getRevInfo;
  1996.  
  1997.  
  1998. /***/ }),
  1999.  
  2000. /***/ "./src/ui.ts":
  2001. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2002.  
  2003. "use strict";
  2004.  
  2005. Object.defineProperty(exports, "__esModule", ({ value: true }));
  2006. exports.clear = exports.show = exports.render = void 0;
  2007. const Diff2Html = __webpack_require__("diff2html");
  2008. const $ = __webpack_require__("jquery");
  2009. function render(diff) {
  2010. return Diff2Html.html(diff);
  2011. }
  2012. exports.render = render;
  2013. function show(html) {
  2014. $('#show-trim21-cn').html(html);
  2015. }
  2016. exports.show = show;
  2017. function clear() {
  2018. $('#show-trim21-cn').html('');
  2019. }
  2020. exports.clear = clear;
  2021.  
  2022.  
  2023. /***/ }),
  2024.  
  2025. /***/ "./src/utils.ts":
  2026. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2027.  
  2028. "use strict";
  2029.  
  2030. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2031. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  2032. return new (P || (P = Promise))(function (resolve, reject) {
  2033. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  2034. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  2035. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  2036. step((generator = generator.apply(thisArg, _arguments || [])).next());
  2037. });
  2038. };
  2039. Object.defineProperty(exports, "__esModule", ({ value: true }));
  2040. exports.request = void 0;
  2041. const axios_1 = __webpack_require__("./node_modules/axios/index.js");
  2042. function request(url) {
  2043. return __awaiter(this, void 0, void 0, function* () {
  2044. const res = yield axios_1.default.get(url);
  2045. return res.data;
  2046. });
  2047. }
  2048. exports.request = request;
  2049.  
  2050.  
  2051. /***/ }),
  2052.  
  2053. /***/ "jquery":
  2054. /***/ (function(module) {
  2055.  
  2056. "use strict";
  2057. module.exports = $;
  2058.  
  2059. /***/ }),
  2060.  
  2061. /***/ "diff":
  2062. /***/ (function(module) {
  2063.  
  2064. "use strict";
  2065. module.exports = Diff;
  2066.  
  2067. /***/ }),
  2068.  
  2069. /***/ "diff2html":
  2070. /***/ (function(module) {
  2071.  
  2072. "use strict";
  2073. module.exports = Diff2Html;
  2074.  
  2075. /***/ })
  2076.  
  2077. /******/ });
  2078. /************************************************************************/
  2079. /******/ // The module cache
  2080. /******/ var __webpack_module_cache__ = {};
  2081. /******/
  2082. /******/ // The require function
  2083. /******/ function __webpack_require__(moduleId) {
  2084. /******/ // Check if module is in cache
  2085. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  2086. /******/ if (cachedModule !== undefined) {
  2087. /******/ return cachedModule.exports;
  2088. /******/ }
  2089. /******/ // Create a new module (and put it into the cache)
  2090. /******/ var module = __webpack_module_cache__[moduleId] = {
  2091. /******/ // no module.id needed
  2092. /******/ // no module.loaded needed
  2093. /******/ exports: {}
  2094. /******/ };
  2095. /******/
  2096. /******/ // Execute the module function
  2097. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  2098. /******/
  2099. /******/ // Return the exports of the module
  2100. /******/ return module.exports;
  2101. /******/ }
  2102. /******/
  2103. /************************************************************************/
  2104. /******/
  2105. /******/ // startup
  2106. /******/ // Load entry module and return exports
  2107. /******/ // This entry module is referenced by other modules so it can't be inlined
  2108. /******/ var __webpack_exports__ = __webpack_require__("./src/index.ts");
  2109. /******/
  2110. /******/ })()
  2111. ;